Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

Determining take-offs and landings


marcus holmes
 Share

Recommended Posts

marcus holmes
Posted
Posted

I am looking at creating a Vatsim Stats website/app, but I am a little stuck on how programs determine when a pilot on the network takes-off and lands at an airport using the Vatsim API Json file. It could be done based off the pilots altitude, but every airport has a different elevation, but their is no departure or arrive airport elevation info in the Json file.

Does anyone know how take-offs and landing are determined?

815851

Link to comment
Share on other sites

Aidan Deschene
Posted
Posted

From my knowledge the current VATSIM statistics page is based off the connections. Earlier this month I had one flight from Punta Cuna to Jacksonville, and I had connection issues. I then recollected the statistics from that partial flight that was broken up per connection. Thus concluding that both pilot, controller, and observers connections are through connections. To get every together it'd be a little harder to recollect the data (possibly by plan, date, and then combined to find all data). I knew that there is a few open source databases that have airport elevations or TDZE (touch down zone elevations), but I can not remember them by hand, and you'd have to look through the available sources.

crisp_logo.png
Aidan Deschene
Training Administrator
VATSIM Cleveland ARTCC
[email protected]

Link to comment
Share on other sites

Luca Benelli
Posted
Posted

You may look at changes in altitude and speed. i once did something which worked quite well by simply measuring looking at speeds below 40 knots. If you consider two cycles you can even interpolate a bit, this might become an issue for helicopters. in that case you probably need to create a DB of airport altitudes (or maybe a change of less than 2 feet is a landing? :D ). I even had some PHP code working out departure and arrival times for real time events. 

Luca Benelli - C3 - P2

Link to comment
Share on other sites

marcus holmes
Posted
Posted (edited)

Many thanks Aidan and Luca for your responses. I was also looking at basing the take-off and landing by going off the speed data, similar to what Luca said. When the speed is above a certain point it will be classed that the aircraft has departed(taken-off) from the departure airport, then when that same flight speed drops below a certain speed it would then be classed as landed at the arrival airport. 

I think I know where I can get a database of airport elevations, but I believe trying to base take-off and landings based off altitude and airport elevation will be a bit of a headache and would require more coding. I am pretty new to coding and this is my first coding project so I want to try and avoid making the code too over complicated. 

Edited by marcus holmes

815851

Link to comment
Share on other sites

Javier Larroulet
Posted
Posted (edited)

At my vACC we use a little more complex approach. I'll give you a brief summary

  1. We have a database with all airport ICAO codes that we know of, each with its latitude and longitude
  2. From the VATSIM feed we determine the departure and arrival airports in the flight plan, plus the current location of the aircraft
  3. We calculate the great-circle distance from the aircraft to each airport. We use a simplified model that assumes the earth is a sphere and not the WGS84 ellipsoid (to make the math simpler, which has a small error which is negligible for our purposes
  4. If the distance from the aircraft to the departure airport is less than (if I remember correctly) 2 kilometers, we assume the aircraft is on the ground and departing. If the distance from the aircraft to the arrival airport is less than 2 kilometers, we assume the aircraft is on the ground and arrived/landed. If neither of the former is true, we flag the aircraft as "enroute".

You can see ON THIS LINK how to calculate the great circle distance between two points (in this case one point is the aircraft, the other point is one of the airports)

The end result can be seen on my vACC's website HERE

 

Edited by Javier Larroulet

Javier Larroulet (C3) - Chile vACC

18.png

Link to comment
Share on other sites

marcus holmes
Posted
Posted

I have scrapped the idea of using just speed to work out if an aircraft has arrived or landed. I have managed to get hold of a json file which contains over over 26000 airport and airfields worldwide, it also contains the latitude and longitude as well as elevation of each airport. So now I am looking at basing it from the latitude and longitude relative to the aircraft position to the airport as well as using the aircraft height along side the elevation of the airport it is departing from or arriving too. 

Now all I need to do it work out how I will code it.

815851

Link to comment
Share on other sites

Javier Larroulet
Posted
Posted

If you need some help and starting points for coding the distance part, shoot me an email at jlarroulet at [same domain of the working example I posted earlier]... I have a couple of PHP snippets that may help

Javier Larroulet (C3) - Chile vACC

18.png

Link to comment
Share on other sites

 Share