use warnings;
use strict;
use GPSD::Parse;
my $gps = GPSD::Parse->new;
$gps->poll;
print "poll time: " . $gps->time .
"\nlattitude: " . $gps->tpv('lat') .
"\nlongitude: " . $gps->tpv('lon') .
"\ndirection: " . $gps->tpv('track') .
"\naltitude: " . $gps->tpv('alt') . "\n";
####
poll time: 2017-05-17T00:48:16.000Z
lattitude: 51.00000000
longitude: -114.000000000
direction: 324.87
altitude: 1084.9
##
##
time => '2017-05-16T22:29:29.000Z' # date/time in UTC
lon => '-114.000000000' # longitude
lat => '51.000000' # latitude
alt => '1084.9' # altitude (metres)
climb => '0' # rate of ascent/decent (metres/sec)
speed => '0' # rate of movement (metres/sec)
track => '279.85' # heading (degrees from true north)
device => '/dev/ttyS0' # GPS serial interface
mode => 3 # NMEA mode
epx => '3.636' # longitude error estimate (metres)
epy => '4.676' # latitude error estimate (metres)
epc => '8.16' # ascent/decent error estimate (meters)
ept => '0.005' # timestamp error (sec)
epv => '4.082' # altitude error estimate (meters)
eps => '9.35' # speed error estimate (metres/sec)
class => 'TPV' # data type (fixed as TPV)
tag => 'ZDA' # identifier
##
##
PRN => 16 # PRN ID of the satellite
# 1-63 are GNSS satellites
# 64-96 are GLONASS satellites
# 100-164 are SBAS satellites
ss => 20 # signal strength (dB)
az => 161 # azimuth (degrees from true north)
used => 1 # currently being used in calculations
el => 88 # elevation in degrees