diff options
author | Daniel Estévez <daniel@destevez.net> | 2020-08-25 21:14:42 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-10-20 12:28:36 -0400 |
commit | 912d48596569812ddcd05539bc7086617971b65e (patch) | |
tree | 9a0552142b6346d84fac62713cef5b2b158b71a2 /gr-qtgui/python/qtgui/qa_qtgui.py | |
parent | a93d6c3bf2e20f3f3795fc631af33acc9ef1f187 (diff) |
blocks: prevent losing rx_time precision in gr_read_file_metadata
The utility gr_read_file_metadata uses parse_file_metadata.parse_header()
from gr-blocks to parse and print headers in a metadata file. Currently,
the rx_time field is printed with us precision. However, the rx_time is
stored as the integer seconds of the UNIX timestamp in an uint64_t plus
a double storing the fraction of a second, so the rx_time has more
precision.
A precision on the order of 1ns is necessary for many ranging applications,
since 1us is approximately 300m of range.
This modifies parse_file_metadata.parse_header() to print rx_time with 16
decimal places, without losing precision. Aditionally, it adds "rx_time_secs"
and "rx_time_fracs" fields to the dict() return value of parse_header(), in
case they are ever needed. The "rx_time" field in this dict() is a double,
and as such it is unable to store a UNIX timestamp with 1ns precision.
Diffstat (limited to 'gr-qtgui/python/qtgui/qa_qtgui.py')
0 files changed, 0 insertions, 0 deletions