How to check at which GPS time correspond the pps edge of set_time_next_pps()

Hi

USRP N210, UHD 3.2.1, GPSDO Jackson Labs installed
windows7

Using set_time_next_pps()
How can I be sure at which GPS time (in seconds from 01/01/1970) the pps
egde correspond to

So far, here is how I do :
_ get GPS time (get_mboard_sensors(“gps_time”)), let it be gps_t_0
_ set_time_next_pps(0, 1, 54000000)
_ add + 2 sec to gps_t_0. +1 because time is set at next PPS, +1 because
this seems to be time needed to execute the sensor query on GPS
(practically, I was always 1 sec behind, before this last +1)

This has shown to be stable in development lab, for the last few days.
But is there another mechanism to map the “next pps” to a GPS time (in
seconds from 01/01/1970) ?
What bothers me, it’s that the second +1 I add is based on the
get_mboard_sensors(“gps_time”) execution time (approx 1 sec). But this
may
change randomly (depending on load, HW etc…)

Regards
Bastien

On Thu, 2011-08-04 at 21:11 +0200, Bastien Auneau wrote:

But is there another mechanism to map the “next pps” to a GPS time (in
seconds from 01/01/1970) ?
What bothers me, it’s that the second +1 I add is based on the
get_mboard_sensors(“gps_time”) execution time (approx 1 sec). But this
may change randomly (depending on load, HW etc…)

The extra second is required because the GPSDO only outputs a report
once per second. It returns immediately upon receiving a message, so as
long as you call set_time_next_pps soon after
get_mboard_sensors(“gps_time”), you should be fine.

–n