From 5c1d7871c678a6b0711e3bf0387c9bf5aec6dcfb Mon Sep 17 00:00:00 2001 From: Trey T Date: Sun, 31 May 2026 13:13:50 -0500 Subject: [PATCH] Flight detail: bearing-aware icons + auto type lookup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Icons: - Route card's central airplane and the two map markers now rotate by the actual dep→arr compass bearing instead of a hardcoded -45°. DAL→SAN (westbound) shows planes pointing left; LAS→DAL (eastbound) points right; DAL→HOU (south) points down. New HistoryDetailView.bearing(from:to:) computes great-circle bearing; rotation is (bearing - 45) since SF's airplane glyph naturally sits at ~45°. - Replaced the FlightRouteMap's `Marker(systemImage:)` for departure and arrival with custom `Annotation` views (routeMarker helper) that wrap an SF airplane.departure/arrival glyph in a tinted circle and rotate the icon by the same bearing. Aircraft data lookup: - HistoryDetailView now auto-enriches the missing aircraftType on .task via the same two-step chain the bulk Aircraft Stats button uses: route-explorer first, FlightAware activity-log fallback, normalized through AircraftDatabase.normalizedICAO before saving. - Aircraft card's Type cell now shows the friendly name when available — "B738 · Boeing 737-800" instead of just "B738". - When neither registration nor icao24 is set (typical for CSV- imported historical flights), the card shows an honest one-line caption explaining why tail / first-flight / ICAO24 are blank and what populates them. Honest about what we can't get: - Tested OpenSky /flights/departure (anonymous tier blocks historical, 403 "You cannot access historical flights"), FlightAware /history//