Implementation of Goertzel algorithm in C
I am implementing BFSK frequency hopping communication system on a DSP processor. It was suggested by some of the forum members to use Goertzel algorithm for the demodulation of frequency hopping at specific frequencies. I have tried implementing the goertzel algorithm in C. the code is follows: float goertzel(int numSamples,int TARGET_FREQUENCY,int SAMPLING_RATE, float* data) { int k,i; float floatnumSamples; float omega,sine,cosine,coeff,q0,q1,q2,result,real,imag; floatnumSamples = (float) numSamples; k = (int) (0.5 + ((floatnumSamples * TARGET_FREQUENCY) / SAMPLING_RATE)); omega = (2.0 * M