line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::GPSD3::Return::Satellite; |
2
|
5
|
|
|
5
|
|
891
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
219
|
|
3
|
5
|
|
|
5
|
|
24
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
166
|
|
4
|
5
|
|
|
5
|
|
24
|
use base qw{Net::GPSD3::Return::Unknown}; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
1607
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION='0.13'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::GPSD3::Return::Satellite - Net::GPSD3 Return Satellite Object |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Net::GPSD3 0.13; |
15
|
|
|
|
|
|
|
my $gpsd = Net::GPSD3->new; |
16
|
|
|
|
|
|
|
my $poll = $gpsd->poll; #new method in 0.12 |
17
|
|
|
|
|
|
|
my $sky = $poll->sky; #new method in 0.13 |
18
|
|
|
|
|
|
|
printf "Reported: %s, Used: %s\n", $sky->reported, $sky->used; |
19
|
|
|
|
|
|
|
printf "PRN: %s\n", join(", ", map {$_->used ? $_->prn : "-".$_->prn} $sky->Satellites); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Provides a Perl object interface to the Satellite data structure returned by the GPSD daemon. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
An example JSON string: |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
{"PRN":15,"el":77,"az":123,"ss":0, "used":false}, |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 class |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Returns the object class |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 string |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Returns the JSON string |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 parent |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Return the parent Net::GPSD object |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 PRN, prn |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Returns the GPS Satellites Pseudo Random Number Identifier |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
1
|
1
|
5
|
sub PRN {shift->{"PRN"}}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
*prn=\&PRN; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 used |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Returns a L true or false object. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
1
|
10
|
sub used {shift->{"used"}}; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 az, azimuth |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Returns the azimuth, degrees from true north. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
1
|
1
|
5
|
sub az {shift->{"az"}}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
*azimuth=\&az; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 el, elevation |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Returns the Elevation in degrees. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
1
|
|
|
1
|
1
|
5
|
sub el {shift->{"el"}}; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
*elevation=\⪙ |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 ss |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Signal strength in dBHz. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Note: C/N0 is dBHz usually, but trimbles can also emit poorly specified Amplitude Measurement Units. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
1
|
|
|
1
|
1
|
4
|
sub ss {shift->{"ss"}}; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 BUGS |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Log on RT and Send to gpsd-dev email list |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 SUPPORT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Try gpsd-dev email list |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 AUTHOR |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Michael R. Davis |
104
|
|
|
|
|
|
|
CPAN ID: MRDVT |
105
|
|
|
|
|
|
|
STOP, LLC |
106
|
|
|
|
|
|
|
domain=>michaelrdavis,tld=>com,account=>perl |
107
|
|
|
|
|
|
|
http://www.stopllc.com/ |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 COPYRIGHT |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This program is free software licensed under the... |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The BSD License |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 SEE ALSO |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
L, L |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; |