1 // bfi.cxx - Big Friendly Interface implementation
3 // Written by David Megginson, started February, 2000.
5 // Copyright (C) 2000 David Megginson - david@megginson.com
7 // THIS CLASS IS DEPRECATED; USE THE PROPERTY MANAGER INSTEAD.
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License as
11 // published by the Free Software Foundation; either version 2 of the
12 // License, or (at your option) any later version.
14 // This program is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <simgear/constants.h>
28 #include <simgear/debug/logstream.hxx>
29 #include <simgear/ephemeris/ephemeris.hxx>
30 #include <simgear/math/sg_types.hxx>
31 #include <simgear/misc/props.hxx>
32 #include <simgear/timing/sg_time.hxx>
34 #include <Aircraft/aircraft.hxx>
35 #include <FDM/UIUCModel/uiuc_aircraftdir.h>
36 #include <Controls/controls.hxx>
37 #include <Autopilot/newauto.hxx>
38 #include <Scenery/scenery.hxx>
39 #include <Time/light.hxx>
40 #include <Time/event.hxx>
41 #include <Time/sunpos.hxx>
42 #include <Time/tmp.hxx>
43 #include <Cockpit/radiostack.hxx>
44 #include <Cockpit/panel.hxx>
45 #ifndef FG_OLD_WEATHER
46 # include <WeatherCM/FGLocalWeatherDatabase.h>
48 # include <Weather/weather.hxx>
51 #include "globals.hxx"
52 #include "fg_init.hxx"
53 #include "fg_props.hxx"
55 FG_USING_NAMESPACE(std);
62 ////////////////////////////////////////////////////////////////////////
64 ////////////////////////////////////////////////////////////////////////
66 // Yech -- not thread-safe, etc. etc.
67 static bool _needReinit = false;
70 static inline void needReinit ()
77 * Reinitialize FGFS to use the new BFI settings.
82 // Save the state of everything
83 // that's going to get clobbered
84 // when we reinit the subsystems.
86 FG_LOG(FG_GENERAL, FG_INFO, "Starting BFI reinit");
88 // TODO: add more AP stuff
89 bool apHeadingLock = FGBFI::getAPHeadingLock();
90 double apHeadingMag = FGBFI::getAPHeadingMag();
91 bool apAltitudeLock = FGBFI::getAPAltitudeLock();
92 double apAltitude = FGBFI::getAPAltitude();
93 bool gpsLock = FGBFI::getGPSLock();
94 // double gpsLatitude = FGBFI::getGPSTargetLatitude();
95 // double gpsLongitude = FGBFI::getGPSTargetLongitude();
99 // FIXME: this is wrong.
100 // All of these are scheduled events,
101 // and it should be possible to force
102 // them all to run once.
105 cur_light_params.Update();
107 fgUpdateWeatherDatabase();
108 current_radiostack->search();
110 // Restore all of the old states.
111 FGBFI::setAPHeadingLock(apHeadingLock);
112 FGBFI::setAPHeadingMag(apHeadingMag);
113 FGBFI::setAPAltitudeLock(apAltitudeLock);
114 FGBFI::setAPAltitude(apAltitude);
115 FGBFI::setGPSLock(gpsLock);
119 FG_LOG(FG_GENERAL, FG_INFO, "Ending BFI reinit");
123 // Allow the view to be set from two axes (i.e. a joystick hat)
124 // This needs to be in FGViewer itself, somehow.
125 static double axisLong = 0.0;
126 static double axisLat = 0.0;
129 _set_view_from_axes ()
131 // Take no action when hat is centered
132 if (axisLong == 0 && axisLat == 0)
137 if (axisLong < 0) { // Longitudinal axis forward
140 else if (axisLat > 0)
144 } else if (axisLong > 0) { // Longitudinal axis backward
147 else if (axisLat > 0)
151 } else { // Longitudinal axis neutral
158 globals->get_current_view()->set_goal_view_offset(viewDir*DEG_TO_RAD);
159 // globals->get_current_view()->set_view_offset(viewDir*DEG_TO_RAD);
166 ////////////////////////////////////////////////////////////////////////
168 ////////////////////////////////////////////////////////////////////////
171 * Initialize the BFI by binding its functions to properties.
173 * TODO: perhaps these should migrate into the individual modules
174 * (i.e. they should register themselves).
179 FG_LOG(FG_GENERAL, FG_INFO, "Starting BFI init");
182 fgTie("/sim/aircraft-dir", getAircraftDir, setAircraftDir);
183 fgTie("/sim/time/gmt", getDateString, setDateString);
184 fgTie("/sim/time/gmt-string", getGMTString);
187 fgTie("/orientation/heading-magnetic", getHeadingMag);
190 fgTie("/engines/engine0/rpm", getRPM);
191 fgTie("/engines/engine0/egt", getEGT);
192 fgTie("/engines/engine0/cht", getCHT);
193 fgTie("/engines/engine0/mp", getMP);
196 fgTie("/autopilot/locks/altitude", getAPAltitudeLock, setAPAltitudeLock);
197 fgTie("/autopilot/settings/altitude", getAPAltitude, setAPAltitude);
198 fgTie("/autopilot/locks/heading", getAPHeadingLock, setAPHeadingLock);
199 fgTie("/autopilot/settings/heading", getAPHeading, setAPHeading);
200 fgTie("/autopilot/settings/heading-magnetic",
201 getAPHeadingMag, setAPHeadingMag);
202 fgTie("/autopilot/locks/nav1", getAPNAV1Lock, setAPNAV1Lock);
205 fgTie("/environment/visibility", getVisibility, setVisibility);
206 fgTie("/environment/wind-north", getWindNorth, setWindNorth);
207 fgTie("/environment/wind-east", getWindEast, setWindEast);
208 fgTie("/environment/wind-down", getWindDown, setWindDown);
211 fgTie("/sim/view/axes/long", (double(*)())0, setViewAxisLong);
212 fgTie("/sim/view/axes/lat", (double(*)())0, setViewAxisLat);
216 FG_LOG(FG_GENERAL, FG_INFO, "Ending BFI init");
221 * Reinitialize FGFS if required.
223 * Some changes (especially those in aircraft position) require that
224 * FGFS be reinitialized afterwards. Rather than reinitialize after
225 * every change, the setter methods simply set a flag so that there
226 * can be a single reinit at the end of the frame.
231 _set_view_from_axes();
239 ////////////////////////////////////////////////////////////////////////
241 ////////////////////////////////////////////////////////////////////////
245 * Return the current aircraft directory (UIUC) as a string.
248 FGBFI::getAircraftDir ()
255 * Set the current aircraft directory (UIUC).
258 FGBFI::setAircraftDir (string dir)
260 if (getAircraftDir() != dir) {
268 * Return the current Zulu time.
271 FGBFI::getDateString ()
275 struct tm * t = globals->get_time_params()->getGmt();
276 sprintf(buf, "%.4d-%.2d-%.2dT%.2d:%.2d:%.2d",
277 t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
278 t->tm_hour, t->tm_min, t->tm_sec);
285 * Set the current Zulu time.
288 FGBFI::setDateString (string date_string)
289 // FGBFI::setTimeGMT (time_t time)
291 SGTime * st = globals->get_time_params();
292 struct tm * current_time = st->getGmt();
295 // Scan for basic ISO format
296 // YYYY-MM-DDTHH:MM:SS
297 int ret = sscanf(date_string.c_str(), "%d-%d-%dT%d:%d:%d",
298 &(new_time.tm_year), &(new_time.tm_mon),
299 &(new_time.tm_mday), &(new_time.tm_hour),
300 &(new_time.tm_min), &(new_time.tm_sec));
302 // Be pretty picky about this, so
303 // that strange things don't happen
304 // if the save file has been edited
307 FG_LOG(FG_INPUT, FG_ALERT, "Date/time string " << date_string
308 << " not in YYYY-MM-DDTHH:MM:SS format; skipped");
312 // OK, it looks like we got six
313 // values, one way or another.
314 new_time.tm_year -= 1900;
315 new_time.tm_mon -= 1;
317 // Now, tell flight gear to use
318 // the new time. This was far
319 // too difficult, by the way.
321 mktime(&new_time) - mktime(current_time) + globals->get_warp();
322 double lon = current_aircraft.fdm_state->get_Longitude();
323 double lat = current_aircraft.fdm_state->get_Latitude();
324 double alt = current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER;
325 globals->set_warp(warp);
326 st->update(lon, lat, warp);
327 fgUpdateSkyAndLightingParams();
332 * Return the GMT as a string.
335 FGBFI::getGMTString ()
339 struct tm * t = globals->get_time_params()->getGmt();
340 sprintf(buf, " %.2d:%.2d:%.2d",
341 t->tm_hour, t->tm_min, t->tm_sec);
348 ////////////////////////////////////////////////////////////////////////
350 ////////////////////////////////////////////////////////////////////////
354 * Return the current latitude in degrees (negative for south).
357 FGBFI::getLatitude ()
359 return current_aircraft.fdm_state->get_Latitude() * RAD_TO_DEG;
364 * Set the current latitude in degrees (negative for south).
367 FGBFI::setLatitude (double latitude)
369 current_aircraft.fdm_state->set_Latitude(latitude * DEG_TO_RAD);
374 * Return the current longitude in degrees (negative for west).
377 FGBFI::getLongitude ()
379 return current_aircraft.fdm_state->get_Longitude() * RAD_TO_DEG;
384 * Set the current longitude in degrees (negative for west).
387 FGBFI::setLongitude (double longitude)
389 current_aircraft.fdm_state->set_Longitude(longitude * DEG_TO_RAD);
394 * Return the current altitude in feet.
397 FGBFI::getAltitude ()
399 return current_aircraft.fdm_state->get_Altitude();
405 * Return the current altitude in above the terrain.
410 return current_aircraft.fdm_state->get_Altitude()
411 - (scenery.cur_elev * METER_TO_FEET);
416 * Set the current altitude in feet.
419 FGBFI::setAltitude (double altitude)
421 current_aircraft.fdm_state->set_Altitude(altitude);
426 ////////////////////////////////////////////////////////////////////////
428 ////////////////////////////////////////////////////////////////////////
432 * Return the current heading in degrees.
437 return current_aircraft.fdm_state->get_Psi() * RAD_TO_DEG;
442 * Return the current heading in degrees.
445 FGBFI::getHeadingMag ()
447 return current_aircraft.fdm_state->get_Psi() * RAD_TO_DEG - getMagVar();
452 * Set the current heading in degrees.
455 FGBFI::setHeading (double heading)
457 FGInterface * fdm = current_aircraft.fdm_state;
458 fdm->set_Euler_Angles(fdm->get_Phi(), fdm->get_Theta(),
459 heading * DEG_TO_RAD);
464 * Return the current pitch in degrees.
469 return current_aircraft.fdm_state->get_Theta() * RAD_TO_DEG;
474 * Set the current pitch in degrees.
477 FGBFI::setPitch (double pitch)
479 FGInterface * fdm = current_aircraft.fdm_state;
480 fdm->set_Euler_Angles(fdm->get_Phi(), pitch * DEG_TO_RAD, fdm->get_Psi());
485 * Return the current roll in degrees.
490 return current_aircraft.fdm_state->get_Phi() * RAD_TO_DEG;
495 * Set the current roll in degrees.
498 FGBFI::setRoll (double roll)
500 FGInterface * fdm = current_aircraft.fdm_state;
501 fdm->set_Euler_Angles(roll * DEG_TO_RAD, fdm->get_Theta(), fdm->get_Psi());
506 * Return the current engine0 rpm
511 if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
512 return current_aircraft.fdm_state->get_engine(0)->get_RPM();
520 * Set the current engine0 rpm
523 FGBFI::setRPM (double rpm)
525 if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
526 if (getRPM() != rpm) {
527 current_aircraft.fdm_state->get_engine(0)->set_RPM( rpm );
534 * Return the current engine0 EGT.
539 if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
540 return current_aircraft.fdm_state->get_engine(0)->get_EGT();
548 * Return the current engine0 CHT.
553 if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
554 return current_aircraft.fdm_state->get_engine(0)->get_CHT();
562 * Return the current engine0 CHT.
567 if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
568 return current_aircraft.fdm_state->get_engine(0)->get_Manifold_Pressure();
576 ////////////////////////////////////////////////////////////////////////
578 ////////////////////////////////////////////////////////////////////////
582 * Return the current airspeed in knots.
585 FGBFI::getAirspeed ()
587 // FIXME: should we add speed-up?
588 return current_aircraft.fdm_state->get_V_calibrated_kts();
593 * Set the calibrated airspeed in knots.
596 FGBFI::setAirspeed (double speed)
598 current_aircraft.fdm_state->set_V_calibrated_kts(speed);
603 * Return the current sideslip (FIXME: units unknown).
606 FGBFI::getSideSlip ()
608 return current_aircraft.fdm_state->get_Beta();
613 * Return the current climb rate in feet/minute
616 FGBFI::getVerticalSpeed ()
618 // What about meters?
619 return current_aircraft.fdm_state->get_Climb_Rate() * 60.0;
624 * Get the current north velocity (units??).
627 FGBFI::getSpeedNorth ()
629 return current_aircraft.fdm_state->get_V_north();
634 // * Set the current north velocity (units??).
637 // FGBFI::setSpeedNorth (double speed)
639 // FGInterface * fdm = current_aircraft.fdm_state;
640 // // fdm->set_Velocities_Local(speed, fdm->get_V_east(), fdm->get_V_down());
645 * Get the current east velocity (units??).
648 FGBFI::getSpeedEast ()
650 return current_aircraft.fdm_state->get_V_east();
655 // * Set the current east velocity (units??).
658 // FGBFI::setSpeedEast (double speed)
660 // FGInterface * fdm = current_aircraft.fdm_state;
661 // // fdm->set_Velocities_Local(fdm->get_V_north(), speed, fdm->get_V_down());
666 * Get the current down velocity (units??).
669 FGBFI::getSpeedDown ()
671 return current_aircraft.fdm_state->get_V_down();
676 // * Set the current down velocity (units??).
679 // FGBFI::setSpeedDown (double speed)
681 // FGInterface * fdm = current_aircraft.fdm_state;
682 // // fdm->set_Velocities_Local(fdm->get_V_north(), fdm->get_V_east(), speed);
687 ////////////////////////////////////////////////////////////////////////
689 ////////////////////////////////////////////////////////////////////////
694 * Get the throttle setting, from 0.0 (none) to 1.0 (full).
697 FGBFI::getThrottle ()
699 // FIXME: add engine selector
700 return controls.get_throttle(0);
705 * Set the throttle, from 0.0 (none) to 1.0 (full).
708 FGBFI::setThrottle (double throttle)
710 // FIXME: allow engine selection
711 controls.set_throttle(0, throttle);
716 * Get the fuel mixture setting, from 0.0 (none) to 1.0 (full).
721 // FIXME: add engine selector
722 return controls.get_mixture(0);
727 * Set the fuel mixture, from 0.0 (none) to 1.0 (full).
730 FGBFI::setMixture (double mixture)
732 // FIXME: allow engine selection
733 controls.set_mixture(0, mixture);
738 * Get the propellor pitch setting, from 0.0 (none) to 1.0 (full).
741 FGBFI::getPropAdvance ()
743 // FIXME: add engine selector
744 return controls.get_prop_advance(0);
749 * Set the propellor pitch, from 0.0 (none) to 1.0 (full).
752 FGBFI::setPropAdvance (double pitch)
754 // FIXME: allow engine selection
755 controls.set_prop_advance(0, pitch);
760 * Get the flaps setting, from 0.0 (none) to 1.0 (full).
765 return controls.get_flaps();
770 * Set the flaps, from 0.0 (none) to 1.0 (full).
773 FGBFI::setFlaps (double flaps)
776 controls.set_flaps(flaps);
781 * Get the aileron, from -1.0 (left) to 1.0 (right).
786 return controls.get_aileron();
791 * Set the aileron, from -1.0 (left) to 1.0 (right).
794 FGBFI::setAileron (double aileron)
797 controls.set_aileron(aileron);
802 * Get the rudder setting, from -1.0 (left) to 1.0 (right).
807 return controls.get_rudder();
812 * Set the rudder, from -1.0 (left) to 1.0 (right).
815 FGBFI::setRudder (double rudder)
818 controls.set_rudder(rudder);
823 * Get the elevator setting, from -1.0 (down) to 1.0 (up).
826 FGBFI::getElevator ()
828 return controls.get_elevator();
833 * Set the elevator, from -1.0 (down) to 1.0 (up).
836 FGBFI::setElevator (double elevator)
839 controls.set_elevator(elevator);
844 * Get the elevator trim, from -1.0 (down) to 1.0 (up).
847 FGBFI::getElevatorTrim ()
849 return controls.get_elevator_trim();
854 * Set the elevator trim, from -1.0 (down) to 1.0 (up).
857 FGBFI::setElevatorTrim (double trim)
860 controls.set_elevator_trim(trim);
865 * Get the highest brake setting, from 0.0 (none) to 1.0 (full).
870 double b1 = getCenterBrake();
871 double b2 = getLeftBrake();
872 double b3 = getRightBrake();
873 return (b1 > b2 ? (b1 > b3 ? b1 : b3) : (b2 > b3 ? b2 : b3));
878 * Set all brakes, from 0.0 (none) to 1.0 (full).
881 FGBFI::setBrakes (double brake)
883 setCenterBrake(brake);
885 setRightBrake(brake);
890 * Get the center brake, from 0.0 (none) to 1.0 (full).
893 FGBFI::getCenterBrake ()
895 return controls.get_brake(2);
900 * Set the center brake, from 0.0 (none) to 1.0 (full).
903 FGBFI::setCenterBrake (double brake)
905 controls.set_brake(2, brake);
910 * Get the left brake, from 0.0 (none) to 1.0 (full).
913 FGBFI::getLeftBrake ()
915 return controls.get_brake(0);
920 * Set the left brake, from 0.0 (none) to 1.0 (full).
923 FGBFI::setLeftBrake (double brake)
925 controls.set_brake(0, brake);
930 * Get the right brake, from 0.0 (none) to 1.0 (full).
933 FGBFI::getRightBrake ()
935 return controls.get_brake(1);
940 * Set the right brake, from 0.0 (none) to 1.0 (full).
943 FGBFI::setRightBrake (double brake)
945 controls.set_brake(1, brake);
952 ////////////////////////////////////////////////////////////////////////
954 ////////////////////////////////////////////////////////////////////////
958 * Get the autopilot altitude lock (true=on).
961 FGBFI::getAPAltitudeLock ()
963 return current_autopilot->get_AltitudeEnabled();
968 * Set the autopilot altitude lock (true=on).
971 FGBFI::setAPAltitudeLock (bool lock)
973 current_autopilot->set_AltitudeMode(FGAutopilot::FG_ALTITUDE_LOCK);
974 current_autopilot->set_AltitudeEnabled(lock);
979 * Get the autopilot target altitude in feet.
982 FGBFI::getAPAltitude ()
984 return current_autopilot->get_TargetAltitude() * METER_TO_FEET;
989 * Set the autopilot target altitude in feet.
992 FGBFI::setAPAltitude (double altitude)
994 current_autopilot->set_TargetAltitude( altitude );
999 * Get the autopilot heading lock (true=on).
1002 FGBFI::getAPHeadingLock ()
1005 (current_autopilot->get_HeadingEnabled() &&
1006 current_autopilot->get_HeadingMode() == FGAutopilot::FG_HEADING_LOCK);
1011 * Set the autopilot heading lock (true=on).
1014 FGBFI::setAPHeadingLock (bool lock)
1017 // We need to do this so that
1018 // it's possible to lock onto a
1019 // heading other than the current
1021 double heading = getAPHeadingMag();
1022 current_autopilot->set_HeadingMode(FGAutopilot::FG_HEADING_LOCK);
1023 current_autopilot->set_HeadingEnabled(true);
1024 setAPHeadingMag(heading);
1025 } else if (current_autopilot->get_HeadingMode() ==
1026 FGAutopilot::FG_HEADING_LOCK) {
1027 current_autopilot->set_HeadingEnabled(false);
1033 * Get the autopilot target heading in degrees.
1036 FGBFI::getAPHeading ()
1038 return current_autopilot->get_TargetHeading();
1043 * Set the autopilot target heading in degrees.
1046 FGBFI::setAPHeading (double heading)
1048 current_autopilot->set_TargetHeading( heading );
1053 * Get the autopilot target heading in degrees.
1056 FGBFI::getAPHeadingMag ()
1058 return current_autopilot->get_TargetHeading() - getMagVar();
1063 * Set the autopilot target heading in degrees.
1066 FGBFI::setAPHeadingMag (double heading)
1068 current_autopilot->set_TargetHeading( heading + getMagVar() );
1073 * Return true if the autopilot is locked to NAV1.
1076 FGBFI::getAPNAV1Lock ()
1079 (current_autopilot->get_HeadingEnabled() &&
1080 current_autopilot->get_HeadingMode() == FGAutopilot::FG_HEADING_NAV1);
1085 * Set the autopilot NAV1 lock.
1088 FGBFI::setAPNAV1Lock (bool lock)
1091 current_autopilot->set_HeadingMode(FGAutopilot::FG_HEADING_NAV1);
1092 current_autopilot->set_HeadingEnabled(true);
1093 } else if (current_autopilot->get_HeadingMode() ==
1094 FGAutopilot::FG_HEADING_NAV1) {
1095 current_autopilot->set_HeadingEnabled(false);
1101 ////////////////////////////////////////////////////////////////////////
1103 ////////////////////////////////////////////////////////////////////////
1107 * Get the autopilot GPS lock (true=on).
1110 FGBFI::getGPSLock ()
1112 return (current_autopilot->get_HeadingEnabled() &&
1113 (current_autopilot->get_HeadingMode() ==
1114 FGAutopilot::FG_HEADING_WAYPOINT ));
1119 * Set the autopilot GPS lock (true=on).
1122 FGBFI::setGPSLock (bool lock)
1125 current_autopilot->set_HeadingMode(FGAutopilot::FG_HEADING_WAYPOINT);
1126 current_autopilot->set_HeadingEnabled(true);
1127 } else if (current_autopilot->get_HeadingMode() ==
1128 FGAutopilot::FG_HEADING_WAYPOINT) {
1129 current_autopilot->set_HeadingEnabled(false);
1135 * Get the GPS target latitude in degrees (negative for south).
1138 FGBFI::getGPSTargetLatitude ()
1140 return current_autopilot->get_TargetLatitude();
1145 * Get the GPS target longitude in degrees (negative for west).
1148 FGBFI::getGPSTargetLongitude ()
1150 return current_autopilot->get_TargetLongitude();
1155 * Set the GPS target longitude in degrees (negative for west).
1158 FGBFI::setGPSTargetLongitude (double longitude)
1160 current_autopilot->set_TargetLongitude( longitude );
1166 ////////////////////////////////////////////////////////////////////////
1168 ////////////////////////////////////////////////////////////////////////
1172 * Get the current visibility (meters).
1175 FGBFI::getVisibility ()
1177 #ifndef FG_OLD_WEATHER
1178 return WeatherDatabase->getWeatherVisibility();
1180 return current_weather.get_visibility();
1186 * Set the current visibility (meters).
1189 FGBFI::setVisibility (double visibility)
1191 #ifndef FG_OLD_WEATHER
1192 WeatherDatabase->setWeatherVisibility(visibility);
1194 current_weather.set_visibility(visibility);
1200 * Get the current wind north velocity (feet/second).
1203 FGBFI::getWindNorth ()
1205 return current_aircraft.fdm_state->get_V_north_airmass();
1210 * Set the current wind north velocity (feet/second).
1213 FGBFI::setWindNorth (double speed)
1215 current_aircraft.fdm_state->set_Velocities_Local_Airmass(speed,
1222 * Get the current wind east velocity (feet/second).
1225 FGBFI::getWindEast ()
1227 return current_aircraft.fdm_state->get_V_east_airmass();
1232 * Set the current wind east velocity (feet/second).
1235 FGBFI::setWindEast (double speed)
1237 cout << "Set wind-east to " << speed << endl;
1238 current_aircraft.fdm_state->set_Velocities_Local_Airmass(getWindNorth(),
1245 * Get the current wind down velocity (feet/second).
1248 FGBFI::getWindDown ()
1250 return current_aircraft.fdm_state->get_V_down_airmass();
1255 * Set the current wind down velocity (feet/second).
1258 FGBFI::setWindDown (double speed)
1260 current_aircraft.fdm_state->set_Velocities_Local_Airmass(getWindNorth(),
1267 ////////////////////////////////////////////////////////////////////////
1269 ////////////////////////////////////////////////////////////////////////
1272 FGBFI::setViewAxisLong (double axis)
1278 FGBFI::setViewAxisLat (double axis)
1284 ////////////////////////////////////////////////////////////////////////
1286 ////////////////////////////////////////////////////////////////////////
1289 * Return the magnetic variation
1294 return globals->get_mag()->get_magvar() * RAD_TO_DEG;
1299 * Return the magnetic variation
1304 return globals->get_mag()->get_magdip() * RAD_TO_DEG;