The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::OpenSky::Core::StateVector - A class representing a state from the OpenSky Network API

VERSION

version 0.4

SYNOPSIS

    use WebService::OpenSky;
    my $opensky = WebService::OpenSky->new;
    my $states  = $opensky->get_states;
    while ( my $vector = $states->next ) {
        say $vector->callsign;
        say $vector->latitude;
        say $vector->longitude;
    }

DESCRIPTION

This class is not to be instantiated directly. It is a read-only class representing an OpenSky state vector.

All attributes are read-only.

icao24

Unique ICAO 24-bit address of the transponder in hex string representation.

callsign

Callsign of the vehicle (8 chars). Can be null if no callsign has been received.

origin_country

Country name inferred from the ICAO 24-bit address.

time_position

Unix timestamp (seconds) for the last position update. Can be null if no position report was received by OpenSky within the past 15s.

last_contact

Unix timestamp (seconds) for the last update in general. This field is updated for any new, valid message received from the transponder.

longitude

WGS-84 longitude in decimal degrees. Can be null.

latitude

WGS-84 latitude in decimal degrees. Can be null.

baro_altitude

Barometric altitude in meters. Can be null.

on_ground

Boolean value which indicates if the position was retrieved from a surface position report.

velocity

Velocity over ground in m/s. Can be null.

true_track

True track in decimal degrees clockwise from north (north=0°). Can be null.

vertical_rate

Vertical rate in m/s. A positive value indicates that the airplane is climbing, a negative value indicates that it descends. Can be null.

sensors

IDs of the receivers which contributed to this state vector. Is null if no filtering for sensor was used in the request.

geo_altitude

Geometric altitude in meters. Can be null.

squawk

The transponder code aka Squawk. Can be null.

spi

Whether flight status indicates special purpose indicator.

position_source_name

Returns the name of the position source. Can be an empty string.

position_source

Integer. Origin of this state’s position:

    0 = ADS-B
    1 = ASTERIX
    2 = MLAT
    3 = FLARM

category_name

Returns the name of the aircraft category. Can be an empty string.

If $opensky->get_states is called without extended set to true, this method will always return an empty string.

category

Integer. Aircraft category. Can be null.

    0 = No information at all
    1 = No ADS-B Emitter Category Information
    2 = Light (< 15500 lbs)
    3 = Small (15500 to 75000 lbs)
    4 = Large (75000 to 300000 lbs)
    5 = High Vortex Large (aircraft such as B-757)
    6 = Heavy (> 300000 lbs)
    7 = High Performance (> 5g acceleration and 400 kts)
    8 = Rotorcraft
    9 = Glider / sailplane
    10 = Lighter-than-air
    11 = Parachutist / Skydiver
    12 = Ultralight / hang-glider / paraglider
    13 = Reserved
    14 = Unmanned Aerial Vehicle
    15 = Space / Trans-atmospheric vehicle
    16 = Surface Vehicle – Emergency Vehicle
    17 = Surface Vehicle – Service Vehicle
    18 = Point Obstacle (includes tethered balloons)
    19 = Cluster Obstacle
    20 = Line Obstacle

AUTHOR

Curtis "Ovid" Poe <curtis.poe@gmail.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by Curtis "Ovid" Poe.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)