gpsd-users
[Top][All Lists]
Advanced

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

Re: use gpsd and chrony time sync with fake gps


From: Gary E. Miller
Subject: Re: use gpsd and chrony time sync with fake gps
Date: Tue, 23 Nov 2021 10:25:01 -0800

Yo Lin!

On Mon, 22 Nov 2021 14:21:50 -0500
Lin Zhao <crazymumu0804@gmail.com> wrote:

> Sorry for late reply.

The only thing bad about that is I tend to forget where this was left.

> Now I start with following commands:

Most of us here use NTPsec, I'm not very current on chronyd.

> /etc/chrony/chrony.conf:
> > driftfile /var/lib/chrony/drift
> > allow
> > # set larger delay to allow the NMEA source to overlap with
> > # the other sources and avoid the falseticker status
> > refclock SOCK /var/run/chrony.ttyTHS0.sock refid GPS precision 1e-1 offset 
> > 0.9999
> > refclock SOCK /var/run/chrony.pps1.sock refid PPS precision 1e-7  

Sources are started in the order they are found in the file.  You want
your besst source at the top, and worst at the bottom.

Your ttyTHS0 offset is crazy.  And it should be "noselect".

> Start commands:
> > sudo killall -9 gpsd chronyd

a) that is no good if you have some init system handling your daemons.
Like openrc or systemd.

b) sudon't: https://gpsd.io/ubxtool-examples.html#_sudo_sudont

> > sudo chronyd -f /etc/chrony/chrony.conf
> > sleep 2
> > stty -F /dev/ttyTHS0 speed 9600
> > sudo gpsd -n /dev/ttyTHS0 -F /var/run/gpsd.sock  

Dunno why you are using -F, and why you are not using -s.

> sudo ntpshmmon :

Not useful without seeing your output.  I can not read, nor cut/paste, your
dark gray on black screen shot.

Please post text only.

> > # gpsd -nND 4 /dev/ttyTHS0 > tmp.log 2>&1  
> Please see attached log file from you suggested commands

Broken kernel PPS:

gpsd:INFO: KPPS:/dev/ttyTHS0 kernel PPS timeout Interrupted system call

And no regular PPS seen either.  Are you sure your PPS is working?

> > You at least have to change the time stamps.  
> The GPS example I taken from a Ultimate GPS record, I do increase
> time stamp every second and keep other information.

Care to share your NMEA data?  Easy to do, while gpsd is running:

$ gpspipe -R -x 20 > raw.log
$ gpspipe -w -x 20 > json.log

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpAWp5L1wsDv.pgp
Description: OpenPGP digital signature


reply via email to

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