GPSD3/Return/Satellite.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 5 / 5 totaltotal 100% 32 / 32 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« GPSD3/Return/SUBFRAME.pm ↑ Summary GPSD3/Return/Unknown.pm »
1 package Net::GPSD3::Return::Satellite;
2 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use base qw{Net::GPSD3::Return::Unknown};
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 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 ▶sub PRN {shift->{"PRN"}};
Subroutine PRN: called CC=1 SCAR=0.0
Pod documented
50  
51 5 *prn=\&PRN;
52  
53 =head2 used
54  
55 Returns a L<JSON::XS::Boolean> true or false object.
56  
57 =cut
58  
59 2 ▶sub used {shift->{"used"}};
Subroutine used: called CC=1 SCAR=0.0
Pod documented
60  
61 =head2 az, azimuth
62  
63 Returns the azimuth, degrees from true north.
64  
65 =cut
66  
67 1 ▶sub az {shift->{"az"}};
Subroutine az: called CC=1 SCAR=0.0
Pod documented
68  
69 5 *azimuth=\&az;
70  
71 =head2 el, elevation
72  
73 Returns the Elevation in degrees.
74  
75 =cut
76  
77 1 ▶sub el {shift->{"el"}};
Subroutine el: called CC=1 SCAR=0.0
Pod documented
78  
79 5 *elevation=\&el;
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 ▶sub ss {shift->{"ss"}};
Subroutine ss: called CC=1 SCAR=0.0
Pod documented
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<Net::GPSD3>, L<Net::GPSD3::Return::Unknown>
120  
121 =cut
122  
123 5 1;
« GPSD3/Return/SUBFRAME.pm ↑ Summary GPSD3/Return/Unknown.pm »