[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: rx_time
From: |
Daniel R. Marlow |
Subject: |
RE: rx_time |
Date: |
Sun, 24 Jul 2022 13:21:38 +0000 |
-----Original Message-----
From: Discuss-gnuradio <discuss-gnuradio-bounces+marlow=princeton.edu@gnu.org>
On Behalf Of Marcus D. Leech
Sent: Saturday, July 23, 2022 9:24 PM
To: discuss-gnuradio@gnu.org
Subject: Re: rx_time
On 2022-07-23 16:53, Daniel R. Marlow wrote:
> Hello,
>
> I am having trouble understanding the 'rx_time' field in the gnuradio
> metadata. In particular, if I use the following code to unpack the metadata:
>
> self.handle = open(filename, "rb")
> header_str = self.handle.read(parse_file_metadata.HEADER_LENGTH)
> header = pmt.deserialize_str(header_str) info =
> parse_file_metadata.parse_header(header, False)
> print("info[rx_time]={0}".format(info['rx_time']))
>
> The print statement gives:
> info[rx_time]=6634431378.28
>
> I was expecting a time in seconds past the epoch (something in the
> neighborhood of 1658609226).
>
> Any information on what I am doing wrong would be most appreciated.
>
> Details: B210 with GPS module, Gnuradio 3.7.9, Ubuntu 16.04
>
> Sincerely,
> Dan Marlow
>
>
>
>
> I am using a B210 board with a GPS module.
>
How are you setting the time on the USRP B210?
I have a manually-inserted code snipped, included below that I've used in the
past to set the timestamp clock from the GPS time on a B210:
def lock_to_gps(uhd_src):
while(not uhd_src.get_mboard_sensor("gps_locked").to_bool()):
time.sleep(0.1)
time.sleep(0.2)
while(not uhd_src.get_mboard_sensor("ref_locked").to_bool()):
time.sleep(0.1)
time.sleep(0.2)
# Spin, waiting for PPS transition
t = uhd_src.get_time_last_pps()
while (t == uhd_src.get_time_last_pps()):
time.sleep(0.05)
#Set the time from the GPS time
gps_time = uhd_src.get_mboard_sensor("gps_time").to_int()
uhd_src.set_time_next_pps(uhd.time_spec(gps_time+1))
#This sleep is recomended to stabilize the clocks
time.sleep(1.5)
Hi Marcus,
Thanks. I tried that, but got the same result. I think that my problem
may be more basic. Specifically, I think that I don't know how to interpret
the info['rx_time'] object. It seems like it is a float. If so, then I
don't know what the units are.
Cheers
Dan
- rx_time, Daniel R. Marlow, 2022/07/23
- Re: rx_time, Marcus D. Leech, 2022/07/23
- RE: rx_time,
Daniel R. Marlow <=