mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into test-fine-doppler
This commit is contained in:
commit
c98305f556
@ -133,6 +133,12 @@ void pcps_acquisition_fine_doppler_cc::set_doppler_step(unsigned int doppler_ste
|
||||
{
|
||||
d_grid_data[i] = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
}
|
||||
|
||||
if (d_dump)
|
||||
{
|
||||
grid_ = arma::fmat(d_fft_size, d_num_doppler_points, arma::fill::zeros);
|
||||
}
|
||||
|
||||
update_carrier_wipeoff();
|
||||
}
|
||||
|
||||
@ -181,11 +187,6 @@ void pcps_acquisition_fine_doppler_cc::init()
|
||||
d_gnss_synchro->Acq_doppler_hz = 0.0;
|
||||
d_gnss_synchro->Acq_samplestamp_samples = 0;
|
||||
d_state = 0;
|
||||
|
||||
if (d_dump)
|
||||
{
|
||||
grid_ = arma::fmat(d_fft_size, d_num_doppler_points, arma::fill::zeros);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -363,7 +364,6 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
//int fft_size_extended = nextPowerOf2(signal_samples * zero_padding_factor);
|
||||
int fft_size_extended = signal_samples * zero_padding_factor;
|
||||
gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true);
|
||||
|
||||
//zero padding the entire vector
|
||||
std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0));
|
||||
|
||||
@ -385,7 +385,6 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
memcpy(&code_replica[(n + 1) * d_fft_size], code_replica, d_fft_size * sizeof(gr_complex));
|
||||
}
|
||||
//2. Perform code wipe-off
|
||||
|
||||
volk_32fc_x2_multiply_32fc(fft_operator->get_inbuf(), d_10_ms_buffer, code_replica, signal_samples);
|
||||
|
||||
// 3. Perform the FFT (zero padded!)
|
||||
@ -401,8 +400,8 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
|
||||
//case even
|
||||
int counter = 0;
|
||||
float* fftFreqBins= new float[fft_size_extended];
|
||||
|
||||
float fftFreqBins[fft_size_extended];
|
||||
std::fill_n(fftFreqBins, fft_size_extended, 0.0);
|
||||
|
||||
for (int k = 0; k < (fft_size_extended / 2); k++)
|
||||
@ -413,8 +412,9 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
|
||||
for (int k = fft_size_extended / 2; k > 0; k--)
|
||||
{
|
||||
fftFreqBins[counter] = ((-static_cast<float>(d_fs_in) / 2) * static_cast<float>(k)) / (static_cast<float>(fft_size_extended) / 2.0);
|
||||
fftFreqBins[counter] = ((-static_cast<float>(d_fs_in) / 2.0) * static_cast<float>(k)) / (static_cast<float>(fft_size_extended) / 2.0);
|
||||
counter++;
|
||||
|
||||
}
|
||||
|
||||
// 5. Update the Doppler estimation in Hz
|
||||
@ -433,6 +433,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
delete fft_operator;
|
||||
volk_gnsssdr_free(code_replica);
|
||||
volk_gnsssdr_free(p_tmp_vector);
|
||||
delete[] fftFreqBins;
|
||||
return d_fft_size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user