]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bfi.cxx
Added support for managing fov via the property manager so the --fov= option
[flightgear.git] / src / Main / bfi.cxx
index 531250958fe358ff716784cd3cf6cce5464d359b..63687fea0d9cc513f6d956a59fd5e9543fbd1c6d 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);
@@ -208,6 +209,7 @@ FGBFI::init ()
   fgTie("/environment/wind-down", getWindDown, setWindDown);
 
                                // View
+  fgTie("/sim/field-of-view", getFOV, setFOV);
   fgTie("/sim/view/axes/long", (double(*)())0, setViewAxisLong);
   fgTie("/sim/view/axes/lat", (double(*)())0, setViewAxisLat);
 
@@ -1049,6 +1051,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.
  */
@@ -1268,6 +1290,18 @@ FGBFI::setWindDown (double speed)
 // View.
 ////////////////////////////////////////////////////////////////////////
 
+double
+FGBFI::getFOV ()
+{
+  globals->get_current_view()->get_fov();
+}
+
+void
+FGBFI::setFOV (double fov)
+{
+  globals->get_current_view()->set_fov( fov );
+}
+
 void
 FGBFI::setViewAxisLong (double axis)
 {