Pozor! wiki.freemap.sk je archivovaná a už do nej nie je možné prispievať. Užitočné stránky budú premigrované na oficiálne wiki stránky slovenskej OpenStreetMap komunity.

Revision [2392]

This is an old revision of HoluxDownload made by MichalPalenik on 2009-11-30 09:42:10.

 

Ako stiahnuť dáta z Holuxu 241 v linuxe ? Jednoducho, týmto skriptom:

#!/bin/sh
# by michal palenik, GPL v2 or later
# treba pridat usera do grupy dialout kvoli pravam na /dev/cosi
# treba mat curl

# adapt these to fit your needs
osmusername="username"
osmpw="password"
cd /kam/ukladat
# end

# ak nie su ziadne parametre
if [ "$1 " == " " ]; then 
	echo "usage '$0 description'";
	exit 1;
fi

filename=`echo $1 | sed 's/ /-/g'| sed 's/\//-/g'`
echo $filename;

if [ -r "$filename.gpx" ]; then
	echo "$filename.gpx exists";
	exit 1;
fi
if [ -r "/dev/ttyUSB0" ]; then
	echo 'ok';
else
	echo "/dev/ttyUSB0 not readable, plugin holux";
	exit 1;
fi

mtkbabel -i -s 38400 -f foo -t
mv foo_trk.gpx "$filename.gpx"

# upload do osm http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6#Uploading_Traces
curl -u $osmusername:$osmpw -F "file=@$filename.gpx" -F "description=$1" -F "visibility=trackable" http://www.openstreetmap.org/api/0.6/gpx/create

if [ $? -eq 0 ]; then
	# uploaded
	echo "zmazat data z holuxu? (data uz uploadnute na server)"
else
	echo "nepodarilo sa uploadnut na server, zmazat z holuxu ?";
fi
echo "[yes]/nie";
read zmazat
if [[ $zmazat == n* ]]; 
then
   exit;
fi   
echo "mazem"
mtkbabel -s 38400 -E
exit 0;



CategoryHowTo
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki