Bug fixed in gps_l1_ca_pcps_acquisition_cc. Re-acquisition is ok now.

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@81 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Luis Esteve 2011-11-26 14:20:47 +00:00
parent 34d1c5110b
commit 994e2dddfe
1 changed files with 12 additions and 6 deletions

View File

@ -131,7 +131,7 @@ void gps_l1_ca_pcps_acquisition_cc::set_satellite(unsigned int satellite)
d_satellite = satellite;
d_code_phase = 0;
d_doppler_freq = 0;
d_mag = 0;
d_mag = 0.0;
d_input_power = 0.0;
// Now the GPS codes are generated on the fly using a custom version of the GPS code generator
@ -190,6 +190,14 @@ int gps_l1_ca_pcps_acquisition_cc::general_work(int noutput_items,
else
{
d_sample_counter += d_fft_size; // sample counter
//restart acquisition variables
d_code_phase = 0;
d_doppler_freq = 0;
d_mag = 0.0;
d_input_power = 0.0;
// initialize acquisition algorithm
int doppler;
@ -287,7 +295,7 @@ int gps_l1_ca_pcps_acquisition_cc::general_work(int noutput_items,
d_acq_sample_stamp = d_sample_counter;
LOG_AT_LEVEL(INFO) << "positive acquisition";
LOG_AT_LEVEL(INFO) << "satellite " << d_satellite;
LOG_AT_LEVEL(INFO) << "sample_stamp" << d_sample_counter;
LOG_AT_LEVEL(INFO) << "sample_stamp " << d_sample_counter;
LOG_AT_LEVEL(INFO) << "test statistics value "
<< d_test_statistics;
LOG_AT_LEVEL(INFO) << "test statistics threshold " << d_threshold;
@ -305,13 +313,11 @@ int gps_l1_ca_pcps_acquisition_cc::general_work(int noutput_items,
LOG_AT_LEVEL(INFO) << "test statistics value "
<< d_test_statistics;
LOG_AT_LEVEL(INFO) << "test statistics threshold " << d_threshold;
LOG_AT_LEVEL(INFO) << "code phase " << d_code_phase;
LOG_AT_LEVEL(INFO) << "doppler " << d_doppler_freq;
LOG_AT_LEVEL(INFO) << "magnitude " << d_mag;
LOG_AT_LEVEL(INFO) << "input signal power " << d_input_power;
//restart acquisition variables
d_input_power = 0.0;
d_mag = 0.0;
}
d_active = false;