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

Get controller location


Jacques Rascagneres
 Share

Recommended Posts

Jacques Rascagneres
Posted
Posted

I'm trying to make a map where I can draw controllers on a map as well as pilots. 
https://data.vatsim.net/v3/vatsim-data.json works pretty perfectly to get pilot information and pilot position however I can't see a way to obtain controller location? We have visual_range but no location is provided.

You are able to get location from https://data.vatsim.net/vatsim-data.json though. 

Would it be possible to get a latitude on longitude of controllers in v3. If this is already possible can you let me know how?

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
Tom Grozev
Posted
Posted

I know this is/was possible as it lat and lon data was in a previous version of the data api. Would be great to add back, only distinguishing bit of data without it is the callsign but there are duplicates around the world.

Link to comment
Share on other sites

  • 2 weeks later...
Pavel Vorobyev
Posted
Posted

I know this is a bit of an ugly hack, but. I myself have found a way out and finally can use JSON3 API. There is a tiny go project of mine https://github.com/viert/go-vatspy which loads and indexes vatspy data. The only thing I need to do to figure out the controller's coords is run FindAirport() with a controller prefix - everything before the first underscore, for example, in case of KIAD_GND I use KIAD, as well as for IAD_GND I use IAD (some people tend to use IATA prefixes instead of ICAO). This works quite well.

This is a controller I get from json3 API

{'cid': 1505429,
  'name': 'Ajay Powell',
  'callsign': 'IAD_GND',
  'frequency': '121.900',
  'facility': 3,
  'rating': 2,
  'server': 'USA-EAST',
  'visual_range': 20,
  'text_atis': None,
  'last_updated': '2021-02-16T08:07:38.5992779Z',
  'logon_time': '2021-02-16T07:54:56.8699668Z'},

And this is the response from FindAirport("IAD")

&{KIAD Washington Dc Washington Dulles Intl VA {38.944533 -77.455811} IAD KZDC false}

The VATspy data is more or less static, it updates with AIRAC, i.e. once a month or so and it's quite reliable.

  • Like 2
Link to comment
Share on other sites

Pavel Vorobyev
Posted
Posted (edited)

Sorry for using this topic as an announcement channel, but I can now confirm that go-vatspy library is now much closer to a production-ready state. It is in use by https://track-my-flight.live (check out the vatsim toggle button in the upper left corner) so it is and hopefully will be an actively developing project. The most noticeable change is that the lib is now capable of providing the dynamic vatsim data along with the static one, with real-time (well, almost) updates.

I have updated the project readme but if there are other developers interested in using the library I will definitely put some efforts into writing a proper doc for the project.

Feel free to try and post any issues you find to https://github.com/viert/go-vatspy

Edited by Pavel Vorobyev
Link to comment
Share on other sites

 Share