Vivian MEAZZA: "Bug fix - make TACAN work with no carrier in the environment"
This commit is contained in:
parent
cc3ad61175
commit
4da02e3d99
1 changed files with 71 additions and 65 deletions
|
@ -341,6 +341,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
= globals->get_carrierlist()->findStationByFreq( frequency_mhz );
|
||||
bool freq_valid = (mobile_tacan != NULL);
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "mobile freqency valid " << freq_valid );
|
||||
_mobile_valid = false;
|
||||
|
||||
if ( freq_valid ) {
|
||||
|
||||
|
@ -352,7 +353,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
number = carrier.size();
|
||||
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "carrier " << number );
|
||||
|
||||
if ( number > 0 ) { // don't do this if there are no carriers
|
||||
for ( i = 0; i < number; ++i ) {
|
||||
string str2 ( carrier[i]->getStringValue("name", ""));
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "carrier name " << str2 );
|
||||
|
@ -376,6 +377,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
SG_LOG( SG_INSTR, SG_DEBUG, " carrier transmitter invalid " << _mobile_valid );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "name " << _mobile_name);
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _mobile_lat << "lon " << _mobile_lon);
|
||||
|
@ -393,6 +395,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "tanker number " << number );
|
||||
|
||||
if ( number > 0 ) { // don't do this if there are no AI aircraft
|
||||
for ( i = 0; i < number; ++i ) {
|
||||
string str4 ( tanker[i]->getStringValue("callsign", ""));
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "tanker callsign " << str4 );
|
||||
|
@ -416,6 +419,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
SG_LOG( SG_INSTR, SG_DEBUG, " tanker transmitter invalid " << _mobile_valid );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "tanker name " << _mobile_name);
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _mobile_lat << "lon " << _mobile_lon);
|
||||
|
@ -435,6 +439,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, " mp tanker number " << number );
|
||||
|
||||
if ( number > 0 ) { // don't do this if there are no MP aircraft
|
||||
for ( i = 0; i < number; ++i ) {
|
||||
string str6 ( mp_tanker[i]->getStringValue("callsign", ""));
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, "mp tanker callsign " << str6 );
|
||||
|
@ -464,6 +469,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_mobile_valid = false;
|
||||
SG_LOG( SG_INSTR, SG_DEBUG, " mobile transmitter invalid " << _mobile_valid );
|
||||
|
|
Loading…
Add table
Reference in a new issue