1
0
Fork 0

Avoid Marker-beacon spam on FDM NaN case

Check and bail out of marker beacon search if we are in NaN-land; this
should making it easier to trace the cause of the NaNs.
This commit is contained in:
James Turner 2021-06-28 12:13:56 +01:00
parent 076d0816b5
commit 16bf10b333

View file

@ -297,6 +297,10 @@ void FGMarkerBeacon::search()
_time_before_search_sec = 0.5;
const SGGeod pos = globals->get_aircraft_position();
if (!pos.isValid()) {
// avoid error flood when core positions goes wrong
return;
}
// get closest marker beacon - within a 1nm cutoff
BeaconFilter filter;