mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-23 02:24:53 +00:00
Miscelaneous code improvements by clang-tidy
This commit is contained in:
@@ -41,9 +41,12 @@
|
||||
using google::LogMessage;
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return galileo_pcps_8ms_acquisition_cc_sptr(
|
||||
@@ -52,9 +55,12 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
}
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
|
||||
@@ -101,11 +107,12 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
d_channel = 0;
|
||||
}
|
||||
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
}
|
||||
@@ -125,6 +132,7 @@ galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
// code A: two replicas of a primary code
|
||||
@@ -146,6 +154,7 @@ void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
volk_32fc_conjugate_32fc(d_fft_code_B, d_fft_if->get_outbuf(), d_fft_size);
|
||||
}
|
||||
|
||||
|
||||
void galileo_pcps_8ms_acquisition_cc::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
@@ -161,8 +170,8 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
const double GALILEO_TWO_PI = 6.283185307179600;
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@@ -170,10 +179,10 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = static_cast<float>(GALILEO_TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@@ -182,7 +191,7 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
}
|
||||
|
||||
|
||||
void galileo_pcps_8ms_acquisition_cc::set_state(int state)
|
||||
void galileo_pcps_8ms_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@@ -210,7 +219,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
@@ -240,7 +249,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
case 1:
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
uint32_t indext = 0;
|
||||
uint32_t indext_A = 0;
|
||||
uint32_t indext_B = 0;
|
||||
@@ -268,10 +277,10 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power /= static_cast<float>(d_fft_size);
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in,
|
||||
d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
|
||||
@@ -44,10 +44,14 @@ class galileo_pcps_8ms_acquisition_cc;
|
||||
typedef boost::shared_ptr<galileo_pcps_8ms_acquisition_cc> galileo_pcps_8ms_acquisition_cc_sptr;
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition for
|
||||
@@ -57,41 +61,52 @@ class galileo_pcps_8ms_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
galileo_pcps_8ms_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
void calculate_magnitudes(
|
||||
gr_complex* fft_begin,
|
||||
int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_max_dwells;
|
||||
uint32_t d_well_count;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_A;
|
||||
gr_complex* d_fft_code_B;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@@ -99,9 +114,9 @@ private:
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@@ -123,7 +138,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@@ -154,13 +169,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@@ -179,7 +194,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@@ -188,7 +203,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename)
|
||||
{
|
||||
return pcps_assisted_acquisition_cc_sptr(
|
||||
@@ -58,8 +58,8 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
|
||||
|
||||
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_assisted_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||
@@ -109,7 +109,7 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
}
|
||||
|
||||
|
||||
void pcps_assisted_acquisition_cc::set_doppler_step(unsigned int doppler_step)
|
||||
void pcps_assisted_acquisition_cc::set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ void pcps_assisted_acquisition_cc::set_doppler_step(unsigned int doppler_step)
|
||||
|
||||
void pcps_assisted_acquisition_cc::free_grid_memory()
|
||||
{
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
delete[] d_grid_data[i];
|
||||
delete[] d_grid_doppler_wipeoffs[i];
|
||||
@@ -206,9 +206,9 @@ void pcps_assisted_acquisition_cc::get_assistance()
|
||||
void pcps_assisted_acquisition_cc::reset_grid()
|
||||
{
|
||||
d_well_count = 0;
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < d_fft_size; j++)
|
||||
for (uint32_t j = 0; j < d_fft_size; j++)
|
||||
{
|
||||
d_grid_data[i][j] = 0.0;
|
||||
}
|
||||
@@ -227,16 +227,16 @@ void pcps_assisted_acquisition_cc::redefine_grid()
|
||||
d_num_doppler_points = floor(std::abs(d_doppler_max - d_doppler_min) / d_doppler_step);
|
||||
|
||||
d_grid_data = new float *[d_num_doppler_points];
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
d_grid_data[i] = new float[d_fft_size];
|
||||
}
|
||||
|
||||
// create the carrier Doppler wipeoff signals
|
||||
int doppler_hz;
|
||||
int32_t doppler_hz;
|
||||
float phase_step_rad;
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_points];
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
for (int32_t doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
doppler_hz = d_doppler_min + d_doppler_step * doppler_index;
|
||||
// doppler search steps
|
||||
@@ -254,11 +254,11 @@ double pcps_assisted_acquisition_cc::search_maximum()
|
||||
{
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor;
|
||||
int index_doppler = 0;
|
||||
int32_t index_doppler = 0;
|
||||
uint32_t tmp_intex_t = 0;
|
||||
uint32_t index_time = 0;
|
||||
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_grid_data[i], d_fft_size);
|
||||
if (d_grid_data[i][tmp_intex_t] > magt)
|
||||
@@ -316,7 +316,7 @@ float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_st
|
||||
}
|
||||
|
||||
|
||||
int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
int32_t pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
@@ -331,7 +331,7 @@ int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_vo
|
||||
// 2- Doppler frequency search loop
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
for (int32_t doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
// Perform the carrier wipe-off
|
||||
@@ -394,7 +394,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
d_state = 2;
|
||||
break;
|
||||
case 2: // S2. ComputeGrid
|
||||
int consumed_samples;
|
||||
int32_t consumed_samples;
|
||||
consumed_samples = compute_and_accumulate_grid(input_items);
|
||||
d_well_count++;
|
||||
if (d_well_count >= d_max_dwells)
|
||||
|
||||
@@ -61,8 +61,13 @@ typedef boost::shared_ptr<pcps_assisted_acquisition_cc>
|
||||
pcps_assisted_acquisition_cc_sptr;
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long fs_in, int samples_per_ms,
|
||||
pcps_make_assisted_acquisition_cc(
|
||||
int32_t max_dwells,
|
||||
uint32_t sampled_ms,
|
||||
int32_t doppler_max,
|
||||
int32_t doppler_min,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
/*!
|
||||
@@ -75,20 +80,20 @@ class pcps_assisted_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
|
||||
int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
|
||||
int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
|
||||
int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
|
||||
int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
int compute_and_accumulate_grid(gr_vector_const_void_star& input_items);
|
||||
int32_t compute_and_accumulate_grid(gr_vector_const_void_star& input_items);
|
||||
float estimate_input_power(gr_vector_const_void_star& input_items);
|
||||
double search_maximum();
|
||||
void get_assistance();
|
||||
@@ -96,22 +101,22 @@ private:
|
||||
void redefine_grid();
|
||||
void free_grid_memory();
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_max_dwells;
|
||||
unsigned int d_doppler_resolution;
|
||||
int d_gnuradio_forecast_samples;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_max_dwells;
|
||||
uint32_t d_doppler_resolution;
|
||||
int32_t d_gnuradio_forecast_samples;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
int d_doppler_max;
|
||||
int d_doppler_min;
|
||||
int d_config_doppler_max;
|
||||
int d_config_doppler_min;
|
||||
int32_t d_doppler_max;
|
||||
int32_t d_doppler_min;
|
||||
int32_t d_config_doppler_max;
|
||||
int32_t d_config_doppler_min;
|
||||
|
||||
int d_num_doppler_points;
|
||||
int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_fft_size;
|
||||
int32_t d_num_doppler_points;
|
||||
int32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex* d_carrier;
|
||||
gr_complex* d_fft_codes;
|
||||
@@ -122,17 +127,17 @@ private:
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_input_power;
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_active;
|
||||
bool d_disable_assist;
|
||||
int d_well_count;
|
||||
int32_t d_well_count;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
|
||||
std::string d_dump_filename;
|
||||
|
||||
@@ -155,7 +160,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_test_statistics;
|
||||
}
|
||||
@@ -185,7 +190,7 @@ public:
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@@ -204,7 +209,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@@ -213,7 +218,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step);
|
||||
void set_doppler_step(uint32_t doppler_step);
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
|
||||
@@ -35,22 +35,24 @@
|
||||
*/
|
||||
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h" // GPS_TWO_PI
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return pcps_cccwsr_acquisition_cc_sptr(
|
||||
@@ -58,10 +60,14 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
samples_per_ms, samples_per_code, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
|
||||
pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
|
||||
@@ -116,7 +122,7 @@ pcps_cccwsr_acquisition_cc::~pcps_cccwsr_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
}
|
||||
@@ -175,8 +181,8 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@@ -184,11 +190,11 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@@ -197,7 +203,7 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
}
|
||||
|
||||
|
||||
void pcps_cccwsr_acquisition_cc::set_state(int state)
|
||||
void pcps_cccwsr_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@@ -225,7 +231,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
@@ -254,7 +260,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
case 1:
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
|
||||
uint32_t indext = 0;
|
||||
uint32_t indext_plus = 0;
|
||||
@@ -281,11 +287,11 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power /= static_cast<float>(d_fft_size);
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in,
|
||||
d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
@@ -320,7 +326,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
// d_data_correlation.
|
||||
memcpy(d_pilot_correlation, d_ifft->get_outbuf(), sizeof(gr_complex) * d_fft_size);
|
||||
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_correlation_plus[i] = std::complex<float>(
|
||||
d_data_correlation[i].real() - d_pilot_correlation[i].imag(),
|
||||
|
||||
@@ -50,10 +50,15 @@ class pcps_cccwsr_acquisition_cc;
|
||||
typedef boost::shared_ptr<pcps_cccwsr_acquisition_cc> pcps_cccwsr_acquisition_cc_sptr;
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
pcps_cccwsr_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@@ -63,40 +68,40 @@ class pcps_cccwsr_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
pcps_cccwsr_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_max_dwells;
|
||||
uint32_t d_well_count;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_data;
|
||||
gr_complex* d_fft_code_pilot;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@@ -108,9 +113,9 @@ private:
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@@ -132,7 +137,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@@ -164,13 +169,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@@ -189,7 +194,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@@ -198,7 +203,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
||||
@@ -43,10 +43,13 @@
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t folding_factor,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename)
|
||||
@@ -63,10 +66,10 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
|
||||
|
||||
pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc",
|
||||
@@ -97,7 +100,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_magnitude = static_cast<float*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
d_magnitude_folded = static_cast<float*>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
d_possible_delay = new unsigned int[d_folding_factor];
|
||||
d_possible_delay = new uint32_t[d_folding_factor];
|
||||
d_corr_output_f = new float[d_folding_factor];
|
||||
|
||||
/*Create the d_code signal , which would store the values of the code in its
|
||||
@@ -138,7 +141,7 @@ pcps_quicksync_acquisition_cc::~pcps_quicksync_acquisition_cc()
|
||||
//DLOG(INFO) << "START DESTROYER";
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
}
|
||||
@@ -176,7 +179,7 @@ void pcps_quicksync_acquisition_cc::set_local_code(std::complex<float>* code)
|
||||
/*perform folding of the code by the factorial factor parameter. Notice that
|
||||
folding of the code in the time stage would result in a downsampled spectrum
|
||||
in the frequency domain after applying the fftw operation*/
|
||||
for (unsigned int i = 0; i < d_folding_factor; i++)
|
||||
for (uint32_t i = 0; i < d_folding_factor; i++)
|
||||
{
|
||||
std::transform((code + i * d_fft_size), (code + ((i + 1) * d_fft_size)),
|
||||
d_fft_if->get_inbuf(), d_fft_if->get_inbuf(),
|
||||
@@ -209,8 +212,8 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@@ -218,10 +221,10 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@@ -231,7 +234,7 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
}
|
||||
|
||||
|
||||
void pcps_quicksync_acquisition_cc::set_state(int state)
|
||||
void pcps_quicksync_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@@ -270,7 +273,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
* 6. Declare positive or negative acquisition using a message queue
|
||||
*/
|
||||
//DLOG(INFO) << "START GENERAL WORK";
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
//std::cout<<"general_work in quicksync gnuradio block"<<std::endl;
|
||||
switch (d_state)
|
||||
{
|
||||
@@ -302,7 +305,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
{
|
||||
/* initialize acquisition implementing the QuickSync algorithm*/
|
||||
//DLOG(INFO) << "START CASE 1";
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const auto* in = reinterpret_cast<const gr_complex*>(input_items[0]); //Get the input samples pointer
|
||||
@@ -349,7 +352,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
volk_32f_accumulator_s32f(&d_input_power, d_magnitude, d_samples_per_code * d_folding_factor);
|
||||
d_input_power /= static_cast<float>(d_samples_per_code * d_folding_factor);
|
||||
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
/*Ensure that the signal is going to start with all samples
|
||||
at zero. This is done to avoid over acumulation when performing
|
||||
@@ -360,7 +363,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
/*Doppler search steps and then multiplication of the incoming
|
||||
signal with the doppler wipeoffs to eliminate frequency offset
|
||||
*/
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
/*Perform multiplication of the incoming signal with the
|
||||
complex exponential vector. This removes the frequency doppler
|
||||
@@ -372,7 +375,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
/*Perform folding of the carrier wiped-off incoming signal. Since
|
||||
superlinear method is being used the folding factor in the
|
||||
incoming raw data signal is of d_folding_factor^2*/
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor * d_folding_factor); i++)
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor * d_folding_factor); i++)
|
||||
{
|
||||
std::transform((in_temp + i * d_fft_size),
|
||||
(in_temp + ((i + 1) * d_fft_size)),
|
||||
@@ -423,17 +426,17 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
restarted between consecutive dwells in multidwell operation.*/
|
||||
if (d_test_statistics < (d_mag / d_input_power) || !d_bit_transition_flag)
|
||||
{
|
||||
unsigned int detected_delay_samples_folded = 0;
|
||||
uint32_t detected_delay_samples_folded = 0;
|
||||
detected_delay_samples_folded = (indext % d_samples_per_code);
|
||||
gr_complex complex_acumulator[100];
|
||||
//gr_complex complex_acumulator[d_folding_factor];
|
||||
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++)
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
d_possible_delay[i] = detected_delay_samples_folded + (i)*d_fft_size;
|
||||
}
|
||||
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++)
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
/*Copy a signal of 1 code length into suggested buffer.
|
||||
The copied signal must have doppler effect corrected*/
|
||||
@@ -447,7 +450,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
of a shift*/
|
||||
volk_32fc_x2_multiply_32fc(corr_output, in_1code, d_code, d_samples_per_code);
|
||||
|
||||
for (int j = 0; j < d_samples_per_code; j++)
|
||||
for (int32_t j = 0; j < d_samples_per_code; j++)
|
||||
{
|
||||
complex_acumulator[i] += (corr_output[j]);
|
||||
}
|
||||
@@ -532,7 +535,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "folding factor " << d_folding_factor;
|
||||
DLOG(INFO) << "possible delay correlation output";
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude folded " << d_mag;
|
||||
@@ -561,7 +564,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "folding factor " << d_folding_factor;
|
||||
DLOG(INFO) << "possible delay corr output";
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude folded " << d_mag;
|
||||
|
||||
@@ -67,10 +67,14 @@ typedef boost::shared_ptr<pcps_quicksync_acquisition_cc>
|
||||
pcps_quicksync_acquisition_cc_sptr;
|
||||
|
||||
pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_quicksync_make_acquisition_cc(
|
||||
uint32_t folding_factor,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
@@ -86,56 +90,56 @@ class pcps_quicksync_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_quicksync_make_acquisition_cc(uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_quicksync_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_quicksync_acquisition_cc(uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
gr_complex* d_code;
|
||||
unsigned int d_folding_factor; // also referred in the paper as 'p'
|
||||
uint32_t d_folding_factor; // also referred in the paper as 'p'
|
||||
float* d_corr_acumulator;
|
||||
unsigned int* d_possible_delay;
|
||||
uint32_t * d_possible_delay;
|
||||
float* d_corr_output_f;
|
||||
float* d_magnitude_folded;
|
||||
gr_complex* d_signal_folded;
|
||||
gr_complex* d_code_folded;
|
||||
float d_noise_floor_power;
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_max_dwells;
|
||||
uint32_t d_well_count;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_fft_if2;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@@ -144,9 +148,9 @@ private:
|
||||
bool d_bit_transition_flag;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@@ -168,7 +172,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@@ -199,13 +203,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@@ -224,7 +228,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@@ -233,7 +237,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
||||
@@ -61,10 +61,14 @@
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return pcps_tong_acquisition_cc_sptr(
|
||||
@@ -73,10 +77,14 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
}
|
||||
|
||||
pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_tong_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
|
||||
@@ -130,7 +138,7 @@ pcps_tong_acquisition_cc::~pcps_tong_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
volk_gnsssdr_free(d_grid_data[i]);
|
||||
@@ -176,8 +184,8 @@ void pcps_tong_acquisition_cc::init()
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@@ -186,11 +194,11 @@ void pcps_tong_acquisition_cc::init()
|
||||
// Create the carrier Doppler wipeoff signals and allocate data grid.
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_bins];
|
||||
d_grid_data = new float *[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@@ -198,14 +206,14 @@ void pcps_tong_acquisition_cc::init()
|
||||
|
||||
d_grid_data[doppler_index] = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_grid_data[doppler_index][i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pcps_tong_acquisition_cc::set_state(int state)
|
||||
void pcps_tong_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@@ -220,9 +228,9 @@ void pcps_tong_acquisition_cc::set_state(int state)
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_grid_data[doppler_index][i] = 0;
|
||||
}
|
||||
@@ -241,7 +249,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
@@ -260,9 +268,9 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_grid_data[doppler_index][i] = 0;
|
||||
}
|
||||
@@ -280,7 +288,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
case 1:
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
@@ -304,11 +312,11 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power /= static_cast<float>(d_fft_size);
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in,
|
||||
d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
|
||||
@@ -64,11 +64,17 @@ class pcps_tong_acquisition_cc;
|
||||
typedef boost::shared_ptr<pcps_tong_acquisition_cc> pcps_tong_acquisition_cc_sptr;
|
||||
|
||||
pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
pcps_tong_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@@ -78,45 +84,45 @@ class pcps_tong_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
pcps_tong_make_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max,
|
||||
int64_t fs_in, int32_t samples_per_ms,
|
||||
int32_t samples_per_code, uint32_t tong_init_val,
|
||||
uint32_t tong_max_val, uint32_t tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
pcps_tong_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max,
|
||||
int64_t fs_in, int32_t samples_per_ms,
|
||||
int32_t samples_per_code, uint32_t tong_init_val,
|
||||
uint32_t tong_max_val, uint32_t tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_dwell_count;
|
||||
unsigned int d_tong_count;
|
||||
unsigned int d_tong_init_val;
|
||||
unsigned int d_tong_max_val;
|
||||
unsigned int d_tong_max_dwells;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_dwell_count;
|
||||
uint32_t d_tong_count;
|
||||
uint32_t d_tong_init_val;
|
||||
uint32_t d_tong_max_val;
|
||||
uint32_t d_tong_max_dwells;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
float** d_grid_data;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@@ -124,9 +130,9 @@ private:
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@@ -148,7 +154,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@@ -179,13 +185,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@@ -204,7 +210,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@@ -213,7 +219,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user