Put Strava Routes on your Suunto Device with Movescount
by Cosmo Catalano
I’ve long been unsatisfied with Garmin’s cycling GPS devices. After a particularly bitter unexplained ride deletion last fall, I finally took the leap on a Suunto Ambit2. It’s been great so far, with the added benefit that it works very well for the non-cycling activities I do.
Unfortunately, the device is really tied to some substandard Suunto products. I understand how the proprietary USB connector helps keep the Ambit2 thin, but it’s finicky and fragile.
But of far more concern is that the Ambit2 is chained to Suunto’s Movescount web service. Want to change the settings? Alter what data is displayed for what activity? Program a route onto the device? You’ll need to go online.
This might not be such a big deal in the era of infinite connectivity, except that the Movescount site tends to go down. A lot. Sometimes unexpectedly. I could launch into a extended rant about hardware companies trying to shoulder their way into the web, but space is limited.
A recent automatic sync with Strava, my preferred online fitness site, has taken some of the sting out of this, though there are still some bugs—temperature, for example, does not carry over yet. And if you try to export a gpx from Strava’s Route planner to Movescount, you get this very unhelpful error:
It turns out the issue is with Strava’s use of self-closing
<trkpt/> tags. It makes perfect sense, since the necessary data for routes is just
lng and the resulting file is still entirely valid and significantly smaller. Even after this is corrected, Movescount refuses to read past the first
</trkseg>, which Strava generates between each point in the route planner.
Anyway, I’ve thrown together a quick PHP script to dumb down your Strava routes so they’ll upload nicely to Movescount, and by extension, your Suunto device. I’ve addressed the issue using regular expressions, which is a dangerous game to play with any markup language, but I feel less bad about it as Movescount has already shown itself unwilling to work with valid XML.
There’s also a working version of this script live at my website here: http://cosmocatalano.com/movescount-routes/