Suppose we have a position on earth with coordinates: (latitude, longitude). I'm looking for methods, algorithms or APIs to get a time alert that a plane would fly overhead in the neighborhood of that position. What are my options? Here are my thoughts:
- Use a web-based API to query all planes in the interest bound, periodically.
Downside: For average speed of airplanes (1000km/h), for a 1 degree in variation in latitude/longitude (approx. 100km), we have to probe the API every 6 minutes so not to miss the overhead plane. For a 0.1° variation (~10km) which fits the "flying overhead" description more accurately, this probing period is 36 seconds which is too much of a burden on both the machine and endpoint server.
This does not give us a "time-of-arrival" per se. It just continuously checks for overhead flights.
- To solve the frequent probing issue, first, use the API to query for flights in a bound much larger than interest bound. Then for all matched flights, only choose those whose predicted route passes over the interest region. This method gives us time-of-arrival.
Downside: How can we "predict" a flight route? We can use "dead-reckoning" meaning we assume a fixed heading, then predict the time of arrival of the plane in the interest region according to its initial speed. But problem is, planes may change their heading arbitrarily. So we may miss some planes who were not even in the first probing phase to begin with, or we may have false positives for planes which change their route after our probing.
- Use some fixed predefined flight route API.
a)I don't know of any such APIs that provides routes or waypoints.
b) The timing may be well off due to frequent delays in the industry.
These are all solutions I could come up with. Any ideas?