]> git.mxchange.org Git - flightgear.git/commitdiff
Do not use the new JSBSim ground reactions code by default until there is a good...
authorErik Hofman <erik@ehofman.com>
Sun, 19 Jan 2014 14:23:15 +0000 (15:23 +0100)
committerErik Hofman <erik@ehofman.com>
Sun, 19 Jan 2014 14:23:15 +0000 (15:23 +0100)
src/FDM/JSBSim/JSBSim.cxx

index f6faecb6c775c431dc42e95853e8269cdfcbc794..6a4b937706753536abd47669609f045e391e8589 100644 (file)
@@ -1341,8 +1341,9 @@ FGJSBsim::get_agl_ft(double t, const double pt[3], double alt_off,
    SGQuatd hlToEc = SGQuatd::fromLonLat(geodPt);
    *agl = dot(hlToEc.rotate(SGVec3d(0, 0, 1)), SGVec3d(contact) - SGVec3d(pt));
 
-   static SGPropertyNode_ptr terrain_nas = fgGetNode("/fdm/jsbsim/environment/terrain-hight", false);
-   if (!terrain_nas && material) {
+#ifdef JSBSIM_USE_GROUNDREACTIONS
+   static SGPropertyNode_ptr terrain_nas = fgGetNode("/fdm/jsbsim/systems/fg-terrain", false);
+   if (material && !terrain_nas) {
       double frictionFactor = (*material).get_friction_factor();
       double rollingFriction = (*material).get_rolling_friction();
       
@@ -1359,6 +1360,7 @@ FGJSBsim::get_agl_ft(double t, const double pt[3], double alt_off,
       GroundReactions->SetSolid((*material).get_solid());
       GroundReactions->SetPosition(pt);
    }
+#endif
 
    return true;
 }