Merging Columbus CSV files

⇠ Back to Blog:Hacks

To merge various tracks from the Columbus P-10 device so as to assemble a global picture of your whereabouts, one can follow the steps below.

I use CSV files, as described in the previous blog post, which can also make use of its csv2gpx script. This is fairly rough but works as a proto-version:

#!/bin/bash
#                                ____ ______     __
# _ __ ___   ___ _ __ __ _  ___ / ___/ ___\ \   / /
#| '_ ` _ \ / _ \ '__/ _` |/ _ \ |   \___ \\ \ / / 
#| | | | | |  __/ | | (_| |  __/ |___ ___) |\ V /  
#|_| |_| |_|\___|_|  \__, |\___|\____|____/  \_/   
#                    |___/                         
# F.P. Laussy - fabrice.laussy@gmail.com
# v0°1
#


# make copy in a temporary auxiliary directory
mkdir tmpauxcsv
cp *CSV tmpauxcsv
cd tmpauxcsv

# remove first line (header) of each input
sed -i '1d' *.CSV

# merge
cat *.CSV > all
mv all all.CSV

# Add header
sed -i '1s/^/INDEX,TAG,DATE,TIME,LATITUDE N\/S,LONGITUDE E\/W,HEIGHT,SPEED,HEADING /' all.CSV

# Save output and clean
mv all.CSV ../
cd ..
rm -rf tmpauxcsv

echo "Finished (output in all.CSV)"

This for instance allowed us to reconstruct this visit of the Highlands during our Isles of Man and Skye (Christmas 2022 & New Year 2023) trip:

Screenshot 20230106 002759.png