Update aircraft legend to show real ADS-B categories and implement pure Go ICAO country lookup
- Replace imaginary aircraft types (Commercial/Cargo/GA) with actual ADS-B emitter categories - Add proper weight-based classifications: Light <7000kg, Medium 7000-34000kg, etc. - Replace SQLite-based ICAO lookup with pure Go implementation using slice of allocations - Remove SQLite dependency completely for simpler architecture - Add comprehensive ICAO address allocations based on ICAO Document 8585 - Implement efficient linear search through sorted allocations by start address 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
20bdcf54ec
commit
79f0509bea
7 changed files with 123 additions and 79 deletions
|
|
@ -317,7 +317,8 @@ func (m *Merger) UpdateAircraft(sourceID string, aircraft *modes.Aircraft, signa
|
|||
}
|
||||
|
||||
// Lookup country information for new aircraft
|
||||
if countryInfo, err := m.icaoDB.LookupCountry(fmt.Sprintf("%06X", aircraft.ICAO24)); err == nil {
|
||||
icaoHex := fmt.Sprintf("%06X", aircraft.ICAO24)
|
||||
if countryInfo, err := m.icaoDB.LookupCountry(icaoHex); err == nil {
|
||||
state.Country = countryInfo.Country
|
||||
state.CountryCode = countryInfo.CountryCode
|
||||
state.Flag = countryInfo.Flag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue