Hi all, it has been quite a while ago since I worked on my GPSDO. I plan now to extend it a bit and I wanted to connect it to my PC to serve as precision time source, not only precision frequency source. I figured out that ntpd on Linux can accept 1PPS input signals as well as NMEA sentences that tell it the current time, so I would like to try this. However the actual software implementation is not so easy as it sounds at first.
I thought I will add a function that is called once per second and that increments the seconds, minutes, days and so on. Since my GPSDO does not contain a realtime clock, I need to start with some arbitrary date. As soon as the GPS module knows the time and date, I can adjust the "internal" time and date. However, how should I deal with leap seconds and leap years, and how shall I proceed when the GPS module loses the fix (e.g. antenna disconnected or something)? is it better to have internally something like an unix time stamp that increments each second and is then converted to a date and time, or is it better to maintain the actual time and date in the software? As far as I understand, the communication with a PC running ntpd works by sending out the NMEA sentence GPRMC which contains the date and time, which is valid when the next 1PPS pulse arrives. Is that correct? In the long run, I wanted to add a Raspberry Pi compute module to my GPSDO, which handles the ethernet and NTP stuff, while my microcontroller controls the OCXO and so on. The microcontroller could be interfaced to the raspberry such that it tells NTP the correct date and time. This would make a nice NTP time server, plus the raspberry could collect other useful data from the GPSDO and display it on a small web server. I know the raspberry pi can be interfaced to a GPS module, but I have a slightly different situation: my GPS module is connected to the microcontroller, which in turn generates the precise 1PPS pulses which are derived from the OCXO. Therefore, I thought I could use the microcontroller to "fake" a GPS module, outputting the required NMEA strings, and use the more precise 1PPS pulses derived from the OCXO, instead of simply routing the GPS module to the raspberry. Any hints? best Tobias _______________________________________________ time-nuts mailing list -- [email protected] -- To unsubscribe send an email to [email protected] To unsubscribe, go to and follow the instructions there.
