Quantcast

Using forecast() for input dependant output?

classic Classic list List threaded Threaded
3 messages Options
MJS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using forecast() for input dependant output?

MJS
I'm currently working on an arbitrary ratio block, the idea is that the output rate of the block is completely dependent on the data received, ie, there is no way to know how much data will be output until the input data is processed. This doesn't seem to match exactly the definition of the arbitrary ratio block. Could anyone suggest an implementation for forecast() to accomplish this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using forecast() for input dependant output?

Martin Braun (CEL)
On Mon, Jan 07, 2013 at 03:09:35AM -0800, MJS wrote:
> I'm currently working on an arbitrary ratio block, the idea is that the
> output rate of the block is completely dependent on the data received, ie,
> there is no way to know how much data will be output until the input data is
> processed. This doesn't seem to match exactly the definition of the
> arbitrary ratio block. Could anyone suggest an implementation for forecast()
> to accomplish this?

Hi MJS,

we're currently doing something similar on the OFDM-reimplementation.
As an example, check this out:
https://github.com/benreynwar/gnuradio/blob/ofdm/gr-digital/lib/digital_ofdm_carrier_allocator_cvc.cc

The gist:
- set_relative_rate() is simply set to the best approximation
  (if completely random, leave at 1.0)
- use a block member to 'communicate' with forecast()
- set_output_multiple() helps keeping the out buffer large enough

The 'arbitrary ratio' block (aka gr_block) doesn't necessarily need a
'ratio' between in- and output rates.
You can consume and produce as you wish.

M

--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstra├če 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-W├╝rttemberg and
National Laboratory of the Helmholtz Association

_______________________________________________
Discuss-gnuradio mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

attachment0 (205 bytes) Download Attachment
MJS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using forecast() for input dependant output?

MJS
Works like a charm now, thanks for the help Martin.
Loading...