Training Center

All things related to IT security, privacy and compliance.

Don’t forget to check out #InfoSecAndCompliance on Jaiku.

Garmin Updates Training Center for OS X to version 2.0.3

Garmin released version 2.0.3 of their Training Center for OS X on May 4 (I signed up for notifications but never received one). Changes include:

  • Implemented length restrictions to workout name, workout step name, course name, course point name, and speed zone name for compatibility with fitness devices. Using this version of application could cause existing names that exceed the length restriction to be truncated.
  • Fixed an update issue with course point name.
  • Fixed some XML export issues.
  • Fixed a transfer issue with speed and heart rate values.

More info here.

Direct download.

|

Some python code for extracting OS X Garmin Training Center data

Turns out that Garmin Training Center schema wasn’t all that difficult to figure out. I still don’t know how they have the timestamps encoded - doing a conversion results in a date that is ~30 years off and, if post-February, ~30 years and 1 day offf. Also, I don’t know how the longitude/latitude is encoded either. Any pointers would be most appreciated.

If you’ve got python and it’s sqlite library installed, then this script will be a half-decent example of how to pull data from “.gtc” database for each entry in the stored history. If not, have no fear, I hope to release a small app to let you extract the data on your own and I’m still thinking about that widget.

Pretty source after the jump.

Open in new window
| »

Garmin Training Center for OS X Data File Format

My interest in learning the secrets of the Garmin Training Center for OS X user data file was renewed upon learning that the author of TrailRunner added the ability to import GTC data directly into that app. After a cursory search for clues on the format of the “Training Center.gtc” data file, I managed to find the needed bit of knowledge after digging through one of the forums over at MotionBased. One of the posters - saeedi - suggested it was a sqlite database. After making a copy of the file, I opened it up with sqlite3, tried a “.schema” command and was greeted with the following:

CREATE TABLE ZCDABSTRACTSTEP ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZORDER INTEGER, ZBELONGSTOPLAN INTEGER, ZISCHILDOF INTEGER, ZITERATIONS INTEGER, ZNAME VARCHAR, ZISRESTING INTEGER, ZCOMPLETIONCRITERIA INTEGER, Z5_COMPLETIONCRITERIA INTEGER, ZPERFORMANCEZONE INTEGER, Z12_PERFORMANCEZONE INTEGER );

CREATE TABLE ZCDACTIVITYPROFILE ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZMAXHEARTRATE INTEGER, ZNAME VARCHAR, ZGEARWEIGHT FLOAT, ZACTIVITYTYPE INTEGER, ZDEVICE INTEGER );
CREATE TABLE ZCDCOMPLETIONCRITERIA ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZBELONGSTOLEAFSTEP INTEGER, ZTARGETCALORIES INTEGER, ZTARGETDISTANCE INTEGER, ZLIMIT INTEGER, ZLIMITTYPE INTEGER, ZTARGETTIME INTEGER );

CREATE TABLE ZCDDEVICE ( Z_ENT INTEGER, Z_PK INTEGER PRIMARY KEY, Z_OPT INTEGER, ZID INTEGER, ZMAXSCHEDULEDPLANS INTEGER, ZMAXCOURSETRACKPOINTS INTEGER, ZMAXCOURSEPOINTS INTEGER, ZMAXSCHEDULEDPLANDATES INTEGER, ZPRODUCTNAME VARCHAR, ZMAXCOURSELAPS INTEGER, ZMAXUNSCHEDULEDPLANS INTEGER, ZNAME VARCHAR, ZMAXCOURSES INTEGER, ZPRODUCTID INTEGER, ZSOFTWAREVERSION INTEGER, ZOWNER INTEGER );
…(trimmed)…

It certainly looks like it’s a sqlite database. Just to verify, I tried a few SQL commands:

sqlite> select zproductname from zcddevice ;
ZPRODUCTNAME
--------------------
EDGE305
Forerunner305

sqlite>.output gtc-tree.html
sqlite>select * from zcdtreeitem

While not the prettiest schema, it’s workable. Once I get more time to dissect it a bit, I’ll post some code to extract runs/routes and maybe even take a shot at a widget.

| »

Garmin Training Center for Mac OS X Review

Managed to play with the app a bit more today and jotted some notes.

Device Import

The OS X Training Center software reads from the Edge 305 and ForeRunner 305 fine, though the PC version has a nice progress indicator that the OS X version lacks. There were some issues with Parallels (need to do more investigation), but doing some USB settings reconfiguration on the Parallels side cleared things up.

Activities

The PC version will also auto-categorize your activities (running, cycling, etc) upon import. The OS X version does not even have pre-made categories (you can make “folders”) and you cannot shift- or command-click to do multiple activity selections in order to perform a bulk move. This is frustrating, but workable after the initial device import is complete since you are just moving individual activities at that point (or very few, at least).

The PC version also allows you to move your cursor along the graphs and see the associated data (speed, pace, heart rate, etc). There is no provision in the OS X version for this functionality yet.

You can also get a more detailed breakdown of each activity and compare activities with the PC version. Again, this functionality is lacking in the OS X version.

Macness”

Any app developed for OS X gets held to a higher standard than those for the PC since folks expect Apple developers to do the right thing whenever possible. This means conforming to standards and having the app behave like other Mac apps.

Many things, such as user profile information (even multiple profiles) and unit display preferences definitely belong in a “Preferences…” menu. Garmin needs to do this at a minimum. Garmin’s application help is not integrated with the Help Viewer (how difficult can it be?!), and has interesting viewing requirements:

NOTE: The graphics in this Help system are optimized for monitor displays set at 1680 x 1050 screen resolution. Viewing this Help system at resolution settings other than 1680 x 1050 can result in reduced image quality.

1680x1050!!! So, we need to own a big, honkin’ wide screen monitor, eh? (BTW: the help looks fine in any Safari view, so I think the Q/A team missed this error)

It has no AppleScript elements, leaving you no choice but to resort to UI scripting - which is a pain. Many Mac folks are going to want to do “stuff” with the data in this app and having a simple, programmatic way to export/convert from the main database format to something usable should have been an out-of-the-box feature (I’m thinkin’ Dashboard Widget displaying last activity with basic stats).

What is interesting is that there is a “Copyright 2000-2005 Omni Development, Inc. All rights reserved.” in the “About…” dialog. If anyone knows how to build Mac apps, is the Omni folks, and if they are the primary developers for Garmin’s Training Center, I hope they are given more latitude on future versions/updates.

The “Training Center.gtc” file in ~Library/Application Support/Garmin/Training Center/ seems to be a tad different than the name.gdb files the PC version stores the data in. Either way, they are both proprietary, but I plan on seeing what I can get out of the gtc file with gpsbabel+

Conclusion

The OS X version of Training Center does the basics and gives you access to your workout data without the need for BootCamp or Parallels. It’s very rough around the edges but is a welcome addition to my Applications folder.

I hope Garmin takes some pointers from the Omni Group folks for their next revision.

| »

Training Center Screen Captures

UPDATE: Full review in this post

Here are some screen captures of the application (below). The OS X Training Center application read from my Edge 305 (I’ll try it with the ForeRunner later) without any hiccups and the app behaved almost exactly like the PC version.

It’s not a perfect port to OS X - it just doesn’t “feel” like a Mac app - but at least it’s not written in Java and it has the ability to export to XML.

There are no app-specific AppleScript elements, so you’ll need to enable GUI-scripting to automate any apps that want to make use of the exported data. There were no obvious options to the “export” command to limit the number historical activities being saved. Here’s a sample that is over 7 MB when expanded: export.tcx.zip.

Application Info

First Startup Health Warning

First Startup Main Window

First Download

Selection From History

HTML Help File

|

Garmin Training Center for Mac OS X *Now Available*!

UPDATE: Full review in this post
UPDATE: Screenshots and a mini-review in this follow-up post

After over a year of unkept promises, Garmin pulls through and makes their Training Center app available for Mac OS X! It’s even a Universal Binary!

To run it, you’ll need:

  • Intel-based or PowerPC G3 or later Mac
  • OS 10.4 or later
  • 256 MB RAM
  • 1024x768 display
  • 150 MB free disk space
  • USB port

and a Garmin Forerunner 301, Forerunner 205, Forerunner 305, Edge 205 or Edge 305.

I’ll post more details and screen shots once the download finishes (a whopping 27 KB/sec…guess a ton of folks are grabbing it).

|