Net::G...rn::TPV(3pm)

πŸ“¦
version 0.19 Β· 2 versions
  • 0.19 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.19 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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: in 2.96 (protocol 3.4) the TPV->time format 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 protocol 3.5 the value will be passed directly as TPV->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/

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::GPSD3
  • GPS::Point
  • Net::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