Skip to content

Added Flight Destination - #113

Open
ProfessorShroom wants to merge 1 commit into
MatixYo:mainfrom
ProfessorShroom:main
Open

ProfessorShroom wants to merge 1 commit into
MatixYo:mainfrom
ProfessorShroom:main

Conversation

@ProfessorShroom

Copy link
Copy Markdown

Add flight destination to aircraft tags

ADS-B doesn't include where a flight is going, so this looks up each aircraft's callsign on adsbdb.com (free, no API key) and adds a green line to its tag, e.g. to Amsterdam.

How it works

  • Lookups run on the existing ADS-B fetch task, one HTTPS connection at a time.
  • Only aircraft inside the outer ring (the ones that get a tag) are looked up, nearest first, at most 2 per cycle.
  • Results are cached (48 callsigns): found 2 h, not found 30 min, errors 30 s. Rate limiting backs off for 60 s.
  • Planes with no route data show no extra line.
  • City names are shown when they fit (up to 15 characters), otherwise the airport code. Names are converted to plain ASCII (Zürich → Zurich) because the tag font only has ASCII.
  • The serial log prints the full route and free heap, e.g. route: TRA91T Thessaloniki to Amsterdam (SKG>AMS) [heap free ..., lowest ...].

Settings

  • Setup portal: new "Show flight destination" checkbox (on by default). Turning it off stops all lookups.
  • config.h: kRouteLookupsPerCycle, kRouteUseCityNames, kRouteMaxCityChars, kRouteShowOrigin (adds a from <city> line).

Notes

  • Aircraft callsigns are sent to adsbdb.com. This is documented in the README.
  • New files: route_client (lookup and cache) and ascii_fold (accent folding). Aircraft gains a has_flight_callsign flag.

@ProfessorShroom

Copy link
Copy Markdown
Author

Do these just get ignored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant