Skip to content

Extend pilots API fields #12

@Kahn

Description

@Kahn

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
  • Departing
  • Enroute
  • Arriving
  • Disembarking

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions