discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] How to get precise time tag from blocks_meta_data_sin


From: Ziang Gao
Subject: [Discuss-gnuradio] How to get precise time tag from blocks_meta_data_sink
Date: Tue, 30 Apr 2019 16:10:46 -0400

Hi,

I'm trying to use blocks_file_meta_sink to record data with tags, and then use gr_read_file_metadata.py to read .hdr file, and I got this output:
" " "
HEADER 30
Version Number: 0
Sample Rate: 20000000.00 sps
Seconds: 1556652948.179670
Item size: 8
Data Type: float (5)
Complex? True
Header Length: 171 bytes
Extra Length:  22
Extra Header?  True
Size of Data: 8000000 bytes
              1000000 items

Extra Header:
rx_freq: 2.4205e+09
" " "
It looks like the time in seconds only has 6 floating points, however, it supposes to be double. 
I thought it was caused by string formatting so I went to parse_file_metadata.py and modified line 94 from "print "Seconds: {0:6f}".format(t)" to "print "Seconds: {0:20f}".format(t)", then I got: 
" " "
Seconds: 1556652948.17966961860656738281
" " "
Is this the correct way to solve this problem? Is GNUradio's time tag actually precise to nanosecond? I want to use a PC with GPS time module and sync a B200mini with it, can I actually get the correct GPS time tag in this way?

 Thanks

Best regards,
Ziang

reply via email to

[Prev in Thread] Current Thread [Next in Thread]