TomTom Route aufzeichnen und darstellen

Wie vor ein paar Tagen beschrieben, ist es mit einem TomTom möglich die gefahrenen Routen, bzw alle GPS-Daten der zurückgelegten Strecke vom TomTom aufzeichnen zu lassen.

Diese gesammelten Daten lassen sich dann z.B. über die folgende Seite:

http://maps.gpsvisualizer.com/ grafisch in Google maps darstellen.

Da es ein paar Probleme gab, um mehrere Routen pro Tag aufzeichnen zu lassen, hab ich das Start-Skript etwas geändert, so dass jetzt beim Start die alten Daten archiviert werden. Hier nun das Start-Skript:

Datei: SDKRegistry/TTTracklog.cap

Version|100|
AppName|TTTracklog-wrapper|
AppPath|/mnt/sdcard/bin/|
AppIconFile|track.bmp|
AppMainTitle|TTTracklog|
AppPort|2001|
COMMAND|CMD|hallo|track.bmp|TTTracklog|

Datei: bin/TTTracklog-wrapper

#!/bin/sh

# Wrapper script for TTTracklog (c) Markus Hoffmann 2008-2009
#
# This file is part of TTTracklog, the TomTom GPS Track logger
# ======================================================================
# TTTracklog is free software and comes with NO WARRANTY - read the file
# COPYING for details
#
# Changelog:
# 2009-04-17: First version with gzip MH
# 2009-04-17: fixed bug MH
# 2009-04-23: Added Timezone Option
# 2009-08-08 Edit by Dietrich Heise

# Here the options you might want to change:
# set this to 'yes' if you want old log files to be gzipped
dogzip=yes

# set this to 'yes' if you want gpx files to be gzipped
gpxgzip=yes

# set this to 'yes' if you want old logfiles to be removed.
removelog=no

# set this to 'yes' if you want the citynames and streetnames be added to
# the .itn files. Be careful, this is really sloooow(!) (several minutes)
dowhereami=no

# Set timezone (relative to UTC)
# Here is a quick solution:
# export TZ=UTC-02
# And this is the best solution (including daylight saving times)
export TZ="CEDT-01:00:00CEST-02:00:00,M3.4.0,M10.4.0"

#  PWD, HOME and PATH
cd /mnt/sdcard
export PATH=$PATH:/mnt/sdcard/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/sdcard/lib
export HOME=/mnt/sdcard/

t_date=`date "+%Y-%m-%d"`
t_time=`date "+%d_%H%M%S"`

day_time=`date "+%Y-%m-%d_%H_%M_%S"`

test -x /mnt/sdcard/bin/gzip || {
  echo "gzip is not installed."
  dogzip=no
  gpxgzip=no
}

test -x /mnt/sdcard/bin/whereami || {
  echo "whereami is not installed."
  dowhereami=no
}

efl=statdata/nmea-$t_date.log
fl=`ls statdata/nmea-????-??-??.log`

# Now stop an eventually running process and give it time to writeout
# the gpx file and the statistics.

killall TTTracklog

# hier muessen wir dem toedlich getroffenen TTTracklog noch
# ein wenig Zeit geben, um .gpx und Statistik auszuspucken...

while pidof TTTracklog ; do
  echo "waiting for TTTracklog to terminate ..."
  sleep 1
done

# In the meantime, we are going to cleanup with the files
# if wanted...

for fff in `ls /mnt/sdcard/statdata/*log`
do
    if [ "$dogzip" = "yes" ]
    then
      gzip -v $fff
	  # evtl noch die gpx Dateien gzippen
      gzip -f statdata/*.gpx
	  mkdir -p "/mnt/sdcard/statdata/$day_time/"
	  mv /mnt/sdcard/statdata/*gz /mnt/sdcard/statdata/$day_time/
	fi
done

TTTracklog --gnt --gnd --gnn &

sleep 1

# Jetzt die Meldung rausgeben...
echo -e "FlashMessageV01|TTTracklog is now running in the background: PID=`pidof TTTracklog`|8000|\0\c" >"/var/run/SDK.TomTomNavigationServer.$$.1.message"
echo finish>"/var/run/SDK.TomTomNavigationServer.$$.1.finished"

if [ "$dowhereami" = "yes" ]
then
  fil=`ls itn/????-??-??.itn`
  for fff in $fil
  do
    whereami $fff > $fff.itn
    rm -f $fff
  done
fi

Leave a Comment