From: curt Date: Tue, 23 Mar 2004 13:19:40 +0000 (+0000) Subject: Jim Wilson: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=349195795e0b6ed5d8e66b5598023e0fd3ffb9e4;p=flightgear.git Jim Wilson: 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. --- diff --git a/src/FDM/LaRCsim/LaRCsim.cxx b/src/FDM/LaRCsim/LaRCsim.cxx index 708b60952..a8b9f305e 100644 --- a/src/FDM/LaRCsim/LaRCsim.cxx +++ b/src/FDM/LaRCsim/LaRCsim.cxx @@ -286,7 +286,7 @@ void FGLaRCsim::update( double dt ) { // 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(); diff --git a/src/FDM/flight.hxx b/src/FDM/flight.hxx index 6ecd8730c..010a6f20f 100644 --- a/src/FDM/flight.hxx +++ b/src/FDM/flight.hxx @@ -223,9 +223,6 @@ private: // 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); @@ -1080,9 +1077,6 @@ public: 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; }