Net::GPSD::Point(3)

๐Ÿ“ฆ
version 0.39 ยท 2 versions
, in fedora 43

๐Ÿ’– Net::GPSD::Point ๐Ÿ’–

okay bestie, so this is Net::GPSD::Point, straight out of the User Contributed Perl Documentation corner of the manual-page universe. It's giving "I hold one (1) GPS point and I am very normal about it." Let's get into it. ๐Ÿ›ฐ๏ธโœจ


โœจ NAME โœจ

Net::GPSD::Point โ€” bestie, it's an object interface for a gps point. That's the whole thing. One point. Very demure, very mindful. ๐Ÿ“


๐ŸŒธ SYNOPSIS ๐ŸŒธ

So the main-character way to do this is through Net::GPSD, like:

use Net::GPSD;
$obj=Net::GPSD->new(host=>"localhost",
                    port=>"2947");
my $point=$obj->get;           #$point is a Net::GPSD::Point object
print $point->latlon. "\n";    #use a "." here to force latlon to a scalar
not me needing that "." to force latlon into a scalar ๐Ÿ’€ the code literally comments it for you. respect.

OR โ€” if you're the DIY type and want Net::GPSD::Point objects in your own code:

use Net::GPSD::Point;
my $point=Net::GPSD::Point->new();
$point->lat(39.5432524);
$point->lon(-77.243532);
print $point->latlon. "\n";

slay. build your own point, no gpsd required. ๐Ÿฆ‹


๐ŸŽ€ DESCRIPTION ๐ŸŽ€

bestie the original page literally leaves this section empty. it's just vibing there. no notes. we keep it because we keep everything. ๐Ÿ’…

๐Ÿงš CONSTRUCTOR ๐Ÿงš

๐Ÿซถ new

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

That's it. That's the constructor. Make a point. ๐Ÿ‘‘


โญ METHODS โญ

๐ŸŒˆ initialize

It's listed, bestie. That's what we know. ๐ŸŒˆ

๐Ÿ’œ fix

Returns true if mode is fixed โ€” and the logic behind it is based on the gpsd M[0] or O[14]. So yes, it's doing detective work for you.

my $fix=$point->fix;

๐Ÿ”ฅ status

Returns the DGPS status. (this maps to the gpsd S command's first data element, iykyk)

my $status=$point->status;

๐Ÿ• datetime

Returns datetime. (maps to the gpsd D command's first data element)

my $datetime=$point->datetime;

๐Ÿท๏ธ tag

Returns a tag identifying the last sentence received. (maps to the gpsd O command's first data element)

my $tag=$point->tag;

โณ time

Returns seconds since the Unix epoch, UTC. May have a fractional part. (maps to the gpsd O command's second data element)

my $time=$point->time;

๐Ÿ˜ญ errortime

Returns the estimated timestamp error (%f, seconds, 95% confidence). (maps to the gpsd O command's third data element)

my $errortime=$point->errortime;

๐Ÿ—บ๏ธ latitude aka lat

Returns Latitude as in the P report (%f, degrees). (maps to the gpsd O command's fourth data element)

my $lat=$point->lat;
my $lat=$point->latitude;

two names, same energy. pick your fave. ๐Ÿ’–

๐Ÿงญ longitude aka lon

Returns Longitude as in the P report (%f, degrees). (maps to the gpsd O command's fifth data element)

my $lon=$point->lon;
my $lon=$point->longitude;

๐ŸŒ latlon

Returns Latitude, Longitude as an array in array context, and as a space joined string in scalar context. the duality. the range. ๐Ÿ‘‘

my @latlon=$point->latlon;
my $latlon=$point->latlon;

โ›ฐ๏ธ altitude aka alt

Returns the current altitude, meters above mean sea level. (maps to the gpsd O command's sixth data element)

my $alt=$point->alt;
my $alt=$point->altitude;

๐Ÿ“ errorhorizontal

Returns the Horizontal error estimate as in the E report (%f, meters). (maps to the gpsd O command's seventh data element)

my $errorhorizontal=$point->errorhorizontal;

๐Ÿ“ errorvertical

Returns the Vertical error estimate as in the E report (%f, meters). (maps to the gpsd O command's eighth data element)

my $errorvertical=$point->errorvertical;

๐Ÿงญ heading

Returns Track as in the T report (%f, degrees). (maps to the gpsd O command's ninth data element)

my $heading=$point->heading;

๐Ÿš€ speed

Returns speed (%f, meters/sec). Note: older versions of the O command reported this field in knots. (maps to the gpsd O command's tenth data element)

my $speed=$point->speed;
girl watch out for the unit change, that's a glow-up and a jump-scare at the same time ๐Ÿ’€

๐Ÿชข speed_knots

Returns speed in knots.

my $speed=$point->speed_knots;

๐ŸŽˆ climb

Returns Vertical velocity as in the U report (%f, meters/sec). (maps to the gpsd O command's 11th data element)

my $climb=$point->climb;

๐Ÿงฎ errorheading

Returns the Error estimate for course (%f, degrees, 95% confidence). (maps to the gpsd O command's 12th data element)

my $errorheading=$point->errorheading;

๐Ÿƒ errorspeed

Returns the Error estimate for speed (%f, meters/sec, 95% confidence). Note: older versions of the O command reported this field in knots. (maps to the gpsd O command's 13th data element)

my $errorspeed=$point->errorspeed;

๐Ÿช‚ errorclimb

Returns the Estimated error for climb/sink (%f, meters/sec, 95% confidence). (maps to the gpsd O command's 14th data element)

my $errorclimb=$point->errorclimb;

๐Ÿ”ข mode

Returns The NMEA mode. and the values are:

  • 0 = no mode value yet seen
  • 1 = no fix
  • 2 = 2D (no altitude)
  • 3 = 3D (with altitude)

(maps to the gpsd M command's first data element)

my $mode=$point->mode;

โ“ q2u

It's here. It's listed. The docs say nothing else. Mystery method, we don't know her. ๐Ÿ™ˆ


๐Ÿ’€ LIMITATIONS ๐Ÿ’€

So the object lets users set values for each method โ€” but most likely, this is not what most users will want. it's a trap, bestie. a cute little trap. ๐Ÿชค


๐Ÿซ‚ SUPPORT ๐Ÿซ‚

DavisNetworks.com supports all Perl applications including this package. they got you. ๐Ÿซถ


๐Ÿ› BUGS ๐Ÿ›

Email the author and submit to RT. that's the vibe. go tell them. ๐Ÿ“ง


๐ŸŽฌ EXAMPLES ๐ŸŽฌ

bestie the section header is here, and the actual examples are the code snippets up in the SYNOPSIS. we keep the header because we keep everything. โœจ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Michael R. Davis, qw/gpsd michaelrdavis com/ โ€” the icon, the legend, the moment. ๐Ÿ’…


๐Ÿ“œ LICENSE ๐Ÿ“œ

Copyright (c) 2006 Michael R. Davis (mrdvt92)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • Geo::Point
  • Net::GPSD

and that's the whole page bestie!! ๐ŸŽ€ this came to you from perl v5.42.0, dated 2025-07-25, and it's living its life as a User Contributed Perl Documentation entry for Net::GPSD::Point(3). no cap, go map some points. ๐Ÿฆ‹๐Ÿ’–๐Ÿ“

๐Ÿ“ฆ where this page comes from