discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] recovering timing after overflow


From: Josh Blum
Subject: Re: [Discuss-gnuradio] recovering timing after overflow
Date: Wed, 26 Oct 2011 07:16:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1


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



reply via email to

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