26 #ifndef GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H 27 #define GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H 31 #include <gnuradio/block.h> 32 #include <gnuradio/fft/fft.h> 33 #include <gnuradio/gr_complex.h> 39 #if GNURADIO_USES_STD_POINTERS 41 #include <boost/shared_ptr.hpp> 47 #if GNURADIO_USES_STD_POINTERS 48 using pcps_cccwsr_acquisition_cc_sptr = std::shared_ptr<pcps_cccwsr_acquisition_cc>;
50 using pcps_cccwsr_acquisition_cc_sptr = boost::shared_ptr<pcps_cccwsr_acquisition_cc>;
53 pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
58 int32_t samples_per_ms,
59 int32_t samples_per_code,
61 const std::string& dump_filename);
82 d_gnss_synchro = p_gnss_synchro;
88 inline uint32_t
mag()
const 103 void set_local_code(std::complex<float>* code_data, std::complex<float>* code_pilot);
136 d_channel_fsm = std::move(channel_fsm);
146 d_threshold = threshold;
155 d_doppler_max = doppler_max;
164 d_doppler_step = doppler_step;
170 int general_work(
int noutput_items, gr_vector_int& ninput_items,
171 gr_vector_const_void_star& input_items,
172 gr_vector_void_star& output_items);
175 friend pcps_cccwsr_acquisition_cc_sptr
176 pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
177 uint32_t doppler_max, int64_t fs_in,
178 int32_t samples_per_ms, int32_t samples_per_code,
179 bool dump,
const std::string& dump_filename);
182 uint32_t doppler_max, int64_t fs_in,
183 int32_t samples_per_ms, int32_t samples_per_code,
184 bool dump,
const std::string& dump_filename);
186 void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
187 int32_t doppler_offset);
189 std::weak_ptr<ChannelFsm> d_channel_fsm;
191 std::unique_ptr<gr::fft::fft_complex> d_fft_if;
192 std::unique_ptr<gr::fft::fft_complex> d_ifft;
194 std::vector<std::vector<gr_complex>> d_grid_doppler_wipeoffs;
195 std::vector<gr_complex> d_fft_code_data;
196 std::vector<gr_complex> d_fft_code_pilot;
197 std::vector<gr_complex> d_data_correlation;
198 std::vector<gr_complex> d_pilot_correlation;
199 std::vector<gr_complex> d_correlation_plus;
200 std::vector<gr_complex> d_correlation_minus;
201 std::vector<float> d_magnitude;
203 std::ofstream d_dump_file;
204 std::string d_satellite_str;
205 std::string d_dump_filename;
210 uint64_t d_sample_counter;
213 float d_doppler_freq;
216 float d_test_statistics;
219 int32_t d_samples_per_ms;
220 int32_t d_samples_per_code;
221 uint32_t d_doppler_resolution;
222 uint32_t d_doppler_max;
223 uint32_t d_doppler_step;
224 uint32_t d_sampled_ms;
225 uint32_t d_max_dwells;
226 uint32_t d_well_count;
228 uint32_t d_num_doppler_bins;
229 uint32_t d_code_phase;
236 #endif // GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro)
Set acquisition/tracking common Gnss_Synchro object pointer to exchange synchronization data between ...
void set_channel(uint32_t channel)
Set acquisition channel unique ID.
void set_local_code(std::complex< float > *code_data, std::complex< float > *code_pilot)
Sets local code for CCCWSR acquisition algorithm.
void set_doppler_step(uint32_t doppler_step)
Set Doppler steps for the 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.
This class implements a Parallel Code Phase Search Acquisition with Coherent Channel Combining With S...
void set_channel_fsm(std::weak_ptr< ChannelFsm > channel_fsm)
Set channel fsm associated to this acquisition instance.
void set_doppler_max(uint32_t doppler_max)
Set maximum Doppler grid search.
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Coherent Channel Combining With Sign Recovery Acquisition signal processing.
void init()
Initializes acquisition algorithm.
~pcps_cccwsr_acquisition_cc()
Default destructor.
void set_state(int32_t state)
If set to 1, ensures that acquisition starts at the first available sample.
void set_threshold(float threshold)
Set statistics threshold of CCCWSR algorithm.
uint32_t mag() const
Returns the maximum peak of grid search.
Interface of the Gnss_Synchro class.