Wednesday 29 March 2017

GPS to KML - coloured by speed

Convert a GPS text file to a track that can be loaded into Google Earth, and coloured to reflect speed.
Requires Excel Professional to run VBA macro.


This code is setup for Velocitek GPS which is designed for sailing and motor sports. However it is simple to customise to any other GPS with data in text format. If there is demand for other formats, please comment.

Colours can represent another quantity, such as altitude.

Other GPS formats They need a new module to reformat data to these columns:
Column 1 is time, col 3 latitude DD.DDD, col 4 longitude DDD.DDDD, col 5 is speed, or other variable.

See separate page for macro code and notes.

Macro code is below. Paste into an Microsoft Excel module.

Run the Sub VCC2KML for Velocitek data opened as read-only Workbook..

General Notes
There are routines to cull the output with a minimum step between points. This can dramatically reduce filesize.

Fast & slow colour ranges are suggested by Max(speed) and Average(speed) - 2x StDev, but can be over-ridden.


Writing the KML file is a bottleneck and several subs are devoted to speeding this as much as I've managed to find via Google.


Open the VCC file in Excel as Read-only:



Run VCC2KML
Pick folder and filename for output.
Open KML in Google Earth.