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; }