This is a fix for my earlier "Remove some hardcoded dependencies between fdm,
viewer and acmodel" patch. The problem was discovered when testing the
wrightFlyer.
// Inform LaRCsim of the local terrain altitude
// Runway_altitude = get_Runway_altitude();
- Runway_altitude = getACModel()->get3DModel()->getSGLocation()->get_cur_elev_m() * SG_METER_TO_FEET;
+ Runway_altitude = fgGetDouble("/position/ground-elev-m") * SG_METER_TO_FEET;
// Weather
/* V_north_airmass = get_V_north_airmass();
V_east_airmass = get_V_east_airmass();
// SGTimeStamp valid_stamp; // time this record is valid
// SGTimeStamp next_stamp; // time this record is valid
- // Model tied to FDM
- FGAircraftModel * _acmodel;
-
protected:
int _calc_multiloop (double dt);
inline float get_faux( int n ) const { return faux[n]; }
inline int get_iaux( int n ) const { return iaux[n]; }
- // Model tied to FDM
- FGAircraftModel * getACModel() const { return _acmodel; }
-
// Note that currently this is the "same" value runway altitude...
inline double get_ground_elev_ft() const { return runway_altitude; }