I have an AHRS (attitude heading reference system) that interfaces with my C++ application. I receive a 50Hz stream of messages via Ethernet from the AHRS, and as part of this message, I get UTC time. My system will also have NTPD running as the time server for our embedded network. The AHRS also has a 1PPS output that indicates the second roll-over time for UTC. I would like to synchronize the NTPD time with the UTC. After some research, I have found that there are techniques that utilize a serial port as input for the 1PPS. From what I can find, these techniques use GPSD to read the 1PPS and communicate with NTPD to synchronize the system time. However, GPSD is expecting a NMEA formatted message from a GPS. I don't have that.
The way I see it now, I have a couple of optional approaches:
Don't use GPSD. Write a program that reads the 1PPS and the Ethernet message contain UTC, and then somehow communicates this information to NTPD.
Use GPSD. Write a program that repackages the Ethernet message into something that can be sent to GPSD, and let it handle the interaction with NTPD.
Something else?
Any suggestions would be very much appreciated.
EDIT: I apologize for this poorly constructed question.
My solution to this problem is as follows: 1 - interface 1PPS to RS232 port, which as it turns out is a standard approach that is handled by GPSD. 2 - write a custom C++ application to read the Ethernet messages containing UTC, and from that build an NMEA message containing the UTC. 3 - feed the NMEA message to GPSD, which in turn interfaces with NTPD to synchronize the GPS/1PPS information with system time.