File Coverage

lib/WebService/OpenSky/Core/Flight.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


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