1
0
Fork 0

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:
Torsten Dreyer 2011-10-09 20:21:02 +02:00
parent 30e2db94b1
commit 9022c6a58d

View file

@ -119,9 +119,18 @@ 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;
if( fgGetBool( "/sim/realism/dme-fallback-to-loc", true ) ) {
if( NULL == (_navrecord = globals->get_loclist()->findByFreq( frequency_mhz,
globals->get_aircraft_position())) ) {
_navrecord = globals->get_dmelist()->findByFreq( frequency_mhz, _navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
globals->get_aircraft_position()); 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.
if (!_serviceable_node->getBoolValue() || if (!_serviceable_node->getBoolValue() ||