Showing posts with label Garmin. Show all posts
Showing posts with label Garmin. Show all posts

18 August 2013

Find, change & replace in garmin .fit file

I recently did a long ride and discovered at the end that the speed sensor had been badly configured (wheel circumference set to 6 times too large). This was leading to distorted figures in the Training Centre.  Needing to edit several lines in the .fit file i turned to perl nad this script

#!/usr/bin/env perl
use strict;
use warnings;
my $file='knokke.xml';
open my $info, $file or die "Could not open $file: $!";
open my $out, '>', "knokke_new.xml" or die "Can't write new file: $!";
while( my $line = <$info>)  {  
my $num = $1 if $line =~ /\(.*)\<\/DistanceMeters\>/;
if ( $num ) {
    my $newnum = $num / 750.5*140;
$line =~ s/$num/$newnum/;
}
print $out $line;
}
close $file;
close $out;

6 August 2013

Convert OpenStreetMap data for Mac

Download a map.osm data file using the OpenStreetMap export option - it only seems to permit small areas.

Main instructions are here, but I also had to follow this workaround having got an error "Failed to read option file". That resulted in a gmapsub (and several other files), but not something that could be used with Basecamp.

I then used gmapibuilder, to automagically combine all the outputs into a gmapi file.  Using the cyclemap style files the end result looked like


10 August 2010

Navigating in areas not covered by OpenStreetMap

I spent the last couple of weeks cycling in France. It was not an area well covered by OpenStreetMap, but I found a way of keeping to the roads I wanted to.

I started by setting the routes in Google Maps.



Then I used the bookmark from GMaptoGpx to download a KML and followed the instructions provided by this great tool to run it through GPS visualizer.

The resulting gpx was readily importable to RoadTrip, from where it could be transferred to the Garmin.

On the Garmin itself I choose Where To > Saved Rides > [ride name] > Map Setup. Then I chose a colour and clicked show on map. I could then follow the route around. Don't choose navigate.

[Note: there is a bug in Garmin's 3.2 software that means that once you have a map shown on screen un-clicking the show option does not work.]

18 July 2010

OpenStreetMap for Garmin Edge

The standard OpenStreetMap downloads for Garmin may be appropriate for car drivers but the end result is little use for cycling using a Garmin Edge 605. I'd like to use the cycling specific data on OSM (see OpenCycleMap for the UK, or OpenFietsKaart for the Benelux) data instead with Garmin's Basecamp for OSX.

Do-it-yourself
As there doesn't seem to be a pre-made version anywhere, I had to role my own using these instructions. That got me a gmapsub.img, which worked on the Edge 605 albeit with very slow rendering due to an excessive level of detail.


These instructions are needed for converting to the Mac gmapi format used by RoadTrip and BaseCamp.