From fe79be070212ae191f786c6bfaff1a8837f31ab2 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sun, 19 Jan 2014 15:23:15 +0100 Subject: [PATCH] Do not use the new JSBSim ground reactions code by default until there is a good way to identify Nasal scripts that do this themselves --- src/FDM/JSBSim/JSBSim.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index f6faecb6c..6a4b93770 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -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; }