mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-18 16:15:21 +00:00
Replace unsigned long int by uint64_t and long int by int64_t. Fixes #199
This commit is contained in:
@@ -48,7 +48,7 @@ using google::LogMessage;
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
unsigned int doppler_max, int64_t fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -67,7 +67,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max,
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
int samples_per_ms,
|
||||
int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc> galileo_
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr
|
||||
galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
unsigned int doppler_max, int64_t fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
unsigned int doppler_max, int64_t fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
unsigned int doppler_max, int64_t fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
int doppler_offset);
|
||||
float estimate_input_power(gr_complex* in);
|
||||
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_sampled_ms;
|
||||
int d_samples_per_code;
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_I_A;
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_A;
|
||||
|
||||
@@ -156,7 +156,7 @@ pcps_acquisition::~pcps_acquisition()
|
||||
{
|
||||
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_magnitude_grid[i]);
|
||||
@@ -166,7 +166,7 @@ pcps_acquisition::~pcps_acquisition()
|
||||
}
|
||||
if (acq_parameters.make_2_steps)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins_step2; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins_step2; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs_step_two[i]);
|
||||
}
|
||||
@@ -202,7 +202,7 @@ void pcps_acquisition::set_local_code(std::complex<float>* code)
|
||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||
if (acq_parameters.bit_transition_flag)
|
||||
{
|
||||
int offset = d_fft_size / 2;
|
||||
int32_t offset = d_fft_size / 2;
|
||||
std::fill_n(d_fft_if->get_inbuf(), offset, gr_complex(0.0, 0.0));
|
||||
memcpy(d_fft_if->get_inbuf() + offset, code, sizeof(gr_complex) * offset);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ bool pcps_acquisition::is_fdma()
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::update_local_carrier(gr_complex* carrier_vector, int correlator_length_samples, float freq)
|
||||
void pcps_acquisition::update_local_carrier(gr_complex* carrier_vector, int32_t correlator_length_samples, float freq)
|
||||
{
|
||||
float phase_step_rad = GPS_TWO_PI * freq / static_cast<float>(acq_parameters.fs_in);
|
||||
float _phase[1];
|
||||
@@ -268,29 +268,29 @@ void pcps_acquisition::init()
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
|
||||
d_num_doppler_bins = static_cast<unsigned int>(std::ceil(static_cast<double>(static_cast<int>(acq_parameters.doppler_max) - static_cast<int>(-acq_parameters.doppler_max)) / static_cast<double>(d_doppler_step)));
|
||||
d_num_doppler_bins = static_cast<uint32_t>(std::ceil(static_cast<double>(static_cast<int>(acq_parameters.doppler_max) - static_cast<int>(-acq_parameters.doppler_max)) / static_cast<double>(d_doppler_step)));
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
|
||||
if (acq_parameters.make_2_steps)
|
||||
{
|
||||
d_grid_doppler_wipeoffs_step_two = new gr_complex*[d_num_doppler_bins_step2];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs_step_two[doppler_index] = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
}
|
||||
}
|
||||
|
||||
d_magnitude_grid = 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()));
|
||||
d_magnitude_grid[doppler_index] = static_cast<float*>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
for (unsigned k = 0; k < d_fft_size; k++)
|
||||
for (uint32_t k = 0; k < d_fft_size; k++)
|
||||
{
|
||||
d_magnitude_grid[doppler_index][k] = 0.0;
|
||||
}
|
||||
int doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, d_old_freq + doppler);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ void pcps_acquisition::init()
|
||||
|
||||
if (acq_parameters.dump)
|
||||
{
|
||||
unsigned int effective_fft_size = (acq_parameters.bit_transition_flag ? (d_fft_size / 2) : d_fft_size);
|
||||
uint32_t effective_fft_size = (acq_parameters.bit_transition_flag ? (d_fft_size / 2) : d_fft_size);
|
||||
grid_ = arma::fmat(effective_fft_size, d_num_doppler_bins, arma::fill::zeros);
|
||||
narrow_grid_ = arma::fmat(effective_fft_size, d_num_doppler_bins_step2, arma::fill::zeros);
|
||||
}
|
||||
@@ -307,9 +307,9 @@ void pcps_acquisition::init()
|
||||
|
||||
void pcps_acquisition::update_grid_doppler_wipeoffs()
|
||||
{
|
||||
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++)
|
||||
{
|
||||
int doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int>(acq_parameters.doppler_max) + d_doppler_step * doppler_index;
|
||||
update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, d_old_freq + doppler);
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ void pcps_acquisition::update_grid_doppler_wipeoffs()
|
||||
|
||||
void pcps_acquisition::update_grid_doppler_wipeoffs_step2()
|
||||
{
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
|
||||
{
|
||||
float doppler = (static_cast<float>(doppler_index) - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0))) * acq_parameters.doppler_step2;
|
||||
update_local_carrier(d_grid_doppler_wipeoffs_step_two[doppler_index], d_fft_size, d_doppler_center_step_two + doppler);
|
||||
@@ -325,7 +325,7 @@ void pcps_acquisition::update_grid_doppler_wipeoffs_step2()
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::set_state(int state)
|
||||
void pcps_acquisition::set_state(int32_t state)
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||
d_state = state;
|
||||
@@ -385,7 +385,7 @@ void pcps_acquisition::send_negative_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::dump_results(int effective_fft_size)
|
||||
void pcps_acquisition::dump_results(int32_t effective_fft_size)
|
||||
{
|
||||
d_dump_number++;
|
||||
std::string filename = acq_parameters.dump_filename;
|
||||
@@ -488,16 +488,16 @@ void pcps_acquisition::dump_results(int effective_fft_size)
|
||||
}
|
||||
|
||||
|
||||
float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power, unsigned int num_doppler_bins, int doppler_max, int doppler_step)
|
||||
float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int32_t& doppler, float input_power, uint32_t num_doppler_bins, int32_t doppler_max, int32_t doppler_step)
|
||||
{
|
||||
float grid_maximum = 0.0;
|
||||
unsigned int index_doppler = 0;
|
||||
uint32_t index_doppler = 0;
|
||||
uint32_t tmp_intex_t = 0;
|
||||
uint32_t index_time = 0;
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
||||
// Find the correlation peak and the carrier frequency
|
||||
for (unsigned int i = 0; i < num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size);
|
||||
if (d_magnitude_grid[i][tmp_intex_t] > grid_maximum)
|
||||
@@ -522,19 +522,19 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& dopp
|
||||
}
|
||||
|
||||
|
||||
float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& doppler, unsigned int num_doppler_bins, int doppler_max, int doppler_step)
|
||||
float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int32_t& doppler, uint32_t num_doppler_bins, int32_t doppler_max, int32_t doppler_step)
|
||||
{
|
||||
// Look for correlation peaks in the results
|
||||
// Find the highest peak and compare it to the second highest peak
|
||||
// The second peak is chosen not closer than 1 chip to the highest peak
|
||||
|
||||
float firstPeak = 0.0;
|
||||
unsigned int index_doppler = 0;
|
||||
uint32_t index_doppler = 0;
|
||||
uint32_t tmp_intex_t = 0;
|
||||
uint32_t index_time = 0;
|
||||
|
||||
// Find the correlation peak and the carrier frequency
|
||||
for (unsigned int i = 0; i < num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size);
|
||||
if (d_magnitude_grid[i][tmp_intex_t] > firstPeak)
|
||||
@@ -588,14 +588,14 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& do
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
{
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
|
||||
// Initialize acquisition algorithm
|
||||
int doppler = 0;
|
||||
int32_t doppler = 0;
|
||||
uint32_t indext = 0;
|
||||
int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
||||
int32_t effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size);
|
||||
if (d_cshort)
|
||||
{
|
||||
volk_gnsssdr_16ic_convert_32fc(d_data_buffer, d_data_buffer_sc, d_consumed_samples);
|
||||
@@ -603,7 +603,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
memcpy(d_input_signal, d_data_buffer, d_consumed_samples * sizeof(gr_complex));
|
||||
if (d_fft_size > d_consumed_samples)
|
||||
{
|
||||
for (unsigned int i = d_consumed_samples; i < d_fft_size; i++)
|
||||
for (uint32_t i = d_consumed_samples; i < d_fft_size; i++)
|
||||
{
|
||||
d_input_signal[i] = gr_complex(0.0, 0.0);
|
||||
}
|
||||
@@ -634,7 +634,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
// Doppler frequency grid loop
|
||||
if (!d_step_two)
|
||||
{
|
||||
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++)
|
||||
{
|
||||
// Remove Doppler
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
@@ -682,7 +682,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
|
||||
{
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs_step_two[doppler_index], d_fft_size);
|
||||
|
||||
@@ -814,9 +814,9 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count)
|
||||
d_num_noncoherent_integrations_counter = 0;
|
||||
d_positive_acq = 0;
|
||||
// Reset grid
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
for (unsigned k = 0; k < d_fft_size; k++)
|
||||
for (uint32_t k = 0; k < d_fft_size; k++)
|
||||
{
|
||||
d_magnitude_grid[i][k] = 0.0;
|
||||
}
|
||||
@@ -879,7 +879,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
unsigned int buff_increment;
|
||||
uint32_t buff_increment;
|
||||
if (d_cshort)
|
||||
{
|
||||
const lv_16sc_t* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // Get the input samples pointer
|
||||
|
||||
@@ -82,21 +82,21 @@ private:
|
||||
|
||||
pcps_acquisition(const Acq_Conf& conf_);
|
||||
|
||||
void update_local_carrier(gr_complex* carrier_vector, int correlator_length_samples, float freq);
|
||||
void update_local_carrier(gr_complex* carrier_vector, int32_t correlator_length_samples, float freq);
|
||||
void update_grid_doppler_wipeoffs();
|
||||
void update_grid_doppler_wipeoffs_step2();
|
||||
bool is_fdma();
|
||||
|
||||
void acquisition_core(unsigned long int samp_count);
|
||||
void acquisition_core(uint64_t samp_count);
|
||||
|
||||
void send_negative_acquisition();
|
||||
|
||||
void send_positive_acquisition();
|
||||
|
||||
void dump_results(int effective_fft_size);
|
||||
void dump_results(int32_t effective_fft_size);
|
||||
|
||||
float first_vs_second_peak_statistic(uint32_t& indext, int& doppler, unsigned int num_doppler_bins, int doppler_max, int doppler_step);
|
||||
float max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power, unsigned int num_doppler_bins, int doppler_max, int doppler_step);
|
||||
float first_vs_second_peak_statistic(uint32_t& indext, int32_t& doppler, uint32_t num_doppler_bins, int32_t doppler_max, int32_t doppler_step);
|
||||
float max_to_input_power_statistic(uint32_t& indext, int32_t& doppler, float input_power, uint32_t num_doppler_bins, int32_t doppler_max, int32_t doppler_step);
|
||||
|
||||
Acq_Conf acq_parameters;
|
||||
bool d_active;
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
bool d_cshort;
|
||||
bool d_step_two;
|
||||
bool d_use_CFAR_algorithm_flag;
|
||||
int d_positive_acq;
|
||||
int32_t d_positive_acq;
|
||||
float d_threshold;
|
||||
float d_mag;
|
||||
float d_input_power;
|
||||
@@ -114,16 +114,16 @@ private:
|
||||
float* d_tmp_buffer;
|
||||
gr_complex* d_input_signal;
|
||||
uint32_t d_samplesPerChip;
|
||||
long d_old_freq;
|
||||
int d_state;
|
||||
unsigned int d_channel;
|
||||
unsigned int d_doppler_step;
|
||||
int64_t d_old_freq;
|
||||
int32_t d_state;
|
||||
uint32_t d_channel;
|
||||
uint32_t d_doppler_step;
|
||||
float d_doppler_center_step_two;
|
||||
unsigned int d_num_noncoherent_integrations_counter;
|
||||
unsigned int d_fft_size;
|
||||
unsigned int d_consumed_samples;
|
||||
unsigned int d_num_doppler_bins;
|
||||
unsigned long int d_sample_counter;
|
||||
uint32_t d_num_noncoherent_integrations_counter;
|
||||
uint32_t d_fft_size;
|
||||
uint32_t d_consumed_samples;
|
||||
uint32_t d_num_doppler_bins;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
gr_complex** d_grid_doppler_wipeoffs_step_two;
|
||||
gr_complex* d_fft_codes;
|
||||
@@ -134,10 +134,10 @@ private:
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
arma::fmat grid_;
|
||||
arma::fmat narrow_grid_;
|
||||
unsigned int d_num_doppler_bins_step2;
|
||||
long int d_dump_number;
|
||||
unsigned int d_dump_channel;
|
||||
unsigned int d_buffer_count;
|
||||
uint32_t d_num_doppler_bins_step2;
|
||||
int64_t d_dump_number;
|
||||
uint32_t d_dump_channel;
|
||||
uint32_t d_buffer_count;
|
||||
|
||||
public:
|
||||
~pcps_acquisition();
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@@ -188,13 +188,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)
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||
d_channel = channel;
|
||||
@@ -215,7 +215,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)
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||
acq_parameters.doppler_max = doppler_max;
|
||||
@@ -225,7 +225,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)
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||
d_doppler_step = doppler_step;
|
||||
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
int d_num_doppler_points;
|
||||
int d_doppler_step;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex* d_carrier;
|
||||
gr_complex* d_fft_codes;
|
||||
gr_complex* d_10_ms_buffer;
|
||||
@@ -124,8 +124,8 @@ private:
|
||||
|
||||
std::string d_dump_filename;
|
||||
|
||||
arma::fmat grid_;
|
||||
long int d_dump_number;
|
||||
arma ::fmat grid_;
|
||||
int64_t d_dump_number;
|
||||
unsigned int d_dump_channel;
|
||||
|
||||
public:
|
||||
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_fft_size;
|
||||
unsigned int d_num_doppler_bins;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
std::shared_ptr<fpga_acquisition> acquisition_fpga;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ private:
|
||||
int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex* d_carrier;
|
||||
gr_complex* d_fft_codes;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_data;
|
||||
|
||||
@@ -387,7 +387,7 @@ void pcps_opencl_acquisition_cc::acquisition_core_volk()
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
gr_complex *in = d_in_buffer[d_well_count];
|
||||
unsigned long int samplestamp = d_sample_counter_buffer[d_well_count];
|
||||
uint64_t samplestamp = d_sample_counter_buffer[d_well_count];
|
||||
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
@@ -510,7 +510,7 @@ void pcps_opencl_acquisition_cc::acquisition_core_opencl()
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = (static_cast<float>(d_fft_size_pow2) * static_cast<float>(d_fft_size)); //This works, but I am not sure why.
|
||||
gr_complex *in = d_in_buffer[d_well_count];
|
||||
unsigned long int samplestamp = d_sample_counter_buffer[d_well_count];
|
||||
uint64_t samplestamp = d_sample_counter_buffer[d_well_count];
|
||||
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
unsigned int d_fft_size;
|
||||
unsigned int d_fft_size_pow2;
|
||||
int* d_max_doppler_indexs;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
@@ -144,7 +144,7 @@ private:
|
||||
std::string d_dump_filename;
|
||||
gr_complex* d_zero_vector;
|
||||
gr_complex** d_in_buffer;
|
||||
std::vector<unsigned long int> d_sample_counter_buffer;
|
||||
std::vector<uint64_t> d_sample_counter_buffer;
|
||||
unsigned int d_in_dwell_count;
|
||||
|
||||
cl::Platform d_cl_platform;
|
||||
|
||||
@@ -127,7 +127,7 @@ private:
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
unsigned int d_tong_max_val;
|
||||
unsigned int d_tong_max_dwells;
|
||||
unsigned int d_fft_size;
|
||||
unsigned long int d_sample_counter;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@@ -66,7 +66,7 @@ Channel::Channel(ConfigurationInterface* configuration, unsigned int channel,
|
||||
// Provide a warning to the user about the change of parameter name
|
||||
if (channel_ == 0)
|
||||
{
|
||||
long int deprecation_warning = configuration->property("GNSS-SDR.internal_fs_hz", 0);
|
||||
int64_t deprecation_warning = configuration->property("GNSS-SDR.internal_fs_hz", 0);
|
||||
if (deprecation_warning != 0)
|
||||
{
|
||||
std::cout << "WARNING: The global parameter name GNSS-SDR.internal_fs_hz has been DEPRECATED." << std::endl;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@@ -48,7 +49,7 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||
bool result = false;
|
||||
try
|
||||
{
|
||||
long int message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(msg);
|
||||
switch (message)
|
||||
{
|
||||
case 1: // positive acquisition
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
gnss_sdr_fpga_sample_counter::gnss_sdr_fpga_sample_counter(double _fs, int _interval_ms) : gr::block("fpga_fpga_sample_counter",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
gnss_sdr_fpga_sample_counter::gnss_sdr_fpga_sample_counter(double _fs, int32_t _interval_ms) : gr::block("fpga_fpga_sample_counter",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
message_port_register_out(pmt::mp("fpga_sample_counter"));
|
||||
set_max_noutput_items(1);
|
||||
@@ -64,7 +64,7 @@ gnss_sdr_fpga_sample_counter::gnss_sdr_fpga_sample_counter(double _fs, int _inte
|
||||
}
|
||||
|
||||
|
||||
gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int _interval_ms)
|
||||
gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms)
|
||||
{
|
||||
gnss_sdr_fpga_sample_counter_sptr fpga_sample_counter_(new gnss_sdr_fpga_sample_counter(_fs, _interval_ms));
|
||||
return fpga_sample_counter_;
|
||||
@@ -79,6 +79,7 @@ bool gnss_sdr_fpga_sample_counter::start()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Called by GNURadio to disable drivers, etc for i/o devices.
|
||||
bool gnss_sdr_fpga_sample_counter::stop()
|
||||
{
|
||||
@@ -100,7 +101,6 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__((
|
||||
// Possible problem: what happen if the PS is overloaded and gnuradio does not call this function
|
||||
// with the sufficient rate to catch all the interrupts in the counter. To be evaluated later.
|
||||
|
||||
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
out[0] = Gnss_Synchro();
|
||||
out[0].Flag_valid_symbol_output = false;
|
||||
|
||||
@@ -33,37 +33,37 @@
|
||||
|
||||
#include <gnuradio/block.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class gnss_sdr_fpga_sample_counter;
|
||||
|
||||
typedef boost::shared_ptr<gnss_sdr_fpga_sample_counter> gnss_sdr_fpga_sample_counter_sptr;
|
||||
|
||||
gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int _interval_ms);
|
||||
gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
|
||||
class gnss_sdr_fpga_sample_counter : public gr::block
|
||||
{
|
||||
private:
|
||||
gnss_sdr_fpga_sample_counter(double _fs, int _interval_ms);
|
||||
gnss_sdr_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
bool start();
|
||||
bool stop();
|
||||
unsigned int samples_per_output;
|
||||
uint32_t samples_per_output;
|
||||
double fs;
|
||||
unsigned long long int sample_counter;
|
||||
int interval_ms;
|
||||
long long int current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
unsigned int current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
unsigned int current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
unsigned int current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
unsigned int current_days; // Receiver time in days since the beginning of the run
|
||||
int report_interval_ms;
|
||||
uint64_t sample_counter;
|
||||
int32_t interval_ms;
|
||||
int64_t current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
uint32_t current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
uint32_t current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
uint32_t current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
uint32_t current_days; // Receiver time in days since the beginning of the run
|
||||
int32_t report_interval_ms;
|
||||
bool flag_enable_send_msg;
|
||||
|
||||
public:
|
||||
friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int _interval_ms);
|
||||
friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
int general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs, int _interval_ms, size_t _size) : gr::sync_decimator("sample_counter",
|
||||
gr::io_signature::make(1, 1, _size),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
static_cast<unsigned int>(std::round(_fs * static_cast<double>(_interval_ms) / 1e3)))
|
||||
gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs, int32_t _interval_ms, size_t _size) : gr::sync_decimator("sample_counter",
|
||||
gr::io_signature::make(1, 1, _size),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
static_cast<uint32_t>(std::round(_fs * static_cast<double>(_interval_ms) / 1e3)))
|
||||
{
|
||||
message_port_register_out(pmt::mp("sample_counter"));
|
||||
set_max_noutput_items(1);
|
||||
@@ -60,7 +60,7 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs, int _interval_ms, s
|
||||
}
|
||||
|
||||
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int _interval_ms, size_t _size)
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size)
|
||||
{
|
||||
gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs, _interval_ms, _size));
|
||||
return sample_counter_;
|
||||
|
||||
@@ -33,35 +33,36 @@
|
||||
|
||||
#include <gnuradio/sync_decimator.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
class gnss_sdr_sample_counter;
|
||||
|
||||
typedef boost::shared_ptr<gnss_sdr_sample_counter> gnss_sdr_sample_counter_sptr;
|
||||
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int _interval_ms, size_t _size);
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
|
||||
class gnss_sdr_sample_counter : public gr::sync_decimator
|
||||
{
|
||||
private:
|
||||
gnss_sdr_sample_counter(double _fs, int _interval_ms, size_t _size);
|
||||
unsigned int samples_per_output;
|
||||
gnss_sdr_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
uint32_t samples_per_output;
|
||||
double fs;
|
||||
unsigned long long int sample_counter;
|
||||
int interval_ms;
|
||||
long long int current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
unsigned int current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
unsigned int current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
unsigned int current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
unsigned int current_days; // Receiver time in days since the beginning of the run
|
||||
int report_interval_ms;
|
||||
uint64_t sample_counter;
|
||||
int32_t interval_ms;
|
||||
int64_t current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
uint32_t current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
uint32_t current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
uint32_t current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
uint32_t current_days; // Receiver time in days since the beginning of the run
|
||||
int32_t report_interval_ms;
|
||||
bool flag_enable_send_msg;
|
||||
|
||||
public:
|
||||
friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int _interval_ms, size_t _size);
|
||||
friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <gnuradio/block.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class gnss_sdr_time_counter;
|
||||
|
||||
@@ -45,20 +45,20 @@ class gnss_sdr_time_counter : public gr::block
|
||||
{
|
||||
private:
|
||||
gnss_sdr_time_counter();
|
||||
long long int current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
unsigned int current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
unsigned int current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
unsigned int current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
unsigned int current_days; // Receiver time in days since the beginning of the run
|
||||
int report_interval_ms;
|
||||
int64_t current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
uint32_t current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
uint32_t current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
uint32_t current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
uint32_t current_days; // Receiver time in days since the beginning of the run
|
||||
int32_t report_interval_ms;
|
||||
|
||||
public:
|
||||
friend gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter();
|
||||
int general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)), gr_vector_void_star &output_items);
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)), gr_vector_void_star &output_items);
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_SAMPLE_COUNTER_H_*/
|
||||
|
||||
@@ -134,11 +134,11 @@ int hybrid_observables_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -168,7 +168,7 @@ int hybrid_observables_cc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
for (unsigned int chan = 0; chan < d_nchannels_out; chan++)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ int hybrid_observables_cc::save_matfile()
|
||||
double *PRN_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *Flag_valid_pseudorange_aux = new double[d_nchannels_out * num_epoch];
|
||||
unsigned int k = 0;
|
||||
for (long int j = 0; j < num_epoch; j++)
|
||||
for (int64_t j = 0; j < num_epoch; j++)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_nchannels_out; i++)
|
||||
{
|
||||
@@ -241,7 +241,7 @@ int hybrid_observables_cc::save_matfile()
|
||||
}
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {static_cast<size_t>(d_nchannels_out), static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("RX_time", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, RX_time_aux, MAT_F_DONT_COPY_DATA);
|
||||
@@ -308,14 +308,14 @@ double hybrid_observables_cc::compute_T_rx_s(const Gnss_Synchro &a)
|
||||
return ((static_cast<double>(a.Tracking_sample_counter) + a.Code_phase_samples) / static_cast<double>(a.fs));
|
||||
}
|
||||
|
||||
bool hybrid_observables_cc::interp_trk_obs(Gnss_Synchro &interpolated_obs, const unsigned int &ch, const unsigned long int &rx_clock)
|
||||
bool hybrid_observables_cc::interp_trk_obs(Gnss_Synchro &interpolated_obs, const unsigned int &ch, const uint64_t &rx_clock)
|
||||
{
|
||||
int nearest_element = -1;
|
||||
long int abs_diff;
|
||||
long int old_abs_diff = std::numeric_limits<long int>::max();
|
||||
int64_t abs_diff;
|
||||
int64_t old_abs_diff = std::numeric_limits<int64_t>::max();
|
||||
for (unsigned int i = 0; i < d_gnss_synchro_history->size(ch); i++)
|
||||
{
|
||||
abs_diff = labs(static_cast<long int>(rx_clock) - static_cast<long int>(d_gnss_synchro_history->at(ch, i).Tracking_sample_counter));
|
||||
abs_diff = labs(static_cast<int64_t>(rx_clock) - static_cast<int64_t>(d_gnss_synchro_history->at(ch, i).Tracking_sample_counter));
|
||||
if (old_abs_diff > abs_diff)
|
||||
{
|
||||
old_abs_diff = abs_diff;
|
||||
|
||||
@@ -66,14 +66,14 @@ private:
|
||||
hybrid_make_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, std::string dump_filename);
|
||||
hybrid_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, std::string dump_filename);
|
||||
bool interpolate_data(Gnss_Synchro& out, const unsigned int& ch, const double& ti);
|
||||
bool interp_trk_obs(Gnss_Synchro& interpolated_obs, const unsigned int& ch, const unsigned long int& rx_clock);
|
||||
bool interp_trk_obs(Gnss_Synchro& interpolated_obs, const unsigned int& ch, const uint64_t& rx_clock);
|
||||
double compute_T_rx_s(const Gnss_Synchro& a);
|
||||
void compute_pranges(std::vector<Gnss_Synchro>& data);
|
||||
void update_TOW(std::vector<Gnss_Synchro>& data);
|
||||
int save_matfile();
|
||||
|
||||
//time history
|
||||
boost::circular_buffer<unsigned long int> d_Rx_clock_buffer;
|
||||
boost::circular_buffer<uint64_t> d_Rx_clock_buffer;
|
||||
//Tracking observable history
|
||||
Gnss_circular_deque<Gnss_Synchro>* d_gnss_synchro_history;
|
||||
unsigned int T_rx_clock_step_samples;
|
||||
|
||||
@@ -474,11 +474,11 @@ int galileo_e1b_telemetry_decoder_cc::general_work(int noutput_items __attribute
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = static_cast<double>(d_TOW_at_Preamble_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ private:
|
||||
|
||||
std::deque<Gnss_Synchro> d_symbol_history;
|
||||
|
||||
long unsigned int d_sample_counter;
|
||||
long unsigned int d_preamble_index;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_preamble_index;
|
||||
unsigned int d_stat;
|
||||
bool d_flag_frame_sync;
|
||||
|
||||
|
||||
@@ -487,11 +487,11 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_sample.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = static_cast<double>(d_TOW_at_Preamble_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ private:
|
||||
int d_symbol_counter;
|
||||
int corr_value;
|
||||
unsigned int required_symbols;
|
||||
long unsigned int d_sample_counter;
|
||||
long unsigned int d_preamble_index;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_preamble_index;
|
||||
bool d_flag_frame_sync;
|
||||
bool d_flag_preamble;
|
||||
bool d_dump;
|
||||
|
||||
@@ -423,11 +423,11 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = d_TOW_at_current_symbol;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = 0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -91,15 +91,15 @@ private:
|
||||
std::deque<Gnss_Synchro> d_symbol_history;
|
||||
|
||||
//!< Variables for internal functionality
|
||||
long unsigned int d_sample_counter; //!< Sample counter as an index (1,2,3,..etc) indicating number of samples processed
|
||||
long unsigned int d_preamble_index; //!< Index of sample number where preamble was found
|
||||
unsigned int d_stat; //!< Status of decoder
|
||||
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved
|
||||
bool d_flag_parity; //!< Flag indicating when parity check was achieved (crc check)
|
||||
bool d_flag_preamble; //!< Flag indicating when preamble was found
|
||||
int d_CRC_error_counter; //!< Number of failed CRC operations
|
||||
bool flag_TOW_set; //!< Indicates when time of week is set
|
||||
double delta_t; //!< GPS-GLONASS time offset
|
||||
uint64_t d_sample_counter; //!< Sample counter as an index (1,2,3,..etc) indicating number of samples processed
|
||||
uint64_t d_preamble_index; //!< Index of sample number where preamble was found
|
||||
unsigned int d_stat; //!< Status of decoder
|
||||
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved
|
||||
bool d_flag_parity; //!< Flag indicating when parity check was achieved (crc check)
|
||||
bool d_flag_preamble; //!< Flag indicating when preamble was found
|
||||
int d_CRC_error_counter; //!< Number of failed CRC operations
|
||||
bool flag_TOW_set; //!< Indicates when time of week is set
|
||||
double delta_t; //!< GPS-GLONASS time offset
|
||||
|
||||
//!< Navigation Message variable
|
||||
Glonass_Gnav_Navigation_Message d_nav;
|
||||
|
||||
@@ -423,11 +423,11 @@ int glonass_l2_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = d_TOW_at_current_symbol;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = 0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -89,15 +89,15 @@ private:
|
||||
std::deque<Gnss_Synchro> d_symbol_history;
|
||||
|
||||
//!< Variables for internal functionality
|
||||
long unsigned int d_sample_counter; //!< Sample counter as an index (1,2,3,..etc) indicating number of samples processed
|
||||
long unsigned int d_preamble_index; //!< Index of sample number where preamble was found
|
||||
unsigned int d_stat; //!< Status of decoder
|
||||
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved
|
||||
bool d_flag_parity; //!< Flag indicating when parity check was achieved (crc check)
|
||||
bool d_flag_preamble; //!< Flag indicating when preamble was found
|
||||
int d_CRC_error_counter; //!< Number of failed CRC operations
|
||||
bool flag_TOW_set; //!< Indicates when time of week is set
|
||||
double delta_t; //!< GPS-GLONASS time offset
|
||||
uint64_t d_sample_counter; //!< Sample counter as an index (1,2,3,..etc) indicating number of samples processed
|
||||
uint64_t d_preamble_index; //!< Index of sample number where preamble was found
|
||||
unsigned int d_stat; //!< Status of decoder
|
||||
bool d_flag_frame_sync; //!< Indicate when a frame sync is achieved
|
||||
bool d_flag_parity; //!< Flag indicating when parity check was achieved (crc check)
|
||||
bool d_flag_preamble; //!< Flag indicating when preamble was found
|
||||
int d_CRC_error_counter; //!< Number of failed CRC operations
|
||||
bool flag_TOW_set; //!< Indicates when time of week is set
|
||||
double delta_t; //!< GPS-GLONASS time offset
|
||||
|
||||
//!< Navigation Message variable
|
||||
Glonass_Gnav_Navigation_Message d_nav;
|
||||
|
||||
@@ -457,11 +457,11 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = static_cast<double>(d_TOW_at_Preamble_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
Gnss_Satellite d_satellite;
|
||||
int d_channel;
|
||||
|
||||
unsigned long int d_preamble_time_samples;
|
||||
uint64_t d_preamble_time_samples;
|
||||
|
||||
unsigned int d_TOW_at_Preamble_ms;
|
||||
unsigned int d_TOW_at_current_symbol_ms;
|
||||
|
||||
@@ -210,11 +210,11 @@ int gps_l2c_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = d_TOW_at_current_symbol;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_synchro_data.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = d_TOW_at_Preamble;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -266,11 +266,11 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_synchro_data.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = static_cast<double>(d_TOW_at_Preamble_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp);
|
||||
int64_t acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
|
||||
double acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples;
|
||||
DLOG(INFO) << "Number of seconds between Acquisition and Tracking = " << acq_trk_diff_seconds;
|
||||
@@ -869,7 +869,7 @@ void dll_pll_veml_tracking::log_data(bool integrating)
|
||||
float tmp_VE, tmp_E, tmp_P, tmp_L, tmp_VL;
|
||||
float tmp_float;
|
||||
double tmp_double;
|
||||
unsigned long int tmp_long_int;
|
||||
uint64_t tmp_long_int;
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
if (interchange_iq)
|
||||
@@ -937,7 +937,7 @@ void dll_pll_veml_tracking::log_data(bool integrating)
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
tmp_long_int = d_sample_counter + d_current_prn_length_samples;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_long_int), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_long_int), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_rad;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
@@ -984,7 +984,7 @@ int dll_pll_veml_tracking::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 1;
|
||||
int number_of_float_vars = 17;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -998,11 +998,11 @@ int dll_pll_veml_tracking::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -1016,7 +1016,7 @@ int dll_pll_veml_tracking::save_matfile()
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
@@ -1034,7 +1034,7 @@ int dll_pll_veml_tracking::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_VE[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
@@ -1043,7 +1043,7 @@ int dll_pll_veml_tracking::save_matfile()
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_VL[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(float));
|
||||
@@ -1093,7 +1093,7 @@ int dll_pll_veml_tracking::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_VE", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VE, 0);
|
||||
@@ -1255,7 +1255,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
case 1: // Pull-in
|
||||
{
|
||||
// Signal alignment (skip samples until the incoming signal is aligned with local replica)
|
||||
unsigned long int acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
uint64_t acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
double acq_trk_shif_correction_samples = static_cast<double>(d_current_prn_length_samples) - std::fmod(static_cast<double>(acq_to_trk_delay_samples), static_cast<double>(d_current_prn_length_samples));
|
||||
int samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
if (samples_offset < 0)
|
||||
@@ -1566,7 +1566,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
d_sample_counter += d_current_prn_length_samples;
|
||||
if (current_synchro_data.Flag_valid_symbol_output)
|
||||
{
|
||||
current_synchro_data.fs = static_cast<long int>(trk_parameters.fs_in);
|
||||
current_synchro_data.fs = static_cast<int64_t>(trk_parameters.fs_in);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter;
|
||||
*out[0] = current_synchro_data;
|
||||
return 1;
|
||||
|
||||
@@ -177,8 +177,8 @@ private:
|
||||
// PRN period in samples
|
||||
int d_current_prn_length_samples;
|
||||
// processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -842,7 +842,7 @@ void dll_pll_veml_tracking_fpga::log_data(bool integrating)
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_rad;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
@@ -889,7 +889,7 @@ int dll_pll_veml_tracking_fpga::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 1;
|
||||
int number_of_float_vars = 17;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -903,11 +903,11 @@ int dll_pll_veml_tracking_fpga::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -921,7 +921,7 @@ int dll_pll_veml_tracking_fpga::save_matfile()
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
@@ -939,7 +939,7 @@ int dll_pll_veml_tracking_fpga::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_VE[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
@@ -948,7 +948,7 @@ int dll_pll_veml_tracking_fpga::save_matfile()
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_VL[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(float));
|
||||
@@ -998,7 +998,7 @@ int dll_pll_veml_tracking_fpga::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_VE", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VE, 0);
|
||||
@@ -1464,7 +1464,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
}
|
||||
if (current_synchro_data.Flag_valid_symbol_output)
|
||||
{
|
||||
current_synchro_data.fs = static_cast<long int>(trk_parameters.fs_in);
|
||||
current_synchro_data.fs = static_cast<int64_t>(trk_parameters.fs_in);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples;
|
||||
*out[0] = current_synchro_data;
|
||||
return 1;
|
||||
|
||||
@@ -201,8 +201,8 @@ private:
|
||||
// PRN period in samples
|
||||
int d_current_prn_length_samples;
|
||||
// processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
@@ -219,7 +219,7 @@ private:
|
||||
// extra
|
||||
int d_correlation_length_samples;
|
||||
int d_next_prn_length_samples;
|
||||
unsigned long int d_sample_counter_next;
|
||||
uint64_t d_sample_counter_next;
|
||||
unsigned int d_pull_in = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
using google::LogMessage;
|
||||
|
||||
galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -86,7 +86,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::forecast(int noutput_items,
|
||||
|
||||
|
||||
Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -498,7 +498,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_rad;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef boost::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc> galileo_e1_tcp_c
|
||||
|
||||
galileo_e1_tcp_connector_tracking_cc_sptr
|
||||
galileo_e1_tcp_connector_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
private:
|
||||
friend galileo_e1_tcp_connector_tracking_cc_sptr
|
||||
galileo_e1_tcp_connector_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -95,7 +95,7 @@ private:
|
||||
size_t port_ch0);
|
||||
|
||||
Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
Gnss_Synchro *d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
|
||||
int d_correlation_length_samples;
|
||||
int d_n_correlator_taps;
|
||||
@@ -161,8 +161,8 @@ private:
|
||||
int d_next_prn_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -62,7 +62,7 @@ using google::LogMessage;
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -102,7 +102,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pm
|
||||
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -211,7 +211,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
|
||||
|
||||
d_glonass_freq_ch = 0;
|
||||
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -224,9 +224,9 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -354,7 +354,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -368,11 +368,11 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -384,7 +384,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -402,14 +402,14 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -457,7 +457,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -652,7 +652,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
bool enable_dll_pll;
|
||||
if (d_enable_extended_integration == true)
|
||||
{
|
||||
long int symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
int64_t symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0)
|
||||
{
|
||||
// compute coherent integration and enable tracking loop
|
||||
@@ -880,7 +880,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GLONASS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
private:
|
||||
friend glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
double d_glonass_freq_ch;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
@@ -176,8 +176,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "tracking_discriminators.h"
|
||||
@@ -61,7 +60,7 @@ using google::LogMessage;
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -100,7 +99,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pm
|
||||
}
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -208,7 +207,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
|
||||
d_carrier_doppler_old_hz = 0.0;
|
||||
|
||||
d_glonass_freq_ch = 0;
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -221,9 +220,9 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -309,7 +308,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -323,11 +322,11 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -339,7 +338,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -357,14 +356,14 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -412,7 +411,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -644,7 +643,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
bool enable_dll_pll;
|
||||
if (d_enable_extended_integration == true)
|
||||
{
|
||||
long int symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
int64_t symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0)
|
||||
{
|
||||
// compute coherent integration and enable tracking loop
|
||||
@@ -870,7 +869,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GLONASS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
private:
|
||||
friend glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -101,7 +101,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
glonass_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -118,8 +118,8 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
long d_glonass_freq_ch;
|
||||
int64_t d_fs_in;
|
||||
int64_t d_glonass_freq_ch;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
int d_n_correlator_taps;
|
||||
@@ -179,8 +179,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -59,7 +59,7 @@ using google::LogMessage;
|
||||
|
||||
glonass_l1_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -83,7 +83,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::forecast(int noutput_items,
|
||||
|
||||
|
||||
Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -182,9 +182,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<float>(acq_trk_diff_samples) / static_cast<float>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -306,7 +306,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -320,11 +320,11 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -336,7 +336,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -354,14 +354,14 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -409,7 +409,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -722,7 +722,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_rad;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef boost::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>
|
||||
|
||||
glonass_l1_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
private:
|
||||
friend glonass_l1_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l1_ca_dll_pll_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -91,7 +91,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -105,8 +105,8 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
long d_glonass_freq_ch;
|
||||
int64_t d_fs_in;
|
||||
int64_t d_glonass_freq_ch;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
|
||||
@@ -144,8 +144,8 @@ private:
|
||||
int d_current_prn_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -59,7 +59,7 @@ using google::LogMessage;
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -99,7 +99,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pm
|
||||
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -208,7 +208,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
|
||||
|
||||
d_glonass_freq_ch = 0;
|
||||
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -221,9 +221,9 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -351,7 +351,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -365,11 +365,11 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -381,7 +381,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -399,14 +399,14 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -454,7 +454,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -649,7 +649,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
bool enable_dll_pll;
|
||||
if (d_enable_extended_integration == true)
|
||||
{
|
||||
long int symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
int64_t symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0)
|
||||
{
|
||||
// compute coherent integration and enable tracking loop
|
||||
@@ -877,7 +877,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GLONASS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -56,7 +56,7 @@ typedef boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
private:
|
||||
friend glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
double d_glonass_freq_ch;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
@@ -174,8 +174,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -59,7 +58,7 @@ using google::LogMessage;
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -98,7 +97,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pm
|
||||
}
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -206,7 +205,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc
|
||||
d_carrier_doppler_old_hz = 0.0;
|
||||
|
||||
d_glonass_freq_ch = 0;
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -219,9 +218,9 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -307,7 +306,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -321,11 +320,11 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -337,7 +336,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -355,14 +354,14 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -410,7 +409,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -642,7 +641,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
bool enable_dll_pll;
|
||||
if (d_enable_extended_integration == true)
|
||||
{
|
||||
long int symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
int64_t symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0)
|
||||
{
|
||||
// compute coherent integration and enable tracking loop
|
||||
@@ -868,7 +867,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GLONASS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -57,7 +57,7 @@ typedef boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
private:
|
||||
friend glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -116,8 +116,8 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
long d_glonass_freq_ch;
|
||||
int64_t d_fs_in;
|
||||
int64_t d_glonass_freq_ch;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
int d_n_correlator_taps;
|
||||
@@ -177,8 +177,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -59,7 +59,7 @@ using google::LogMessage;
|
||||
|
||||
glonass_l2_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -83,7 +83,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::forecast(int noutput_items,
|
||||
|
||||
|
||||
Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -182,9 +182,9 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<float>(acq_trk_diff_samples) / static_cast<float>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -306,7 +306,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -320,11 +320,11 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -336,7 +336,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -354,14 +354,14 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -409,7 +409,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -722,7 +722,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_rad;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -53,7 +53,7 @@ typedef boost::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>
|
||||
|
||||
glonass_l2_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
private:
|
||||
friend glonass_l2_ca_dll_pll_tracking_cc_sptr
|
||||
glonass_l2_ca_dll_pll_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -103,8 +103,8 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
long d_glonass_freq_ch;
|
||||
int64_t d_fs_in;
|
||||
int64_t d_glonass_freq_ch;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
|
||||
@@ -142,8 +142,8 @@ private:
|
||||
int d_current_prn_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -51,7 +51,7 @@ using google::LogMessage;
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -91,7 +91,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pmt_t
|
||||
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -195,7 +195,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
d_code_error_filt_chips_s = 0.0;
|
||||
d_carr_phase_error_secs_Ti = 0.0;
|
||||
d_preamble_timestamp_s = 0.0;
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +208,9 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -333,7 +333,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -347,11 +347,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -363,7 +363,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -381,14 +381,14 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -436,7 +436,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -631,7 +631,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
bool enable_dll_pll;
|
||||
if (d_enable_extended_integration == true)
|
||||
{
|
||||
long int symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
int64_t symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0)
|
||||
{
|
||||
// compute coherent integration and enable tracking loop
|
||||
@@ -858,7 +858,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GPS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -56,7 +56,7 @@ typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_cc>
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
private:
|
||||
friend gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -114,7 +114,7 @@ private:
|
||||
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
int d_n_correlator_taps;
|
||||
@@ -170,8 +170,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
@@ -52,7 +51,7 @@ using google::LogMessage;
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -91,7 +90,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pmt_t
|
||||
}
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -195,7 +194,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
d_code_error_filt_chips_Ti = 0.0;
|
||||
d_preamble_timestamp_s = 0.0;
|
||||
d_carr_phase_error_secs_Ti = 0.0;
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +207,9 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
// Doppler effect
|
||||
@@ -336,7 +335,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
std::ifstream::pos_type size;
|
||||
int number_of_double_vars = 11;
|
||||
int number_of_float_vars = 5;
|
||||
int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars +
|
||||
int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
|
||||
sizeof(float) * number_of_float_vars + sizeof(unsigned int);
|
||||
std::ifstream dump_file;
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -350,11 +349,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
long int num_epoch = 0;
|
||||
int64_t num_epoch = 0;
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
size = dump_file.tellg();
|
||||
num_epoch = static_cast<long int>(size) / static_cast<long int>(epoch_size_bytes);
|
||||
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
|
||||
dump_file.seekg(0, std::ios::beg);
|
||||
}
|
||||
else
|
||||
@@ -366,7 +365,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
@@ -384,14 +383,14 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
if (dump_file.is_open())
|
||||
{
|
||||
for (long int i = 0; i < num_epoch; i++)
|
||||
for (int64_t i = 0; i < num_epoch; i++)
|
||||
{
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_E[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_P[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&abs_L[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_I[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&Prompt_Q[i]), sizeof(float));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(unsigned long int));
|
||||
dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count[i]), sizeof(uint64_t));
|
||||
dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz[i]), sizeof(double));
|
||||
dump_file.read(reinterpret_cast<char *>(&code_freq_chips[i]), sizeof(double));
|
||||
@@ -439,7 +438,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -634,7 +633,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
bool enable_dll_pll;
|
||||
if (d_enable_extended_integration == true)
|
||||
{
|
||||
long int symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
int64_t symbol_diff = round(1000.0 * ((static_cast<double>(d_sample_counter) + d_rem_code_phase_samples) / static_cast<double>(d_fs_in) - d_preamble_timestamp_s));
|
||||
if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0)
|
||||
{
|
||||
// compute coherent integration and enable tracking loop
|
||||
@@ -860,7 +859,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GPS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -57,7 +57,7 @@ typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_sc>
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
private:
|
||||
friend gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr
|
||||
gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float pll_bw_hz,
|
||||
@@ -116,7 +116,7 @@ private:
|
||||
Gnss_Synchro* d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
int d_n_correlator_taps;
|
||||
@@ -174,8 +174,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -49,7 +49,7 @@ using google::LogMessage;
|
||||
|
||||
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
|
||||
gps_l1_ca_dll_pll_make_tracking_gpu_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -73,7 +73,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::forecast(int noutput_items,
|
||||
|
||||
|
||||
Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -163,7 +163,7 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
|
||||
d_rem_code_phase_chips = 0.0;
|
||||
d_code_phase_step_chips = 0.0;
|
||||
d_carrier_phase_step_rad = 0.0;
|
||||
//set_min_output_buffer((long int)300);
|
||||
//set_min_output_buffer((int64_t)300);
|
||||
}
|
||||
|
||||
|
||||
@@ -176,9 +176,9 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
double acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp); //-d_vector_length;
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp); //-d_vector_length;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples;
|
||||
acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / static_cast<double>(d_fs_in);
|
||||
//doppler effect
|
||||
@@ -516,7 +516,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_cycles * GPS_TWO_PI;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -53,7 +53,7 @@ typedef boost::shared_ptr<Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc>
|
||||
|
||||
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
|
||||
gps_l1_ca_dll_pll_make_tracking_gpu_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
private:
|
||||
friend gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
|
||||
gps_l1_ca_dll_pll_make_tracking_gpu_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -91,7 +91,7 @@ private:
|
||||
float early_late_space_chips);
|
||||
|
||||
Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -108,8 +108,8 @@ private:
|
||||
Gnss_Synchro *d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_if_freq;
|
||||
long d_fs_in;
|
||||
int64_t d_if_freq;
|
||||
int64_t d_fs_in;
|
||||
|
||||
double d_early_late_spc_chips;
|
||||
int d_n_correlator_taps;
|
||||
@@ -153,8 +153,8 @@ private:
|
||||
int d_correlation_length_samples;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
@@ -58,7 +58,7 @@ using google::LogMessage;
|
||||
|
||||
gps_l1_ca_tcp_connector_tracking_cc_sptr
|
||||
gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -81,7 +81,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::forecast(int noutput_items,
|
||||
|
||||
|
||||
Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
long fs_in,
|
||||
int64_t fs_in,
|
||||
unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
@@ -186,9 +186,9 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
long int acq_trk_diff_samples;
|
||||
int64_t acq_trk_diff_samples;
|
||||
float acq_trk_diff_seconds;
|
||||
acq_trk_diff_samples = static_cast<long int>(d_sample_counter) - static_cast<long int>(d_acq_sample_stamp);
|
||||
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
|
||||
std::cout << "acq_trk_diff_samples=" << acq_trk_diff_samples << std::endl;
|
||||
acq_trk_diff_seconds = static_cast<float>(acq_trk_diff_samples) / static_cast<float>(d_fs_in);
|
||||
//doppler effect
|
||||
@@ -535,7 +535,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_I), sizeof(float));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
|
||||
// PRN start sample stamp
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(unsigned long int));
|
||||
d_dump_file.write(reinterpret_cast<char *>(&d_sample_counter), sizeof(uint64_t));
|
||||
// accumulated carrier phase
|
||||
tmp_float = d_acc_carrier_phase_rad;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef boost::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc> gps_l1_ca_tcp_con
|
||||
|
||||
gps_l1_ca_tcp_connector_tracking_cc_sptr
|
||||
gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float early_late_space_chips,
|
||||
@@ -84,14 +84,14 @@ public:
|
||||
private:
|
||||
friend gps_l1_ca_tcp_connector_tracking_cc_sptr
|
||||
gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float early_late_space_chips,
|
||||
size_t port_ch0);
|
||||
|
||||
Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
long fs_in, unsigned int vector_length,
|
||||
int64_t fs_in, unsigned int vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
float early_late_space_chips,
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
Gnss_Synchro *d_acquisition_gnss_synchro;
|
||||
unsigned int d_channel;
|
||||
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
int d_correlation_length_samples;
|
||||
int d_n_correlator_taps;
|
||||
double d_early_late_spc_chips;
|
||||
@@ -147,8 +147,8 @@ private:
|
||||
double d_sample_counter_seconds;
|
||||
|
||||
//processing samples counters
|
||||
unsigned long int d_sample_counter;
|
||||
unsigned long int d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
// CN0 estimation and lock detector
|
||||
int d_cn0_estimation_counter;
|
||||
|
||||
Reference in New Issue
Block a user