// Local functions
////////////////////////////////////////////////////////////////////////
+
/**
* Initialize the BFI by binding its functions to properties.
*
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-dg", getAPHeadingDG, setAPHeadingDG, false);
fgTie("/autopilot/settings/heading-magnetic",
getAPHeadingMag, setAPHeadingMag);
fgTie("/autopilot/locks/nav1", getAPNAV1Lock, setAPNAV1Lock);
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);
{
return
(current_autopilot->get_HeadingEnabled() &&
- current_autopilot->get_HeadingMode() == FGAutopilot::FG_HEADING_LOCK);
+ current_autopilot->get_HeadingMode() == FGAutopilot::FG_DG_HEADING_LOCK);
}
// heading other than the current
// heading.
double heading = getAPHeadingMag();
- current_autopilot->set_HeadingMode(FGAutopilot::FG_HEADING_LOCK);
+ current_autopilot->set_HeadingMode(FGAutopilot::FG_DG_HEADING_LOCK);
current_autopilot->set_HeadingEnabled(true);
setAPHeadingMag(heading);
} else if (current_autopilot->get_HeadingMode() ==
- FGAutopilot::FG_HEADING_LOCK) {
+ FGAutopilot::FG_DG_HEADING_LOCK) {
current_autopilot->set_HeadingEnabled(false);
}
}
// 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)
{