[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] recovering timing after overflow
From: |
Juha Vierinen |
Subject: |
Re: [Discuss-gnuradio] recovering timing after overflow |
Date: |
Wed, 26 Oct 2011 18:23:04 +0300 |
If I understand correctly, the sample count is:
const uint64_t count = gr_tags::get_nitems(rx_time_tag);
This determines the index of the sample coming into work, which has a
new time because of overflow.
juha
On Wed, Oct 26, 2011 at 17:16, Josh Blum <address@hidden> wrote:
>
>
> On 10/26/2011 03:41 AM, Juha Vierinen wrote:
>> Hi,
>>
>> I have been able to use the stream tagging to determine the accurate
>> timing for the first sample of the stream. However, I run into
>> problems after an overflow. It does seem to be feasible to recover
>> timing by looking for new tags (the uhd_usrp block applies a new tag
>> after an overflow is detected). However, this pmt is too alien to me
>> still and I'm not exactly sure how to query for the sample index
>> corresponding to the new tag. Are there any examples anywhere? I know
>> how to query for the tags between some interval of samples, but I
>> cannot get the exact sample corresponding to the first sample of the
>> packet arriving after overflow.
>>
>
> The tag's offset field provides the absolute sample count of the tag.
> Knowing the sample rate, the delta between the tag's offset and your
> sample; you can determine the absolute time for each proceeding sample.
>
> Your code was probably making an assumption that the time was at offset
> zero; but really the absolute time can be referenced at any offset.
>
> http://gnuradio.org/cgit/gnuradio.git/tree/gnuradio-core/src/lib/runtime/gr_tags.h
>
> -josh
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>