mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
Prefer initialization to assignment in constructors
This commit is contained in:
parent
ad3256859e
commit
d66f5ef955
@ -64,20 +64,42 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
|||||||
bool both_signal_components_,
|
bool both_signal_components_,
|
||||||
int CAF_window_hz_,
|
int CAF_window_hz_,
|
||||||
int Zero_padding_,
|
int Zero_padding_,
|
||||||
bool enable_monitor_output) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",
|
bool enable_monitor_output)
|
||||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
: gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||||
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
d_fs_in(fs_in),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_threshold(0),
|
||||||
|
d_doppler_freq(0),
|
||||||
|
d_mag(0),
|
||||||
|
d_input_power(0.0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_state(0),
|
||||||
|
d_samples_per_ms(samples_per_ms),
|
||||||
|
d_samples_per_code(samples_per_code),
|
||||||
|
d_CAF_window_hz(CAF_window_hz_),
|
||||||
|
d_buffer_count(0),
|
||||||
|
d_doppler_resolution(0),
|
||||||
|
d_doppler_max(static_cast<int>(doppler_max)),
|
||||||
|
d_doppler_step(250),
|
||||||
|
d_fft_size(static_cast<int>(sampled_ms) * d_samples_per_ms),
|
||||||
|
d_num_doppler_bins(0),
|
||||||
|
d_gr_stream_buffer(0),
|
||||||
|
d_channel(0),
|
||||||
|
d_max_dwells(max_dwells),
|
||||||
|
d_well_count(0),
|
||||||
|
d_code_phase(0),
|
||||||
|
d_bit_transition_flag(bit_transition_flag),
|
||||||
|
d_active(false),
|
||||||
|
d_dump(dump),
|
||||||
|
d_both_signal_components(both_signal_components_),
|
||||||
|
d_enable_monitor_output(enable_monitor_output)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_state = 0;
|
|
||||||
d_fs_in = fs_in;
|
|
||||||
d_samples_per_ms = samples_per_ms;
|
|
||||||
d_samples_per_code = samples_per_code;
|
|
||||||
d_max_dwells = max_dwells;
|
|
||||||
d_well_count = 0;
|
|
||||||
d_doppler_max = static_cast<int>(doppler_max);
|
|
||||||
if (Zero_padding_ > 0)
|
if (Zero_padding_ > 0)
|
||||||
{
|
{
|
||||||
d_sampled_ms = 1;
|
d_sampled_ms = 1;
|
||||||
@ -86,15 +108,6 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
|||||||
{
|
{
|
||||||
d_sampled_ms = sampled_ms;
|
d_sampled_ms = sampled_ms;
|
||||||
}
|
}
|
||||||
d_fft_size = static_cast<int>(sampled_ms) * d_samples_per_ms;
|
|
||||||
d_mag = 0;
|
|
||||||
d_input_power = 0.0;
|
|
||||||
d_num_doppler_bins = 0;
|
|
||||||
d_bit_transition_flag = bit_transition_flag;
|
|
||||||
d_buffer_count = 0;
|
|
||||||
d_both_signal_components = both_signal_components_;
|
|
||||||
d_CAF_window_hz = CAF_window_hz_;
|
|
||||||
d_enable_monitor_output = enable_monitor_output;
|
|
||||||
|
|
||||||
d_inbuffer = std::vector<gr_complex>(d_fft_size);
|
d_inbuffer = std::vector<gr_complex>(d_fft_size);
|
||||||
d_fft_code_I_A = std::vector<gr_complex>(d_fft_size);
|
d_fft_code_I_A = std::vector<gr_complex>(d_fft_size);
|
||||||
@ -120,19 +133,6 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
|||||||
|
|
||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
d_dump = dump;
|
|
||||||
d_dump_filename = dump_filename;
|
|
||||||
|
|
||||||
d_doppler_resolution = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_doppler_step = 250;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
d_gr_stream_buffer = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,46 +52,43 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
|||||||
int32_t samples_per_code,
|
int32_t samples_per_code,
|
||||||
bool dump,
|
bool dump,
|
||||||
const std::string &dump_filename,
|
const std::string &dump_filename,
|
||||||
bool enable_monitor_output) : gr::block("galileo_pcps_8ms_acquisition_cc",
|
bool enable_monitor_output)
|
||||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
: gr::block("galileo_pcps_8ms_acquisition_cc",
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||||
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
d_fs_in(fs_in),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_threshold(0),
|
||||||
|
d_doppler_freq(0),
|
||||||
|
d_mag(0),
|
||||||
|
d_input_power(0.0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_state(0),
|
||||||
|
d_samples_per_ms(samples_per_ms),
|
||||||
|
d_samples_per_code(samples_per_code),
|
||||||
|
d_channel(0),
|
||||||
|
d_doppler_resolution(0),
|
||||||
|
d_doppler_max(doppler_max),
|
||||||
|
d_doppler_step(0),
|
||||||
|
d_sampled_ms(sampled_ms),
|
||||||
|
d_max_dwells(max_dwells),
|
||||||
|
d_well_count(0),
|
||||||
|
d_fft_size(d_sampled_ms * d_samples_per_ms),
|
||||||
|
d_num_doppler_bins(0),
|
||||||
|
d_code_phase(0),
|
||||||
|
d_active(false),
|
||||||
|
d_dump(dump),
|
||||||
|
d_enable_monitor_output(enable_monitor_output)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_state = 0;
|
|
||||||
d_fs_in = fs_in;
|
|
||||||
d_samples_per_ms = samples_per_ms;
|
|
||||||
d_samples_per_code = samples_per_code;
|
|
||||||
d_sampled_ms = sampled_ms;
|
|
||||||
d_max_dwells = max_dwells;
|
|
||||||
d_well_count = 0;
|
|
||||||
d_doppler_max = doppler_max;
|
|
||||||
d_fft_size = d_sampled_ms * d_samples_per_ms;
|
|
||||||
d_mag = 0;
|
|
||||||
d_input_power = 0.0;
|
|
||||||
d_num_doppler_bins = 0;
|
|
||||||
|
|
||||||
d_fft_code_A = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
d_fft_code_A = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
||||||
d_fft_code_B = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
d_fft_code_B = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
||||||
d_magnitude = std::vector<float>(d_fft_size, 0.0F);
|
d_magnitude = std::vector<float>(d_fft_size, 0.0F);
|
||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
// For dumping samples into a file
|
|
||||||
d_dump = dump;
|
|
||||||
d_dump_filename = dump_filename;
|
|
||||||
|
|
||||||
d_enable_monitor_output = enable_monitor_output;
|
|
||||||
|
|
||||||
d_doppler_resolution = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_doppler_step = 0;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,30 +41,41 @@ pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(cons
|
|||||||
pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Conf &conf_)
|
pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Conf &conf_)
|
||||||
: gr::block("pcps_acquisition_fine_doppler_cc",
|
: gr::block("pcps_acquisition_fine_doppler_cc",
|
||||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(conf_.dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
acq_parameters(conf_),
|
||||||
|
d_fs_in(conf_.fs_in),
|
||||||
|
d_dump_number(0),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_threshold(0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_positive_acq(0),
|
||||||
|
d_state(0),
|
||||||
|
d_samples_per_ms(static_cast<int>(conf_.samples_per_ms)),
|
||||||
|
d_max_dwells(conf_.max_dwells),
|
||||||
|
d_config_doppler_max(conf_.doppler_max),
|
||||||
|
d_num_doppler_points(0),
|
||||||
|
d_well_count(0),
|
||||||
|
d_n_samples_in_buffer(0),
|
||||||
|
d_fft_size(d_samples_per_ms),
|
||||||
|
d_gnuradio_forecast_samples(d_fft_size),
|
||||||
|
d_doppler_step(0),
|
||||||
|
d_channel(0),
|
||||||
|
d_dump_channel(0),
|
||||||
|
d_active(false),
|
||||||
|
d_dump(conf_.dump)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
acq_parameters = conf_;
|
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_fs_in = conf_.fs_in;
|
|
||||||
d_samples_per_ms = static_cast<int>(conf_.samples_per_ms);
|
|
||||||
d_config_doppler_max = conf_.doppler_max;
|
|
||||||
d_fft_size = d_samples_per_ms;
|
|
||||||
// HS Acquisition
|
|
||||||
d_max_dwells = conf_.max_dwells;
|
|
||||||
d_gnuradio_forecast_samples = d_fft_size;
|
|
||||||
d_state = 0;
|
|
||||||
d_fft_codes = volk_gnsssdr::vector<gr_complex>(d_fft_size);
|
d_fft_codes = volk_gnsssdr::vector<gr_complex>(d_fft_size);
|
||||||
d_magnitude = volk_gnsssdr::vector<float>(d_fft_size);
|
d_magnitude = volk_gnsssdr::vector<float>(d_fft_size);
|
||||||
d_10_ms_buffer = volk_gnsssdr::vector<gr_complex>(50 * d_samples_per_ms);
|
d_10_ms_buffer = volk_gnsssdr::vector<gr_complex>(50 * d_samples_per_ms);
|
||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
// For dumping samples into a file
|
// this implementation can only produce dumps in channel 0
|
||||||
d_dump = conf_.dump;
|
// todo: migrate config parameters to the unified acquisition config class
|
||||||
d_dump_filename = conf_.dump_filename;
|
|
||||||
|
|
||||||
if (d_dump)
|
if (d_dump)
|
||||||
{
|
{
|
||||||
std::string dump_path;
|
std::string dump_path;
|
||||||
@ -96,21 +107,6 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
|
|||||||
d_dump = false;
|
d_dump = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d_n_samples_in_buffer = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_num_doppler_points = 0;
|
|
||||||
d_doppler_step = 0;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_well_count = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
d_positive_acq = 0;
|
|
||||||
d_dump_number = 0;
|
|
||||||
d_dump_channel = 0; // this implementation can only produce dumps in channel 0
|
|
||||||
// todo: migrate config parameters to the unified acquisition config class
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,7 +219,6 @@ private:
|
|||||||
int64_t d_dump_number;
|
int64_t d_dump_number;
|
||||||
uint64_t d_sample_counter;
|
uint64_t d_sample_counter;
|
||||||
|
|
||||||
float d_doppler_freq;
|
|
||||||
float d_threshold;
|
float d_threshold;
|
||||||
float d_test_statistics;
|
float d_test_statistics;
|
||||||
|
|
||||||
@ -227,15 +226,14 @@ private:
|
|||||||
int d_state;
|
int d_state;
|
||||||
int d_samples_per_ms;
|
int d_samples_per_ms;
|
||||||
int d_max_dwells;
|
int d_max_dwells;
|
||||||
int d_gnuradio_forecast_samples;
|
|
||||||
int d_config_doppler_max;
|
int d_config_doppler_max;
|
||||||
int d_num_doppler_points;
|
int d_num_doppler_points;
|
||||||
int d_well_count;
|
int d_well_count;
|
||||||
int d_n_samples_in_buffer;
|
int d_n_samples_in_buffer;
|
||||||
int d_fft_size;
|
int d_fft_size;
|
||||||
|
int d_gnuradio_forecast_samples;
|
||||||
unsigned int d_doppler_step;
|
unsigned int d_doppler_step;
|
||||||
unsigned int d_channel;
|
unsigned int d_channel;
|
||||||
unsigned int d_code_phase;
|
|
||||||
unsigned int d_dump_channel;
|
unsigned int d_dump_channel;
|
||||||
|
|
||||||
bool d_active;
|
bool d_active;
|
||||||
|
@ -47,48 +47,45 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
|||||||
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||||
int64_t fs_in, int32_t samples_per_ms, bool dump, const std::string &dump_filename,
|
int64_t fs_in, int32_t samples_per_ms, bool dump, const std::string &dump_filename,
|
||||||
bool enable_monitor_output) : gr::block("pcps_assisted_acquisition_cc",
|
bool enable_monitor_output)
|
||||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
: gr::block("pcps_assisted_acquisition_cc",
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||||
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
d_fs_in(fs_in),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_threshold(0),
|
||||||
|
d_doppler_freq(0),
|
||||||
|
d_input_power(0.0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_doppler_resolution(0),
|
||||||
|
d_channel(0),
|
||||||
|
d_sampled_ms(sampled_ms),
|
||||||
|
d_code_phase(0),
|
||||||
|
d_samples_per_ms(samples_per_ms),
|
||||||
|
d_fft_size(d_sampled_ms * d_samples_per_ms),
|
||||||
|
d_max_dwells(max_dwells),
|
||||||
|
d_gnuradio_forecast_samples(d_fft_size * 4),
|
||||||
|
d_doppler_max(0),
|
||||||
|
d_doppler_min(0),
|
||||||
|
d_config_doppler_max(doppler_max),
|
||||||
|
d_config_doppler_min(doppler_min),
|
||||||
|
d_num_doppler_points(0),
|
||||||
|
d_doppler_step(0),
|
||||||
|
d_state(0),
|
||||||
|
d_well_count(0),
|
||||||
|
d_active(false),
|
||||||
|
d_disable_assist(false),
|
||||||
|
d_dump(dump),
|
||||||
|
d_enable_monitor_output(enable_monitor_output)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_fs_in = fs_in;
|
|
||||||
d_samples_per_ms = samples_per_ms;
|
|
||||||
d_sampled_ms = sampled_ms;
|
|
||||||
d_config_doppler_max = doppler_max;
|
|
||||||
d_config_doppler_min = doppler_min;
|
|
||||||
d_fft_size = d_sampled_ms * d_samples_per_ms;
|
|
||||||
// HS Acquisition
|
|
||||||
d_max_dwells = max_dwells;
|
|
||||||
d_gnuradio_forecast_samples = d_fft_size * 4;
|
|
||||||
d_input_power = 0.0;
|
|
||||||
d_state = 0;
|
|
||||||
d_disable_assist = false;
|
|
||||||
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
||||||
|
|
||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
// For dumping samples into a file
|
|
||||||
d_dump = dump;
|
|
||||||
d_dump_filename = dump_filename;
|
|
||||||
|
|
||||||
d_enable_monitor_output = enable_monitor_output;
|
|
||||||
|
|
||||||
d_doppler_resolution = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_doppler_max = 0;
|
|
||||||
d_doppler_min = 0;
|
|
||||||
d_num_doppler_points = 0;
|
|
||||||
d_doppler_step = 0;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_well_count = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,7 +219,16 @@ private:
|
|||||||
float d_doppler_freq;
|
float d_doppler_freq;
|
||||||
float d_input_power;
|
float d_input_power;
|
||||||
float d_test_statistics;
|
float d_test_statistics;
|
||||||
|
|
||||||
|
uint32_t d_doppler_resolution;
|
||||||
|
uint32_t d_channel;
|
||||||
|
uint32_t d_sampled_ms;
|
||||||
|
uint32_t d_code_phase;
|
||||||
|
|
||||||
int32_t d_samples_per_ms;
|
int32_t d_samples_per_ms;
|
||||||
|
|
||||||
|
uint32_t d_fft_size;
|
||||||
|
|
||||||
int32_t d_max_dwells;
|
int32_t d_max_dwells;
|
||||||
int32_t d_gnuradio_forecast_samples;
|
int32_t d_gnuradio_forecast_samples;
|
||||||
int32_t d_doppler_max;
|
int32_t d_doppler_max;
|
||||||
@ -230,11 +239,6 @@ private:
|
|||||||
int32_t d_doppler_step;
|
int32_t d_doppler_step;
|
||||||
int32_t d_state;
|
int32_t d_state;
|
||||||
int32_t d_well_count;
|
int32_t d_well_count;
|
||||||
uint32_t d_doppler_resolution;
|
|
||||||
uint32_t d_channel;
|
|
||||||
uint32_t d_sampled_ms;
|
|
||||||
uint32_t d_fft_size;
|
|
||||||
uint32_t d_code_phase;
|
|
||||||
|
|
||||||
bool d_active;
|
bool d_active;
|
||||||
bool d_disable_assist;
|
bool d_disable_assist;
|
||||||
|
@ -57,25 +57,37 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
|||||||
int32_t samples_per_code,
|
int32_t samples_per_code,
|
||||||
bool dump,
|
bool dump,
|
||||||
const std::string &dump_filename,
|
const std::string &dump_filename,
|
||||||
bool enable_monitor_output) : gr::block("pcps_cccwsr_acquisition_cc",
|
bool enable_monitor_output)
|
||||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
: gr::block("pcps_cccwsr_acquisition_cc",
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||||
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
d_fs_in(fs_in),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_threshold(0),
|
||||||
|
d_doppler_freq(0),
|
||||||
|
d_mag(0),
|
||||||
|
d_input_power(0.0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_state(0),
|
||||||
|
d_samples_per_ms(samples_per_ms),
|
||||||
|
d_samples_per_code(samples_per_code),
|
||||||
|
d_doppler_resolution(0),
|
||||||
|
d_doppler_max(doppler_max),
|
||||||
|
d_doppler_step(0),
|
||||||
|
d_sampled_ms(sampled_ms),
|
||||||
|
d_max_dwells(max_dwells),
|
||||||
|
d_well_count(0),
|
||||||
|
d_fft_size(d_sampled_ms * d_samples_per_ms),
|
||||||
|
d_num_doppler_bins(0),
|
||||||
|
d_code_phase(0),
|
||||||
|
d_channel(0),
|
||||||
|
d_active(false),
|
||||||
|
d_dump(dump),
|
||||||
|
d_enable_monitor_output(enable_monitor_output)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_state = 0;
|
|
||||||
d_fs_in = fs_in;
|
|
||||||
d_samples_per_ms = samples_per_ms;
|
|
||||||
d_samples_per_code = samples_per_code;
|
|
||||||
d_sampled_ms = sampled_ms;
|
|
||||||
d_max_dwells = max_dwells;
|
|
||||||
d_well_count = 0;
|
|
||||||
d_doppler_max = doppler_max;
|
|
||||||
d_fft_size = d_sampled_ms * d_samples_per_ms;
|
|
||||||
d_mag = 0;
|
|
||||||
d_input_power = 0.0;
|
|
||||||
d_num_doppler_bins = 0;
|
|
||||||
|
|
||||||
d_fft_code_data = std::vector<gr_complex>(d_fft_size);
|
d_fft_code_data = std::vector<gr_complex>(d_fft_size);
|
||||||
d_fft_code_pilot = std::vector<gr_complex>(d_fft_size);
|
d_fft_code_pilot = std::vector<gr_complex>(d_fft_size);
|
||||||
@ -87,21 +99,6 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
|||||||
|
|
||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
// For dumping samples into a file
|
|
||||||
d_dump = dump;
|
|
||||||
d_dump_filename = dump_filename;
|
|
||||||
|
|
||||||
d_enable_monitor_output = enable_monitor_output;
|
|
||||||
|
|
||||||
d_doppler_resolution = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_doppler_step = 0;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,29 +59,40 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
|||||||
bool bit_transition_flag,
|
bool bit_transition_flag,
|
||||||
bool dump,
|
bool dump,
|
||||||
const std::string& dump_filename,
|
const std::string& dump_filename,
|
||||||
bool enable_monitor_output) : gr::block("pcps_quicksync_acquisition_cc",
|
bool enable_monitor_output)
|
||||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
: gr::block("pcps_quicksync_acquisition_cc",
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||||
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
d_fs_in(fs_in),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_noise_floor_power(0),
|
||||||
|
d_threshold(0),
|
||||||
|
d_doppler_freq(0),
|
||||||
|
d_mag(0),
|
||||||
|
d_input_power(0.0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_samples_per_ms(samples_per_ms),
|
||||||
|
d_samples_per_code(samples_per_code),
|
||||||
|
d_state(0),
|
||||||
|
d_channel(0),
|
||||||
|
d_folding_factor(folding_factor),
|
||||||
|
d_doppler_resolution(0),
|
||||||
|
d_doppler_max(doppler_max),
|
||||||
|
d_doppler_step(0),
|
||||||
|
d_sampled_ms(sampled_ms),
|
||||||
|
d_max_dwells(max_dwells),
|
||||||
|
d_well_count(0),
|
||||||
|
d_fft_size((d_samples_per_code) / d_folding_factor),
|
||||||
|
d_num_doppler_bins(0),
|
||||||
|
d_code_phase(0),
|
||||||
|
d_bit_transition_flag(bit_transition_flag),
|
||||||
|
d_active(false),
|
||||||
|
d_dump(dump),
|
||||||
|
d_enable_monitor_output(enable_monitor_output)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_state = 0;
|
|
||||||
d_fs_in = fs_in;
|
|
||||||
d_samples_per_ms = samples_per_ms;
|
|
||||||
d_samples_per_code = samples_per_code;
|
|
||||||
d_sampled_ms = sampled_ms;
|
|
||||||
d_max_dwells = max_dwells;
|
|
||||||
d_well_count = 0;
|
|
||||||
d_doppler_max = doppler_max;
|
|
||||||
d_mag = 0;
|
|
||||||
d_input_power = 0.0;
|
|
||||||
d_num_doppler_bins = 0;
|
|
||||||
d_bit_transition_flag = bit_transition_flag;
|
|
||||||
d_folding_factor = folding_factor;
|
|
||||||
|
|
||||||
// fft size is reduced.
|
|
||||||
d_fft_size = (d_samples_per_code) / d_folding_factor;
|
|
||||||
|
|
||||||
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
||||||
d_magnitude = std::vector<float>(d_samples_per_code * d_folding_factor);
|
d_magnitude = std::vector<float>(d_samples_per_code * d_folding_factor);
|
||||||
@ -96,24 +107,8 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
|||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
// For dumping samples into a file
|
|
||||||
d_dump = dump;
|
|
||||||
d_dump_filename = dump_filename;
|
|
||||||
|
|
||||||
d_enable_monitor_output = enable_monitor_output;
|
|
||||||
|
|
||||||
d_code_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
d_code_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
||||||
|
|
||||||
d_signal_folded = std::vector<gr_complex>(d_fft_size);
|
d_signal_folded = std::vector<gr_complex>(d_fft_size);
|
||||||
d_noise_floor_power = 0;
|
|
||||||
d_doppler_resolution = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_doppler_step = 0;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,49 +75,46 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
|||||||
uint32_t tong_max_dwells,
|
uint32_t tong_max_dwells,
|
||||||
bool dump,
|
bool dump,
|
||||||
const std::string &dump_filename,
|
const std::string &dump_filename,
|
||||||
bool enable_monitor_output) : gr::block("pcps_tong_acquisition_cc",
|
bool enable_monitor_output)
|
||||||
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
: gr::block("pcps_tong_acquisition_cc",
|
||||||
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro)))
|
gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)),
|
||||||
|
gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))),
|
||||||
|
d_dump_filename(dump_filename),
|
||||||
|
d_gnss_synchro(nullptr),
|
||||||
|
d_fs_in(fs_in),
|
||||||
|
d_sample_counter(0ULL),
|
||||||
|
d_threshold(0),
|
||||||
|
d_doppler_freq(0),
|
||||||
|
d_mag(0),
|
||||||
|
d_input_power(0.0),
|
||||||
|
d_test_statistics(0),
|
||||||
|
d_state(0),
|
||||||
|
d_samples_per_ms(samples_per_ms),
|
||||||
|
d_samples_per_code(samples_per_code),
|
||||||
|
d_channel(0),
|
||||||
|
d_doppler_resolution(0),
|
||||||
|
d_doppler_max(doppler_max),
|
||||||
|
d_doppler_step(0),
|
||||||
|
d_sampled_ms(sampled_ms),
|
||||||
|
d_dwell_count(0),
|
||||||
|
d_tong_init_val(tong_init_val),
|
||||||
|
d_tong_max_val(tong_max_val),
|
||||||
|
d_tong_max_dwells(tong_max_dwells),
|
||||||
|
d_tong_count(d_tong_init_val),
|
||||||
|
d_fft_size(d_sampled_ms * d_samples_per_ms),
|
||||||
|
d_num_doppler_bins(0),
|
||||||
|
d_code_phase(0),
|
||||||
|
d_active(false),
|
||||||
|
d_dump(dump),
|
||||||
|
d_enable_monitor_output(enable_monitor_output)
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
this->message_port_register_out(pmt::mp("events"));
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
|
||||||
d_active = false;
|
|
||||||
d_state = 0;
|
|
||||||
d_fs_in = fs_in;
|
|
||||||
d_samples_per_ms = samples_per_ms;
|
|
||||||
d_samples_per_code = samples_per_code;
|
|
||||||
d_sampled_ms = sampled_ms;
|
|
||||||
d_dwell_count = 0;
|
|
||||||
d_tong_max_val = tong_max_val;
|
|
||||||
d_tong_max_dwells = tong_max_dwells;
|
|
||||||
d_tong_init_val = tong_init_val;
|
|
||||||
d_tong_count = d_tong_init_val;
|
|
||||||
d_doppler_max = doppler_max;
|
|
||||||
d_fft_size = d_sampled_ms * d_samples_per_ms;
|
|
||||||
d_mag = 0;
|
|
||||||
d_input_power = 0.0;
|
|
||||||
d_num_doppler_bins = 0;
|
|
||||||
|
|
||||||
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
||||||
d_magnitude = std::vector<float>(d_fft_size);
|
d_magnitude = std::vector<float>(d_fft_size);
|
||||||
|
|
||||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||||
|
|
||||||
// For dumping samples into a file
|
|
||||||
d_dump = dump;
|
|
||||||
d_dump_filename = dump_filename;
|
|
||||||
|
|
||||||
d_enable_monitor_output = enable_monitor_output;
|
|
||||||
|
|
||||||
d_doppler_resolution = 0;
|
|
||||||
d_threshold = 0;
|
|
||||||
d_doppler_step = 0;
|
|
||||||
d_gnss_synchro = nullptr;
|
|
||||||
d_code_phase = 0;
|
|
||||||
d_doppler_freq = 0;
|
|
||||||
d_test_statistics = 0;
|
|
||||||
d_channel = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,10 +231,10 @@ private:
|
|||||||
uint32_t d_doppler_step;
|
uint32_t d_doppler_step;
|
||||||
uint32_t d_sampled_ms;
|
uint32_t d_sampled_ms;
|
||||||
uint32_t d_dwell_count;
|
uint32_t d_dwell_count;
|
||||||
uint32_t d_tong_count;
|
|
||||||
uint32_t d_tong_init_val;
|
uint32_t d_tong_init_val;
|
||||||
uint32_t d_tong_max_val;
|
uint32_t d_tong_max_val;
|
||||||
uint32_t d_tong_max_dwells;
|
uint32_t d_tong_max_dwells;
|
||||||
|
uint32_t d_tong_count;
|
||||||
uint32_t d_fft_size;
|
uint32_t d_fft_size;
|
||||||
uint32_t d_num_doppler_bins;
|
uint32_t d_num_doppler_bins;
|
||||||
uint32_t d_code_phase;
|
uint32_t d_code_phase;
|
||||||
|
Loading…
Reference in New Issue
Block a user