NAME

GPS::Lowrance::Trail - Convert between GDM16 Trails and other formats

REQUIREMENTS

The following non-standard modules are used:

Carp::Assert
Geo::Coordinates::UTM

Installation

Installation is pretty standard:

perl Makefile.PL
make
make test
make install

There is no test suite to speak of. One will be added in a later version.

SYNOPSIS

use GPS::Lowrance::Trail;

my $trail = new GPS::Lowrance::Trail;

my $fh1 = new FileHandle '<lowrance.txt';
my $fh2 = new FileHandle '>lonlat.txt';

$trail->read_gdm16( $fh1 );      # read GDM16 Trail Exports

$trail->write_latlon( $fh2 );    # write as Longitude/Latitude file

DESCRIPTION

This module allows one to convert between Lowrance GPS trail files (handled by their GDM16 application), Latitude/Longitude (or "Lat/Lon") files, and UTM files which may be used by mapping applications.

Methods

The following methods are implemented.

new
my $trail = new GPS::Lowrance::Trail;

Generates a new instance of the object.

trail_num
$trail->trail_num(1);

if ($trail->trail_num() > 4) { ... }

Sets or gets the "Plot Trail" number indicated in the GDM16 trail export. GDM16 does not seem to care about this number when importing a trail.

The number should be between 1 and 4 (corresponding to what GDM16 allows) although the GPS::Lowrance::Trail module does not care.

add_point
$trail->add_point( $latitude, $longitude, $name );

Add a point to the trail.

$latitude and $longitude are in decimal degrees form. $name is an optional name for the point.

size
$trail->size();

Returns the number of points on the trail.

get_trail
my $array_ref = $trail->get_trail;

Returns a reference to an array of all trail points (where each point is an array reference to the latitude and longitude).

read_gdm16
my $fh = FileHandle "mytrail.txt";

$trail->read_gdm16( $fh );

Read a trail file in GDM16 format. Points are appended to the last point.

read_latlon
$trail->read_latlon( $fh );

Read a trail file in Latitude/Longitude file format. Points are appended to the last point.

read_utm
$trail->read_utm( $fh );

Read a trail file in UTM file format. Points are appended to the last point.

write_gdm16

Write a trail file in GDM16 format.

write_latlon

Write a trail file in Longitude/Latitude format.

write_utm

Write a tail file in UTM (Universal Tranverse Mercator) format. Assumes WGS-84 datum.

errors

Returns a value if there were errors when reading a file.

Export

None by default.

Exporting Trail Files from GDM16

Trail data can be extracted from the GDM16 utility (which is distributed by Lowrance at http://www.lowrance.com) or Eagle at http://www.eaglegps.com.

To do so, choose the "Trails" tab, select "Edit" and then "Copy", then open your favorite text editor and paste from the clipboard.

What you have is the file format which this Perl module processes.

Likewise, to import a trail file, open one of these files, "Select All" and "Copy" the file, load GDM16, select the "Trails" tab and choose "Edit" and "Paste".

SEE ALSO

GPS::Lowrance implements higher-level functions to extract trails and other information directly from the GPS device. It uses this module.

Geo::GPS::Data is a GPS data management module. However, it does not yet implement track logs. When it does, this module may be modified to interface with it.

Location::GeoTool will convert coordinates to different formats and across different datums.

AUTHOR

Robert Rothenberg <rrwo at cpan.org>

Suggestions and Bug Reporting

Feedback is always welcome. Please report any bugs using the CPAN Request Tracker at http://rt.cpan.org.

COPYRIGHT AND LICENSE

Copyright (C) 2002,2004 by Robert Rothenberg <rrwo at cpan.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.