{"id":555,"date":"2009-09-09T06:54:54","date_gmt":"2009-09-09T04:54:54","guid":{"rendered":"http:\/\/www.bkits.at\/weblog\/?page_id=555"},"modified":"2011-07-23T13:32:10","modified_gmt":"2011-07-23T11:32:10","slug":"documentation","status":"publish","type":"page","link":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/","title":{"rendered":"Documentation"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>tcx2hrm is a Java based command line tool to convert Garmin TCX training files into Polar HRM data files. It offers a variety of <a title=\"Tell me more about the features.\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=524\" target=\"_self\">features<\/a> to influence the conversion, however in most cases the default settings should be sufficient for most applications.<\/p>\n<p>Note, that the information given below always applies to the latest version of tcx2hrm. Please refer to the <a href=\"http:\/\/www.bkits.at\/weblog\/?page_id=545\" target=\"_self\">version history<\/a> for information on previous functionality.<\/p>\n<h3>Installation<\/h3>\n<p><a title=\"Get me to the download side.\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=545\" target=\"_self\">Download<\/a> the latest version of the application and extract it to your favourite directory. The distributable comes as GZIP compressed file, any unzip tool should be sufficient. Ensure that <a title=\"Get Java\" href=\"http:\/\/www.java.com\" target=\"_blank\">Java<\/a> at least version 1.6 is installed on your machine, that&#8217;s it!<\/p>\n<p>The application is compiled with a 32 bit JDK, however I recommend to run a 64 bit state of the art JRE which is fully backwards compatible.<\/p>\n<h3>Running the application<\/h3>\n<p>Running the application is quite simple if you do not need to use extended parameters:<\/p>\n<p style=\"padding-left: 30px;\"><code>java -jar tcx2hrm.jar <em>inputname<\/em><\/code><\/p>\n<p>This will start the tool with the TCX file <em>inputname<\/em> with default settings. The tool will analyze the input file, extract the first track of the first lap and convert it to an HRM file in the local directory.  The HRM filename will follow Polar&#8217;s convention: <code>YYYYMMDD.hrm<\/code>, where <code>YYYY<\/code> is the year, <code>MM<\/code> the month and <code>DD<\/code> the day of the month, filled up with leading zero&#8217;s if required.  The HRM file content will follow the specifications for version v1.07 with a virtual S725X monitor and five second interval. This ensures, that  most of the TCX training data can be transferred to the HRM format.  If you want to understand in detail, what is going on during conversion, please refer to <a title=\"Get the background information.\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=478\" target=\"_self\">this page<\/a>.<\/p>\n<h3>Advanced parameters<\/h3>\n<p>To make a long story short, the tool supports the following list of command line options:<\/p>\n<p style=\"padding-left: 30px;\"><code><em>java -jar tcx2hrm.jar tcxfilename [hrmfilename] [-a N] [-c N] [-g] [-G XYZ] [-i Interval] [-l N] [-m Monitor] [-o N] [-s] [-t N] [-u] [-v Version]<\/em><em> <\/em><\/code><\/p>\n<p><code><em>inputname<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Fully qualified name of the TCX file. This is a mandatory parameter in normal operation mode.<\/p>\n<p><code><em>outputname<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Fully qualified name of the HRM file to create. If not used, the Polar standard convention will be used (see above).<\/p>\n<p><code><em>-a N<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Selects the sport session to use in a so-called &#8222;MultiSportSession&#8220; record. Defaults to 1. Please refer to your Garmin device manual for more information on multi sport sessions. Use the <code>-s<\/code> switch if you are not sure, whether a multi sport session was recorded.<\/p>\n<p><code><em>-c N<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Selects the method to be applied for <a title=\"What the hell are you talking about?\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=478\" target=\"_self\">converting<\/a> the input data. For <code>N<\/code> use the following values:<\/p>\n<ul>\n<li>1 &#8230; replicator, simply replicating data <em>rows<\/em><\/li>\n<li>2 &#8230; linear mean algorithm, <a title=\"Information about data accurracy.\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=504\" target=\"_self\">calculates<\/a> mean values between predecessor and successor; default<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">This is mainly related to the difference on data recording between TCX (time variance) and HRM (fixed time interval). During conversion, tcx2hrm calculates <em>one<\/em> data record <em>per second<\/em>.<\/p>\n<p><code><em>-g<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">If this option is provided, the GPS data will be stored in a separate <a href=\"http:\/\/www.topografix.com\/gpx.asp\" target=\"_blank\">GPX<\/a> compatible XML file. A <a href=\"http:\/\/en.wikipedia.org\/wiki\/GPS_eXchange_Format\" target=\"_blank\">GPX file<\/a> is used by various applications to manage recorded GPS information. For example, Polar Pro Trainer uses GPX files together with <a href=\"http:\/\/earth.google.com\" target=\"_blank\">Google Earth<\/a> in case the Polar device used a G3 sensor to record GPS coordinates.<\/p>\n<p style=\"padding-left: 30px;\">Using this option the filename of the GPX file will be equal to the HRM file, except of the file extension being &#8222;gpx&#8220;, as both files belong together. tcx2hrm will store waypoint, route and track information per default. Lap information will be kept, as the track is segmented accordingly. Use <code>-G<\/code> option to influence behaviour as required.<\/p>\n<p style=\"padding-left: 30px;\">Note, that GPX file data will be compiled out of the raw TCX file content, no data manipulation will be applied.<\/p>\n<p><code><em>-G XYZ<br \/>\n<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">The more advanced version of the <code>-g<\/code> option. XYZ is a three digit, numeric value, where tcx2hrm expects:<\/p>\n<ul>\n<li>X &#8230; If 0, turns off generation of waypoint information within the GPX file. Defaults to 1.<\/li>\n<li>Y &#8230; If 0, turns off generation of route information within the GPX file. Defaults to 1.<\/li>\n<li>Z &#8230; If 0, turns off generation of track information within the GPX file. Defaults to 1.\u00c2\u00a0 If value is 2, track segmentation according to initial lap information will not be obtained.<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">Note, this switch is for advanced users only, who are experienced in GPS data. Default values are designed to be applicable for most users. In fact <code>-G 111<\/code> would give the same result as <code>-g<\/code>.<\/p>\n<p><code><em>-h<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Prints out the help splash screen with a short summary on available command line options. No further operations will be executed.<\/p>\n<p><code><em>-i Interval <\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Selects the time interval the data will be aligned to in the HRM output file. According to the specifications, following values are available for the parameter <code>Interval<\/code>:<\/p>\n<ul>\n<li>X1S: one second interval; this interval was initially not supported by the original specification, but accepted by most of the HRM applications on the market, hence tcx2hrm supports it. A one second interval is recommended in case you want to optimize <a href=\"http:\/\/www.bkits.at\/weblog\/?page_id=504\" target=\"_blank\">data accurracy<\/a>. X1S has the same effect as I1S.<\/li>\n<li>I1S, I2S, I5S, I15S, I30S, I60S, I120S, I240S,\u00c2\u00a0 I480S:\u00c2\u00a0 interval in seconds, default = I1S (<em>changed in v0.45<\/em>)<\/li>\n<li> I5M: five minutes interval (300 seconds)<\/li>\n<\/ul>\n<p><code><em>-l N<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Selects a lap, that should be considered for data conversion.  <code>N<\/code> is the positive integer number of the lap, starting with 1. Setting this value to zero forces the application to combine all laps into one output file but keep lap information in the intermediate times section. Default = 1.<\/p>\n<p><code><em>-m Monitor<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Sets the Polar device, which is used as the virtual source for the data. Following values are supported for parameter <code>Monitor<\/code>:<\/p>\n<ul>\n<li>ST, VXL, VNV, AP, XTP,\u00c2\u00a0 Coach, E600, AXN500, AXN700: Polar legacy devices, no or limited support for cycling data<\/li>\n<li>S210, S410, S510, S520, S610, S610i, S625X: Polar S-series, limited support for cycling data<\/li>\n<li> S710, S710i, S720i, S725, S725X: Polar S-series, specifically designed for bikers, hence full support of cycling data<\/li>\n<li>CS400, CS600X, CS600, RS400, RS800, RS800X: Latest professional monitors for cycling and running<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">Default values is S725X. Setting this to a different value might cause issues, as tcx2hrm does not check, whether the monitor supports all the data which is in the HRM file. However, the list only covers monitors with data download capabilities.<\/p>\n<p><code><em>-n N<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Selects the method to be applied for <a title=\"What the hell are you talking about?\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=478\" target=\"_self\">normalizing<\/a> the input data. For <code>N<\/code> use the following values:<\/p>\n<ul>\n<li>1 &#8230; extractor, deleting inconsistent data <em>rows<\/em><\/li>\n<li>2 &#8230; zero filler, fills up missing data <em>columns<\/em> with &#8222;0&#8220; values<\/li>\n<li>3 &#8230; linear mean algorithm, <a title=\"Information about data accurracy.\" href=\"http:\/\/www.bkits.at\/weblog\/?page_id=504\" target=\"_self\">calculates<\/a> mean values between valid predecessor and valid successor; default<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">&nbsp;<\/p>\n<p><code><em>-o N<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Use this option to define the (restrictive) log level. Following values are available:<\/p>\n<ul>\n<li> 0 &#8230; debug<\/li>\n<li>1 &#8230; info, default<\/li>\n<li>2 &#8230; warn<\/li>\n<li>3 &#8230; error<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">Setting the level to 1 means, that info, warning and error messages will be printed.<\/p>\n<p><code><em>-s<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Analyses the TCX input file and prints out statistical data. No further operations will be executed.<\/p>\n<p><code><em>-t N<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Selects a track, that should be considered for data conversion.  <code>N<\/code> is the positive integer number of the track, starting with 1. Settings this value to\u00c2\u00a0 zero triggers the concatenation mode, where all tracks (of the selected lap) are concatenated. Default = 1.<\/p>\n<p><code><em>-u<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Requests unit conversion, any data values will be converted from SI units (km\/h, km, m) to US units (mp\/h, miles, ft). TCX data is always in SI units, HRM supports both.<\/p>\n<p><code><em>-v Version<\/em><\/code><\/p>\n<p style=\"padding-left: 30px;\">Sets the HRM file version to be used as output format. String Version can be  V102, V105, V106 or V107.  Default is V107 which provides the most flexibility. Using a different version restricts the support for specific data content, monitors and further options in the HRM file.<\/p>\n<p>For any questions you would like to dig into in terms of data accuracy, please refer to this <a href=\"http:\/\/www.bkits.at\/weblog\/?page_id=504\" target=\"_self\">article<\/a>.<\/p>\n<h3>Configuration file<\/h3>\n<p>Since v0.22 tcx2hrm supports an external configuration file, storing static fitness data. tcx2hrm searches for a file <code>tcx2hrm.cfg<\/code> on startup.  The (text) configuration file follows a quite simple convention, where the application expects a single parameter\/value pair per line, separated via &#8222;=&#8220;. Following parameters are supported:<\/p>\n<ul>\n<li>HRM_MAXHR<br \/>\nInteger value of your maximum heart rate in bpm. Default is 0.<\/li>\n<li>HRM_RESTHR<br \/>\nInteger value of your resting heart rate in bpm. Default is 0.<\/li>\n<li>HRM_VO2MAX<br \/>\nInteger value of your <a href=\"http:\/\/en.wikipedia.org\/wiki\/VO2_max\" target=\"_blank\">maxium oxygen consumption<\/a> value in ml\/kg\/min. Default is 0. Only used in HRM file version 1.06 or higher.<\/li>\n<li>HRM_WEIGHT<br \/>\nInteger value of your weight in kg. Default is 0. Only used in HRM file version 1.06 or higher<\/li>\n<li>HRM_HRZONE<span style=\"color: #ff0000;\">X<\/span><br \/>\nUse these parameters to define your personal HR zones, which will be written in the corresponding section in the HRM file. <span style=\"color: #ff0000;\">X<\/span> starts with one (zone 1 upper limit) and ends with eleven (zone 10 lower limit), e.g. HRM_ZONE5<\/li>\n<li>DC_ADD_HR_DATA<br \/>\nUse this parameter with value &#8222;1&#8220; in case you want to override the check for heartrate presence in the input file. tcx2hrm will then be forced to zero fill heartbeat information in the output file.<\/li>\n<li>DC_FILL_BREAKS_LAPS<br \/>\nIf this parameter is provided with the value &#8222;1&#8220;, breaks within laps will be interpolated. Use this, if the lap segmentation in the exercise data is not desired.<\/li>\n<li>DC_FILL_BREAKS_TRACKS<br \/>\nIf this parameter is provided with the value &#8222;1&#8220;, breaks within tracks will be interpolated. Use this, if the track segmentation in the exercise data is not desired.<\/li>\n<\/ul>\n<h3>Return values<\/h3>\n<p>Beside of creating an outputfile (default operation), the tool returns different exit codes, depending on the stop condition. Those can be evaluated, e.g. via shell or batch script:<\/p>\n<ul>\n<li>0 &#8230; no error occurred, application was terminated successfully<\/li>\n<li>10 &#8230; a mandatory parameter was missing<\/li>\n<li>11 &#8230; the format of the passed parameter was incorrect<\/li>\n<li>12 &#8230; the parameter value was invalid<\/li>\n<li>20 &#8230; errors while accessing the input file<\/li>\n<li>21 &#8230; input file is empty, hence no data available to be converted<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction tcx2hrm is a Java based command line tool to convert Garmin TCX training files into Polar HRM data files. It offers a variety of features to influence the conversion, however in most cases the default settings should be sufficient &hellip; <a href=\"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":447,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-555","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Documentation - Berni&#039;s ~page V5 Weblog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Documentation - Berni&#039;s ~page V5 Weblog\" \/>\n<meta property=\"og:description\" content=\"Introduction tcx2hrm is a Java based command line tool to convert Garmin TCX training files into Polar HRM data files. It offers a variety of features to influence the conversion, however in most cases the default settings should be sufficient &hellip; Weiterlesen &rarr;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/\" \/>\n<meta property=\"og:site_name\" content=\"Berni&#039;s ~page V5 Weblog\" \/>\n<meta property=\"article:modified_time\" content=\"2011-07-23T11:32:10+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"8\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.bkits.at\\\/weblog\\\/tcx2hrm\\\/documentation\\\/\",\"url\":\"http:\\\/\\\/www.bkits.at\\\/weblog\\\/tcx2hrm\\\/documentation\\\/\",\"name\":\"Documentation - Berni&#039;s ~page V5 Weblog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bkits.at\\\/weblog\\\/#website\"},\"datePublished\":\"2009-09-09T04:54:54+00:00\",\"dateModified\":\"2011-07-23T11:32:10+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.bkits.at\\\/weblog\\\/tcx2hrm\\\/documentation\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/www.bkits.at\\\/weblog\\\/tcx2hrm\\\/documentation\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.bkits.at\\\/weblog\\\/tcx2hrm\\\/documentation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/www.bkits.at\\\/weblog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"tcx2hrm\",\"item\":\"http:\\\/\\\/www.bkits.at\\\/weblog\\\/tcx2hrm\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Documentation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bkits.at\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.bkits.at\\\/weblog\\\/\",\"name\":\"Berni&#039;s ~page V5 Weblog\",\"description\":\"The official weblog to Berni&#039;s ~page V5\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bkits.at\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Documentation - Berni&#039;s ~page V5 Weblog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/","og_locale":"de_DE","og_type":"article","og_title":"Documentation - Berni&#039;s ~page V5 Weblog","og_description":"Introduction tcx2hrm is a Java based command line tool to convert Garmin TCX training files into Polar HRM data files. It offers a variety of features to influence the conversion, however in most cases the default settings should be sufficient &hellip; Weiterlesen &rarr;","og_url":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/","og_site_name":"Berni&#039;s ~page V5 Weblog","article_modified_time":"2011-07-23T11:32:10+00:00","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"8\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/","url":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/","name":"Documentation - Berni&#039;s ~page V5 Weblog","isPartOf":{"@id":"https:\/\/www.bkits.at\/weblog\/#website"},"datePublished":"2009-09-09T04:54:54+00:00","dateModified":"2011-07-23T11:32:10+00:00","breadcrumb":{"@id":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/documentation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/www.bkits.at\/weblog\/"},{"@type":"ListItem","position":2,"name":"tcx2hrm","item":"http:\/\/www.bkits.at\/weblog\/tcx2hrm\/"},{"@type":"ListItem","position":3,"name":"Documentation"}]},{"@type":"WebSite","@id":"https:\/\/www.bkits.at\/weblog\/#website","url":"https:\/\/www.bkits.at\/weblog\/","name":"Berni&#039;s ~page V5 Weblog","description":"The official weblog to Berni&#039;s ~page V5","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bkits.at\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"}]}},"_links":{"self":[{"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/pages\/555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/comments?post=555"}],"version-history":[{"count":103,"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/pages\/555\/revisions"}],"predecessor-version":[{"id":679,"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/pages\/555\/revisions\/679"}],"up":[{"embeddable":true,"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/pages\/447"}],"wp:attachment":[{"href":"http:\/\/www.bkits.at\/weblog\/wp-json\/wp\/v2\/media?parent=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}