[USRP-users] GPSO 1PSS
josh at ettus.com
Fri Feb 1 19:08:49 EST 2013
On 02/01/2013 04:02 PM, Damien Serant wrote:
> I confirm the issue with the query_gpsdo_sensors util that i built myself
> from the version in the git repo (master branch). I always get the error
> message "GPS and UHD Device time are NOT aligned". I found why and how
> correct that :
> Actually on my PC, last_pps_time.get_full_secs() and gps_time.to_int() have
> different values and the difference between the two integers is 1 while
> thier real values are very close. Perhaps a rounding issue. My work around
> is to use the following condition instead:
> if (abs(last_pps_time.get_real_secs() - gps_time.to_real())<DBL_EPSILON)
last_pps_time is only good if the USRP's time was previously sync'd to
PPS, and the clock reference was the GPS unit ("external"). Otherwise,
there could be drift.
> For the second issue I confirm also:
> I configure the stream command with a time t which is a full second (equal
> to get_last_pps() command +1)
> In the metadata of the fisrt received packet i get : t+eps, where eps is
> constant from a test to another, but change with the sampling frequency:
> about 5000 ns at 0.2 Mhz, 700 ns at 2 Mhz, 200 ns at 10 Mhz and 200 ns at
> 20 Mhz (however this is true that i obtained this value from the
> get_real_sec()...). You can test that with the rx_timed_samples example
> with some modification (no set_time_now() and augmentation of the number of
> decimals when printing the metadata time).
> This time offset is too important to be the filter group delay, no ?
The codec clock is a 10ns period. The 200 ns would be 20 samples at the
codec rate, and then you basically see this delay increasing as the
decimation rate increasing.
> So my question is: what is the right time of the samples : the time
> requested in the issue stream command or the time in the metadata of the
> first packet ?
The input to the DDC chain began at the time you requested. The
timestamp comes from the first sample out of the DDC chain. Thats just
how its implemented.
Hope that clarifies things :-)
More information about the USRP-users