src/Instrumentation/tcas.cxx: fixed handling of Swift craft.
Altitude of Swift craft is not in transponder information.
This commit is contained in:
parent
ec1a53d428
commit
5fabf44e51
1 changed files with 10 additions and 1 deletions
|
@ -591,7 +591,16 @@ static bool checkTransponderLocal(const SGPropertyNode* pModel, float velocityKt
|
||||||
// For MP aircraft (name='multiplayer') that are being ignored.
|
// For MP aircraft (name='multiplayer') that are being ignored.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (pModel->getNameString() == "aircraft")
|
if (pModel->getNameString() == "swift")
|
||||||
|
{
|
||||||
|
/* Transponder info is in ./swift/transponder/ but altitude needs to
|
||||||
|
come from ./position/altitude-ft. */
|
||||||
|
bool xpdr_on = pModel->getBoolValue("swift/transponder/c-mode", false);
|
||||||
|
if (!xpdr_on) return false;
|
||||||
|
o_altFt = pModel->getDoubleValue("position/altitude-ft");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (pModel->getNameString() == "aircraft")
|
||||||
{
|
{
|
||||||
/* assume all non-MP and non-Swift (i.e. AI) aircraft have their transponder switched off while taxiing/parking
|
/* assume all non-MP and non-Swift (i.e. AI) aircraft have their transponder switched off while taxiing/parking
|
||||||
* (at low speed) */
|
* (at low speed) */
|
||||||
|
|
Loading…
Reference in a new issue