]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bfi.cxx
More property manager interface updates.
[flightgear.git] / src / Main / bfi.cxx
index 1c4eec1d47d2e3e8bd7476824b12bb907454bcfc..639a7bcae9c6e2f6cf780cc08395239111ddc2b6 100644 (file)
@@ -90,13 +90,10 @@ reinit ()
   double apHeadingMag = FGBFI::getAPHeadingMag();
   bool apAltitudeLock = FGBFI::getAPAltitudeLock();
   double apAltitude = FGBFI::getAPAltitude();
-  const string &targetAirport = FGBFI::getTargetAirport();
   bool gpsLock = FGBFI::getGPSLock();
   // double gpsLatitude = FGBFI::getGPSTargetLatitude();
   // double gpsLongitude = FGBFI::getGPSTargetLongitude();
 
-  FGBFI::setTargetAirport("");
-
   fgReInitSubsystems();
 
                                // FIXME: this is wrong.
@@ -115,7 +112,6 @@ reinit ()
   FGBFI::setAPHeadingMag(apHeadingMag);
   FGBFI::setAPAltitudeLock(apAltitudeLock);
   FGBFI::setAPAltitude(apAltitude);
-  FGBFI::setTargetAirport(targetAirport);
   FGBFI::setGPSLock(gpsLock);
 
   _needReinit = false;
@@ -211,25 +207,21 @@ FGBFI::init ()
 {
   FG_LOG(FG_GENERAL, FG_INFO, "Starting BFI init");
                                // Simulation
-//   fgTie("/sim/flight-model", getFlightModel, setFlightModel);
-//   fgTie("/sim/aircraft", getAircraft, setAircraft);
   fgTie("/sim/aircraft-dir", getAircraftDir, setAircraftDir);
   fgTie("/sim/time/gmt", getDateString, setDateString);
   fgTie("/sim/time/gmt-string", getGMTString);
-//   fgTie("/sim/hud/visibility", getHUDVisible, setHUDVisible);
 
                                // Position
-//   fgTie("/position/airport-id", getTargetAirport, setTargetAirport);
-  fgTie("/position/latitude", getLatitude, setLatitude);
-  fgTie("/position/longitude", getLongitude, setLongitude);
-  fgTie("/position/altitude", getAltitude, setAltitude);
-  fgTie("/position/altitude-agl", getAGL);
+//   fgTie("/position/latitude", getLatitude, setLatitude);
+//   fgTie("/position/longitude", getLongitude, setLongitude);
+//   fgTie("/position/altitude", getAltitude, setAltitude);
+//   fgTie("/position/altitude-agl", getAGL);
 
                                // Orientation
-  fgTie("/orientation/heading", getHeading, setHeading);
+//   fgTie("/orientation/heading", getHeading, setHeading);
   fgTie("/orientation/heading-magnetic", getHeadingMag);
-  fgTie("/orientation/pitch", getPitch, setPitch);
-  fgTie("/orientation/roll", getRoll, setRoll);
+//   fgTie("/orientation/pitch", getPitch, setPitch);
+//   fgTie("/orientation/roll", getRoll, setRoll);
 
                                // Engine
   fgTie("/engines/engine0/rpm", getRPM);
@@ -238,12 +230,12 @@ FGBFI::init ()
   fgTie("/engines/engine0/mp", getMP);
 
                                // Velocities
-  fgTie("/velocities/airspeed", getAirspeed, setAirspeed);
-  fgTie("/velocities/side-slip", getSideSlip);
-  fgTie("/velocities/vertical-speed", getVerticalSpeed);
-  fgTie("/velocities/speed-north", getSpeedNorth);
-  fgTie("/velocities/speed-east", getSpeedEast);
-  fgTie("/velocities/speed-down", getSpeedDown);
+//   fgTie("/velocities/airspeed", getAirspeed, setAirspeed);
+//   fgTie("/velocities/side-slip", getSideSlip);
+//   fgTie("/velocities/vertical-speed", getVerticalSpeed);
+//   fgTie("/velocities/speed-north", getSpeedNorth);
+//   fgTie("/velocities/speed-east", getSpeedEast);
+//   fgTie("/velocities/speed-down", getSpeedDown);
 
                                // Autopilot
   fgTie("/autopilot/locks/altitude", getAPAltitudeLock, setAPAltitudeLock);
@@ -298,65 +290,13 @@ FGBFI::update ()
 ////////////////////////////////////////////////////////////////////////
 
 
-/**
- * Return the flight model as an integer.
- *
- * TODO: use a string instead.
- */
-int
-FGBFI::getFlightModel ()
-{
-  return globals->get_options()->get_flight_model();
-}
-
-
-/**
- * Return the current aircraft as a string.
- */
-string
-FGBFI::getAircraft ()
-{
-  _temp = globals->get_options()->get_aircraft();
-  return _temp;
-}
-
-
 /**
  * Return the current aircraft directory (UIUC) as a string.
  */
 string 
 FGBFI::getAircraftDir ()
 {
-  _temp = aircraft_dir;
-  return _temp;
-}
-
-
-/**
- * Set the flight model as an integer.
- *
- * TODO: use a string instead.
- */
-void
-FGBFI::setFlightModel (int model)
-{
-  if (getFlightModel() != model) {
-    globals->get_options()->set_flight_model(model);
-    needReinit();
-  }
-}
-
-
-/**
- * Set the current aircraft.
- */
-void
-FGBFI::setAircraft (string aircraft)
-{
-  if (getAircraft() != aircraft) {
-    globals->get_options()->set_aircraft(aircraft);
-    needReinit();
-  }
+  return aircraft_dir;
 }
 
 
@@ -453,26 +393,6 @@ FGBFI::getGMTString ()
 }
 
 
-/**
- * Return true if the HUD is visible.
- */
-bool
-FGBFI::getHUDVisible ()
-{
-  return globals->get_options()->get_hud_status();
-}
-
-
-/**
- * Ensure that the HUD is visible or hidden.
- */
-void
-FGBFI::setHUDVisible (bool visible)
-{
-  globals->get_options()->set_hud_status(visible);
-}
-
-
 \f
 ////////////////////////////////////////////////////////////////////////
 // Position
@@ -1282,30 +1202,6 @@ FGBFI::setGPSLock (bool lock)
 }
 
 
-/**
- * Get the GPS target airport code.
- */
-string 
-FGBFI::getTargetAirport ()
-{
-  // FIXME: not thread-safe
-  static string out;
-  out = globals->get_options()->get_airport_id();
-
-  return out;
-}
-
-
-/**
- * Set the GPS target airport code.
- */
-void
-FGBFI::setTargetAirport (string airportId)
-{
-  globals->get_options()->set_airport_id(airportId);
-}
-
-
 /**
  * Get the GPS target latitude in degrees (negative for south).
  */