M8 Sensor User Guide, QPN 96-00001 Rev K Page 75
1. Disconnect or turn off the GPS receiver. (This will allow you to distinguish between the
sensor’s own timestamp and the GPS receiver’s timestamp later in this procedure.)
2. Open a terminal window, and execute the following commands:
$ roscd quanergy_client_ros
$ cd settings
$ sudo gedit client.xml
3. In the client.xml file that opens up in the text editor:
• Find the <useRosTime> switch; change the default value (true) to false as follows:
<useRosTime>false</useRosTime>
• The value must be false for NMEA to work, so it’s a good idea to document
that by adding the following comment (or similar) after the <useRosTime> switch:
<!-- when using NMEA, set this value to false -->
• Save and exit the file.
4. Execute the command rostopic list. Check the resulting list for the proper
capitalization (/sensor/points or /Sensor/points) to use in the next step.
5. Display the timestamp from the sensor only by executing this command:
$ rostopic echo /Sensor/points/header/stamp
You will see a display of seconds incrementing from zero, as counted up from
the sensor’s internal clock, which resets when the sensor is power cycled.
6. Reconnect the GPS receiver to the M8 sensor, and power it on.
7. Wait about thirty seconds for signals to fully synchronize with the sensor.
(Once synchronization takes place, you will be able to see a display of the timestamp
in real time.)
8. Display the timestamp with NMEA/PPS input by executing this command:
$ rostopic echo /Sensor/points/header/stamp
The return will look similar to this:
secs: 1504238913 <== UNIX Epoch time (Number of seconds since Jan 1, 1970)
nsecs: 75048100 <== Nanoseconds
---
secs: 1504238913
nsecs: 848061000