1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-24 03:57:39 +00:00

Optimizations in PCPS Acquisition module:

- Improved speed for normalization in the FFTW results
- Complex multiplications now use the SIMD instructions with VOLK library
- Carrier wipeoff now uses the GNU Radio fixed point NCO (gr_fxpt) 

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@241 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas
2012-09-04 14:29:07 +00:00
parent 03208cb76f
commit 0703dd2af3
2 changed files with 39 additions and 11 deletions

View File

@@ -32,17 +32,32 @@
*/
#include "gnss_signal_processing.h"
#include <gr_fxpt.h>
void complex_exp_gen(std::complex<float>* _dest, double _f, double _fs, unsigned int _samps)
{
double phase = 0;
const double phase_step = (GPS_TWO_PI * _f) / _fs;
//old
//double phase = 0;
//const double phase_step = (GPS_TWO_PI * _f) / _fs;
//new Fixed Point NCO (faster)
int phase_i=0;
int phase_step_i;
float phase_step_f =(float)((GPS_TWO_PI * _f) / _fs);
phase_step_i=gr_fxpt::float_to_fixed(phase_step_f);
float sin_f,cos_f;
for(unsigned int i = 0; i < _samps; i++)
{
_dest[i] = std::complex<float>(cos(phase), sin(phase));
phase += phase_step;
//old
//_dest[i] = std::complex<float>(cos(phase), sin(phase));
//phase += phase_step;
//new Fixed Point NCO (faster)
gr_fxpt::sincos(phase_i,&sin_f,&cos_f);
_dest[i] = std::complex<float>(cos_f, sin_f);
phase_i += phase_step_i;
}
}