Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-24 Thread kimaidou
Hi all I come back after some tests. I would like to stick on bash script for several reasons (don't want to load another instance of python just to record some sound, etc.). So among your answer, I tried to use one of this line echo p | nc -w1 0 gpsd | tr -d '\r\n' | cut -d'=' -f2 But I got

Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-24 Thread Timo Juhani Lindfors
kimaidou kimai...@gmail.com writes: * do I need to start gpsd first Sure, netcat talks to gspd. * will this work on every distribution, or do I need to change gpsd by fso-gpsd or anything else ? It works with anything that speaks the gpsd protocol. * how do I know I have a fix before using

Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-24 Thread Ed Kapitein
Hi kimaidou, on om 2008.12 do: -1 in settings turn on gps hardware -2 start gpsd (/etc/init.d/gpsd start) -3 read the gps data (gpspipe -r) To check if you have a fix, you might want to clean out the lines that have no lat/long info like this: gpspipe -r | grep GPGGA | grep -v ',,' And to

Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-23 Thread Ed Kapitein
Hi Kimaidou, I put some script on http://wiki.openmoko.org/wiki/User_talk:Kapiteined and start and stop gps in those scripts. And also clean the gps logs from data without a valid lat/long (thus without having a fix). Please feel free to browse trough the scripts and use whatever you like about

Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-23 Thread kimaidou
Thanks very much to all for your kind and quick answers. I will try do use them when I have time kimaidou 2009/2/23 Ed Kapitein e...@kapitein.org Hi Kimaidou, I put some script on http://wiki.openmoko.org/wiki/User_talk:Kapiteined and start and stop gps in those scripts. And also clean

GPS - how to get lat lon and time from a bash script file ?

2009-02-22 Thread kimaidou
Hi, I am developping voicenote (1), and I would like to implement a new function : localize each audio note with the gps latitude, longitude and time. Since I would like the soft to be plateform independant, I ask you to tell me how can I : * start gps if it is not * know when I got a fix * put

Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-22 Thread Timo Juhani Lindfors
kimaidou kimai...@gmail.com writes: * know when I got a fix * put the latitude, longitude and time into variables (and why not the precision too : hdop) $ cat bin/gps-get-position #!/bin/sh echo p | nc -w1 0 gpsd | tr -d '\r\n' | cut -d'=' -f2 ___

Re: GPS - how to get lat lon and time from a bash script file ?

2009-02-22 Thread Michele Renda
NB: I am just begining scripting; I know nothing about dbus (only copy paste some working lines), etc. Please be patient :D This is not bash, but python, and it need lib_pyfso_gobject import. The good part is that it use fso-frameworkd But I think it can help: from lib_pyfso_gobject import