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

Prípadne možno použiť alternatívu: http://www.bt747.org/. Priamy upload nespracovaného tracku do OSM sa neodporúča.



#!/bin/sh
# by michal palenik, GPL v2 or later
# treba pridat usera do grupy dialout kvoli pravam na /dev/cosi
# treba mat curl
# you need CURL and add your user to dialout group (in order to access /dev/ttyUSB0)

# adapt these to fit your needs
osmusername="username"
osmpw="password"
# where to store temporary GPX files
cd /kam/ukladat
# end

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

#aby neblbli zle znaky v nazve
filename=`echo $* | 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
id=`curl -u $osmusername:$osmpw -F "file=@$filename.gpx" -F "description=$*" -F "visibility=identifiable" http://www.openstreetmap.org/api/0.6/gpx/create`

if [ $? -eq 0 ]; then
	# uploaded
	echo "zmazat data z holuxu? (data uz uploadnute na server)"
	echo "http://www.openstreetmap.org/edit?gpx=$id"
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;


Ako dolovať stratené dáta ? keď ich vyšný postup nestiahne...


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