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:
parent
27eece55da
commit
9ff4d8d880
@ -84,7 +84,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
|
||||
//--- 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_;
|
||||
|
||||
|
@ -135,7 +135,6 @@ public:
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
size_t item_size_;
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
|
@ -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_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
|
||||
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];
|
||||
}
|
||||
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);
|
||||
// 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;
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
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
|
||||
int doppler;
|
||||
@ -810,6 +810,6 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
}
|
||||
|
||||
return noutput_items;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -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.CN0_dB_hz = 0.0;
|
||||
current_synchro_data.fs = d_fs_in;
|
||||
*out[0] = current_synchro_data;
|
||||
consume_each(samples_offset); //shift input to perform alignment with local replica
|
||||
return 1;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user