It would help if you gave a complete list for example of the sources command
What do you mean of "sources command"? if you mean chrony configuration:
## Internet server
driftfile /var/lib/chrony/drift
## Used for NTP time sync for other system (e.g. DVL, Topside, Pi...)
## Used for time sync Jetson from Arduino using gps NMEA string and PPS
makestep 1.0 3
maxupdateskew 100.0
refclock SHM 0 poll 0 refid NMEA precision 1e-1 offset 0.0 trust
refclock PPS /dev/pps1 poll 0 lock NMEA refid PPS precision 1e-6 prefer
initstepslew 30
How do you hook up the microcontroller, how does it send out the PPS to make
sure it is on the UTC second, How is the NMEA generated, etc.?
1) The computer is connected to the Internet, so it's originally time synchronized UTC..
2) The computer and microcontroller have two part connections: 1) USB cable: used for data transmission. 2) PPS connection and UART (for pure NMEA)
3) Then I will send UTC time at the beginning of one second to microcontroller through the USB serial. So the microcontroller time is aligned with UTC. Obviously, serial transmission will take some time. but it should be very small.
2) After microcontroller time is aligned with UTC, microcontroller will start to count time using hardware timer, and each one second send PPS and NMEA. NMEA is saved from a real GPS, but I will replace the time information that counts inside the microcontroller.
3) Right now, I can compare computer time and microcontroller time, they are the same.
4) Now, I start gpsd and chrony, computer start time synchronized with microcontroller. After synchronization, computer time is ahead of the microcontroller. For example, microcontroller time is 1646779996, computer time is 1646779997.
Best regards,
-------------------------------------------------Lin Zhao
Research Assistant @ Graduate School of Oceanography
Ph.D. Student @ Department of Ocean Engineering
University of Rhode Island
Room 2, Horn Lab
215 South Ferry Road
Narragansett RI 02882
Phone: 401-771-4661