]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/newauto.cxx
Patch from Melchior Franz:
[flightgear.git] / src / Autopilot / newauto.cxx
index 9c89c4cbf90f773921c78863bfb6545d6b28945e..a2d188a6adbbd5e4d20df4bc87690877a8f36b40 100644 (file)
@@ -256,6 +256,7 @@ void FGAutopilot::init ()
     altitude_hold = false ;     // turn the altitude hold off
     auto_throttle = false ;    // turn the auto throttle off
     heading_mode = DEFAULT_AP_HEADING_LOCK;
+    altitude_mode = DEFAULT_AP_ALTITUDE_LOCK;
 
     DGTargetHeading = fgGetDouble("/autopilot/settings/heading-bug-deg");
     TargetHeading = fgGetDouble("/autopilot/settings/heading-bug-deg");
@@ -596,8 +597,10 @@ FGAutopilot::update (int dt)
            // figure out how far off we are from desired heading
 
            // Now it is time to deterime how far we should be rolled.
-           SG_LOG( SG_AUTOPILOT, SG_DEBUG, "RelHeading: " << RelHeading );
-
+           SG_LOG( SG_AUTOPILOT, SG_DEBUG,
+                    "Heading = " << heading_node->getDoubleValue() <<
+                    " TargetHeading = " << TargetHeading <<
+                    " RelHeading = " << RelHeading );
 
            // Check if we are further from heading than the roll out point
            if ( fabs( RelHeading ) > RollOut ) {