Add ICAO registration country#92
Add ICAO registration country#92rosorio wants to merge 1 commit intoantirez:masterfrom rosorio:upstream
Conversation
| {"OM",BLK_1024,0x70c000,0xfffc00}, | ||
| {"BN",BLK_1024,0x895000,0xfffc00}, | ||
| {"SB",BLK_1024,0x897000,0xfffc00}, | ||
| {"00",BLK_1024,0x899000,0xfffc00}, |
There was a problem hiding this comment.
What Country are 00's? There are 3 instances of "00".
|
I pulled in a set of flag icons from https://addons.mozilla.org/en-US/firefox/addon/flagfox/, and it displays the flag next to the two character code. I still want to handle the 00's and add a flag for "yu". See don-willingham@6634aff |
|
The ICAO has reserved block of address for temporary use, and there is no country. I put 00 for those blocks. YU is Yugoslavia, I don't think you will find a flag, because the country doesn't exist anymore. It was divide around 2008 in two countries (https://en.wikipedia.org/wiki/Yugoslavia) but still exist in icao list of countries. |
|
I now only display the flag if registration is not 00. There was a flag for Yugoslavia. Although chances are low that an aircraft would have that code, I wanted to still handle that case, instead of treating it like 00. I chose the flag for Federal Republic of Yugoslavia (1992–2003) from https://en.wikipedia.org/wiki/Serbia_and_Montenegro as it was most recent. I'm not sure if there are political and cultural reasons to go either way. I submitted pull request #101. |
I made the required changes to display the registration country code based on the ICAO id. Country codes are returned in the ISO 3166-1 alpha-2 format. I made changes as light as possible and respectful of your coding styles.
regards