Output
The messages output by the endpoint are separated by a new line and are encoded in the JSON format. Two different types of messages can appear when calling the endpoint (target update and status message), which you can distinguish by their associated JSON keys.
#
Target UpdateThe Target Update message contains all the fields describing a positional update for an aircraft. It is delivered in the following format:
{"target": {...}}
. The fields included in the Target Update message are described below.
#
Contents#
ADS-B position informationThe fields in this table are taken directly from ADS-B messages:
Field | Type | Description | Example |
---|---|---|---|
icao_address | string | Hexadecimal representation of ICAO 24-bit address | "02013F" |
latitude | float | Latitude in degrees, between -90 and 90 (both inclusive) | -26.80491819 |
longitude | float | Longitude in degrees, between -180 (exclusive) and 180 (inclusive) | 28.64151588 |
altitude_baro | integer | Barometric altitude in feet | 38000 |
on_ground | boolean | Specifies if the aircraft is on the ground. true if the aircraft is on the ground, false if the aircraft is airborne | false |
heading | float | Aircraft heading in degrees (0 is North) | 273 |
speed | float | Aircraft speed in knots | 477 |
vertical_rate | integer | Vertical rate of ascent/descent, in ft/min | 100 |
callsign | string | Call sign | "RAM200" |
squawk | string | Mode-A squawk code | 6617 |
#
Spire target update metadataThese fields are merged into each record to give additional information regarding the ADS-B message details:
Field | Type | Description | Example |
---|---|---|---|
timestamp | datetime | Timestamp when the message was received by ADS-B receiver | "2019-06-06T07:55:25Z" |
source | string | The identification of the satellite in Satellite ADS-B data | “FM83” |
ingestion_time | datetime | Timestamp when record was stored to the database | "2019-06-06T07:55:25.602Z" |
collection_type | string | Collection type satellite or terrestrial | "satellite" |
#
Aircraft InformationThe following fields are enhanced data and may be present in the record depending on information availability:
Field | Type | Description | Example |
---|---|---|---|
aircraft_type_icao | string | Aircraft type (ICAO code) | "A320" |
tail_number | string | Aircraft Registration | "G-EUUL" |
aircraft_type_name | string | Aircraft type name | "Airbus A320-232" |
airline_iata | string | IATA code of the airline | "BA" |
airline_name | string | Human readable name of the airline | "British Airways" |
#
Flight InformationThe following fields are enhanced data and may be present in the record depending on information availability:
Field | Type | Description | Example |
---|---|---|---|
flight_number | string | Flight number (IATA format) | "WN9002" |
departure_airport_icao | string | Departure airport ICAO code | "EHAM" |
departure_airport_iata | string | Departure airport IATA code | "AMS" |
arrival_airport_icao | string | Arrival airport ICAO code | "EGNX" |
arrival_airport_iata | string | Arrival airport IATA code | 'EMA" |
departure_scheduled_time | datetime | Scheduled departure time, format is in ISO 8601 | "2019-06-06T07:55:25Z" |
departure_estimated_time | datetime | Departure estimated time, format is in ISO 8601 | "2019-06-06T07:55:25Z" |
arrival_scheduled_time | datetime | Scheduled arrival time, format is in ISO 8601 | "2019-06-06T07:55:25Z" |
arrival_estimated_time | datetime | Estimated arrival time, format is in ISO 8601 | "2019-06-06T07:55:25Z" |
departure_utc_offset | string | Departure airport timezone offset from UTC | "+0600" |
arrival_utc_offset | string | Arrival airport timezone offset from UTC | "-0700" |
#
Flight AnalyticsThe following fields are enhanced data and may be present in the record depending on information availability:
Field | Type | Description | Example |
---|---|---|---|
takeoff_time | datetime | Take off time, format is in ISO 8601 | "2019-06-06T07:55:25Z" |
landing_time | datetime | Landing time, format is in ISO 8601 | "2019-06-06T07:55:25Z" |
#
SampleHere is how a typical Target Updated broadcasted by our API looks like:
#
Status messageThe message is used to communicate errors, warnings and info level codes back to the client. The level can be set to:
- ERROR (
3xx
codes) - WARN (
2xx
codes) - INFO (
1xx
codes)
The code can be used by clients to detect certain conditions and act on them. The status is delivered in this format: