discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] how to learn of decimation rate in general_work()


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] how to learn of decimation rate in general_work() ?
Date: Thu, 19 Jan 2012 16:39:37 -0500

On Thu, Jan 19, 2012 at 3:09 PM, George Nychis <address@hidden> wrote:
I am using stream tags to get the timestamp of its corresponding sample in general_work().  Now, if I want to calculate the time of an arbitrary sample in the incoming sample stream I need to know the decimation rate.  This tells me how much clock time is added per-sample.  So I can calculate the offset between the timestamped sample and the sample I care about, and then multiple that offset by the time per sample.

Is there a good way to learn of the decimation rate in general_work() to do this?


Hey George,

You can use the relative_rate data member of the blocks. Setting the decimation actually sets the relative_rate to 1.0/decimation. You can get this value with the accessor function "relative_rate()".

-- 
Tom



reply via email to

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