1Net::GPSD::Point(3)   User Contributed Perl Documentation  Net::GPSD::Point(3)
2
3
4

NAME

6       Net::GPSD::Point - Provides an object interface for a gps point.
7

SYNOPSIS

9         use Net::GPSD;
10         $obj=Net::GPSD->new(host=>"localhost",
11                             port=>"2947");
12         my $point=$obj->get;           #$point is a Net::GPSD::Point object
13         print $point->latlon. "\n";    #use a "." here to force latlon to a scalar
14
15       or to use Net::GPSD::Point objects in you own code.
16
17         use Net::GPSD::Point;
18         my $point=Net::GPSD::Point->new();
19         $point->lat(39.5432524);
20         $point->lon(-77.243532);
21         print $point->latlon. "\n";
22

DESCRIPTION

CONSTRUCTOR

25   new
26         my $point=Net::GPSD::Point->new();
27

METHODS

29   initialize
30   fix
31       Returns true if mode is fixed (logic based on the gpsd M[0] or O[14])
32
33         my $fix=$point->fix;
34
35   status
36       Returns DGPS status. (maps to gpsd S command first data element)
37
38         my $status=$point->status;
39
40   datetime
41       Returns datetime. (maps to gpsd D command first data element)
42
43         my $datetime=$point->datetime;
44
45   tag
46       Returns a tag identifying the last sentence received.  (maps to gpsd O
47       command first data element)
48
49         my $tag=$point->tag;
50
51   time
52       Returns seconds since the Unix epoch, UTC. May have a fractional part.
53       (maps to gpsd O command second data element)
54
55         my $time=$point->time;
56
57   errortime
58       Returns estimated timestamp error (%f, seconds, 95% confidence). (maps
59       to gpsd O command third data element)
60
61         my $errortime=$point->errortime;
62
63   latitude aka lat
64       Returns Latitude as in the P report (%f, degrees). (maps to gpsd O
65       command fourth data element)
66
67         my $lat=$point->lat;
68         my $lat=$point->latitude;
69
70   longitude aka lon
71       Returns Longitude as in the P report (%f, degrees). (maps to gpsd O
72       command fifth data element)
73
74         my $lon=$point->lon;
75         my $lon=$point->longitude;
76
77   latlon
78       Returns Latitude, Longitude as an array in array context and as a space
79       joined string in scalar context
80
81         my @latlon=$point->latlon;
82         my $latlon=$point->latlon;
83
84   altitude aka alt
85       Returns the current altitude, meters above mean sea level. (maps to
86       gpsd O command sixth data element)
87
88         my $alt=$point->alt;
89         my $alt=$point->altitude;
90
91   errorhorizontal
92       Returns Horizontal error estimate as in the E report (%f, meters).
93       (maps to gpsd O command seventh data element)
94
95         my $errorhorizontal=$point->errorhorizontal;
96
97   errorvertical
98       Returns Vertical error estimate as in the E report (%f, meters). (maps
99       to gpsd O command eighth data element)
100
101         my $errorvertical=$point->errorvertical;
102
103   heading
104       Returns Track as in the T report (%f, degrees). (maps to gpsd O command
105       ninth data element)
106
107         my $heading=$point->heading;
108
109   speed
110       Returns speed (%f, meters/sec). Note: older versions of the O command
111       reported this field in knots. (maps to gpsd O command tenth data
112       element)
113
114         my $speed=$point->speed;
115
116   speed_knots
117       Returns speed in knots
118
119         my $speed=$point->speed_knots;
120
121   climb
122       Returns Vertical velocity as in the U report (%f, meters/sec). (maps to
123       gpsd O command 11th data element)
124
125         my $climb=$point->climb;
126
127   errorheading
128       Returns Error estimate for course (%f, degrees, 95% confidence). (maps
129       to gpsd O command 12th data element)
130
131         my $errorheading=$point->errorheading;
132
133   errorspeed
134       Returns Error estimate for speed (%f, meters/sec, 95% confidence).
135       Note: older versions of the O command reported this field in knots.
136       (maps to gpsd O command 13th data element)
137
138         my $errorspeed=$point->errorspeed;
139
140   errorclimb
141       Returns Estimated error for climb/sink (%f, meters/sec, 95%
142       confidence). (maps to gpsd O command 14th data element)
143
144         my $errorclimb=$point->errorclimb;
145
146   mode
147       Returns The NMEA mode. 0=no mode value yet seen, 1=no fix, 2=2D (no
148       altitude), 3=3D (with altitude). (maps to gpsd M command first data
149       element)
150
151         my $mode=$point->mode;
152
153   q2u

LIMITATIONS

155       The object allows users to set values for each method but, most likely,
156       this is not what most users will want.
157

SUPPORT

159       DavisNetworks.com supports all Perl applications including this
160       package.
161

BUGS

163       Email to author and submit to RT.
164

EXAMPLES

AUTHOR

167       Michael R. Davis, qw/gpsd michaelrdavis com/
168

LICENSE

170       Copyright (c) 2006 Michael R. Davis (mrdvt92)
171
172       This library is free software; you can redistribute it and/or modify it
173       under the same terms as Perl itself.
174

SEE ALSO

176       Geo::Point, Net::GPSD
177
178
179
180perl v5.34.0                      2022-01-21               Net::GPSD::Point(3)
Impressum