Reintroduce an old bugture: use localizer as dme
Our nav.dat.gz seem to have many bugs regarding paired LOC/DME where the DME is missing. A feature has recently been introduced to always use a LOC frequency as a DME to avoid these issues. However many LOC station do not have a DME paired at their frequency and this behaviour might be as confusing as having no DME where one should be. Before we get new/bugfree navdata, a property can be set to select the desired behaviour: if /sim/realism/dme-fallback-to-loc is true or absent, LOC will be treated as DME (realism is off) if /sim/realism/dme-fallback-to-loc is false, LOC will be NOT be treated as DME (realism is on)
This commit is contained in:
parent
30e2db94b1
commit
9022c6a58d
1 changed files with 11 additions and 2 deletions
|
@ -119,8 +119,17 @@ DME::update (double delta_time_sec)
|
||||||
if (_time_before_search_sec < 0) {
|
if (_time_before_search_sec < 0) {
|
||||||
_time_before_search_sec = 1.0;
|
_time_before_search_sec = 1.0;
|
||||||
|
|
||||||
_navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
|
if( fgGetBool( "/sim/realism/dme-fallback-to-loc", true ) ) {
|
||||||
globals->get_aircraft_position());
|
if( NULL == (_navrecord = globals->get_loclist()->findByFreq( frequency_mhz,
|
||||||
|
globals->get_aircraft_position())) ) {
|
||||||
|
|
||||||
|
_navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
|
||||||
|
globals->get_aircraft_position());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
|
||||||
|
globals->get_aircraft_position());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's off, don't bother.
|
// If it's off, don't bother.
|
||||||
|
|
Loading…
Reference in a new issue