Category Archives: Triathlon

Fitbit (and other optical/LED-based devices’) HR Accuracy

Reposted here from Facebook for reference:

Not sure how many out there are Fitbiters but I believe this applies equally to all wrist/LED-based HR monitors (e.g. Apple Watch, Garmin devices, and other trackers). My own anecdotal testing corroborates this study as does DC Rainmaker’s review of the Garmin 235, i.e. they are good at low intensity but get less accurate as intensity increases.

NB: The study referenced was commissioned by the plaintiffs in a class action lawsuit agains Fitbit, so bias is a strong possibility. The descriptive language could be more neutral but it’s hard to deny the data.

NYT Article
Just How Accurate Are Fitbits? The Jury Is Out

Study
Validation of the Fitbit® SurgeTM and Charge HRTM Fitness Trackers

DC Rainmaker Review of Garmin 235 (HR Accuracy)
Garmin Forerunner 230 & 235 In-Depth Review

Oh Garmin…

I’ve been meaning to write out this for a while but this past week finally spurred me into action. It’s been a trying week for some if not all (tri)athletes out there, well, the ones that use a Garmin device, which is just about all of them. Actually, now that I think about it, I guess it was only Garmin wielding athletes that have iPhones. On August 6, Garmin updated their iOS (and Android) Garmin Connect app. This is the app you use to sync all your workouts with Garmin Connect, a task most athletes do before they get in their car to drive home from the workout. You can also view your activities, do some minor editing (like change the name, activity type, etc.), and share them. Well, the latest update was a major cluster, crashing on launch for most or simply not working after launch for the rest. Here’s a screen shot of their latest reviews on the App Store.

Screen Shot 2015-08-10 at 10.21.11 AM

Not that this is anything new for Garmin, most athletes have a love/hate relationship with Garmin. When working correctly, their devices are arguably the best available, particularly the Garmin 920XT. Sadly, getting to “when working correctly” can be a long and painful process. I’m not sure if it’s Garmin’s (perceived?) monopoly of the athlete GPS-based device market or just plain incompetence. My hope is the Apple Watch one day gives them a run for their money, although it certainly can’t do that in it’s current incarnation (although maybe it could on the entry level market).

It took 4 days for Garmin to post an update to their iOS app, which in reality is not that bad given App Review times and it’s over a weekend. I am happy to report the Garmin Connect app no longer crashes on launch and seems to sync with my device, yay! On a slightly less happy note, it appears Garmin still doesn’t understand basic Physics/Math, as they don’t calculate the overall pace correctly on the “laps” tab view. Here’s a screen shot.

IMG_1478

Total Avg. Pace should be 9:18/mi.

You can’t average the “Avg. Pace” paces to get the overall pace for your run (unless you run an exact (integer) number of miles every time). Most people don’t do that, although I have some friends that try. Garmin does correctly calculate the overall average pace in other places of the app, notably the “Dashboard” tab view you get when tapping on an activity. Sigh.

I admit I have absolutely zero experience with the Android version of the Garmin Connect app but it appears you Android guys are far from immune.

Screen Shot 2015-08-10 at 10.25.46 AM

As far as I can tell, Garmin has not yet updated the Android version.

Parsing Strava’s GPX File in PHP

I love Strava! However, as with all tracking sites, Strava doesn’t always provide the exact window I want into my data. I’ve been thinking about building an app that allows me to manipulate the specific data I’m interested in but to do that, one has to get the data first. Given that, I’ve been playing around with parsing Strava GPX files. I’ve been looking at Garmin GPX and FIT files as well, but the Strava ones seem the easiest to work with.

The challenge I had with the Strava GPX file was getting at the data in the extensions: temperature (atemp), heart rate (hr) and Cadence (cad) data. It took me a few hours to figure out how to parse those values (I’m not very good at XML, namespaces, etc.), so I wanted to post this bit of PHP code to hopefully save others some time!

foreach($stravaData->trk->trkseg->children() as $trkpts) {
    $dataPoint->trkpt = $i;
    $dataPoint->latitude = $trkpts['lat'];
    $dataPoint->longitude = $trkpts['lon'];
    $dataPoint->elevation = $trkpts->ele;
    $dataPoint->time = $trkpts->time;
    $dataPoint->temp = $trkpts->extensions->children('gpxtpx', true)->TrackPointExtension->atemp;
    $dataPoint->hr = $trkpts->extensions->children('gpxtpx', true)->TrackPointExtension->hr;
    $dataPoint->cad = $trkpts->extensions->children('gpxtpx', true)->TrackPointExtensi
 on->cad;
    ...
}

The above code assumes you have created a “dataPoint” class to store the relevant Strava data (trackpoint number, latitude, longitude, elevation, time, temp, hr, cad, … you may have others like power). Let me know if you have any questions.

Norm’s VDOT Calculator

The Silicon Valley Triathlon Club (SVTC) used to have an old Perl based VDOT calculator. If you don’t know what VDOT is, take a look here or at Jack Daniel’s wiki page. The SVTC calculator has not worked for a long time, so I managed to get the code behind the calculator and rewrote its functionality in PHP. It’s not pretty to look at (yet) but you can find my version of the VDOT calculator here. I’ll see if I can figure out a way to integrate it into this blog/site more cleanly.

Let me know if you have any questions or comments.

Update: I have managed to integrate my VDOT calculator into this blog, so I’m updated the link above to point to its new location. I created a new page for it so it also has a menu item that points directly to the page.

Garmin ANT USB Stick/Agent Issues

Virtually every triathlete I know owns a Garmin product of some kind and I’m no exception. I’ve been using Garmin hardware products for over 5 years now and am continually disappointed with several aspects of the experience. Here’s my latest issue. It’s probably not a big deal but if you have a Garmin USB stick plugged into your Mac and are running the Garmin ANT agent, you might want to check this out.

The Problem

I have a Mac Pro tower that I run as a server. It’s always on. I decided I would plug my Garmin USB stick into it and leave the agent software running. That way, whenever I came home, I would put my Garmin (310XT) on the computer table while I went to shower and my workout data would be downloaded and ready to go. This has been working well for about 6 months. This morning, completely unrelated, I was perusing my system log (via the Console app) and noticed a LOT of activity I had never seen before. There were literally hundreds of lines that said:

Jan 23 08:12:30 Mac-Pro kernel[0]: USBF: 3091688.364 AppleUSBUHCI[0xffffff80e1014000]::Found a transaction past the completion deadline on bus 0x3d, timing out! (Addr: 2, EP: 1)

I don’t know all the details behind what’s going on here but it appears if the Garmin USB stick is plugged in and the Garmin ANT Agent software is running, it polls the USB bus every 1-2 seconds. During this “activity” it seems the agent software does not quite clean up after itself, causing lots of system log entries. Surprise, surprise.

Now, this is probably not a big deal for my dual processor, quad core Mac Pro. However, I imagine there has to be some sort of performance hit, not to mention severely bloated log files (which make finding something you are really looking for quite difficult).

The Solution

Fortunately, there’s an easy fix. Just unplug your stick and the agent software stops polling. No idea if this affects Windows users and realistically, I doubt it affects many people but I thought I’d share.

Update Feb 2, 2013: I’m actually doing the reverse now. I leave the stick plugged in and just run the ANT Agent app when I want to download data.