mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Use by default the new fast local code resampler
This commit is contained in:
parent
47e1ba1923
commit
83021ccfff
@ -37,7 +37,6 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes()
|
||||
{
|
||||
d_sig_in = nullptr;
|
||||
@ -47,6 +46,7 @@ cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes()
|
||||
d_local_codes_resampled = nullptr;
|
||||
d_code_length_chips = 0;
|
||||
d_n_correlators = 0;
|
||||
d_use_fast_resampler = true;
|
||||
}
|
||||
|
||||
|
||||
@ -84,6 +84,7 @@ bool cpu_multicorrelator_real_codes::set_local_code_and_taps(
|
||||
d_local_code_in = local_code_in;
|
||||
d_shifts_chips = shifts_chips;
|
||||
d_code_length_chips = code_length_chips;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -99,14 +100,28 @@ bool cpu_multicorrelator_real_codes::set_input_output_vectors(std::complex<float
|
||||
|
||||
void cpu_multicorrelator_real_codes::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
|
||||
{
|
||||
volk_gnsssdr_32f_xn_resampler_32f_xn(d_local_codes_resampled,
|
||||
d_local_code_in,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_shifts_chips,
|
||||
d_code_length_chips,
|
||||
d_n_correlators,
|
||||
correlator_length_samples);
|
||||
if (d_use_fast_resampler)
|
||||
{
|
||||
volk_gnsssdr_32f_xn_fast_resampler_32f_xn(d_local_codes_resampled,
|
||||
d_local_code_in,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_shifts_chips,
|
||||
d_code_length_chips,
|
||||
d_n_correlators,
|
||||
correlator_length_samples);
|
||||
}
|
||||
else
|
||||
{
|
||||
volk_gnsssdr_32f_xn_resampler_32f_xn(d_local_codes_resampled,
|
||||
d_local_code_in,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_shifts_chips,
|
||||
d_code_length_chips,
|
||||
d_n_correlators,
|
||||
correlator_length_samples);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -141,3 +156,9 @@ bool cpu_multicorrelator_real_codes::free()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void cpu_multicorrelator_real_codes::set_fast_resampler(
|
||||
bool use_fast_resampler)
|
||||
{
|
||||
d_use_fast_resampler = use_fast_resampler;
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ class cpu_multicorrelator_real_codes
|
||||
{
|
||||
public:
|
||||
cpu_multicorrelator_real_codes();
|
||||
void set_fast_resampler(bool use_fast_resampler);
|
||||
~cpu_multicorrelator_real_codes();
|
||||
bool init(int max_signal_length_samples, int n_correlators);
|
||||
bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips);
|
||||
@ -61,6 +62,7 @@ private:
|
||||
const float *d_local_code_in;
|
||||
std::complex<float> *d_corr_out;
|
||||
float *d_shifts_chips;
|
||||
bool d_use_fast_resampler;
|
||||
int d_code_length_chips;
|
||||
int d_n_correlators;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user