Blog de Flap

18/11/2014

Raspberry PI et Holux GPSlim 236

Filed under: Inclassable — flap @ 14:27
#!/bin/bash
gpsdata=$( gpspipe -w | grep -m 1 TPV )
lat=$( echo “$gpsdata”  | cut -d”,” -f7 | cut -d”:” -f2 )
lon=$( echo “$gpsdata”  | cut -d”,” -f8 | cut -d”:” -f2 )
alt=$( echo “$gpsdata”  | cut -d”,” -f9 | cut -d”:” -f2 )
time=$( echo “$gpsdata” | cut -d”,” -f5 | cut -d”T” -f2 | cut -d”Z” -f1 | cut -d”.” -f1 )
date=$( echo “$gpsdata” | cut -d”,” -f5 | cut -d”T” -f1 | cut -d”:” -f2 | cut -d’”‘ -f2 )
echo “$date $time”
#date
echo “You are here : $lat, $lon at $alt”

Powered by WordPress