Using forecast() for input dependant output?

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?


View this message in context:
http://gnuradio.4.n7.nabble.com/Using-forecast-for-input-dependant-output-tp38858.html
Sent from the GnuRadio mailing list archive at Nabble.com.

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 B.
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

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


View this message in context:
http://gnuradio.4.n7.nabble.com/Using-forecast-for-input-dependant-output-tp38858p38916.html
Sent from the GnuRadio mailing list archive at Nabble.com.