gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] gpxlogger daemon mode is not working?


From: Beat Bolli
Subject: Re: [gpsd-users] gpxlogger daemon mode is not working?
Date: Fri, 5 Feb 2016 18:22:29 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 04.02.16 19:20, Free.man wrote:
> Hi,
> 
> I am using Raspbian Jessie with GPSD 3.17-dev manually compiled. The GPS
> data runs through the serial port.
> 
> Everything works fine so far.
> 
> I start gpsd and gpxlogger via rc.local at startup and if my GPS chip
> has a fix on startup the gpxlogger starts logging.
> 
> I use the following options:
> 
> #Rc.local:
> 
> gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
> 
> gpxlogger -d -i 30 -m 5 -f /home/pi/trip_log_`date
> +"%Y-%m-%d_%H%M%S"`.gpx /dev/ttyAMA0
> 
> The idea ist hat if gpxlogger loses the fix for more than 30 seconds it
> starts a new fileā€¦ I read it in a forum that that was the way
> 
> Its meant to be and of course my understanding of a daemon.
> 
> My problem is that it exits without error if it loses the fix.
> 
> Of course I need it to be unattended so I cant always check if it is
> still running.
> 
> Any suggestions?

You need to restart the logger when it quits:

while true; do
    gpxlogger -d -i 30 -m 5 -f /home/pi/trip_log_$(date
+"%Y-%m-%d_%H%M%S").gpx /dev/ttyAMA0
done

This way, the loop repeats until the shutdown command kills all processes.

Regards,
Beat

-- 
https://drbeat.li
pgp: 0x506A903A; 49D5 794A EA77 F907 764F  D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E

"It takes love over gold, and mind over matter" -- Dire Straits



reply via email to

[Prev in Thread] Current Thread [Next in Thread]