]> git.mxchange.org Git - flightgear.git/commitdiff
Corrected so that deflections are reversed on ILS backcourse.
authordavid <david>
Tue, 1 Oct 2002 23:28:17 +0000 (23:28 +0000)
committerdavid <david>
Tue, 1 Oct 2002 23:28:17 +0000 (23:28 +0000)
src/Cockpit/navcom.cxx

index 98055b03a885e8f36bffd62ce5ab3ec93f5a929d..8b35fc7894b354a84c9bc268b76c6c9ce611e475 100644 (file)
@@ -550,6 +550,9 @@ void FGNavCom::search()
 double FGNavCom::get_nav_heading_needle_deflection() const {
     double r;
 
+    std::cout << "Nav heading is " << nav_heading << std::endl;
+    std::cout << "Nav radial is " << nav_radial << std::endl;
+
     if ( nav_inrange ) {
         r = nav_heading - nav_radial;
        // cout << "Radial = " << nav_radial 
@@ -557,12 +560,8 @@ double FGNavCom::get_nav_heading_needle_deflection() const {
     
        while ( r >  180.0 ) { r -= 360.0;}
        while ( r < -180.0 ) { r += 360.0;}
-       if ( fabs(r) > 90.0 ) {
+       if ( fabs(r) > 90.0 )
            r = ( r<0.0 ? -r-180.0 : -r+180.0 );
-           if ( nav_loc ) {
-               r = -r;
-           }
-       }
 
        // According to Robin Peel, the ILS is 4x more sensitive than a vor
        if ( nav_loc ) { r *= 4.0; }