revert(flights): remove the route feature, keep the tracking - #271
Merged
Conversation
Naming the two ends of a flight never worked well enough to be worth showing. The route databases only cover mainline airlines — of 30 aircraft sampled from the live feed, 29 had no entry at all — and what they did return described the wrong leg of the aircraft's day about four times in five. Successive attempts to salvage it (corroborating a schedule against the departure the aircraft was seen to make, then against its course, then widening the airport table so more fields could be named) each moved the numbers without making the feature trustworthy on screen. So it goes. Removed: the /api/flight-route endpoint and its three upstream sources, the FROM/TO readout in the aircraft popup, the airport dots and the dashed remaining-leg layer on the map, the departure and arrival airports derived in /api/aircraft, and the endpoint reconciliation in the watch panel. Tracking is untouched and stays: aircraft on the map, the watch cards with model, registration and operator, and the flown track drawn from the aircraft's own reported positions. Generated with SIMPLIFAI
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Naming the two ends of a flight never worked well enough to be worth showing on screen. This removes the feature. Aircraft tracking is untouched.
Why
The data is not there to support it.
Ground truth for this is obtainable: a trace that ends in a run of ground reports means the aircraft landed, and the airport under its last airborne fix is where. Measured that way, across ~100 completed flights:
The sources also contradict each other on 14 of every 16 flights they both answer, so "first reply wins" was a coin flip between two bad guesses.
Worse, they barely cover the traffic. Of 30 aircraft sampled straight from the live feed, 29 had no route entry in any database — cargo, charter, regional and business callsigns (FFL, CXK, EJA, GXA, JSX, PWA). The databases only know mainline airlines.
Three rounds of salvage attempts each moved the numbers without making the result trustworthy: corroborating a schedule against the departure the aircraft was seen to make (12% coverage at 36% correct), then against its course (54% at 62%), then widening the airport table from 370 to ~5,000 fields so more airports could be named at all (departure identification 14% → 62%, but destination accuracy fell back to ~45% as denser candidates produced more near-misses). None of it reached the bar for putting an airport name in front of someone as fact.
What is removed
/api/flight-routeand its three upstream sourcesdeparture/arrivalderivation in/api/aircraft, andnearestAirportWhat stays
Tracking, in full — aircraft on the map, the watch cards with model, registration and operator, and the flown track drawn from the aircraft's own reported positions.
Verified on localhost: three watch cards rendering AIRBUS A-321 / N156UW, AIRBUS A220-300 / C-GUAC, BOEING 787-8 Dreamliner / N809AA with their track point counts and no route row. Map layers checked directly —
aircraft-track-casingandaircraft-track-linepresent,watched-airport-*andaircraft-pending-linegone./api/aircraftstill returns identity and 700-point tracks;/api/flight-routenow 404s.137 tests pass,
next buildclean, zero residual references to the removed symbols.Two things for the maintainer
mastercarries an unpushed merge commit with someone else's Lithuania CCTV work (feat(cctv): add Lithuania — 304 Via Lietuva national-road cameras #265). It nearly rode along in this diff — this branch is based onorigin/masterto exclude it, but that commit is still sitting on local master.core.autocrlf=truefights this repo. Several files are stored with CRLF, so a normal commit rewrites them end to end — it made a 36-line change topage.tsxrender as 3,264. This was committed withcore.autocrlf=falseto preserve the original endings. A.gitattributes, orcore.autocrlf=falsefor this repo, would stop the noise recurring.Generated with SIMPLIFAI