]> git.mxchange.org Git - flightgear.git/commitdiff
Jim Wilson:
authorcurt <curt>
Tue, 23 Mar 2004 13:19:40 +0000 (13:19 +0000)
committercurt <curt>
Tue, 23 Mar 2004 13:19:40 +0000 (13:19 +0000)
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.

src/FDM/LaRCsim/LaRCsim.cxx
src/FDM/flight.hxx

index 708b609523d8a4458eb93d7db6209738be80e615..a8b9f305ec64dcead6296973d1dfefea6dbcbcf7 100644 (file)
@@ -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();
index 6ecd8730c6eba2c0ab0804bdf869ced099ea0138..010a6f20f3e37722b0c20a1bf8a84e12020b580b 100644 (file)
@@ -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; }