If you have no idea what HTTP Requests, json, xml, sockets, javascript, html are, basically, if you’re not a developer then move along, this topic if not for you
GetSessionsInfo.aspx
Use this call to get the current server list. This should be the 1st call you send.
Parameters: apikey
Flights.aspx
Use this call to get all current flights for specified server
Parameters: apikey, sessionid, positionsonly [boolean as string]
Notes: Use the positionsonly if you just want a quick overview of where traffic is
FlightDetails.aspx
Use this call to get flight details
Parameters: apikey, flightid
GetATCFacilities.aspx
Use this call to get the list of active ATC Facilities for specified server
Parameters: apikey, sessionid
UserDetails.aspx
Use this call to get information about a user
Parameters: apikey
Post Request: a json object containing an array of strings named UserIDs.
GetFlightPlans.aspx
Parameters: apikey, sessionid
Data Format:
[DataContract]
public enum FlightPlanType
{
[EnumMember]
VFR,
[EnumMember]
IFR
}
[DataContract]
public class FlightPlanInfo
{
[DataMember]
public Guid EntityID { get; set; } // Pilot ID
[DataMember]
public string[] Waypoints { get; set; }
[DataMember]
public FlightPlanType FlightPlanType { get; set; }
/// <summary>
/// Filed Altitude in Feet
/// </summary>
[DataMember]
public int Altitude { get; set; }
/// <summary>
/// Filed Airspeed in KTS
/// </summary>
[DataMember]
public int Speed { get; set; }
[DataMember]
public string DepartureAirportCode { get; set; }
[DataMember]
public string DestinationAirportCode { get; set; }
[DataMember]
public TimeSpan EstimatedTimeEnroute { get; set; }
[DataMember]
public String Remarks { get; set; }
[DataMember]
public DateTime DepartureTime { get; set; }
[DataMember]
public string[] AlternateDestinations { get; set; }
[DataMember]
public TimeSpan FuelOnBoard { get; set; }
[DataMember]
public Guid FlightID { get; set; }
[DataMember]
public DateTime LastUpdate { get; set; }
}
Rules:
An API Key is required. Please contact us with your project idea to get an API key.
All apps are required to have a timeout feature if the app isn’t being used. We don’t want users to have the app running for hours if no-one is looking.
So if no action is taken for 15 minutes, have your apps stop downloading new content unless the user presses a button. (FlightRadar24 does this on their site).
No permanent storing of data retrieved via the API is permitted. (You cannot keep the data in your own database) If you need additional functionality from the API, please contact us).
Please follow this or your app key will be deactivated. (when we have them in place)
Haha I’m always eager to learn! I’ve always wanted to know how to program apps. It would be fun to code an app for you guys but I have Zero brains in that field ;)
Got to continue with my app soon and get it running even nicer than before :smile:
The ATC API seems interesting, I’m thinking favourite users/push notifications for when they come online… :)
I can position this on a map with lat/lng coordinates and name, however, is there any way we could query for the FrequencyID in order to get more info about it? Info such as frequency name, type, grouping, frequency… Cheers :)
FrequencyID is a Guid generated from the FrequencyName+Type+FrequencyInteger
For now, you can use this as a ref for the Type item:
Ground = 0
Tower,
Unicom,
Clearance,
Approach,
Departure,
Center,
ATIS,
Aircraft,
Recorded,
Unknown,
Unused
If you want to find out exactly what it is, here’s how I generate the ID from the X-Plane Data:
// For Tower/Ground/Unicom
var fullFrequencyName = frequency.ICAO + frequency.FrequencyType.ToString() + frequency.IntegerFrequency.ToString();
// For Approach/Departire/Center, names are curated… and it’s difficult to post it here…
var fullFrequencyName = frequency.Name + frequency.FrequencyType.ToString() + frequency.IntegerFrequency.ToString();
// Generate the Guid from the frequency name
using (MD5 md5 = MD5.Create())
{
byte hash = md5.ComputeHash(Encoding.Default.GetBytes(fullFrequencyName));
return new Guid(hash);
}
By the way, talking about notifications…one thing that would be nice is for controllers to get a notification when lots of airplanes are in an area with no controllers on duty :)