From 307617de4328a90a5ada1cc7411168ac22a8387f Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Mon, 24 Oct 2011 23:15:59 +0300 Subject: [PATCH] Fixes #366 - compass angle --- map/location_state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/map/location_state.cpp b/map/location_state.cpp index 72e888928e..2ded0ff9e7 100644 --- a/map/location_state.cpp +++ b/map/location_state.cpp @@ -29,7 +29,8 @@ namespace location m_flags |= ECompass; m_headingRad = ((info.m_trueHeading >= 0.0) ? info.m_trueHeading : info.m_magneticHeading) - / 180 * math::pi; + / 180 * math::pi + - math::pi / 2; // 0 angle is for North ("up"), but in our coordinates it's to the right. m_headingAccuracyRad = info.m_accuracy / 180 * math::pi; }