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 via
fit2tcx-0.11.tar.gz (9KB, 2014-01-03 11:16:36).

It uses a Perl class


of version 0.10 or later.


shows the version string of this program, and exits.

shows FIT file header and trailing CRC information on stdout.

tries to limit the number of trackpoints to <number>.

specifies a comma separated list of TCX elements which must be included in trackpoints.

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.

specifies a comma separated list of TCX elements which should be excluded from Trackpoint elements in <TCX file>.

For instance, with -tpexclude=AltitudeMeters option, fit2tcx makes a TCX file including no altitude data in Trackpoints.

specifies that a Creator section should be excluded.

specifies a comma separated list of lap indices (0, 1, ...) which should be included in <TCX file>.

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.

specifies a colon or space separated list of <region>s, in which trackpoinsts must be excluded from <TCX file>.

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>.

Per user configuration file

Fit2tcx evaluates the contents of the file 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 <>


This program is distributed with ABSOLUTELY NO WARRANTY.

Anyone can use, modify, and re-distibute this program without any restriction.


0.10 --> 0.11

accepts spaces as separators of <region>s.

top level
Fixed process hanging up with $tpmask including tow or more <region>s.

0.09 --> 0.10

There was no check whether or not power field exists in a record message.

Thanks to report from Benjamin Wolak.

0.08 --> 0.09

order of sub-elemtens of Lap was not conforming to

Thanks again to report from David García Granda.

0.07 --> 0.08

Format of HeartRateBpm in Trackpoint was not conforming to

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.

loaded in a BEGIN block, based on report from David García Granda.

loaded after $ENV{HOME}/, based on report from David García Granda.

0.06 --> 0.07

new subroutine to compare degrees of longitudes in right manner (hopefully).

use &cmp_lon.


0.05 --> 0.06

top level
improved accuracy when limitting the number of Trackpoints.

0.04 --> 0.05

xsi:schemaLocation is made up in a consistent manner.

0.03 --> 0.04

new option.

accepts an empty string, character *, and word all.

0.02 --> 0.03

Track elements should be considered arrays.

absorbed into &cb_lap.

0.01 --> 0.02

new member name.

uses new member name of hashes defining TCX elements.

top level
Cadences in Trackpoints and Watts's in TPXs were not re-calculated when the option tplimit was specified.