vatpac-technology / vatsim-map

Experimenting with the new VATSIM API to provide a generic FIR map for VATCCs.
https://map.vatpac.org
Apache License 2.0
7 stars 2 forks source link

Extend pilots API fields #12

Open Kahn opened 2 years ago

Kahn commented 2 years ago

The pilot API adds three new fields but they are not usefully implemented.

{ "aerodrome": false, "tag_alt": "A043", "tag_gs": "0" }

This test is connected at YHOT 4255 MSL. The aerodrome tag should show YHOT while tag_alt and tag_gs are not really useful by themselves.

Create a new set of tags and expand on current tags.

tag_alt

Formatted altitude string handling transition level changes. Only displayed when airborne so that we can fix the shitty inputs from some VATSIMers so that the following logic works.

    alt = string/100; // 33000 -> 330, 1000 -> 10, 340 -> 3.4
    if(alt <= 5){
        alt = alt * 100;
    }

25,000 ft = F250 10,000 ft = A100 9,500 ft = A095

Values: False, String

tag_gs

gs / 10 to match vatSys outputs.

Values: String

on_aerodrome

Values: False, or the ICAO code of the aerodrome polygon.

aerodrome_elevation

Values: False, or the on_aerodrome elevation AMSL.

phase

A map of flight phases.

Boarding

on_aerodrome == flight_plan.departure gs == 0

Departing

on_aerodrome == flight_plan.departure gs > 0 altitude == aerodrome_elevation +/- 100

Enroute

on_aerodrome == false gs > 0

Arriving

on_aerodrome == flight_plan.arrival gs > 0

Disembarking

on_aerodrome == flight_plan.arrival gs == 0

JoshuaMicallefYBSU commented 2 months ago

Seems this API feature has been removed in v3. Otherwise, what API link where you referencing?

Kahn commented 2 months ago

Pretty sure this was related to the internal pilots API https://map.vatpac.org/v1/pilots