API returns wrong lat/long


#1

I have been using Flight Aware’s API in order to get the location of specific aircrafts in the U.S.

unfortunately, i have encountered some instances where the method i’m using (SearchBirdseyeInFlight) returns the wrong aircraft location, while GetLastTrack returns the correct location (according to your site) but with much less details than the search does (details which i’m currently using, such as origin & destination airports).

Also, SearchBirdseyeInFlight allows me to search multiple aircraft using a single request, while GetLastTrack can only handle one ident at a time.

Example: N351EF
SearchBirdseyeInFlight puts it at 21.03653, -86.87708
While GetLastTrack returns a lot of coordinates, and the last one points to 34.749, -83.817

Is there a reason why SearchBirdseyeInFlight doesn’t return the correct location of the aircraft?

Is there another method i can use in order to get the correct data for multiple aircrafts?

thanks in advance,


#2

Your SearchBirdseyeInFlight call returned a different flight than the GetLastTrack call did.
The flight was from March 15th, with “21.017 -86.867” has origin":“KMQS”,“destination”:“MMUN”, and “faFlightID”:“N351EF-1458055374-0-0”

We are investigating why this happened, for some reason this flight is better identified by the registration number than by ident.

In the meantime a call to SearchBirdseyeInFlight with {ident_or_reg N351EF} will return data for the last flight. However, a search with ident_or_reg will be slower, it is not recommended usually but may be a good temporary solution for you.


#3

thanks adimic for your quick response.

I’ll change the query type to the one you suggested :slight_smile:


#4

The problem still occurs. we are getting the wrong lat/lng for the tail

example:

{“faFlightID”:“N31GJ-1459250985-12-2:0”,“ident”:“N31GJ”,“prefix”:“G”,“type”:“LJ35”,“suffix”:“L”,“origin”:“KCLE”,“destination”:“TJSJ”,“timeout”:“0”,“timestamp”:1459272875,“departureTime”:1459259640,“firstPositionTime”:1459259676,“arrivalTime”:1459272960,“longitude”:-66.066670000000002005,“latitude”:18.433330000000001547,“lowLongitude”:-81.833100000000001728,“lowLatitude”:18.416669999999999874,“highLongitude”:-66.066670000000002005,“highLatitude”:41.430799999999997851,“groundspeed”:429,“altitude”:10,“heading”:90,“altitudeStatus”:“C”,“updateType”:“Z”,“altitudeChange”:"",“waypoints”:“41.4 -81.85 41.35 -81.733 41.317 -81.667 41.3 -81.633 41.3 -81.6 41.267 -81.55 41.267 -81.55 41.133 -81.4 41.117 -81.367 41.067 -81.317 41.067 -81.317 41.017 -81.25 40.967 -81.2 40.817 -81.033 41.05 -80.95 40.767 -80.683 40.667 -80.583 40.633 -80.55 40.567 -80.483 40.367 -80.3 40.15 -80.1 39.967 -79.783 39.75 -79.567 39.633 -79.433 39.533 -79.35 39.45 -79.25 39.183 -79 39.1 -78.9 38.867 -78.667 38.75 -78.55 38.55 -78.35 38.35 -78.15 38.183 -78 38.083 -77.883 38 -77.8 37.833 -77.667 37.833 -77.65 37.767 -77.583 37.433 -77.267 37.167 -77.017 37.117 -76.967 36.833 -76.7 36.683 -76.567 36.25 -76.167 36.067 -75.917 35.85 -75.65 35.617 -75.35 35.4 -75.05 34.867 -74.4 34.567 -74.017 34.383 -73.783 34.35 -73.75 34.35 -73.75 33.833 -73.583 33.75 -73.55 33.233 -73.383 33.15 -73.367 32.767 -73.233 32.317 -73.1 32.3 -73.1 25.017 -71 25 -71 25 -71 24.967 -71 24.117 -70.917 23.867 -70.9 23.7 -70.817 23.367 -70.567 20.967 -68.817 20.4 -68.433 20.383 -68.417 19.85 -68.033 19.55 -67.833 19.483 -67.567 19.367 -67.433 18.8 -66.717 18.8 -66.717 18.8 -66.717 18.75 -66.617 18.75 -66.6 18.733 -66.567 18.633 -66.383 18.633 -66.35 18.55 -66.2 18.55 -66.2 18.517 -66.117 18.467 -66.05 18.45 -66.017 18.433 -65.983 18.433 -66”}

when according to this:
he.flightaware.com/live/flight/N31GJ

The aircraft is flying from:
29-Mar-2016 LJ35/L Luis Munoz Marin Intl (SJU / TJSJ) Brooksville-Tampa Bay Rgnl (KBKV) 03:12PM AST 06:04PM EDT 2:52

so instead of getting the last aircraft location that we need, we are getting its previous location

our system requirement is to show the actual location of the aircraft… is there a way to solve this?


#5

I see the inconsistent behavior of the call for ident N31GJ. I do get the most current flight most of the times but sometimes after several calls I get the previous flight, probably from a server that was not updated yet for that flight.
I don’t have any suggestion or solution, SearchBirdseyeInFlight and GetLastTrack are the calls that should provide you with position data. I know the team is working on improving the api calls. Maybe someone else has other advice for you.


#6

and it is still happening…

he.flightaware.com/live/flight/N351EF

is showing
Teterboro (KTEB – info)
Teterboro, NJ
Witham Field (KSUA – info)
Stuart, FL

BUT the API returns:

{
SearchBirdseyeInFlightResult: {
next_offset: -1,
aircraft:
{
faFlightID: “N351EF-1459684536-10-1”,
ident: “N351EF”,
prefix: “G”,
type: “LJ35”,
suffix: “L”,
origin: “KSUA”,
destination: “MDSD”,
timeout: “0”,
timestamp: 1459695722,
departureTime: 1459688340,
firstPositionTime: 1459688703,
arrivalTime: 1459695120,
longitude: -69.66893,
latitude: 18.42966,
lowLongitude: -80.19361,
lowLatitude: 18.41667,
highLongitude: -69.65,
highLatitude: 27.26361,
groundspeed: 447,
altitude: 410,
heading: 150,
altitudeStatus: “C”,
updateType: “P”,
altitudeChange: “”,
waypoints: “27.167 -80.217 27.2 -80.167 27.217 -80.117 27.2 -80.117 27.2 -80.1 27.2 -80.083 27.183 -80.05 27.167 -80.033 27.15 -80 27.15 -80 27.15 -80 27.1 -79.95 27.083 -79.933 27.017 -79.833 26.933 -79.733 26.9 -79.7 26.883 -79.667 26.833 -79.617 26.8 -79.567 26.783 -79.55 26.75 -79.517 26.7 -79.45 26.667 -79.417 26.6 -79.317 26.55 -79.267 26.417 -79.1 26.367 -79.033 26.317 -78.967 26.25 -78.917 26.083 -78.7 26.067 -78.683 26 -78.6 25.917 -78.5 25.833 -78.417 25.833 -78.417 25.8 -78.367 25.8 -78.367 25.65 -78.183 25.467 -77.9 25.383 -77.783 23.4 -74.883 22.167 -73.15 22.033 -72.967 21.9 -72.783 21.617 -72.4 21.267 -71.933 20.65 -71.1 20.6 -71.033 20.417 -70.8 20.417 -70.783 20.417 -70.783 20.267 -70.733 19.95 -70.633 19.9 -70.617 19.883 -70.6 19.75 -70.567 19.667 -70.5 19.45 -70.35 19.333 -70.283 19.133 -70.133 19.1 -70.117 18.95 -70.017 18.783 -69.9 18.633 -69.8 18.633 -69.8 18.567 -69.75 18.5 -69.7 18.417 -69.65”
}
]
}
}

:question: