Cut, reverse and combine GPS tracks

When I plan a cycling trip I search for tracks in the target area and try to maximize the “fun factor”. Thus I often end up with a bunch of tracks from which I want to use parts. The difficult task is to cut, sometime reverse and combine the source tracks into a planned track. Most of the times this seems a too much waste of time since it involves a number of operations in qlandkarte (cutting and combining) and gpsbabel (reversing)....

August 2, 2011 · len

Reverse GPX track

This is a simple script which reverses the direction of a gps track stored in a gpx file: <pre lang="bash">#!/bin/bash gpsbabel -t -i gpx -f $1 -x transform,rte=trk,del -o gpx -F 1.$1 gpsbabel -t -i gpx -f 1.$1 -x reverse -o gpx -F 2.$1 gpsbabel -t -i gpx -f 2.$1 -x transform,trk=rte,del -o gpx -F rev.$1 rm 1.$1 2.$1 will generate a rev.file.gpx from file.gpx Comments: Gon - Apr 5, 2015 However the timestamps will be now in a wrong time order… It would be cool to be able to maintain the time gaps between trackpoints together with the start/end times....

June 2, 2011 · len

The smartphone holiday

Going on trip, one of the questions I asked myself is: should I pack a laptop, a gps, a camera? Now a new question: can a smartphone replace all these gadgets on a trip? The answer, based on my experience with my HTC Desire, Android based phone, is: yes, it can replace a laptop and a gps device on a city trip, but… Let me explain what I mean while I wait for my plane....

April 4, 2011 · len

GPS track analysis

GPS data has become extremely available in the last time and analyzing it always yields interesting results.The purpose of this article is to show a simple example where GPS track data is compared with a set of waypoints in order to determine whether a specific tracks was followed. This scenario is custom to various competitions ranging from randonee, cycling (cross country, orientation), 4×4 and the examples can go on and on....

October 3, 2010 · len

Python xml namespace parsing with libxml2

The goal of this tinkering was simple: to parse a KML file for further interpretation and use using python and libxml2. First test <pre lang="python">#!/usr/bin/env python import libxml2, sys doc = libxml2.parseFile(sys.argv[1]) ctxt = doc.xpathNewContext() ctxt.xpathRegisterNs('kml', "http://www.opengis.net/kml/2.2") root = doc.getRootElement() res = ctxt.xpathEval("//kml:Placemark") for e in res: nodes = e.xpathEval('kml:name') if len(nodes) > 0: if nodes[0].content.strip().startswith('cp'): coord = e.xpathEval('kml:Point/kml:coordinates') if len(coord) > 0: print coord[0].content.split(',') doc.freeDoc() ctxt.xpathFreeContext() This sounded ok according to the scarce doc but resulted in the following error:...

July 9, 2010 · len

Holux M-241 GPS

Read track via USB gpsbabel -t -w -i m241 -f /dev/ttyUSB0 -o gpx -F test.gpx Read track via Bluetooth Find mac: hcitool scan Scanning ... 00:1B:C1:05:XX:XX HOLUX_M-241 Bind to a serial port in /etc/bluetooth/rfcomm.conf rfcomm4 { bind yes; device 00:1B:C1:05:XX:XX; channel 1; comment "Serial Port"; } Connect the serial port: rfcomm connect 4 read track: gpsbabel -t -w -i m241 -f /dev/rfcomm4 -o gpx -F test.gpx

May 31, 2010 · len

Navit GPS on a Acer Aspire One

This is a small experiment to use my cycling gps device with the navit application on my Acer Aspire One as a car navigation system. The system was composed of the following elements: GPS device Acer Aspire one running Ubuntu linux gpsd navit Navit GPS Required software Step 1. Install all packages required to build navit from ubuntu repositories: apt-get install build-essential pkg-config automake libglib2.0-dev libtool libxmu-dev libfribidi-dev gettext zlib1g-dev cvs gpsd gpsd-clients libgps-dev libdbus-glib-1-dev libgtk2....

July 31, 2009 · len

Cycling GPS usage tips

I’ve been using my GPS for cycling trips for a few months now and I’ve decided to write a small list of tips and tricks I’ve found useful or found out during these months. Most of the concepts here are general but the technical examples applies to linux which is my main operating system. Terms A waypoint is a set of coordinates for your orientation. It can either be created on the track to mark a position or it can be created on the map and used on the track for in track later orientation....

November 30, 2008 · len

GPS on linux

I’ve bought a GPS device for use during treking and cycling. Since the choice is rather limited here where most of the GPS devices are car dedicated I’ve ended up with a Garmin eTrex legend HCx. Connecting Upon connection my Ubuntu syslog shows: Sep 7 15:53:47 black kernel: [16333.973603] usb 3-1: new full speed USB device using uhci_hcd and address 3 Sep 7 15:53:47 black kernel: [16334.117759] usb 3-1: configuration #1 chosen from 1 choice Sep 7 15:53:47 black NetworkManager: <debug> [1220792027....

September 7, 2008 · len