Author Archives: Harry

Beyond the SDK: Uncovering Undocumented Garmin FIT File Information

Introduction: The Challenge of Undocumented FIT File Data

Decoding all the data within Garmin’s FIT files can be a challenge due to the presence of undocumented messages, fields, and values. Garmin developed the FIT file format to store data on its devices, including activity data, courses, workouts, monitoring data, goals, and more. While much of this data is viewable in the Garmin Connect app or website, and activities can often be exported to FIT format by other brands and imported into apps like Strava, there are reasons to develop custom applications. These reasons include accessing data not shown in standard apps, creating personalized data visualizations, or performing more in-depth analysis.

The Garmin FIT SDK: An Incomplete Resource

To aid developers, Garmin provides an SDK (available on their developer website) with tools to extract information from FIT files in various programming languages. However, this SDK isn’t exhaustive, meaning not all information within FIT files can be accessed through it.

FIT Files: Messages, Fields, and the Profile Spreadsheet

A FIT file is a compact, binary format organizing information into messages and fields. For example, a “lap” message contains summary information for each lap, and a “device info” message details the devices and sensors used. Each message comprises several fields, such as start time and total elapsed time in a lap message.

Messages and fields are identified by numerical codes. Also the value of a field may be a numerical code. For example, an “event” field may have value 0 for a timer event, 9 for a lap event, 22 for a battery low alert, etc.

The SDK includes a spreadsheet, profile.xlsx, which documents the meaning of many of these numbers.

The Problem: Undocumented Elements

When working with FIT files, you’ll quickly encounter undocumented numbers. You might decode a message but not know its purpose, or find undocumented fields within documented messages, leaving their meaning unclear. Even when a field’s purpose is known, it can contain undocumented values. For instance, an “event” field might have an undocumented value like 39, so you don’t know what type of event it is.

Strategies for Deciphering Undocumented Data

Several methods can be used to decipher these undocumented elements. One crucial tool is an application like FIT File Viewer, which displays all messages, fields, and values within a FIT file, including those not officially documented (accessible via developer mode in FIT File Viewer).

A practical approach is to record an activity and then compare the values in the FIT file with the information presented in the Connect app/website or your device’s app. If you find a match in a field labeled like “field {number}” (where {number} is the specific field’s numerical identifier), it suggests this is the corresponding data point. Repeating this process with different activities can help confirm your findings.

Another useful technique is to change settings on your device one at a time and observe the resulting changes in the FIT file. This helps isolate the impact of each setting modification.

Good to know: if you go to https://www.fitfileviewer.com/develop, you have some extra features: you will see the fields for which I have already figured out the type, but not the meaning yet, and there is a button to log the undocumented fields (if any) in the debugger console: the field definition number, base type, size and value in the first row.

A Community-Driven Resource: Undocumented Data for FIT File Viewer

Through these investigations and the shared knowledge of others, I have compiled a list of undocumented messages, fields, and values specifically for use in FIT File Viewer. This list follows the same format as the profile.xlsx file in the FIT SDK.

I am now sharing this document to benefit others developing their own FIT file decoders. Simultaneously, I encourage them to share any undocumented values they discover, so I can incorporate them into this resource.

You can find the list of undocumented values in this Google Sheet.

Call for Contribution

If you discover other undocumented messages, fields, or values, or identify any errors in this sheet, please contribute!

You can do so by opening a FIT file demonstrating the value in FIT File Viewer, clicking the “Contact Me” link at the bottom, and completing the form.

Getting your Zwift ID the easy way

Zwift is an online training app for cycling (and running). If you have an account at Zwift, you can also use other web apps, such as Zwift Power and Zwift GPS. You connect these apps to your Zwift account using your Zwift ID.

Getting your Zwift ID can be a bit tricky. For some reason, Zwift is not simply listing it in your profile, but you can figure it out if you analyse the link of a downloaded activity (.FIT) file.

It can be much easier using a bookmarklet. A bookmarklet is a small tool that is installed in your bookmarks bar and that can do simple tasks, such as getting information from the current web page.

Continue reading

New version of Gmail to Evernote now in spreadsheet

A new version of the Gmail to Evernote script has been released. It is now embedded in a spreadsheet, so you have all the relevant information together and can easily view it. Moreover, you have your own copy of the script now: much more secure, but it is not to update automatically anymore. Therefore, current users are advised to install the latest version and use this instead of the old version. The old version may stop working in the course of the next week (end of April 2019).

Continue reading

Changing the settings for a Garmin Connect IQ App

Update: Garmin has now a page on their support site explaining How to Access the Settings of Downloaded Connect IQ Content Using the Garmin Connect App.

Garmin has a range of sports watches, on which you can install Apps, both provided by Garmin and by the community. You can find the  Apps developed by HarryOnline in the Connect IQ store.

From the feedback I received, I noticed that many people find it hard to change the settings for an App. This can be done on the watch itself, if it provides such an option via the Menu, or using a connected computer or smartphone. On a computer  you use Garmin Express, on a smartphone there is the Connect Mobile App. For both I will describe how the settings can be changed.

Continue reading

A Smarter Sudoku on your mobile phone

smarter.com-highlightSudoku puzzles started getting popular around 10 years ago, and many web sites offering to play Sudoku online have sprung up. Many of these sites are outdated: they can only be played on a desktop computer, while roughly half the traffic on the Internet nowadays comes from mobile devices (tablets and smartphones). So what does it take to make a Sudoku puzzle play well on mobile devices? SmarterSudoku is a new Sudoku site, that shows how it can be done, as explained here.

Continue reading

Marathon Apps, why do they fail so often?

2015-04-12 19.24.49Today the Rotterdam Marathon took place. Also for this marathon, a smartphone app had been developed. I think most users for such apps are the supporters, who want to track their favourite runners, along the side of the route or from home.

There is some innovation, but clearly not much thought was given to how this app would be used, and how this could be made more easy.

Why is this format not good, and how can it be improved?

Continue reading

Gmail to Evernote messages now in Sent mail

The Gmail to Evernote script works by sending a message to your Evernote email address. It does so using Google Apps Script. Until recently, a message sent by Google Apps Script would not appear in your Sent mail; in many cases, this would be considered an omission, and it has been fixed now: the messages will show in your Sent mail.

For messages sent to Evernote, keeping a copy in your Sent mail is less relevant; several people, including myself, considered it a benefit that these message were not cluttering your Sent mail. I will therefore look into the options for not getting receiving a copy of the mail to Evernote in your Sent mail, perhaps as an option that you can switch on or off. No immediate solutions have come to my mind yet, but if I get some, it will be implemented in the next version.

Meanwhile, any bright ideas are welcome!

Update: the bright idea is to create a filter in Gmail, specify your Evernote address in the To field of the search criteria, and select Delete it as action (submitted by Nathan Stretch, comment below).

Multi-day calendar events in Google Apps Script

You can create events using the Calendar Class in Google Apps Script. However, only for regular (not all day  events) you can set both the start and the end time. For all day events, you can only set one date, so they will always be one day only. Then how can you create all day events?

There are a few workarounds:

  • Create a regular event and set the start and end time to midnight; remember to specify midnight of the day after the end day. The drawback is the event fills the whole space for a day in your calendar overview, rather then just a line at the top as with all day events.
  • Create a all day event series, so you have a sequence of one-day all day events; this looks already a bit nicer, but in the calendar view, from a single event yio can not see how long it last.
  • Create an event from a description, this creates real multi-day all day events.

So creating an event from a description seems the best way to go. This is worked out in a new function, createMultiDayEvent( calendar, title, startDate, endDate ). Continue reading

New version of Gmail to Evernote script

Version 3 of the Gmail to Evernote script has been released. Existing users will have to authenticate and give access again, to keep  the script running. You can do so easily by going to  gm2en.com.

This is the new web interface, that is one of the major changes in the new version. All options can now be configured from this form.

Other changes are:

  • more flexibility in selecting labels: you can now specify a different label than ‘Evernote’, to select the messages to be forwarded. Also, you can select a tag label, and only this label and its sublabels will be included as tags to be sent  with the message to Evernote, other labels will be ignored. Finally, you can specify a label to be assigned if a message is sent to Evernote.
  • better catching of errors. it may happen, that a server is not reachable. Before, you would receive a notification of script failures, but these are caught now and you will not receive a notification anymore, After all, you can not do anything about it, so it does not make sense to send these messages. Other problems, such as the requirement for re-authentication, will still be sent. 

.All options are documented in the original Gmail to Evernote post, which has been updated.