| 1 | # ABSTRACT: Flight class | ||
| 2 | |||
| 3 | package OpenSky::API::Core::Flight; | ||
| 4 | |||
| 5 | our $VERSION = '0.004'; | ||
| 6 | |||
| 7 | use Moose; | ||
| 8 | use experimental qw(signatures); | ||
| 9 | |||
| 10 | sub _get_params ($class) { | ||
| 11 | return qw( | ||
| 12 | icao24 | ||
| 13 | firstSeen | ||
| 14 | estDepartureAirport | ||
| 15 | lastSeen | ||
| 16 | estArrivalAirport | ||
| 17 | callsign | ||
| 18 | estDepartureAirportHorizDistance | ||
| 19 | estDepartureAirportVertDistance | ||
| 20 | estArrivalAirportHorizDistance | ||
| 21 | estArrivalAirportVertDistance | ||
| 22 | departureAirportCandidatesCount | ||
| 23 | arrivalAirportCandidatesCount | ||
| 24 | ); | ||
| 25 | } | ||
| 26 | has [ __PACKAGE__->_get_params() ] => ( is => 'ro', required => 1 ); | ||
| 27 | |||
| 28 | __PACKAGE__->meta->make_immutable; | ||
| 29 | |||
| 30 | __END__ | ||
| 31 | |||
| 32 | =pod | ||
| 33 | |||
| 34 | =encoding UTF-8 | ||
| 35 | |||
| 36 | =head1 NAME | ||
| 37 | |||
| 38 | OpenSky::API::Core::Flight - Flight class | ||
| 39 | |||
| 40 | =head1 VERSION | ||
| 41 | |||
| 42 | version 0.004 | ||
| 43 | |||
| 44 | =head1 DESCRIPTION | ||
| 45 | |||
| 46 | This class is not to be instantiated directly. It is a read-only class representing | ||
| 47 | L<OpenSky flight responses|https://openskynetwork.github.io/opensky-api/rest.html#flights-in-time-interval>. | ||
| 48 | |||
| 49 | All attributes are read-only. | ||
| 50 | |||
| 51 | =head1 METHODS | ||
| 52 | |||
| 53 | =head2 icao24 | ||
| 54 | |||
| 55 | Unique ICAO 24-bit address of the transponder in hex string representation. | ||
| 56 | All letters are lower case. | ||
| 57 | |||
| 58 | =head2 firstSeen | ||
| 59 | |||
| 60 | Estimated time of departure for the flight as Unix time (seconds since epoch). | ||
| 61 | |||
| 62 | =head2 estDepartureAirport | ||
| 63 | |||
| 64 | ICAO code of the estimated departure airport. Can be null if the airport could | ||
| 65 | not be identified. | ||
| 66 | |||
| 67 | =head2 lastSeen | ||
| 68 | |||
| 69 | Estimated time of arrival for the flight as Unix time (seconds since epoch) | ||
| 70 | |||
| 71 | =head2 estArrivalAirport | ||
| 72 | |||
| 73 | ICAO code of the estimated arrival airport. Can be null if the airport could | ||
| 74 | not be identified. | ||
| 75 | |||
| 76 | =head2 callsign | ||
| 77 | |||
| 78 | Callsign of the vehicle (8 chars). Can be null if no callsign has been | ||
| 79 | received. If the vehicle transmits multiple callsigns during the flight, we | ||
| 80 | take the one seen most frequently. | ||
| 81 | |||
| 82 | =head2 estDepartureAirportHorizDistance | ||
| 83 | |||
| 84 | Horizontal distance of the last received airborne position to the estimated | ||
| 85 | |||
| 86 | =head2 estDepartureAirportVertDistance | ||
| 87 | |||
| 88 | Vertical distance of the last received airborne position to the estimated | ||
| 89 | departure airport in meters | ||
| 90 | |||
| 91 | =head2 estArrivalAirportHorizDistance | ||
| 92 | |||
| 93 | Horizontal distance of the last received airborne position to the estimated | ||
| 94 | arrival airport in meters | ||
| 95 | |||
| 96 | =head2 estArrivalAirportVertDistance | ||
| 97 | |||
| 98 | Vertical distance of the last received airborne position to the estimated | ||
| 99 | arrival airport in meters | ||
| 100 | |||
| 101 | =head2 departureAirportCandidatesCount | ||
| 102 | |||
| 103 | Number of other possible departure airports. These are airports in short | ||
| 104 | distance to C<estDepartureAirport>. | ||
| 105 | |||
| 106 | =head2 arrivalAirportCandidatesCount | ||
| 107 | |||
| 108 | Number of other possible departure airports. These are airports in short | ||
| 109 | distance to C<estArrivalAirport>. | ||
| 110 | |||
| 111 | =head1 AUTHOR | ||
| 112 | |||
| 113 | Curtis "Ovid" Poe <curtis.poe@gmail.com> | ||
| 114 | |||
| 115 | =head1 COPYRIGHT AND LICENSE | ||
| 116 | |||
| 117 | This software is Copyright (c) 2023 by Curtis "Ovid" Poe. | ||
| 118 | |||
| 119 | This is free software, licensed under: | ||
| 120 | |||
| 121 | The Artistic License 2.0 (GPL Compatible) | ||
| 122 | |||
| 123 | =cut |