FlightAware Discussions

flight distance and search by route

Dear Team

Please advise which xml operation returns flight distance?
Also the operation that can be used to track flight by route i.e. origin and destination airport as in flightaware app?


You can use the “LatLongsToDistance” function to return the great-circle distance between two lat/lon points. You can use “AirportInfo” to get the lat/lon of any airport, if you don’t already have that information in your own database.

You can avoid calling LatLongsToDistance if you want to implement the algorithm yourself, or can rely on a GIS distance function in your own database/library.

What about tracking flight by route i.e. Origin and destination? As in flightaware app.

The “Search by route” functionality is not available through FlightXML in the same form that our mobile app uses. We’re thinking of exposing that feature in a future version of FlightXML though.

However, you can use the “Search” function to locate direct flights that are currently in enroute by specifying “-origin XXXX -destination XXXX -inAir 1” as the search string.