From a363da927480226dd8fbe893e59c5f69da466d56 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 14 Aug 2010 19:29:02 +0100 Subject: [PATCH] Really fix bug 146 - angle units confusiuon. --- src/Cockpit/cockpit.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cockpit/cockpit.cxx b/src/Cockpit/cockpit.cxx index 2669ca1f8..a2f542cbc 100644 --- a/src/Cockpit/cockpit.cxx +++ b/src/Cockpit/cockpit.cxx @@ -26,6 +26,7 @@ #endif #include +#include #include #include @@ -245,7 +246,8 @@ float get_climb_rate( void ) float get_view_direction( void ) { double view_off = 360.0 - globals->get_current_view()->getHeadingOffset_deg(); - double view = SGMiscd::normalizeAngle2(fgGetDouble("/orientation/heading-deg") + view_off); + double view = fgGetDouble("/orientation/heading-deg") + view_off; + SG_NORMALIZE_RANGE(view, 0.0, 360.0); return view; } -- 2.39.5