Hi Using USRP N210, UHD 3.2.1, windows7 (VC++ 9), GPSDO (Jackson Labs)
I first use : get_mboard_sensor("gps_time") set_time_next_pps(0, 1, 54000000) Since gps time returns soon after pps edge occurs, I know that time is set to 0 at a known GPS time called gps_t_0 (which is gps time returned by sensor + 1) (this is based on previous comments of Nick http://lists.gnu.org/archive/html/discuss-gnuradio/2011-08/msg00097.html) Then, I want to check that gps_t_0 is really my starting point, then I discovered the bug Here is pseudo code (in real code I use get_full_secs()) loop(){ //Sleep(3000) gps_now = get_mboard_sensor("gps_time") time_now = get_time_now() if ((gps_now - gps_t_0) != time_now){ //NOT OK std::cout << (gps_now - gps_t_0) - time_now } } If there is no Sleep(3000), results are OK If I enable the Sleep(3000), it prints at every loop iteration either -2 or -3 If I change the sleep into Sleep(6000), it prints at every loop iteration -5 or -6 This means that query of gps_time is proportionally to Sleep(x) in the past So I guess there is a problem of data flushing, the sensor query returning first gps phrase generated by GPSDO since last gps_time query A way to solve this bug may be to flush previous gps_time phrase generated by GPSDO prior to get current time ?? Trying to dig into code (so far searching around get_nmea(...) in gps_ctrl.cpp l.148), but not sure this can be solved in host code ?? Regards Bastien
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio