NAME
GPS::Point - Provides an object interface for a GPS point.
SYNOPSIS
use GPS::Point;
$obj=GPS::Point->new(
time=>$time, #float seconds from the unix epoch
lat=>$lat, #signed degrees
lon=>$lon, #signed degrees
alt=>$hae, #meters above the WGS-84 ellipsoid
speed=>$speed, #meters/second (over ground)
heading=>$heading, #degrees clockwise from North
climb=>$climb, #meters/second
etime=>$etime, #float seconds
ehorizontal=>$ehz, #float meters
evertical=$evert, #float meters
espeed=>$espeed, #meters/second
eheading=>$ehead, #degrees
eclimb=>$eclimb, #meters/second
mode=>$mode, #GPS mode [Unknown=>undef(),None=>1,2D=>2,3D=>3]
tag=>$tag, #Name of the GPS message for data
);
print $point->latlon. "\n"; #use a "." here to force latlon to a scalar
my ($x,$y,$z)=$point->ecef; #if Geo::ECEF is available
my $GeoPoint=$point->GeoPoint; #if Geo::Point is available
my $distance=$point->distance($point2); #if Geo::Inverse is available
SYNOPSIS TODO
my $obj=GPS::Point->newGPSD($GPSD_O_line);#e.g. GPSD,O=....
my $obj=GPS::Point->newNMEA($NMEA_lines); #e.g. GGA+GSA+RMC
DESCRIPTION
This is a re-write of Net::GPSD::Point that is more portable.
GPS::Point - Provides an object interface for a GPS fix (e.g. Position, Velocity and Time). (Note: Please use Geo::Point, if you want 2D or projection support.)
USAGE
CONSTRUCTOR
new
my $obj = GPS::Point->new();
METHODS
time
Sets or returns time
print $obj->time, "\n";
lat
Sets or returns lat
print $obj->lat, "\n";
lon
Sets or returns lon
print $obj->lon, "\n";
alt
Sets or returns alt
print $obj->alt, "\n";
speed
Sets or returns speed
print $obj->speed, "\n";
heading
Sets or returns heading
print $obj->heading, "\n";
climb
Sets or returns climb
print $obj->climb, "\n";
etime
Sets or returns etime
print $obj->etime, "\n";
ehorizontal
Sets or returns ehorizontal
print $obj->ehorizontal, "\n";
evertical
Sets or returns evertical
print $obj->evertical, "\n";
espeed
Sets or returns espeed
print $obj->espeed, "\n";
eheading
Sets or returns eheading
print $obj->eheading, "\n";
eclimb
Sets or returns eclimb
print $obj->eclimb, "\n";
mode
Sets or returns GPS fix mode
print $obj->mode, "\n";
tag
Sets or returns tag
print $obj->tag, "\n";
latlon
Returns Latitude, Longitude as an array in array context and as a space joined string in scalar context
my @latlon=$point->latlon;
my $latlon=$point->latlon;
ecef
Returns ECEF coordinates
my ($x,$y,$z) = $point->ecef;
my @xyz = $point->ecef;
my $xyz = $point->ecef; #[] if Geo::ECEF::VERSION >= 0.08
GeoPoint
Returns GeoPoint Object
my $gp = $point->GeoPoint;
distance
Returns distance
my $gp = $point->distance($pt2);
my $gp = $point->distance($lat, $lon);
BUGS
SUPPORT
AUTHOR
Michael R. Davis
CPAN ID: MRDVT
DavisNetworks.com
account=>perl,tld=>com,domain=>michaelrdavis
http://www.davisnetworks.com/
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Geo::Point, Net::GPSD::Point, Geo::Distance, Geo::ECEF, Geo::Functions