mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-25 11:34:53 +00:00
Replace unsigned long int by uint64_t and long int by int64_t. Fixes #199
This commit is contained in:
@@ -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