Hi, After synchronization to the GPS time, the USRP time does not match the real GPS time (there is 1 second offset between the USRP time and the real GPS time). I realized that 1 second offset by analyzing the signal content produced by the USRP (which depends on the GPS time in my case).
Here the system configuration: CentOs 7.2 UHD 3.9.6 USRP X300/X310 GCC 5.4 I also tried to run the application (with the exact same source code) on a Windows based system. And there were no mismatch between the USRP time and the real GPS time (the signal produced by the USRP was perfectly sync with the GPS time). Here the Windows based configuration: Windows 7 Enterprise UHD 3.9.4 USRP X300/X310 MSVC 2013 To synchronize the USRP time with the GPS time I used the code snippet from the X300/X310 documentation, see below: =============================================================================== while(! (usrp->get_mboard_sensor("gps_locked",0).to_bool()) ) { boost::this_thread::sleep(boost::posix_time::seconds(2)); } usrp->set_time_source("gpsdo"); uhd::time_spec_t last = usrp->get_time_last_pps(); uhd::time_spec_t next = usrp->get_time_last_pps(); while(next == last) { boost::this_thread::sleep(boost::posix_time::seconds(0.05)); last = next; next = usrp->get_time_last_pps(); } boost::this_thread::sleep(boost::posix_time::seconds(0.2)); usrp->set_time_next_pps(uhd::time_spec_t(usrp->get_mboard_sensor("gps_time").to_int()+1)); =============================================================================== I was able to fix the issue by adding 1 second to the time when calling set_time_next_pps, as follow: =============================================================================== usrp->set_time_next_pps(uhd::time_spec_t(usrp->get_mboard_sensor("gps_time").to_int()+2)); =============================================================================== However I would like to understand why that additional second is needed (only on CentOs) and get rid of it in order to keep the CentOs source code and the Windows source code the same.
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com