]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/adf.cxx
Fix my mailing address by replacing it with my web page.
[flightgear.git] / src / Instrumentation / adf.cxx
index e6d02a1400dd0ce2fafa028ac52ab19c2d70e3e2..e5303db019f7673c6668d67c4b757d7de834bd22 100644 (file)
@@ -75,9 +75,9 @@ ADF::ADF (SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in adf config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in adf config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
@@ -131,8 +131,6 @@ ADF::init ()
     std::ostringstream temp;
     temp << name << num;
     adf_ident = temp.str();
-
-    _serviceable_node->setBoolValue(true);
 }
 
 void
@@ -291,13 +289,11 @@ ADF::set_bearing (double dt, double bearing_deg)
 {
     double old_bearing_deg = _bearing_node->getDoubleValue();
 
-    bearing_deg += _error_node->getDoubleValue();
-
     while ((bearing_deg - old_bearing_deg) >= 180)
         old_bearing_deg += 360;
     while ((bearing_deg - old_bearing_deg) <= -180)
         old_bearing_deg -= 360;
-
+    bearing_deg += _error_node->getDoubleValue();
     bearing_deg =
         fgGetLowPass(old_bearing_deg, bearing_deg, dt * RESPONSIVENESS);