Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADS-B demod: all airline countries are classified as Taiwan #1805

Closed
bczhc opened this issue Sep 5, 2023 · 7 comments
Closed

ADS-B demod: all airline countries are classified as Taiwan #1805

bczhc opened this issue Sep 5, 2023 · 7 comments
Assignees
Labels

Comments

@bczhc
Copy link

bczhc commented Sep 5, 2023

Hi! I just want to politely ask how the country field is fetched. All of them shows Taiwan, but they shouldn't.

image

See https://en.wikipedia.org/wiki/List_of_airlines_of_Taiwan; https://en.wikipedia.org/wiki/List_of_airlines_of_China

@srcejon
Copy link
Collaborator

srcejon commented Sep 5, 2023

There's a file (demodadsb/flags/regprefixmap.csv) that maps aircraft registration prefixes to the flag.

Looking at it, we have a clash, in that both China and Taiwan both have the prefix B, with nothing to distinguish the two) - and Taiwan is last in the file, so that's why you get the Taiwan flag.

Can you perhaps add another screenshot showing the registration column, so I can see if there's any more info that we could perhaps use?

@srcejon
Copy link
Collaborator

srcejon commented Sep 5, 2023

Ok, it seems China should have B-4 digits, and Taiwan B-5 digits, so I may be able to add some additional logic to check for that.

@srcejon srcejon self-assigned this Sep 5, 2023
@srcejon srcejon added the bug label Sep 5, 2023
@bczhc
Copy link
Author

bczhc commented Sep 5, 2023

Yes. As this:
image
That makes sense. Thanks!

@srcejon
Copy link
Collaborator

srcejon commented Sep 5, 2023

Have added a patch - let me know if you still see problems.

@bczhc
Copy link
Author

bczhc commented Sep 6, 2023

Alright. Seems to be OK:
image

BTW why use the CPC flag but not its national flag? 🤔

@srcejon
Copy link
Collaborator

srcejon commented Sep 6, 2023

I just used a flag icon pack from here (https://radarspotting.com/forum/index.php?action=gallery;cat=33). If you have a correct 40x20 pixel image, I can replace it. Or contact Steve on there to let him know.

@bczhc
Copy link
Author

bczhc commented Sep 6, 2023

Oh okay. Actually I have no idea on this, maybe in this case CPC is at the same hierarchy with Hong Kong and Macau (they are Special Administrative Regions)... Just leave it so. Thanks again and this issue can be marked as solved.

@bczhc bczhc closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants