Ground-cache: throw on NaN inputs
Attempt to provoke FDM NAN issues more directly (eg in Sentry reports), rather than waiting on SGCardToGeod, etc to blow up inside the ground cache. SF-Id: https://sourceforge.net/p/flightgear/codetickets/2743/
This commit is contained in:
parent
8ae98ea543
commit
8517eda0c9
1 changed files with 4 additions and 0 deletions
|
@ -702,6 +702,10 @@ FGGroundCache::get_agl(double t, const SGVec3d& pt, SGVec3d& contact,
|
|||
SGVec3d& normal, SGVec3d& linearVel, SGVec3d& angularVel,
|
||||
simgear::BVHNode::Id& id, const simgear::BVHMaterial*& material)
|
||||
{
|
||||
if (isNaN(pt)) {
|
||||
throw sg_range_exception("FGGroundCache::get_agl: NaN position input");
|
||||
}
|
||||
|
||||
#ifdef GROUNDCACHE_DEBUG
|
||||
SGTimeStamp t0 = SGTimeStamp::now();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue