# Adding offset to frequency messsage?

**URL:** <https://www.ruby-forum.com/t/adding-offset-to-frequency-messsage/232878>\
**Category:** GNU Radio\
**Created:** [November 1, 2014, 10:49pm UTC](https://www.ruby-forum.com/t/adding-offset-to-frequency-messsage/232878 "2014-11-01T22:49:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [November 1, 2014, 10:49pm UTC](https://www.ruby-forum.com/t/adding-offset-to-frequency-messsage/232878/1 "2014-11-01T22:49:33Z")

</div>

I’m using the freq message output of the QT GUI Frequency Sink to drive  
the  
freq message input of the Frequency Translating FIR Filter. Since I  
have  
set the the Center Frequency of the QT Frequency Sink to 7E6 Hz, that  
means  
I need to subtract that value before I send it to the channelizer so it  
only  
falls between -Fs/2 and +Fs/2.

I tried converting the message to float via PDU to Tagged Stream but  
that  
does not work:

thread[thread-per-block[1]: \<block pdu\_to\_tagged\_stream (8)\>]:  
pmt\_length:  
wrong\_type : 7.12348e+06

Is there a proper way to do this, i.e. convert to float, add the offset,  
and  
convert back to message?

Or is there a way to do this within the Xlating FIR Filter center  
frequency  
field.

Thanks,  
Lou  
KD4HSO

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Adding-offset-to-frequency-messsage-tp51153.html](http://gnuradio.4.n7.nabble.com/Adding-offset-to-frequency-messsage-tp51153.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![madengr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ec9cab/32.png) [@madengr](https://www.ruby-forum.com/u/madengr)\
**Post date:** [November 2, 2014, 4:16pm UTC](https://www.ruby-forum.com/t/adding-offset-to-frequency-messsage/232878/2 "2014-11-02T16:16:19Z")

</div>

On Sat, Nov 1, 2014 at 5:43 PM, madengr [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> thread[thread-per-block[1]: \<block pdu\_to\_tagged\_stream (8)\>]: pmt\_length:  
> Lou  
> KD4HSO

No, the only way to use that feature currently would be to set your  
center  
frequency of the gui sink to 0. I suppose I could see adding another  
configuration option to tell the message interface to use or not use the  
center frequency. It’d be easy enough, but more configuration options  
tends  
to lead to more confusion. If you really want to display the RF  
frequency  
in the sink, though, this would be your only option. If you do it, feel  
free to send us a patch via github (with good documentation to explain  
the  
different modes) and we’ll see about incorporating it.

Tom
