Fit2tcx - converts a FIT file to a TCX file
fit2tcx -show_version=1 fit2tcx [<options>] [<FIT activity file> [<TCX file>]]
Fit2tcx reads the contents of <FIT activity file>, converts them to correspoding TCX formats, and write converted contents to <TCX file>.
The latest version is obtained viafit2tcx-0.13.tar.gz (9KB, 2021-03-22 16:43:01).
It uses a Perl class
of version 0.10 or later.
-show_version=1-verbose=1stdout.
-tplimit=<number>-must=<list>Fit2tcx convert each record message to a trackpoint in TCX format,
examines whether or not any of the elements in the list are defined,
and drop the trackpoint if not.
Some map services seem to require a TCX file created with -must=Time,Position option.
-tpexclude=<list>Trackpoint elements in <TCX file>.
For instance,
with -tpexclude=AltitudeMeters option,
fit2tcx makes a TCX file including no altitude data in Trackpoints.
-include_creator=0Creator section should be excluded.
-lap=<list>Each element of <list> must be of the form <index> or <start>-<end>.
<index> is treated as an abbreviation of <index>-<index>.
<start>-<end> implies that only laps with indices >= <start> and <= <end>,
should be included in <TCX file>.
<start> or <end> may be one of an empty string, asterisc (*), or the word ALL,
which are treated as 0 when used as <start>, or 65534 when used as <end>.
For instance,
any of -lap=-, -lap=*, or -lap=all is treated as -lap=0-65534.
-tpmask=<list>A <region> must be a comma separated quadruple of the form <lat_sw>,<long_sw>,<lat_ne>,<long_ne>.
<lat_*> must be degrees of latitudes,
and <long_*> must be degrees of longitudes.
Suffices _sw and _ne stand for ``south west'' and ``north east'', respectively.
Trackpoints in the ``rectangle'' (including borders) enclosed with paralles and meridians determined by the above latitudes and longitudes, are not written to <TCX file>.
.fit2tcx.plFit2tcx evaluates the contents of the file .fit2tcx.pl in your home directory if it exists,
before starting conversion.
So,
in the file,
you can set appropriate values to scalar variables of the same names of the above options with leading hyphens removed,
and will get the same effects as giving the command line options.
Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
This program is distributed with ABSOLUTELY NO WARRANTY.
Anyone can use, modify, and re-distibute this program without any restriction.
&cb_record&cb_lapenhanced_altitude, enhanced_speed, enhanced_max_speed, or enhanced_avg_speed instead of
altitude, speed, max_speed, or avg_speed respectively,
when enhanced_... ones are defined in FIT files.
Improvements by Håkan Jerning.
Thanks!
$tpmask$tpmask including tow or more <region>s.
&cb_recordpower field exists in a record message.
Thanks to report from Benjamin Wolak.
%activity_defLap was not conforming to http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd.
Thanks again to report from David García Granda.
%activity_defHeartRateBpm in Trackpoint was not conforming to http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd.
Mandatory attribute Sport of Activity was missing.
New elements AverageHeartRateBpm and MaximumHeartRateBpm in Lap.
TriggerMethod in Lap was mis-spelled as TrigerMethod.
All thanks to report from David García Granda.
$ENV{HOME}/.fit2tcx.plBEGIN block,
based on report from David García Granda.
Garmin::FIT$ENV{HOME}/.fit2tcx.pl,
based on report from David García Granda.
&cmp_lon&tpmask_rec&cmp_lon.
@tpmask
Trackpoints.
$startxsi:schemaLocation is made up in a consistent manner.
$tpexclude$lap*, and word all.
%activity_defTrack elements should be considered arrays.
&cb_lap_or_session&cb_lap.
%activity_defname.
&outputname of hashes defining TCX elements.
Cadences in Trackpoints and Watts's in TPXs were not re-calculated
when the option tplimit was specified.