Score:0

I need to set my system's clock using a gps receiver

tz flag

I'm trying to set the system clock on an NVIDIA Jetson using a USB connection to an Advanced Navigation Spatial FOG Dual. I found the following script from a previously answered question:

...

#!/bin/bash
#date -s '02/15/2023'
sleep 1
pkill ntpd
pkill gpsd
gpsd /dev/ttyUSB0
sleep 2
GPSDATE=`gpspipe -w | head -10 | grep TPV | sed -r 's/.*"time":"([^"]*)".*/\1/' | head -1`
echo $GPSDATE
date -s "$GPSDATE"
#/usr/sbin/ntpd

...

The script executes, but does not set the system set the clock accordingly.

user535733 avatar
cn flag
Did you install gpsd?
gabriel92 avatar
tz flag
I did, and I can see the data through xgps. I just isn't allowing me to set my system clock to the gps.
in flag
Are you running this script as sudo/root? How does $GPSDATE look like?
Terrance avatar
id flag
Possible: https://askubuntu.com/questions/988514/how-can-i-set-the-system-clock-to-gps-time
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.