The best result I obtain is with chrony, following this process:
photobyte.org/raspberry-pi-stretch-gps-d...-chrony-timedatectl/
But after the boot, chronyd starts and stops some time after. So I have to restart the service to update after a while the system clock.
I use gpsd for my USB key GPS Ublock7 and it runs well for ages.
I am going to explore the links you give me and the script. I did not get any result with ntp.
After installation of NTP, I modify the ntp.conf, with only these lines :
#GPS TIME SOURCE
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 refid GPS
Next sudo service ntp restart.
ntpq -p but the line HMS has not a star and the reach column remains to 0 :
stellarmate@stellarmate:~ $ ntpq -p
remote refid st t when poll reach delay offset jitter
=======================================
SHM(0) .SHM. 0 l – 16 0 0.000 0.000 0.000
Systemctl status ntp gives this result:
ntp.service – Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-02-03 23:12:13 CET; 10s ago
Docs: man:ntpd(
Process: 2355 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 2361 (ntpd)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/ntp.service
`-2361 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 121:128
févr. 03 23:12:14 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:15 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:16 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:17 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:18 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:19 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:20 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:21 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:22 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
févr. 03 23:12:23 stellarmate ntpd[2361]: SHM: difference limit exceeded, delta=43276s
Thank you for your help.