1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-19 00:04:58 +00:00

Reset acquisition

This commit is contained in:
Gastd 2017-07-18 17:57:05 -03:00
parent 4be07c78c7
commit 2dbab56c6c
4 changed files with 9 additions and 0 deletions

View File

@ -78,6 +78,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
d_active = false; d_active = false;
d_state = 0; d_state = 0;
d_freq = freq; d_freq = freq;
d_old_freq = freq;
d_fs_in = fs_in; d_fs_in = fs_in;
d_samples_per_ms = samples_per_ms; d_samples_per_ms = samples_per_ms;
d_samples_per_code = samples_per_code; d_samples_per_code = samples_per_code;
@ -160,6 +161,8 @@ pcps_acquisition_cc::~pcps_acquisition_cc()
void pcps_acquisition_cc::set_local_code(std::complex<float> * code) void pcps_acquisition_cc::set_local_code(std::complex<float> * code)
{ {
// reset the intermediate frequency
d_freq = d_old_freq;
// This will check if it's fdma, if yes will update the intermediate frequency and the doppler grid // This will check if it's fdma, if yes will update the intermediate frequency and the doppler grid
if( is_fdma() ) if( is_fdma() )
{ {
@ -185,6 +188,7 @@ void pcps_acquisition_cc::set_local_code(std::complex<float> * code)
volk_32fc_conjugate_32fc(d_fft_codes, d_fft_if->get_outbuf(), d_fft_size); volk_32fc_conjugate_32fc(d_fft_codes, d_fft_if->get_outbuf(), d_fft_size);
} }
bool pcps_acquisition_cc::is_fdma() bool pcps_acquisition_cc::is_fdma()
{ {
// Dealing with FDMA system // Dealing with FDMA system

View File

@ -102,6 +102,7 @@ private:
void send_positive_acquisition(); void send_positive_acquisition();
long d_fs_in; long d_fs_in;
long d_freq; long d_freq;
long d_old_freq;
int d_samples_per_ms; int d_samples_per_ms;
int d_samples_per_code; int d_samples_per_code;
//unsigned int d_doppler_resolution; //unsigned int d_doppler_resolution;

View File

@ -76,6 +76,7 @@ pcps_acquisition_sc::pcps_acquisition_sc(
d_active = false; d_active = false;
d_state = 0; d_state = 0;
d_freq = freq; d_freq = freq;
d_old_freq = freq;
d_fs_in = fs_in; d_fs_in = fs_in;
d_samples_per_ms = samples_per_ms; d_samples_per_ms = samples_per_ms;
d_samples_per_code = samples_per_code; d_samples_per_code = samples_per_code;
@ -161,6 +162,8 @@ pcps_acquisition_sc::~pcps_acquisition_sc()
void pcps_acquisition_sc::set_local_code(std::complex<float> * code) void pcps_acquisition_sc::set_local_code(std::complex<float> * code)
{ {
// reset the intermediate frequency
d_freq = d_old_freq;
// This will check if it's fdma, if yes will update the intermediate frequency and the doppler grid // This will check if it's fdma, if yes will update the intermediate frequency and the doppler grid
if( is_fdma() ) if( is_fdma() )
{ {

View File

@ -102,6 +102,7 @@ private:
long d_fs_in; long d_fs_in;
long d_freq; long d_freq;
long d_old_freq;
int d_samples_per_ms; int d_samples_per_ms;
int d_samples_per_code; int d_samples_per_code;
//unsigned int d_doppler_resolution; //unsigned int d_doppler_resolution;