]> git.mxchange.org Git - flightgear.git/commitdiff
JSBSim: fix zero agl above scenery discontinuity
authorTorsten Dreyer <torsten@t3r.de>
Wed, 30 Apr 2014 14:41:27 +0000 (16:41 +0200)
committerTorsten Dreyer <torsten@t3r.de>
Wed, 30 Apr 2014 14:41:27 +0000 (16:41 +0200)
see http://osdir.com/ml/flightgear-sim/2014-04/msg00145.html

src/FDM/JSBSim/JSBSim.cxx

index 91c4dd615b41449111798f7f05c5ccef5fc2b62f..c27356da27961fd65189fb03a05f2bb54c2cd981 100644 (file)
@@ -1331,9 +1331,11 @@ FGJSBsim::get_agl_ft(double t, const double pt[3], double alt_off,
 {
   const simgear::BVHMaterial* material;
   simgear::BVHNode::Id id;
-  if (!FGInterface::get_agl_ft(t, pt, alt_off, contact, normal, vel,
-                               angularVel, material, id))
-    return false;
+
+  // don't check the return value and continue above scenery discontinuity
+  // see http://osdir.com/ml/flightgear-sim/2014-04/msg00145.html
+  FGInterface::get_agl_ft(t, pt, alt_off, contact, normal, vel,
+                               angularVel, material, id);
 
   SGGeod geodPt = SGGeod::fromCart(SG_FEET_TO_METER*SGVec3d(pt));
   SGQuatd hlToEc = SGQuatd::fromLonLat(geodPt);