AIS Message Time Tagging
The Satlab Polaris AIS receiver support time tagging of the received AIS messages, if a PPS signal is supplied. When a PPS signal in connected to the receiver it discipline the sample clock with the external PPS signal and is able to time tag with the accuracy specified in the datasheet. When a PPS signal is provided the sub-second time of arrival of the AIS message will be accurate, but to give the full time, it needs to be time synchronized with a CSP message.
The PPS signal needs to be active when the board is powered on for the time stamping to work. After the receiver has booted and synchronized to the external PPS signal, it is able to stay in sync, even if the PPS is absent for a short period of time. When the PPS signal is reapplied the Polaris AIS receiver will start to pull-in the phase error, if any has build up while the PPS was absent. If the receiver has been running for a couple of hours without external PPS, it is possible for the error to exceed 0.5 s, and in this case the receiver will report the correct sub-second time but the wrong whole second, in this case the receiver should be rebooted.
Setup
Connect a PPS signal to the PPS input pin. For voltage and location check the datasheet.
Follow Getting Started to setup communication with the receiver, if not already done.
List the demod property table and verify that demod.pps.valid and demod.pps.synced are true.
...
pps.valid bool M N true
pps.last u32 M N 24999779
pps.avg u32 M N 24999793
pps.synced bool M N true
pps.time.set bool D N false
Note
The receiver will only set demod.pps.synced to true if the PPS is active before it is booted. If pps.valid is true and pps.synced is false then reboot the board.
Set the current time with satctl: ‘polaris clock [sec] [nsec]’
Now the pps.time.set parameter will show true, like below, and received AIS messages are time tagged.
Note
There is no requirement to when the time is set with respect to the PPS phase, but it should have a accuracy better than 0.3 s.
...
pps.valid bool M N true
pps.last u32 M N 24999779
pps.avg u32 M N 24999793
pps.synced bool M N true
pps.time.set bool D N true
The two parameters pps.last and pps.avg is the number of cycles on the ADC clock between the PPS, the nominal value is 25000000. In the digital domain a resampler corrects the sample rate based on the measured error, this correction is not reflected in the pps.last and pps.avg values, as they are referenced to the uncorrected ADC clock.