Re: [chrony-users] help - UTC time of PPS pulses

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Unless the card is a many pulses per second (eg 5 per second) then the pulse
is on exactly the UTC second to within a few nanoseconds (unless you have a
really crappy gps card)
Note that the pulse has a leading and trailing edge. If you use the trailing
edge then the time will be out by up to milliseconds from UTC, and have a
large fluctuation. If the card is a multi pulses per second, then the time
will be at exactly 1/n second ( eg 0 , .2,.4,.6,.8) to within a few
nanoseconds. There is nothing in the stream which would displace this by
milliseconds.



On Wed, 14 Oct 2020, Yoed Stavi wrote:

Hi Miroslav,
Thank you for your comments.

We have chronyd configured with a reference NTP server and a PPS in addition.
In my understanding this configuration sets the time according to the NTP server and then maintains the frequency with the PPS.
I was under the assumption that the GPS pulses are not precisely aligned with whole UTC seconds.
I need to know the offset between the pulses and the UTC seconds in order to create timestamps that are relative to the pulses rather than UTC seconds.
In the refclocks log I see the following:
2020-10-14 08:47:09.000003 PPS     7 N 1 -3.747000e-06 -3.382498e-06  2.200e-08

So now I'm thinking: if each of these lines is a GPS pulse, maybe my assumption is wrong and the pulses are aligned with UTC seconds.
And possibly the offset that I've been measuring is due to transmission delay of the ASI card.
Highly unlikely. That might be on the microsecond level, not millisecond. The
interrupt handler could well introduce problems at the microsecond level.


Thank you,
 Yoed.


-----Original Message-----
From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
Sent: Tuesday, 13 October 2020 13:30
To: chrony-users@xxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: [chrony-users] help - UTC time of PPS pulses

On Tue, Oct 13, 2020 at 10:03:10AM +0000, Yoed Stavi wrote:
Hi,

I use Chrony as our NTP client and also for PPS synchronization.
This works great.
The same server creates a DVB-T transport (MPEG-2 TS with MIP packets). The DVB-T protocol includes timestamps that should be relative to GPS pulses.
Since the DVB-T software doesn't know when the GPS pulses are (only Chrony knows that), I set the timestamps to be relative to whole UTC seconds instead of GPS pulses.

I would like to improve by knowing the offset between GPS pulses and UTC seconds as it is measured by Chrony  (from my measurements the result should be between 230-250 milliseconds).

I'm not sure if I understand your goal correctly. You have chronyd configured to synchronize the system clock to UTC using a PPS signal coming from a GPS receiver and you want to measure the offset between the PPS and UTC? That would be the offset that chronyd is minimizing, i.e. it should be close to zero. The measurements can be reported by the "chronyc sources" command, and also in the refclocks log if enabled.

--
Miroslav Lichvar


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/