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
27         my $point=Net::GPSD::Point->new();
28

METHODS

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

GETTING STARTED

KNOWN LIMITATIONS

175       The object allows users to set values for each method but, most likely,
176       this is not what most users will want.
177

BUGS

179       No known bugs.
180

EXAMPLES

AUTHOR

183       Michael R. Davis, qw/gpsd michaelrdavis com/
184

LICENSE

186       Copyright (c) 2006 Michael R. Davis (mrdvt92)
187
188       This library is free software; you can redistribute it and/or modify it
189       under the same terms as Perl itself.
190

SEE ALSO

192       Geo::Point
193
194
195
196perl v5.8.8                       2007-01-15               Net::GPSD::Point(3)
Impressum