On Thu, Jan 19, 2012 at 3:09 PM, George Nychis <gnyc...@gmail.com> 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
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio