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
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to