27 #ifndef GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H 28 #define GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H 32 #include <gnuradio/block.h> 33 #include <gnuradio/fft/fft.h> 34 #include <gnuradio/gr_complex.h> 40 #if GNURADIO_USES_STD_POINTERS 42 #include <boost/shared_ptr.hpp> 47 #if GNURADIO_USES_STD_POINTERS 48 using galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr = std::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc>;
50 using galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr = boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc>;
53 galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
54 unsigned int sampled_ms,
55 unsigned int max_dwells,
56 unsigned int doppler_max, int64_t fs_in,
57 int samples_per_ms,
int samples_per_code,
58 bool bit_transition_flag,
60 const std::string& dump_filename,
61 bool both_signal_components_,
86 d_gnss_synchro = p_gnss_synchro;
92 inline unsigned int mag()
const 106 void set_local_code(std::complex<float>* code, std::complex<float>* codeQ);
139 d_channel_fsm = std::move(channel_fsm);
149 d_threshold = threshold;
158 d_doppler_max = doppler_max;
167 d_doppler_step = doppler_step;
173 int general_work(
int noutput_items, gr_vector_int& ninput_items,
174 gr_vector_const_void_star& input_items,
175 gr_vector_void_star& output_items);
178 friend galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr
179 galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
180 unsigned int sampled_ms,
181 unsigned int max_dwells,
182 unsigned int doppler_max, int64_t fs_in,
183 int samples_per_ms,
int samples_per_code,
184 bool bit_transition_flag,
186 const std::string& dump_filename,
187 bool both_signal_components_,
192 unsigned int sampled_ms,
193 unsigned int max_dwells,
194 unsigned int doppler_max, int64_t fs_in,
195 int samples_per_ms,
int samples_per_code,
196 bool bit_transition_flag,
198 const std::string& dump_filename,
199 bool both_signal_components_,
203 void calculate_magnitudes(gr_complex* fft_begin,
int doppler_shift,
206 float estimate_input_power(gr_complex* in);
208 std::weak_ptr<ChannelFsm> d_channel_fsm;
209 std::unique_ptr<gr::fft::fft_complex> d_fft_if;
210 std::unique_ptr<gr::fft::fft_complex> d_ifft;
212 std::vector<std::vector<gr_complex>> d_grid_doppler_wipeoffs;
213 std::vector<gr_complex> d_fft_code_I_A;
214 std::vector<gr_complex> d_fft_code_I_B;
215 std::vector<gr_complex> d_fft_code_Q_A;
216 std::vector<gr_complex> d_fft_code_Q_B;
217 std::vector<gr_complex> d_inbuffer;
218 std::vector<float> d_magnitudeIA;
219 std::vector<float> d_magnitudeIB;
220 std::vector<float> d_magnitudeQA;
221 std::vector<float> d_magnitudeQB;
222 std::vector<float> d_CAF_vector;
223 std::vector<float> d_CAF_vector_I;
224 std::vector<float> d_CAF_vector_Q;
226 std::string d_satellite_str;
227 std::string d_dump_filename;
229 std::ofstream d_dump_file;
234 uint64_t d_sample_counter;
237 float d_doppler_freq;
240 float d_test_statistics;
243 int d_samples_per_ms;
244 int d_samples_per_code;
247 int d_doppler_resolution;
251 int d_num_doppler_bins;
252 unsigned int d_gr_stream_buffer;
253 unsigned int d_channel;
254 unsigned int d_max_dwells;
255 unsigned int d_well_count;
256 unsigned int d_sampled_ms;
257 unsigned int d_code_phase;
259 bool d_bit_transition_flag;
262 bool d_both_signal_components;
265 #endif // GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H void set_threshold(float threshold)
Set statistics threshold of PCPS algorithm.
void init()
Initializes acquisition algorithm.
unsigned int mag() const
Returns the maximum peak of grid search.
Interface of the State Machine for channel.
void set_active(bool active)
Starts acquisition algorithm, turning from standby mode to active mode.
This is the class that contains the information that is shared by the processing blocks.
void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro)
Set acquisition/tracking common Gnss_Synchro object pointer to exchange synchronization data between ...
This class implements a Parallel Code Phase Search Acquisition.
void set_doppler_max(unsigned int doppler_max)
Set maximum Doppler grid search.
void set_doppler_step(unsigned int doppler_step)
Set Doppler steps for the grid search.
void set_local_code(std::complex< float > *code, std::complex< float > *codeQ)
Sets local code for PCPS acquisition algorithm.
void set_channel_fsm(std::weak_ptr< ChannelFsm > channel_fsm)
Set channel fsm associated to this acquisition instance.
void set_state(int state)
If set to 1, ensures that acquisition starts at the first available sample.
void set_channel(unsigned int channel)
Set acquisition channel unique ID.
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Parallel Code Phase Search Acquisition signal processing.
~galileo_e5a_noncoherentIQ_acquisition_caf_cc()
Default destructor.
Interface of the Gnss_Synchro class.