]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bfi.cxx
Changes to make the default autopilot heading hold work much more like a C172
[flightgear.git] / src / Main / bfi.cxx
index 531250958fe358ff716784cd3cf6cce5464d359b..8b749b2bdee84887e6d8021057b00c9a946b2ca7 100644 (file)
@@ -197,6 +197,7 @@ FGBFI::init ()
   fgTie("/autopilot/settings/altitude", getAPAltitude, setAPAltitude);
   fgTie("/autopilot/locks/heading", getAPHeadingLock, setAPHeadingLock);
   fgTie("/autopilot/settings/heading", getAPHeading, setAPHeading);
+  fgTie("/autopilot/settings/heading-dg", getAPHeadingDG, setAPHeadingDG);
   fgTie("/autopilot/settings/heading-magnetic",
              getAPHeadingMag, setAPHeadingMag);
   fgTie("/autopilot/locks/nav1", getAPNAV1Lock, setAPNAV1Lock);
@@ -1049,6 +1050,26 @@ FGBFI::setAPHeading (double heading)
 }
 
 
+/**
+ * Get the autopilot DG target heading in degrees.
+ */
+double
+FGBFI::getAPHeadingDG ()
+{
+  return current_autopilot->get_DGTargetHeading();
+}
+
+
+/**
+ * Set the autopilot DG target heading in degrees.
+ */
+void
+FGBFI::setAPHeadingDG (double heading)
+{
+  current_autopilot->set_DGTargetHeading( heading );
+}
+
+
 /**
  * Get the autopilot target heading in degrees.
  */