Added getAGL()
This commit is contained in:
parent
1868e44ee4
commit
2aefd15f74
2 changed files with 14 additions and 0 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue