X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fbfi.cxx;h=63687fea0d9cc513f6d956a59fd5e9543fbd1c6d;hb=7a4da944253124295957728d9e8e550ddbb913d7;hp=531250958fe358ff716784cd3cf6cce5464d359b;hpb=2cd7473384ec231e2a013b280e83919b98ed2a15;p=flightgear.git diff --git a/src/Main/bfi.cxx b/src/Main/bfi.cxx index 531250958..63687fea0 100644 --- a/src/Main/bfi.cxx +++ b/src/Main/bfi.cxx @@ -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) {