Dave Gomberg wrote:
At 10:01 4/29/2009, Bob McGwier wrote:
 the agc will begin to use approximations for sqrt(SUM (sample_mag)^2)

I kinda like writing high performance approximation code, what input range do you need to handle and what error fraction is acceptable? Do you mean sqrt(sum(samples**2))??? What you wrote is simply sum(samples) I believe.



I wrote what I meant. The samples are complex so sample_mag^2 is what is needed. This is best accomplished in "perfect code" by I^2+Q^2 where that is the real and imaginary part of the complex number.

10% error is completely acceptable. The range is variable and this is due to the "agc threshold" setting on the radio.


20*log(1.1) < 1 dB error!

This is audio presented to speaker/headphones. This is not metered, etc. So you can see we have been completely stupid in insisting on the ridiculous cost of full blown square roots, logarithms, sum(x^2) in these calculations.

If you want to propose a mechanism to compute sum(Mag(x)^2) with 10^-14 to 1, not including the multiplicative factor of the length of the sum, I will consider putting it into the code after evaluation. Be prepared to accept GPL v3.0 distribution of the code and not get into trouble with your employer or other masters for having done this. I send this out to the list to let everyone know, I have absolutely ZERO NIH syndrome. If it works, I will use it.

Bob




_______________________________________________
FlexRadio Systems Mailing List
FlexRadio@flex-radio.biz
http://mail.flex-radio.biz/mailman/listinfo/flexradio_flex-radio.biz
Archives: http://www.mail-archive.com/flexradio%40flex-radio.biz/
Knowledge Base: http://kc.flex-radio.com/  Homepage: http://www.flex-radio.com/

Reply via email to