Implement comprehensive ICAO country lookup with complete global coverage
- Fix country field marshaling in JSON output to display countries in web frontend - Replace incomplete ICAO database with comprehensive allocation table from aerotransport.org - Add all 120+ countries and territories with correct hex address ranges - Fix aircraft legend label: change "Medium 34000-136000kg" to "Large 34000-136000kg" - Ensure complete coverage for all allocated ICAO 24-bit addresses worldwide Fixes: - 3C64AE now correctly shows Germany 🇩🇪 (range 3C0000-3FFFFF) - 4ACB58 now correctly shows Sweden 🇸🇪 (range 4A8000-4AFFFF) - 04008D now correctly shows Ethiopia 🇪🇹 (range 040000-040FFF) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
79f0509bea
commit
9389cb8823
3 changed files with 179 additions and 62 deletions
|
|
@ -122,6 +122,9 @@ func (a *AircraftState) MarshalJSON() ([]byte, error) {
|
|||
MLATSources []string `json:"mlat_sources"`
|
||||
PositionSource string `json:"position_source"`
|
||||
UpdateRate float64 `json:"update_rate"`
|
||||
Country string `json:"country"`
|
||||
CountryCode string `json:"country_code"`
|
||||
Flag string `json:"flag"`
|
||||
}{
|
||||
// Copy all fields from Aircraft
|
||||
ICAO24: fmt.Sprintf("%06X", a.Aircraft.ICAO24),
|
||||
|
|
@ -163,6 +166,9 @@ func (a *AircraftState) MarshalJSON() ([]byte, error) {
|
|||
MLATSources: a.MLATSources,
|
||||
PositionSource: a.PositionSource,
|
||||
UpdateRate: a.UpdateRate,
|
||||
Country: a.Country,
|
||||
CountryCode: a.CountryCode,
|
||||
Flag: a.Flag,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue