Net::G...rn::TPV(3pm)
β¨ NAME β¨
okay so bestie, this is the manual page for Net::GPSD3::Return::TPV β the Net::GPSD3 Return TPV Object π
(you'll also see it filed under the page name Net::G...rn::TPV(3pm), iykyk).
π SYNOPSIS π
the whole vibe, in one line:
printf "Time: %s, Lat: %s, Lon: %s\n", $object->time, $object->lat, $object->lon;
πΈ DESCRIPTION πΈ
So basically this thing gives you a Perl object interface to the Time-Velocity-Position (TVP) object that the GPSD daemon hands back. that's it, that's the job π«Ά
here are some example JSON objects so you can see what you're working with, fr fr:
Protocol 3.1 Versions
{
"class":"TPV",
"tag":"MID2",
"device":"/dev/ttyUSB0",
"time":1253593085.470,
"ept":0.005,
"lat":38.88945123,
"lon":-77.03522143,
"track":171.7249,
"speed":0.467,
"mode":2
}
{
"class":"TPV",
"tag":"MID2",
"device":"/dev/ttyUSB0",
"time":1253593667.430,
"ept":0.005,
"lat":38.88945123,
"lon":-77.03522143,
"alt":146.911,
"track":180.0000,
"speed":0.194,
"climb":-0.157,
"mode":3
}
Protocol 3.4 Version
{
"class":"TPV",
"tag":"0x0106",
"device":"/dev/cuaU0",
"time":"2011-03-20T06:51:59.12Z",
"ept":0.005,
"lat":37.371427205,
"lon":-122.015179890,
"alt":25.789,
"epx":1.926,
"epy":1.808,
"epv":6.497,
"track":0.0000,
"speed":0.000,
"climb":0.000,
"eps":3.85,
"mode":3
}
π METHODS PROPERTIES π
these are the properties, aka the little accessors you can call on your object. go off π
class
gives you back the object class, periodt.
string
gives you back the JSON string. the raw one. iconic.
parent
returns the parent Net::GPSD object π«Ά
device
the name of the device it came from. originating device energy β¨
tag
the type tag that goes with this GPS sentence β and if it's coming from an NMEA device, this is literally just the NMEA sentence type. no cap.
mode
NMEA mode: %d, where 0=no mode value yet seen, 1=no fix, 2=2D, 3=3D.
time
seconds since the Unix epoch, UTC. the value may have a fractional part of up to .01sec precision.
β οΈ note bestie: in2.96(protocol3.4) theTPV->timeformat changed from unix epoch to W3C β but this method hides that whole situation from you, so you don't have to care π
timestamp
the W3C formated timestamp value, either straight from the protocol >= 3.4 or calculated when it's < 3.4. the value may have a fractional part of up to .01sec precision.
π note: the author expects that in protocol3.5the value will be passed directly asTPV->timestamp.
datetime
returns a DateTime object. fancy, we love her π
lat
latitude in degrees: +/- signifies West/East.
lon
longitude in degrees: +/- signifies North/South.
alt
altitude in meters.
speed
speed over ground, meters per second.
track
course over ground, degrees from true north.
climb
climb (postive) or sink (negative) rate, meters per second.
ept
estimated timestamp error (%f, seconds, 95% confidence).
epx
epy
latitude error estimate in meters, 95% confidence. (yes, both of them share this one, they're a package deal π«Ά)
epv
estimated vertical error in meters, 95% confidence.
eps
speed error estimate in meters/sec, 95% confifdence.
epd
direction error estinmate in degrees, 95% confifdence.
epc
climb/sink error estinmate in meters/sec, 95% confifdence.
π METHODS VALUE ADDED π
the bonus round, the extra credit, the main character moment π
point
returns a GPS::Point Object. slay.
π BUGS π
found something broken? log on RT and send it to the gpsd-dev email list. do not suffer in silence bestie π
π«Ά SUPPORT π«Ά
DavisNetworks.com supports all Perl applications including this package. yes, all of them. π
also, try the gpsd-dev email list β that's where the people are.
π AUTHOR π
Michael R. Davis
CPAN ID: MRDVT
STOP, LLC
domain=>michaelrdavis,tld=>com,account=>perl
http://www.stopllc.com/
β COPYRIGHT β
this program is free software licensed under the...
The BSD License
the full text of the license can be found in the LICENSE file included with this module. read it, it's giving legal realness π
π¦ SEE ALSO π¦
Net::GPSD3GPS::PointNet::GPSD3::Return::Unknown
and that's the whole page bestie!! πβ¨ this was written for perl v5.34.0 and dated 2022-06-16, and it lives under the manual page name Net::G...rn::TPV(3pm) β go forth and get those coordinates π
π°οΈ
π¦ where this page comes from
- debian bookworm: libnet-gpsd3-perl 0.19-2 Β· BSD-3
- debian trixie: libnet-gpsd3-perl 0.19-2 Β· BSD-3
- ubuntu noble: libnet-gpsd3-perl 0.19-2 Β· BSD-3
- ubuntu resolute: libnet-gpsd3-perl 0.19-2 Β· BSD-3
- ubuntu stonking: libnet-gpsd3-perl 0.19-2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms