NAME

tcx_interactive.pl - Script to use the Geo::TCX module interactively from the command line or in the perl debugger

SYNOPSIS

tcx_interactive.pl --help
tcx_interactive.pl --src_dir=dir [ --help --recent=# --wrk_dir=dir --wpt_dir=dir --dev_dir=dir --tolerance_meters=# ]

DESCRIPTION

tcx_interactive.pl is a utility script that is mostly useful after having saved an activity from a GPS training device onto a computer.

The script looks up recently saved TCX or FIT files in the path specified by --src_dir and prompts the user for one to parse. It reads the selected file, intiates a Geo::TCX::Interactive instance, and prompts the user for commonly used methods such as save_laps() among other.

The user is subsequently prompted whether they wish to read recently saved waypoints from their GPS device (provided it is currently plugged in via USB cable), save these points in a *.gpx waypoints file located in --wpt_dir, and whether they wish to add the end points of each lap to that waypoints file.

The user can also transfer the resulting waypoints file back to their device for use during their next activity (not yet enabled, coming soon).

Options

--recent => #

specifies the number of recent files to look up in --src_dir. The default is 25.

--src_dir=$dir

the directory where TCX or FIT files are located.

--wrk_dir=$dir

the directory where working files are to be saved, such as with the save_laps() method.

--wpt_dir=$dir

If this option is specified, the script will attempt to load a waypoints file from the user's computer into the Geo::TCX::Interactive instance. This option is used by a call to gpx_load() which prompts the user to select a *.gpx file from all such files found in $dir.

The script will later prompt the user whether they wish to add other waypoints saved on the GPS device and also whether to add the begining and end position of each of the activity's laps parsed by the instance to the *.gpx file.

--dev_dir=$dir

the directory on the GPS device where the waypoints are stored. On recent devices, this tends to be a Locations folder and older devices it is sometimes named GPX/current.

If way_add_device() is called and $dir is not specified, the method will search where this directory might be (provided the GPS device is plugged in).

--tolerance_meters => #

the distance below which waypoints at the beginning or end of a lap are to be ignored when comparing with the waypoints file read in the instance. The default is 10 meters.

This option is only relevant for way_add_endpoints(). It is not considered by way_add_device() under the assumption that if a user marked a particular location manually on their device, it has some degree of importance and should not be overlooked.

DEPENDENCIES

This script is part of the Geo::TCX module and relies on the Geo::TCX::Interactive sub-class it provides.

Geo::FIT is also required to parse FIT files and to add waypoints from a GPS device (except for some older models).

SEE ALSO

Geo::TCX::Interactive, Geo::Gpx, Geo::FIT.

AUTHOR

Patrick Joly <patjol@cpan.org>.

VERSION

1.05

LICENSE AND COPYRIGHT

Copyright 2022, Patrick Joly patjol@cpan.org. All rights reserved.

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.