Welcome, Guest
Username: Password: Remember me

TOPIC: State API - time range.

State API - time range. 7 months 3 weeks ago #1049

  • Herson
  • Herson's Avatar
  • Offline
  • New Member
  • Posts: 4
Is there a version of the State API that accepts "begin" and "end" as time input parameters?

For example, instead of:

opensky-network.org/api/states/all?time=...7.8229&lomax=10.5226

opensky-network.org/api/states/all?begin...7.8229&lomax=10.5226

If one does not exist would it be possible to create such an API? What I'm trying to achieve is to list all aircraft that entered a geospatial area in the past 60 minutes. Is there a suggested work around?

Thanks.

Richard.
The administrator has disabled public write access.

State API - time range. 7 months 3 weeks ago #1050

  • jluebbe
  • jluebbe's Avatar
  • Offline
  • Senior Member
  • Posts: 57
  • Thank you received: 20
Hi, what are you looking for?
The callsigns or icao24 ids of the aircraft, that entered the respective area or their tracks?
Is the respective area always a rectangle or should it be some airspace which could be described by?
Are you always looking for the last hour?

I am playing around with some databases to identify which flight touched which airspace on a certain day.
I didn't publish that part on GitHub yet.
The administrator has disabled public write access.

State API - time range. 7 months 2 weeks ago #1055

  • Herson
  • Herson's Avatar
  • Offline
  • New Member
  • Posts: 4
Thanks for your response. Currently I'm using a rectangle but would prefer a circle that is defined by a radius parameter. Although the rectangle is a larger area I can then calculate the distance from my baseline point to filter the results using a python/php script i.e. 1 mile from a geo location.

I'm looking for all attributes relating to the existing "states" service which includes the Call Sign, ICAO24, altitude, long & lat, velocity, Epoch, vertical rate.

I am interested in going back say 3 months but I appreciate that's an expensive query, so I run the "states" Web Service API every 40-60 minutes and then store the results in a local database for further analysis.

So if you have any code or knowledge in this area that you are willing to share that would be very much appreciated.

Thanks Richard
The administrator has disabled public write access.

State API - time range. 7 months 2 weeks ago #1056

  • jluebbe
  • jluebbe's Avatar
  • Offline
  • Senior Member
  • Posts: 57
  • Thank you received: 20
What should be the maximum size of your radius?

Is the location of your circle always the same or should it be moved?

I don't understand why you need aircraft properties like lat/lon/speed/vert. rate if you are consuming data only every 40 minutes as a snapshot. I assume that you would like to have the complete flight paths of all flights that passed your area? Just the part within your area or from departure to destination?

Are you interested in scheduled flights or any flight including general aviation if it is equipped with ADS-B?

I am using Redis databases for short-term storage and mysql for long-term storage. Data is processed using Python. My interest is to verify and combine flight route information from different data sources.
Last Edit: 7 months 2 weeks ago by jluebbe.
The administrator has disabled public write access.

State API - time range. 7 months 2 weeks ago #1057

  • Herson
  • Herson's Avatar
  • Offline
  • New Member
  • Posts: 4
Okay. The radius would be in the range of 1- 9 miles. I'm tracking flight events that occur within the defined radius, I'm not interested in the flight path.

I track every 10-15 seconds (aka snapshots) so if a flight event takes more than 10-15 seconds to traverse the defined radius I would get multiple occurrences of the Call Sign and ICAO24, but the epoch would certainly be different. Also I can use the information to determine the locations of flight holding stacks i.e. where the planes circle at different altitudes.

I don't have direct access to the Redis databases only to the APIs. I'm not sure what the "state" API uses Redis or a reporting database? Could your query be fronted by an API or does it require direct access to Redis?

Also, I do need the majority of the data provided by the "state" API for further aggregations and analytics.

Richard.
The administrator has disabled public write access.

State API - time range. 7 months 2 weeks ago #1058

  • jluebbe
  • jluebbe's Avatar
  • Offline
  • Senior Member
  • Posts: 57
  • Thank you received: 20
I am consuming data via the states API for a certain region (in my case the world) about every 10-15 seconds. Then I ignore any data with incomplete information like missing position data or no callsign. This filtered data is put into a Redis database running in memory on my Raspberry Pi. To avoid the memory totally filled, you could use an expire attribute.
In my case I am storing which aircraft was flying on a certain day to download one day later the the flight path from the API (/flights/aircraft).

If you are a researcher and applied for access to the historical database, the traffic library created by Xavier Olive might also be helpful:
traffic
Last Edit: 7 months 2 weeks ago by jluebbe.
The administrator has disabled public write access.
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!