mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
Merge pull request #1810 from srcejon/fix_1805
Distinguish between China and Taiwan aircraft registrations in ADS-B Demod
This commit is contained in:
commit
428c4a3c78
@ -457,11 +457,23 @@ QString AircraftInformation::getFlag() const
|
|||||||
{
|
{
|
||||||
// Try letters before '-'
|
// Try letters before '-'
|
||||||
prefix = m_registration.left(idx);
|
prefix = m_registration.left(idx);
|
||||||
|
// Both China and Taiwan use B prefix. China regs are <= 4 digits, with Taiwan 5
|
||||||
|
if (prefix == "B")
|
||||||
|
{
|
||||||
|
if (m_registration.size() >= 7) {
|
||||||
|
flag = "taiwan";
|
||||||
|
} else {
|
||||||
|
flag = "china";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (m_prefixMap->contains(prefix)) {
|
if (m_prefixMap->contains(prefix)) {
|
||||||
flag = m_prefixMap->value(prefix);
|
flag = m_prefixMap->value(prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No '-' Could be one of a few countries or military.
|
// No '-' Could be one of a few countries or military.
|
||||||
|
Loading…
Reference in New Issue
Block a user