feat(2-4): implement altitude colour bands and aircraft type icons

Implements altitude_to_colour() mapping altitude bands to the 6 e-ink
palette colours, and classify_aircraft_type() resolving ADS-B category,
callsign prefix, and altitude fallback to AircraftType enum. Adds 21
new tests (13 parametrised boundary cases + 8 icon classification);
89 tests total, all quality gates green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Edholm
2026-04-22 23:21:50 -04:00
parent b9ccdc4916
commit 2c86ffd422
6 changed files with 186 additions and 33 deletions
+10 -1
View File
@@ -1 +1,10 @@
# stub
from __future__ import annotations
from planemapper.constants import ALTITUDE_BANDS_FT, ALTITUDE_COLOURS
def altitude_to_colour(altitude_ft: int) -> tuple[int, int, int]:
for i, band in enumerate(ALTITUDE_BANDS_FT):
if altitude_ft <= band:
return ALTITUDE_COLOURS[i]
return ALTITUDE_COLOURS[-1]