1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

Fix Galileo E5a deadlock

This commit is contained in:
Unknown 2017-11-15 10:22:40 +01:00 committed by Carles Fernandez
parent 27eece55da
commit 9ff4d8d880
4 changed files with 8 additions and 8 deletions

View File

@ -84,7 +84,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
//--- Find number of samples per spreading code (1ms)------------------------- //--- Find number of samples per spreading code (1ms)-------------------------
code_length_ = round(fs_in_ / Galileo_E5a_CODE_CHIP_RATE_HZ * Galileo_E5a_CODE_LENGTH_CHIPS); code_length_ = round(static_cast<double>(fs_in_) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * sampled_ms_; vector_length_ = code_length_ * sampled_ms_;

View File

@ -135,7 +135,6 @@ public:
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_; galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
size_t item_size_; size_t item_size_;
std::string item_type_; std::string item_type_;
unsigned int vector_length_; unsigned int vector_length_;

View File

@ -344,7 +344,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items, int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items __attribute__((unused)),
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused))) gr_vector_void_star &output_items __attribute__((unused)))
{ {
@ -392,17 +392,17 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
{ {
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
unsigned int buff_increment; unsigned int buff_increment;
if (ninput_items[0] + d_buffer_count <= d_fft_size) if ((ninput_items[0] + d_buffer_count) <= d_fft_size)
{ {
buff_increment = ninput_items[0]; buff_increment = ninput_items[0];
} }
else else
{ {
buff_increment = (d_fft_size - d_buffer_count); buff_increment = d_fft_size - d_buffer_count;
} }
memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex) * buff_increment); memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex) * buff_increment);
// If buffer will be full in next iteration // If buffer will be full in next iteration
if (d_buffer_count >= d_fft_size - d_gr_stream_buffer) if (d_buffer_count >= (d_fft_size - d_gr_stream_buffer))
{ {
d_state = 2; d_state = 2;
} }
@ -419,7 +419,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
{ {
memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex)*(d_fft_size-d_buffer_count)); memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex)*(d_fft_size-d_buffer_count));
} }
d_sample_counter += d_fft_size-d_buffer_count; // sample counter d_sample_counter += (d_fft_size - d_buffer_count); // sample counter
// initialize acquisition algorithm // initialize acquisition algorithm
int doppler; int doppler;
@ -810,6 +810,6 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
} }
} }
return noutput_items; return 0;
} }

View File

@ -430,6 +430,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
current_synchro_data.Carrier_phase_rads = 0.0; current_synchro_data.Carrier_phase_rads = 0.0;
current_synchro_data.CN0_dB_hz = 0.0; current_synchro_data.CN0_dB_hz = 0.0;
current_synchro_data.fs = d_fs_in; current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
consume_each(samples_offset); //shift input to perform alignment with local replica consume_each(samples_offset); //shift input to perform alignment with local replica
return 1; return 1;
break; break;