Flight Id's

6 years 10 months ago #190 by rich2020
Flight Id's was created by rich2020
Hi,

Is there a Flight ID or FlightPlan ID field somewhere in the data? I want to build up flight plans, each one being a complete record of all the positional data an aircraft has travelled. Currently, from the free REST API feed, I do not see any Flight ID.

Thanks

Please Log in or Create an account to join the conversation.

6 years 10 months ago - 6 years 10 months ago #194 by meides
Replied by meides on topic Flight Id's
Hey Rich, by "flight" you mean everything between one takeoff and landing? And you expect the FlightID to change as soon as an aircraft takes of again?

[...]each one being a complete record of all the positional data an aircraft has travelled[...]


I assume you mean all positional data of an aircraft between one takeoff and landing?

Please Log in or Create an account to join the conversation.

6 years 10 months ago #195 by rich2020
Replied by rich2020 on topic Flight Id's
Hi Meides,

You are correct: I want a flight ID which is the same between take off and landing for all positional data, but then changes again when the aircraft takes off again.

Please Log in or Create an account to join the conversation.

6 years 10 months ago #196 by meides
Replied by meides on topic Flight Id's
Hey,

the data currently doesn't contain such an ID.

The problem of distinguishing between flights is actually not too easy to solve. Since callsigns sometimes don't change when an aircraft lands and takes off again the flight ID can't simply rely on the callsign. Also the network doesn't have ground vision on all airports. So distinguishing between different flights isn't as easy as looking for onGround state messages either. We are continuously working on a good solution here.

However, we recently implemented flight tracks for live data which in some way or another is very similar to what you are trying to accomplish because a track should always start where a plane had the last takeoff or at least where the aircraft entered the coverage area of the network. The main challenge is to determine where a flight starts and where it ends. Though the track data is reduced to a minimum number of points and therefore does not suffice as a source for all positional data of a flight, it always includes the start of the current flight (best effort determination) of an aircraft. You could use the timestamp of that first flight track point as a reference value in order to correlate data from /api/states/all to the last or the current flight. You are only able to access the last start point because the tracks are currently only available for live data and you are only able to determine the most recent track. But by caching start point timestamps you could build a function which returns a flightId for a combination of timestamp and icao.

A track can be requested via /api/tracks/?icao24=<icao>. So /api/tracks/?icao24=4baa4a returns the track for the aircraft with icao24 "4baa4a" if that aircraft is currently live. Since this was only implemented very recently it is neither part of the official API documentation, nor intended for use apart from our web frontend. Also the response data structure might be subject to changes. So please be aware of that if you are considering it as a dependency for your project :)

Hope this helps.

Cheers,
Marco

Please Log in or Create an account to join the conversation.

6 years 5 months ago #286 by jluebbe
Replied by jluebbe on topic Flight Id's
When tried this API call for several hex codes, "callsign":null was returned while other parameters seem to be ok.

Please Log in or Create an account to join the conversation.

6 years 5 months ago #289 by schaefer
Replied by schaefer on topic Flight Id's
Right, probably not implemented yet since the tracks API is not "official" and you can always get the callsign from the official API:

opensky-network.org/api/tracks/?icao24=4baa4a
vs.
opensky-network.org/api/states/all?icao24=4baa4a

Please Log in or Create an account to join the conversation.

6 years 4 months ago #306 by fuchs
Replied by fuchs on topic Flight Id's
Hi,

the tracks API has been fixed and will also return callsigns, now.

Best,
Markus
The following user(s) said Thank You: jluebbe

Please Log in or Create an account to join the conversation.

6 years 4 months ago #307 by jluebbe
Replied by jluebbe on topic Flight Id's
Hi,
a few questions to the behaviour of these tracks:
How long is the track available after the aircraft disappeared?
Is there a time limit for the length of the track? When I try to obtain data for LH406 (TXL-JFK, today with icao24=3c6569), the starting point seems to be gone. Instead, the track starts somewhere close to the coast of the Netherlands.

Please Log in or Create an account to join the conversation.

6 years 4 months ago - 6 years 4 months ago #308 by fuchs
Replied by fuchs on topic Flight Id's
Hi,

How long is the track available after the aircraft disappeared?

Tracks are available until our algorithm detects that a new flight has started. This is the case (among others) if the aircraft changes its "on ground" state or the callsign. Furthermore, it can also happen that a track of a finished flight is displaced from the cache and cannot be retrieved anymore.

The reason for this behavior is that at the moment we only provide tracks for ongoing flights. That's also the reason why we did not add any note to the official API documentation . However, flight tracks for historical data is on our (loooong) TODO list :)

When I try to obtain data for LH406 (TXL-JFK, today with icao24=3c6569), the starting point seems to be gone. Instead, the track starts somewhere close to the coast of the Netherlands.

We have had some bad receiver in the past which comes back once in a while and provides us with wrong callsigns. It was/is located in the Netherlands. When an aircraft enters the range of this malfunctioning receiver it provides a different callsign which leads to the track being reset. This was probably the case for LH406, too.

Is there a time limit for the length of the track?

As long as the aircraft is on the same flight, there is no time limit. We have a limit on the number of way points which is 2400. In practice this is never reached as we are not storing every single position as long as the aircraft is not turning.

Hope that helps!

Markus

Please Log in or Create an account to join the conversation.

6 years 4 months ago #315 by jluebbe
Replied by jluebbe on topic Flight Id's
Are the METARs recorded by OpenSky Network? An idea to find the closest airport at the end of the route could be a request for the METARs in a certain range around the coordinates (aviationweather.ncep.noaa.gov/dataserver/example?datatype=metar). The METAR provides more or less location and altitude of the airfield. And the real altitude above ground could be calculated.

Please Log in or Create an account to join the conversation.

6 years 4 months ago #325 by fuchs
Replied by fuchs on topic Flight Id's

Are the METARs recorded by OpenSky Network? An idea to find the closest airport at the end of the route could be a request for the METARs in a certain range around the coordinates (aviationweather.ncep.noaa.gov/dataserver/example?datatype=metar). The METAR provides more or less location and altitude of the airfield. And the real altitude above ground could be calculated.


Work in progress :)

Please Log in or Create an account to join the conversation.

3 years 2 months ago #1411 by 42mwmiguel
Replied by 42mwmiguel on topic Flight Id's
I am trying to set up an API for one aircraft so that I can pull the flight time for any tracked flights. I just need to know the total flight time for each flight. Can anyone offer any advice on an API for that?

Thank you,

Please Log in or Create an account to join the conversation.

3 years 2 months ago #1413 by jluebbe
Replied by jluebbe on topic Flight Id's
Maybe, you could use this API endpoint of the OpenSky API
opensky-network.org/apidoc/rest.html#flights-in-time-interval
and subtract lastSeen from firstSeen. However, the precision of this method depends on how good the coverage for that flight is. If arrival or departure are out of the OpenSky Network detection range, the estimated flight duration would be too small.
The following user(s) said Thank You: strohmeier

Please Log in or Create an account to join the conversation.

2 years 10 months ago #1516 by strohmeier
Replied by strohmeier on topic Flight Id's
That's currently not offered live and unlikely to happen - the issue is that it is not trivial really to identify when a flight starts/stops.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
This website uses cookies to offer you the best experience of our services. By using this website you agree to our privacy policy!