1
0
Fork 0

Added getAGL()

This commit is contained in:
curt 2000-04-28 20:08:22 +00:00
parent 1868e44ee4
commit 2aefd15f74
2 changed files with 14 additions and 0 deletions

View file

@ -37,6 +37,7 @@
#include <Aircraft/aircraft.hxx>
#include <Controls/controls.hxx>
#include <Autopilot/autopilot.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_time.hxx>
#include <Time/light.hxx>
#include <Cockpit/radiostack.hxx>
@ -307,6 +308,18 @@ FGBFI::getAltitude ()
}
/**
* Return the current altitude in above the terrain.
*/
double
FGBFI::getAGL ()
{
return current_aircraft.fdm_state->get_Altitude()
- scenery.cur_elev * METER_TO_FEET;
}
/**
* Set the current altitude in feet.
*/

View file

@ -65,6 +65,7 @@ public:
static double getLatitude ();
static double getLongitude ();
static double getAltitude ();
static double getAGL ();
static void setLatitude (double latitude);
static void setLongitude (double longitude);