37 #ifndef GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H 38 #define GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H 43 #include <gnuradio/block.h> 44 #include <gnuradio/gr_complex.h> 62 using pcps_quicksync_acquisition_cc_sptr = gnss_shared_ptr<pcps_quicksync_acquisition_cc>;
64 pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
65 uint32_t folding_factor,
70 int32_t samples_per_ms,
71 int32_t samples_per_code,
72 bool bit_transition_flag,
74 const std::string& dump_filename,
75 bool enable_monitor_output);
99 d_gnss_synchro = p_gnss_synchro;
105 inline uint32_t
mag()
const 152 d_channel_fsm = std::move(channel_fsm);
162 d_threshold = threshold;
171 d_doppler_max = doppler_max;
180 d_doppler_step = doppler_step;
186 int general_work(
int noutput_items, gr_vector_int& ninput_items,
187 gr_vector_const_void_star& input_items,
188 gr_vector_void_star& output_items);
191 friend pcps_quicksync_acquisition_cc_sptr
192 pcps_quicksync_make_acquisition_cc(uint32_t folding_factor,
193 uint32_t sampled_ms, uint32_t max_dwells,
194 uint32_t doppler_max, int64_t fs_in,
195 int32_t samples_per_ms, int32_t samples_per_code,
196 bool bit_transition_flag,
198 const std::string& dump_filename,
199 bool enable_monitor_output);
202 uint32_t sampled_ms, uint32_t max_dwells,
203 uint32_t doppler_max, int64_t fs_in,
204 int32_t samples_per_ms, int32_t samples_per_code,
205 bool bit_transition_flag,
207 const std::string& dump_filename,
208 bool enable_monitor_output);
210 void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
211 int32_t doppler_offset);
213 std::weak_ptr<ChannelFsm> d_channel_fsm;
215 std::unique_ptr<gnss_fft_complex_fwd> d_fft_if;
216 std::unique_ptr<gnss_fft_complex_rev> d_ifft;
218 std::vector<std::vector<gr_complex>> d_grid_doppler_wipeoffs;
219 std::vector<gr_complex> d_code;
220 std::vector<gr_complex> d_fft_codes;
221 std::vector<gr_complex> d_signal_folded;
222 std::vector<gr_complex> d_code_folded;
223 std::vector<float> d_magnitude;
224 std::vector<float> d_corr_output_f;
225 std::vector<float> d_magnitude_folded;
226 std::vector<uint32_t> d_possible_delay;
228 std::string d_dump_filename;
229 std::string d_satellite_str;
231 std::ofstream d_dump_file;
236 uint64_t d_sample_counter;
238 float d_noise_floor_power;
240 float d_doppler_freq;
243 float d_test_statistics;
244 int32_t d_samples_per_ms;
245 int32_t d_samples_per_code;
248 uint32_t d_folding_factor;
249 uint32_t d_doppler_resolution;
250 uint32_t d_doppler_max;
251 uint32_t d_doppler_step;
252 uint32_t d_sampled_ms;
253 uint32_t d_max_dwells;
254 uint32_t d_well_count;
256 uint32_t d_num_doppler_bins;
257 uint32_t d_code_phase;
259 bool d_bit_transition_flag;
262 bool d_enable_monitor_output;
268 #endif // GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H Helper file for FFT interface.
void set_channel_fsm(std::weak_ptr< ChannelFsm > channel_fsm)
Set channel fsm associated to this acquisition instance.
void set_channel(uint32_t channel)
Set acquisition channel unique ID.
void set_local_code(std::complex< float > *code)
Sets local code for PCPS acquisition algorithm.
uint32_t mag() const
Returns the maximum peak of grid search.
void set_state(int32_t state)
If set to 1, ensures that acquisition starts at the first available sample.
void init()
Initializes acquisition algorithm.
void set_doppler_step(uint32_t doppler_step)
Set Doppler steps for the grid search.
This class implements a Parallel Code Phase Search Acquisition with the implementation of the Sparse ...
Interface of the State Machine for channel.
void set_threshold(float threshold)
Set statistics threshold of PCPS algorithm.
This is the class that contains the information that is shared by the processing blocks.
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)
Parallel Code Phase Search Acquisition signal processing.
void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro)
Set acquisition/tracking common Gnss_Synchro object pointer to exchange synchronization data between ...
void set_active(bool active)
Starts acquisition algorithm, turning from standby mode to active mode.
~pcps_quicksync_acquisition_cc()
Default destructor.
Interface of the Gnss_Synchro class.