NAME
GPS::gpsd is a module that provides a perl interface to the gpsd daemon. gpsd is an open source gps deamon from http://gpsd.berlios.de/.
SYNOPSIS
use GPS::gpsd; $gps=new GPS::gpsd(); my $point=$gps->get(); print $point->lat, " ", $point->lon, "\n";
or
use GPS::gpsd; $gps=new GPS::gpsd(); $gps->subscribe();
DESCRIPTION
GPS::gpsd provides a very simple interface to gpsd daemon in perl scripts.
For example the method get() returns a hash reference like {S=>[?|0|1|2], P=>[lat,lon]}
Fortunately, there are various methods that hide this hash from the user.
GETTING STARTED
KNOWN LIMITATIONS
BUGS
No known bugs.
EXAMPLES
#!/usr/bin/perl use strict; use lib './'; use GPS::gpsd;
my $gps=GPS::gpsd->new(); my $data=$gps->get(); my %fix=('?'=>"Error", 0=>"No Fix", 1=>"Fix", 2=>"DGPS-Corrected Fix"); print "gpsd.pm Version:", $gps->VERSION, "\n"; print "gpsd Version:", $data->{'L'}->[1], "\n"; print "Fix:", $data->{'S'}->[0], "=", $fix{$data->{'S'}->[0]}, "\n"; print "Lat:", $data->{'P'}->[0], " Lon:", $data->{'P'}->[1], "\n"; print "Host:", $gps->host, " Port:", $gps->port, "\n";
$gps->subscribe(handler=>\&gps_handler);
sub gps_handler { my $point=shift(); print join " ", "Fix", $point->{'S'}->[0], $point->{'P'}->[0], $point->{'P'}->[1], "\n"; return $point }
AUTHOR
Michael R. Davis, qw/gpsd michaelrdavis com/
SEE ALSO
gpsd http tracker http://twiki.davisnetworks.com/bin/view/Main/GpsApplications
gpsd home http://gpsd.berlios.de/
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 260:
You forgot a '=back' before '=head1'