How to get time from GPSDO

Hi all,

I know this is a very basic problem. But I have looked for a lot of
information and discussions and still cannot figure out how to do.

In my current GNURadio application, I want to get the time produced by
GPSDO. I found this page

<http://files.ettus.com/uhd_docs/manual/html/gpsdo.html#using-the-gpsdo-in-y
our-application>
http://files.ettus.com/uhd_docs/manual/html/gpsdo.html#using-the-gpsdo-in-yo
ur-application

and thought usrp->get_mboard_sensor is the function that I need. But I
don’t
know how to use this function in GNURadio. It seems that the code is
written
in C++. So can I use it directly in GNURadio?

Thanks,

Wu

Use the “get_time_now” method, which is callable from C++ or from Python
(through Swig).

http://gnuradio.org/doc/doxygen/classuhd__usrp__sink.html#a74c75fc2a209184856db674489de748c

Sean

From: [email protected]n.invalid
[mailto:[email protected]n.invalid] On
Behalf Of Wu Ting
Sent: Friday, February 17, 2012 7:45 AM
To: [email protected]
Subject: [Discuss-gnuradio] How to get time from GPSDO

Hi all,

I know this is a very basic problem. But I have looked for a lot of
information and discussions and still cannot figure out how to do.

In my current GNURadio application, I want to get the time produced by
GPSDO. I found this page

http://files.ettus.com/uhd_docs/manual/html/gpsdo.html#using-the-gpsdo-in-your-application

and thought usrp->get_mboard_sensor is the function that I need. But I
don’t know how to use this function in GNURadio. It seems that the code
is written in C++. So can I use it directly in GNURadio?

Thanks,

Wu

Just to enhance my (and everyone’s) knowledge, does that call give you
information substantially different from get_time_now()? Other than you
get a UHD Time Spec with seconds and fractional seconds?

Sean

and thought usrp->get_mboard_sensor is the function that I need. But I don’t
know how to use this function in GNURadio. It seems that the code is written
in C++. So can I use it directly in GNURadio?

All the functions are brought into python via swig, so:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/include/gr_uhd_usrp_sink.h#n279

you would do this python:
secs = the_usrp_block.get_mboard_sensor(“gps_time”).to_int()

-Josh

Thanks! That setup hadn’t been 100% clear to me before. Makes sense now.

Sean

Hi, Sean and Josh,

Thank you so much for your help. My problem is solved now. Thanks again.

Wu

From: Nowlan, Sean [mailto:[email protected]]
Sent: 2012218 1:00
To: Wu Ting; [email protected]
Subject: RE: [Discuss-gnuradio] How to get time from GPSDO

Use the get_time_now method, which is callable from C++ or from Python
(through Swig).

http://gnuradio.org/doc/doxygen/classuhd__usrp__sink.html#a74c75fc2a20918485
6db674489de748c

Sean

From: [email protected]n.invalid
[mailto:discu[email protected]alid] On
Behalf Of Wu Ting
Sent: Friday, February 17, 2012 7:45 AM
To: [email protected]
Subject: [Discuss-gnuradio] How to get time from GPSDO

Hi all,

I know this is a very basic problem. But I have looked for a lot of
information and discussions and still cannot figure out how to do.

In my current GNURadio application, I want to get the time produced by
GPSDO. I found this page

http://files.ettus.com/uhd_docs/manual/html/gpsdo.html#using-the-gpsdo-in-yo
ur-application

and thought usrp->get_mboard_sensor is the function that I need. But I
don
t know how to use this function in GNURadio. It seems that the code is
written in C++. So can I use it directly in GNURadio?

Thanks,

Wu

On 02/17/2012 09:58 AM, Nowlan, Sean wrote:

Just to enhance my (and everyone’s) knowledge, does that call give
you information substantially different from get_time_now()? Other
than you get a UHD Time Spec with seconds and fractional seconds?

Well, there is a time in the GPSDO in seconds that increments once a
PPS. Then there is a time in the FPGA that increments on each clock
cycle.

Supposing you make a new uhd device object and a GPSDO is detected, the
time programmed into the FPGA registers is initialized to march in
lock-step with the GPSDO. This is done automatically, but its as simple
as ->set_time_next_pps(gpsdo_time + 1);

I wanted Wu to know that all the GPSDO sensors are available for access
in python. As in “gps_gpgsa”, “gps_gprmc”, and “gps_gpgga”

-Josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs