line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::OpenSky::Core::Waypoint; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Waypoint class |
4
|
|
|
|
|
|
|
|
5
|
8
|
|
|
8
|
|
68
|
use WebService::OpenSky::Moose; |
|
8
|
|
|
|
|
24
|
|
|
8
|
|
|
|
|
76
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.4'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my @PARAMS = qw( |
10
|
|
|
|
|
|
|
time |
11
|
|
|
|
|
|
|
latitude |
12
|
|
|
|
|
|
|
longitude |
13
|
|
|
|
|
|
|
baro_altitude |
14
|
|
|
|
|
|
|
true_track |
15
|
|
|
|
|
|
|
on_ground |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
param [@PARAMS]; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
around 'BUILDARGS' => sub ( $orig, $class, $waypoint ) { |
21
|
|
|
|
|
|
|
my %value_for; |
22
|
|
|
|
|
|
|
@value_for{@PARAMS} = @$waypoint; |
23
|
|
|
|
|
|
|
return $class->$orig(%value_for); |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
20
|
sub _get_params ($class) {@PARAMS} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=encoding UTF-8 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
WebService::OpenSky::Core::Waypoint - Waypoint class |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 VERSION |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
version 0.4 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use WebService::OpenSky; |
45
|
|
|
|
|
|
|
my $opensky = WebService::OpenSky->new; |
46
|
|
|
|
|
|
|
my $flights = $opensky->get_arrivals_by_airport('KLAX', $start, $end); |
47
|
|
|
|
|
|
|
while ( my $flight = $flights->next ) { |
48
|
|
|
|
|
|
|
say $flight->callsign; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 DESCRIPTION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This class is not to be instantiated directly. It is a read-only class representing |
54
|
|
|
|
|
|
|
L<OpenSky waypoint responses|https://openskynetwork.github.io/opensky-api/rest.html#track-by-aircraft>. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
All attributes are read-only. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 METHODS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 C<time> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Time which the given waypoint is associated with in seconds since epoch (Unix time). |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 C<latitude> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
WGS-84 latitude in decimal degrees. Can be null. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 C<longitude> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
WGS-84 longitude in decimal degrees. Can be null. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 C<baro_altitude> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Barometric altitude in meters. Can be null. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 C<true_track> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
True track in decimal degrees clockwise from north (north=0°). Can be null. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 C<on_ground> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Boolean value which indicates if the position was retrieved from a surface position report. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Curtis "Ovid" Poe <curtis.poe@gmail.com> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Curtis "Ovid" Poe. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This is free software, licensed under: |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |