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.

Parsing vatsim-data for use by a VA-no latlong for dep/dest


Wayne Szot 1128963
 Share

Recommended Posts

Wayne Szot 1128963
Posted
Posted

Hello,

 

If this is posted in the wrong spot, please guide me correctly .

 

In downloading the vatsim-data from the servers, for each pilot I get all of the fields... but planned_depairport_lat:planned_depairport_lon:planned_destairport_lat:planned_destairport_lon are all set to 0 for everyone... how can I get the lat/long for a pilot's departure and arrival airports?

 

This is a sample of what I'm getting:

 

callsign- ******, cid- *******, name- ***********, clienttype- PILOT, frequency- , latitude- 21.44186, longitude- -71.13689, altitude- 32934, groundspeed- 515, planned_aircraft- T/B737/F, planned_tascruise- 470, planned_depairport- KMIA, planned_altitude- 33000, planned_destairport- TJSJ, server- USA-E, protrevision- 100, rating- 1, transponder- 4637, facilitytype- , visualrange- , planned_revision- 4, planned_flighttype- I, planned_deptime- 0, planned_actdeptime- 49, planned_hrsenroute- 0, planned_minenroute- 0, planned_hrsfuel- 0, planned_minfuel- 0, planned_altairport- , planned_remarks- FS9 AS6, planned_route- SKIPS1 SKIPS BR53V RAJAY A555 ZQA A555 GTK A555 HARDE A555 IDAHO RTE6, planned_depairport_lat- 0, planned_depairport_lon- 0, planned_destairport_lat- 0, planned_destairport_lon- 0, atis_message- , time_last_atis_received- , time_logon- 20111201003347, heading- 121, QNH_iHg- 29.856, QNH_Mb- 1011:

 

Thanks!

Link to comment
Share on other sites

Luke Kolin
Posted
Posted
how can I get the lat/long for a pilot's departure and arrival airports?

 

I'd look it up based on the ICAO codes.

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Wayne Szot 1128963
Posted
Posted

Where is the best place to do that?

Link to comment
Share on other sites

Romano Lara
Posted
Posted

You can try AirNav or World Aero Data.

Romano Lara
vACC Philippines, Manager - Training & Standards
04819c_4181f294a6c34b5aa4d8a82c0fb448c5~mv2.webp

Link to comment
Share on other sites

Wayne Szot 1128963
Posted
Posted

Thanks Romano! World Aero Data looks like the ticket... the only bummer is that will be 2 extra queries I need for each pilot... does anyone know why vatsim-data is returning 0's? If I can get the data straight from vatsim it will save CPU ticks and bandwidth.

Link to comment
Share on other sites

Luke Kolin
Posted
Posted
the only bummer is that will be 2 extra queries I need for each pilot...

 

Not the end of the world, especially if your database server has a decent amount of cache. We do 1,000 queries a minute and the load average on the box is usually under 1.

 

does anyone know why vatsim-data is returning 0's? If I can get the data straight from vatsim it will save CPU ticks and bandwidth.

 

They probably want to save CPU ticks and bandwidth. In their world, they are expensive.

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

 Share