API questions, including history and flight trails

Discussion in 'Feeding' started by GucciAIR, Dec 8, 2019.

Tags:
  1. GucciAIR

    GucciAIR New Member

    Hello again,

    I am interested in creating my own visualizations of aircraft overhead (I requested an API key). I have a pretty specific idea of what I'd like to accomplish and was wondering if the following is possible, and if so, what the most optimal way of proceeding would be.

    • Flight trails: If I'm querying the live API, are the results similar to ADSBx Global Radar? I would like to display the flight trails of active aircraft overhead.
      • On my local Pi, the aircraft position coordinates are spread across multiple history_*.json files, does the API return an array of coordinates?
    • History: Without having to query the master database, and since I can't monitor all the time, I'd like to record what aircraft were overhead for the day -- I'm thinking I'd push unique registrations for the day into my own db?
    • Machine learning: I've seen some folks capture flight paths as images [example link] and feed into ML applications to detect circling airplanes/helicopters. Would this only be possible by querying the historical API? I don't think I can do this locally because of the history.json structure, please advise
    TIA
     
  2. wiedehopf

    wiedehopf Administrator Staff Member

    Make your own local database and improve the reception of your feeder.
    That way you don't depend on any API to see "what's overhead".

    Just build your own "array of coordinates" with some python software that parses the aircraft.json every second and creates a json with an array of coordinates for every aircraft.
    Feel free to look at the updateTrack function in tar1090 on how to make trails with the minimum number of required coordinates: https://github.com/wiedehopf/tar1090
    Probably not that important if you do it locally.

    In regards to the other stuff, you'll have to figure that out yourself, no one can explain you how to code what you want ...
     
  3. GucciAIR

    GucciAIR New Member

    Thanks, I'll review this code and good idea about pushing aircraft.json data into my own db, that would provide a solution to my ML question (not looking for code solutions).

    Your comment about adjusting my antenna to dipole orientation vs bunny ears also significantly increased my coverage area but compared to Global Radar I'm still missing a good amount of aircraft over parts of the city (I'm sandwiched between buildings in Manhattan).

    Thanks for the quick reply :)
     
  4. wiedehopf

    wiedehopf Administrator Staff Member

    Yeah in a City that's tough in regards of reception.