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:
parent
076d0816b5
commit
16bf10b333
1 changed files with 4 additions and 0 deletions
|
@ -297,6 +297,10 @@ void FGMarkerBeacon::search()
|
||||||
_time_before_search_sec = 0.5;
|
_time_before_search_sec = 0.5;
|
||||||
|
|
||||||
const SGGeod pos = globals->get_aircraft_position();
|
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
|
// get closest marker beacon - within a 1nm cutoff
|
||||||
BeaconFilter filter;
|
BeaconFilter filter;
|
||||||
|
|
Loading…
Reference in a new issue