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

Bug correction for acquisition and tracking: acquisition Doppler sign were inverted and this issue caused several wrong interpretations in tracking algorithms, resulting in a swap in I/Q components. Now the bug was corrected in all tracking algorithms.

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@249 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas
2012-10-18 10:24:41 +00:00
parent 4859faa245
commit a25e712be6
13 changed files with 94 additions and 80 deletions

View File

@@ -61,6 +61,32 @@ void complex_exp_gen(std::complex<float>* _dest, double _f, double _fs, unsigned
}
}
void complex_exp_gen_conj(std::complex<float>* _dest, double _f, double _fs, unsigned int _samps)
{
//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++)
{
//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;
}
}
void hex_to_binary_converter(int * _dest, char _from)
{

View File

@@ -46,6 +46,14 @@
void complex_exp_gen(std::complex<float>* _dest, double _f, double _fs,
unsigned int _samps);
/*!
* \brief This function generates a conjugate complex exponential in _dest.
*
*/
void complex_exp_gen_conj(std::complex<float>* _dest, double _f, double _fs,
unsigned int _samps);
/*!
* \brief This function makes a conversion from hex (the input is a char)
* to binary (the output are 4 ints with +1 or -1 values).