mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
fixing some gnuradio-related warnings reported by gcc, so others can be spotted easier
This commit is contained in:
parent
17517625be
commit
45195917c1
@ -307,7 +307,12 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
|
||||
}
|
||||
|
||||
consume_each(1); //one by one
|
||||
return 0;
|
||||
output_items.clear(); // removes a warning
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -344,7 +344,12 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
}
|
||||
|
||||
consume_each(1); //one by one
|
||||
return noutput_items;
|
||||
output_items.clear(); // removes a warning
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -370,7 +370,12 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
}
|
||||
|
||||
consume_each(1); //one by one
|
||||
return noutput_items;
|
||||
output_items.clear(); // removes a warning
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -675,7 +675,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
{
|
||||
d_CAF_vector[doppler_index] = 0;
|
||||
// volk_32f_accumulator_s32f_a(&d_CAF_vector[doppler_index], &d_CAF_vector_I[doppler_index-CAF_bins_half], 2*CAF_bins_half+1);
|
||||
for (int i = doppler_index-CAF_bins_half; i < doppler_index+CAF_bins_half + 1; i++)
|
||||
for (int i = doppler_index - CAF_bins_half; i < static_cast<int>(doppler_index + CAF_bins_half + 1); i++)
|
||||
{
|
||||
d_CAF_vector[doppler_index] += d_CAF_vector_I[i] * (1 - weighting_factor * static_cast<unsigned int>((doppler_index - i)));
|
||||
}
|
||||
@ -685,7 +685,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
{
|
||||
accum[0] = 0;
|
||||
// volk_32f_accumulator_s32f_a(&accum[0], &d_CAF_vector_Q[doppler_index-CAF_bins_half], 2*CAF_bins_half);
|
||||
for (int i = doppler_index-CAF_bins_half; i < doppler_index + CAF_bins_half + 1; i++)
|
||||
for (int i = doppler_index-CAF_bins_half; i < static_cast<int>(doppler_index + CAF_bins_half + 1); i++)
|
||||
{
|
||||
accum[0] += d_CAF_vector_Q[i] * (1 - weighting_factor * static_cast<unsigned int>((doppler_index - i)));
|
||||
}
|
||||
@ -695,11 +695,11 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
}
|
||||
// Final iterations
|
||||
for (int doppler_index = d_num_doppler_bins - CAF_bins_half; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (int doppler_index = d_num_doppler_bins - CAF_bins_half; doppler_index < static_cast<int>(d_num_doppler_bins); doppler_index++)
|
||||
{
|
||||
d_CAF_vector[doppler_index] = 0;
|
||||
// volk_32f_accumulator_s32f_a(&d_CAF_vector[doppler_index], &d_CAF_vector_I[doppler_index-CAF_bins_half], CAF_bins_half + (d_num_doppler_bins-doppler_index));
|
||||
for (int i = doppler_index - CAF_bins_half; i < d_num_doppler_bins; i++)
|
||||
for (int i = doppler_index - CAF_bins_half; i < static_cast<int>(d_num_doppler_bins); i++)
|
||||
{
|
||||
d_CAF_vector[doppler_index] += d_CAF_vector_I[i] * (1 - weighting_factor * (abs(doppler_index - i)));
|
||||
}
|
||||
@ -709,7 +709,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
{
|
||||
accum[0] = 0;
|
||||
// volk_32f_accumulator_s32f_a(&accum[0], &d_CAF_vector_Q[doppler_index-CAF_bins_half], CAF_bins_half + (d_num_doppler_bins-doppler_index));
|
||||
for (int i = doppler_index-CAF_bins_half; i < d_num_doppler_bins; i++)
|
||||
for (int i = doppler_index-CAF_bins_half; i < static_cast<int>(d_num_doppler_bins); i++)
|
||||
{
|
||||
accum[0] += d_CAF_vector_Q[i] * (1 - weighting_factor * (abs(doppler_index - i)));
|
||||
}
|
||||
@ -803,6 +803,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
}
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
|
@ -413,5 +413,6 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -265,10 +265,8 @@ int pcps_acquisition_cc::general_work(int noutput_items,
|
||||
const gr_complex *in = (const gr_complex *)input_items[0]; //Get the input samples pointer
|
||||
|
||||
int effective_fft_size = ( d_bit_transition_flag ? d_fft_size/2 : d_fft_size );
|
||||
size_t offset = ( d_bit_transition_flag ? effective_fft_size : 0 );
|
||||
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size)
|
||||
* static_cast<float>(d_fft_size);
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
@ -442,7 +440,6 @@ int pcps_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
d_sample_counter += d_fft_size * ninput_items[0]; // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
|
||||
acquisition_message = 2;
|
||||
d_channel_internal_queue->push(acquisition_message);
|
||||
|
||||
@ -450,6 +447,7 @@ int pcps_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
|
@ -173,9 +173,12 @@ void pcps_acquisition_fine_doppler_cc::init()
|
||||
|
||||
void pcps_acquisition_fine_doppler_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = d_gnuradio_forecast_samples ; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fine_doppler_cc::reset_grid()
|
||||
@ -519,5 +522,6 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
//DLOG(INFO)<<"d_sample_counter="<<d_sample_counter<<std::endl;
|
||||
d_sample_counter += d_fft_size; // sample counter
|
||||
consume_each(d_fft_size);
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -172,9 +172,12 @@ void pcps_assisted_acquisition_cc::init()
|
||||
|
||||
void pcps_assisted_acquisition_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = d_gnuradio_forecast_samples ; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -482,5 +485,6 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
break;
|
||||
}
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -438,5 +438,6 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -466,5 +466,6 @@ int pcps_multithread_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
consume_each(ninput_items[0]);
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -821,5 +821,6 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
consume_each(ninput_items[0]);
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -577,6 +577,6 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
break;
|
||||
}
|
||||
}
|
||||
//DLOG(INFO) << "END GENERAL WORK";
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -432,5 +432,6 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
output_items.clear(); // removes a warning
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ galileo_e1_observables_cc::galileo_e1_observables_cc(unsigned int nchannels, boo
|
||||
d_dump_filename = dump_filename;
|
||||
d_flag_averaging = flag_averaging;
|
||||
|
||||
for (int i=0;i<d_nchannels;i++)
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
d_acc_carrier_phase_queue_rads.push_back(std::deque<double>(d_nchannels));
|
||||
d_carrier_doppler_queue_hz.push_back(std::deque<double>(d_nchannels));
|
||||
@ -125,6 +125,10 @@ int galileo_e1_observables_cc::general_work (int noutput_items, gr_vector_int &n
|
||||
Gnss_Synchro current_gnss_synchro[d_nchannels];
|
||||
std::map<int,Gnss_Synchro> current_gnss_synchro_map;
|
||||
std::map<int,Gnss_Synchro>::iterator gnss_synchro_iter;
|
||||
if (d_nchannels != ninput_items.size())
|
||||
{
|
||||
LOG(WARNING) << "The Observables block is not well connected";
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Read the GNSS SYNCHRO objects from available channels
|
||||
@ -223,9 +227,10 @@ int galileo_e1_observables_cc::general_work (int noutput_items, gr_vector_int &n
|
||||
A.col(1) = symbol_TOW_vec_s;
|
||||
//A.col(2)=symbol_TOW_vec_s % symbol_TOW_vec_s;
|
||||
arma::mat coef_acc_phase(1,3);
|
||||
coef_acc_phase=arma::pinv(A.t()*A)*A.t()*acc_phase_vec_rads;
|
||||
arma::mat pinv_A = arma::pinv(A.t() * A) * A.t();
|
||||
coef_acc_phase = pinv_A * acc_phase_vec_rads;
|
||||
arma::mat coef_doppler(1,3);
|
||||
coef_doppler=arma::pinv(A.t()*A)*A.t()*dopper_vec_hz;
|
||||
coef_doppler = pinv_A * dopper_vec_hz;
|
||||
arma::vec acc_phase_lin;
|
||||
arma::vec carrier_doppler_lin;
|
||||
acc_phase_lin = coef_acc_phase[0] + coef_acc_phase[1] * desired_symbol_TOW[0];//+coef_acc_phase[2]*desired_symbol_TOW[0]*desired_symbol_TOW[0];
|
||||
@ -267,6 +272,10 @@ int galileo_e1_observables_cc::general_work (int noutput_items, gr_vector_int &n
|
||||
{
|
||||
*out[i] = current_gnss_synchro[i];
|
||||
}
|
||||
return 1; //Output the observables
|
||||
if (noutput_items == 0)
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ gps_l1_ca_observables_cc::gps_l1_ca_observables_cc(unsigned int nchannels, boost
|
||||
d_dump_filename = dump_filename;
|
||||
d_flag_averaging = flag_averaging;
|
||||
|
||||
for (int i = 0; i < d_nchannels; i++)
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
d_acc_carrier_phase_queue_rads.push_back(std::deque<double>(d_nchannels));
|
||||
d_carrier_doppler_queue_hz.push_back(std::deque<double>(d_nchannels));
|
||||
@ -120,6 +120,11 @@ int gps_l1_ca_observables_cc::general_work (int noutput_items, gr_vector_int &ni
|
||||
std::map<int,Gnss_Synchro> current_gnss_synchro_map;
|
||||
std::map<int,Gnss_Synchro>::iterator gnss_synchro_iter;
|
||||
|
||||
if (d_nchannels != ninput_items.size())
|
||||
{
|
||||
LOG(WARNING) << "The Observables block is not well connected";
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Read the GNSS SYNCHRO objects from available channels
|
||||
*/
|
||||
@ -229,9 +234,10 @@ int gps_l1_ca_observables_cc::general_work (int noutput_items, gr_vector_int &ni
|
||||
A.col(1) = symbol_TOW_vec_s;
|
||||
//A.col(2)=symbol_TOW_vec_s % symbol_TOW_vec_s;
|
||||
arma::mat coef_acc_phase(1,3);
|
||||
coef_acc_phase = arma::pinv(A.t() * A) * A.t() * acc_phase_vec_rads;
|
||||
arma::mat pinv_A = arma::pinv(A.t() * A) * A.t();
|
||||
coef_acc_phase = pinv_A * acc_phase_vec_rads;
|
||||
arma::mat coef_doppler(1,3);
|
||||
coef_doppler = arma::pinv(A.t() * A) * A.t() * dopper_vec_hz;
|
||||
coef_doppler = pinv_A * dopper_vec_hz;
|
||||
arma::vec acc_phase_lin;
|
||||
arma::vec carrier_doppler_lin;
|
||||
acc_phase_lin = coef_acc_phase[0] + coef_acc_phase[1] * desired_symbol_TOW[0];//+coef_acc_phase[2]*desired_symbol_TOW[0]*desired_symbol_TOW[0];
|
||||
@ -281,6 +287,10 @@ int gps_l1_ca_observables_cc::general_work (int noutput_items, gr_vector_int &ni
|
||||
{
|
||||
*out[i] = current_gnss_synchro[i];
|
||||
}
|
||||
return 1; // Output the observables
|
||||
if (noutput_items == 0)
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -121,6 +121,11 @@ int hybrid_observables_cc::general_work (int noutput_items, gr_vector_int &ninpu
|
||||
std::map<int,Gnss_Synchro> current_gnss_synchro_map_gps_only;
|
||||
std::map<int,Gnss_Synchro>::iterator gnss_synchro_iter;
|
||||
|
||||
if (d_nchannels != ninput_items.size())
|
||||
{
|
||||
LOG(WARNING) << "The Observables block is not well connected";
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Read the GNSS SYNCHRO objects from available channels
|
||||
*/
|
||||
@ -228,7 +233,11 @@ int hybrid_observables_cc::general_work (int noutput_items, gr_vector_int &ninpu
|
||||
{
|
||||
*out[i] = current_gnss_synchro[i];
|
||||
}
|
||||
//todo: enable output when the hybrid algorithm is completed
|
||||
return 1; //Output the observables
|
||||
|
||||
if (noutput_items == 0)
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -112,6 +112,11 @@ int mixed_observables_cc::general_work (int noutput_items, gr_vector_int &ninput
|
||||
std::map<int,Gnss_Synchro> current_gnss_synchro_map;
|
||||
std::map<int,Gnss_Synchro>::iterator gnss_synchro_iter;
|
||||
|
||||
if (d_nchannels != ninput_items.size())
|
||||
{
|
||||
LOG(WARNING) << "The Observables block is not well connected";
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Read the GNSS SYNCHRO objects from available channels
|
||||
*/
|
||||
@ -207,6 +212,10 @@ int mixed_observables_cc::general_work (int noutput_items, gr_vector_int &ninput
|
||||
{
|
||||
*out[i] = current_gnss_synchro[i];
|
||||
}
|
||||
return 1; // Output the observables
|
||||
if (noutput_items == 0)
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -384,6 +384,11 @@ gr_vector_void_star &output_items)
|
||||
}
|
||||
}
|
||||
|
||||
if((noutput_items == 0) || (ninput_items.size() != 0) || input_items[0] == 0)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
// Tell runtime system how many output items we produced.
|
||||
return 1;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ int unpack_2bit_samples::work(int noutput_items,
|
||||
{
|
||||
if( swap_endian_bytes_ )
|
||||
{
|
||||
for(int i = 0; i < ninput_bytes; ++i)
|
||||
for(unsigned int i = 0; i < ninput_bytes; ++i)
|
||||
{
|
||||
// Read packed input sample (1 byte = 4 samples)
|
||||
raw_byte.byte = in[i];
|
||||
@ -174,7 +174,7 @@ int unpack_2bit_samples::work(int noutput_items,
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i = 0; i < ninput_bytes; ++i )
|
||||
for(unsigned int i = 0; i < ninput_bytes; ++i )
|
||||
{
|
||||
|
||||
// Read packed input sample (1 byte = 4 samples)
|
||||
@ -192,7 +192,7 @@ int unpack_2bit_samples::work(int noutput_items,
|
||||
|
||||
if( swap_endian_bytes_ )
|
||||
{
|
||||
for(int i = 0; i < ninput_bytes; ++i)
|
||||
for(unsigned int i = 0; i < ninput_bytes; ++i)
|
||||
{
|
||||
// Read packed input sample (1 byte = 4 samples)
|
||||
raw_byte.byte = in[i];
|
||||
@ -206,7 +206,7 @@ int unpack_2bit_samples::work(int noutput_items,
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i = 0; i < ninput_bytes; ++i )
|
||||
for(unsigned int i = 0; i < ninput_bytes; ++i )
|
||||
{
|
||||
|
||||
// Read packed input sample (1 byte = 4 samples)
|
||||
|
@ -62,14 +62,10 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./navigation.dat";
|
||||
DLOG(INFO) << "role " << role;
|
||||
DLOG(INFO) << "vector length " << vector_length_;
|
||||
vector_length_ = configuration->property(role + ".vector_length", 2048);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
int fs_in;
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = galileo_e1b_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me
|
||||
telemetry_decoder_ = galileo_e1b_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
// set the navigation msg queue;
|
||||
telemetry_decoder_->set_ephemeris_queue(&global_galileo_ephemeris_queue);
|
||||
|
@ -66,14 +66,10 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* c
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./navigation.dat";
|
||||
DLOG(INFO) << "role " << role;
|
||||
DLOG(INFO) << "vector length " << vector_length_;
|
||||
vector_length_ = configuration->property(role + ".vector_length", 2048);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
int fs_in;
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = galileo_e5a_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me
|
||||
telemetry_decoder_ = galileo_e5a_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
// set the navigation msg queue;
|
||||
telemetry_decoder_->set_ephemeris_queue(&global_galileo_ephemeris_queue);
|
||||
|
@ -89,7 +89,6 @@ private:
|
||||
galileo_e5a_telemetry_decoder_cc_sptr telemetry_decoder_;
|
||||
Gnss_Satellite satellite_;
|
||||
int channel_;
|
||||
unsigned int vector_length_;
|
||||
std::string item_type_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
|
@ -61,14 +61,10 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./navigation.dat";
|
||||
DLOG(INFO) << "role " << role;
|
||||
DLOG(INFO) << "vector length " << vector_length_;
|
||||
vector_length_ = configuration->property(role + ".vector_length", 2048);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
int fs_in;
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me
|
||||
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
// set the navigation msg queue;
|
||||
telemetry_decoder_->set_ephemeris_queue(&global_gps_ephemeris_queue);
|
||||
|
@ -61,14 +61,10 @@ GpsL2MTelemetryDecoder::GpsL2MTelemetryDecoder(ConfigurationInterface* configura
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./navigation.dat";
|
||||
DLOG(INFO) << "role " << role;
|
||||
DLOG(INFO) << "vector length " << vector_length_;
|
||||
vector_length_ = configuration->property(role + ".vector_length", 2048);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
int fs_in;
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = gps_l2_m_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me
|
||||
telemetry_decoder_ = gps_l2_m_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
// set the navigation msg queue;
|
||||
telemetry_decoder_->set_ephemeris_queue(&global_gps_cnav_ephemeris_queue);
|
||||
|
@ -61,14 +61,10 @@ SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(ConfigurationInterface* configura
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./navigation.dat";
|
||||
DLOG(INFO) << "role " << role;
|
||||
DLOG(INFO) << "vector length " << vector_length_;
|
||||
vector_length_ = configuration->property(role + ".vector_length", 2048);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
int fs_in;
|
||||
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me
|
||||
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
|
||||
channel_ = 0;
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
// set the queues;
|
||||
|
@ -50,19 +50,20 @@ using google::LogMessage;
|
||||
|
||||
|
||||
galileo_e1b_telemetry_decoder_cc_sptr
|
||||
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
{
|
||||
return galileo_e1b_telemetry_decoder_cc_sptr(new galileo_e1b_telemetry_decoder_cc(satellite, if_freq,
|
||||
fs_in, vector_length, queue, dump));
|
||||
return galileo_e1b_telemetry_decoder_cc_sptr(new galileo_e1b_telemetry_decoder_cc(satellite, queue, dump));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void galileo_e1b_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if(noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = GALILEO_INAV_PAGE_SYMBOLS; // set the required sample history
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1b_telemetry_decoder_cc::viterbi_decoder(double *page_part_symbols, int *page_part_bits)
|
||||
@ -116,10 +117,6 @@ void galileo_e1b_telemetry_decoder_cc::deinterleaver(int rows, int cols, double
|
||||
|
||||
galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
|
||||
Gnss_Satellite satellite,
|
||||
long if_freq,
|
||||
long fs_in,
|
||||
unsigned
|
||||
int vector_length,
|
||||
boost::shared_ptr<gr::msg_queue> queue,
|
||||
bool dump) :
|
||||
gr::block("galileo_e1b_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
@ -130,9 +127,7 @@ galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
LOG(INFO) << "Initializing GALILEO E1B TELEMETRY PROCESSING";
|
||||
d_vector_length = vector_length;
|
||||
d_samples_per_symbol = ( Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS ) / Galileo_E1_B_SYMBOL_RATE_BPS;
|
||||
d_fs_in = fs_in;
|
||||
|
||||
// set the preamble
|
||||
unsigned short int preambles_bits[GALILEO_INAV_PREAMBLE_LENGTH_BITS] = GALILEO_INAV_PREAMBLE;
|
||||
@ -499,6 +494,10 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
}
|
||||
//todo: implement averaging
|
||||
d_average_count++;
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
if (d_average_count == d_decimation_output_factor)
|
||||
{
|
||||
d_average_count = 0;
|
||||
|
@ -54,8 +54,7 @@ class galileo_e1b_telemetry_decoder_cc;
|
||||
|
||||
typedef boost::shared_ptr<galileo_e1b_telemetry_decoder_cc> galileo_e1b_telemetry_decoder_cc_sptr;
|
||||
|
||||
galileo_e1b_telemetry_decoder_cc_sptr galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e1b_telemetry_decoder_cc_sptr galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the INAV data defined in Galileo ICD
|
||||
@ -92,10 +91,8 @@ public:
|
||||
|
||||
private:
|
||||
friend galileo_e1b_telemetry_decoder_cc_sptr
|
||||
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in,unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e1b_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e1b_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
|
||||
|
||||
@ -105,7 +102,7 @@ private:
|
||||
|
||||
unsigned short int d_preambles_bits[GALILEO_INAV_PREAMBLE_LENGTH_BITS];
|
||||
|
||||
signed int *d_preambles_symbols;
|
||||
int *d_preambles_symbols;
|
||||
unsigned int d_samples_per_symbol;
|
||||
int d_symbols_per_preamble;
|
||||
|
||||
@ -118,8 +115,6 @@ private:
|
||||
bool d_flag_preamble;
|
||||
int d_CRC_error_counter;
|
||||
|
||||
long d_fs_in;
|
||||
|
||||
// navigation message vars
|
||||
Galileo_Navigation_Message d_nav;
|
||||
|
||||
@ -133,7 +128,6 @@ private:
|
||||
concurrent_queue<Galileo_Almanac> *d_almanac_queue;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> d_queue;
|
||||
unsigned int d_vector_length;
|
||||
bool d_dump;
|
||||
Gnss_Satellite d_satellite;
|
||||
int d_channel;
|
||||
@ -151,7 +145,6 @@ private:
|
||||
bool flag_TOW_set;
|
||||
double delta_t; //GPS-GALILEO time offset
|
||||
|
||||
|
||||
std::string d_dump_filename;
|
||||
std::ofstream d_dump_file;
|
||||
};
|
||||
|
@ -55,18 +55,19 @@ using google::LogMessage;
|
||||
|
||||
|
||||
galileo_e5a_telemetry_decoder_cc_sptr
|
||||
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
{
|
||||
return galileo_e5a_telemetry_decoder_cc_sptr(new galileo_e5a_telemetry_decoder_cc(satellite, if_freq,
|
||||
fs_in, vector_length, queue, dump));
|
||||
return galileo_e5a_telemetry_decoder_cc_sptr(new galileo_e5a_telemetry_decoder_cc(satellite, queue, dump));
|
||||
}
|
||||
|
||||
void galileo_e5a_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
|
||||
{
|
||||
//ninput_items_required[0] = GALILEO_FNAV_SAMPLES_PER_PAGE; // set the required sample history
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = GALILEO_FNAV_CODES_PER_PREAMBLE;
|
||||
}
|
||||
}
|
||||
|
||||
void galileo_e5a_telemetry_decoder_cc::viterbi_decoder(double *page_part_symbols, int *page_part_bits)
|
||||
{
|
||||
@ -192,10 +193,6 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols,int fram
|
||||
|
||||
galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
|
||||
Gnss_Satellite satellite,
|
||||
long if_freq,
|
||||
long fs_in,
|
||||
unsigned
|
||||
int vector_length,
|
||||
boost::shared_ptr<gr::msg_queue> queue,
|
||||
bool dump) :
|
||||
gr::block("galileo_e5a_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
@ -206,9 +203,7 @@ galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
LOG(INFO) << "GALILEO E5A TELEMETRY PROCESSING: satellite " << d_satellite;
|
||||
d_vector_length = vector_length;
|
||||
//d_samples_per_symbol = ( Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS ) / Galileo_E1_B_SYMBOL_RATE_BPS;
|
||||
d_fs_in = fs_in;
|
||||
|
||||
// set the preamble
|
||||
//unsigned short int preambles_bits[GALILEO_FNAV_PREAMBLE_LENGTH_BITS] = GALILEO_FNAV_PREAMBLE;
|
||||
@ -585,6 +580,10 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
d_sample_counter++; //count for the processed samples
|
||||
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||
*out[0] = current_synchro_data;
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,7 @@ class galileo_e5a_telemetry_decoder_cc;
|
||||
|
||||
typedef boost::shared_ptr<galileo_e5a_telemetry_decoder_cc> galileo_e5a_telemetry_decoder_cc_sptr;
|
||||
|
||||
galileo_e5a_telemetry_decoder_cc_sptr galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e5a_telemetry_decoder_cc_sptr galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
|
||||
/*!
|
||||
@ -90,10 +89,8 @@ public:
|
||||
|
||||
private:
|
||||
friend galileo_e5a_telemetry_decoder_cc_sptr
|
||||
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in,unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e5a_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
galileo_e5a_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
|
||||
|
||||
@ -101,7 +98,7 @@ private:
|
||||
|
||||
void decode_word(double *page_symbols,int frame_length);
|
||||
|
||||
signed int d_preamble_bits[GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
int d_preamble_bits[GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
// signed int d_page_symbols[GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
double d_page_symbols[GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
|
||||
// signed int *d_preamble_symbols;
|
||||
@ -120,8 +117,6 @@ private:
|
||||
bool d_flag_preamble;
|
||||
int d_CRC_error_counter;
|
||||
|
||||
long d_fs_in;
|
||||
|
||||
// navigation message vars
|
||||
Galileo_Fnav_Message d_nav;
|
||||
|
||||
@ -135,7 +130,6 @@ private:
|
||||
concurrent_queue<Galileo_Almanac> *d_almanac_queue;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> d_queue;
|
||||
unsigned int d_vector_length;
|
||||
bool d_dump;
|
||||
Gnss_Satellite d_satellite;
|
||||
int d_channel;
|
||||
|
@ -52,31 +52,28 @@ using google::LogMessage;
|
||||
* \todo name and move the magic numbers to GPS_L1_CA.h
|
||||
*/
|
||||
gps_l1_ca_telemetry_decoder_cc_sptr
|
||||
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
{
|
||||
return gps_l1_ca_telemetry_decoder_cc_sptr(new gps_l1_ca_telemetry_decoder_cc(satellite, if_freq,
|
||||
fs_in, vector_length, queue, dump));
|
||||
return gps_l1_ca_telemetry_decoder_cc_sptr(new gps_l1_ca_telemetry_decoder_cc(satellite, queue, dump));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void gps_l1_ca_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
for (unsigned i = 0; i < 3; i++)
|
||||
{
|
||||
ninput_items_required[i] = d_samples_per_bit * 8; //set the required sample history
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
|
||||
Gnss_Satellite satellite,
|
||||
long if_freq,
|
||||
long fs_in,
|
||||
unsigned
|
||||
int vector_length,
|
||||
boost::shared_ptr<gr::msg_queue> queue,
|
||||
bool dump) :
|
||||
gr::block("gps_navigation_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
@ -86,9 +83,7 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
|
||||
d_queue = queue;
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
d_vector_length = vector_length;
|
||||
d_samples_per_bit = ( GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS ) / GPS_CA_TELEMETRY_RATE_BITS_SECOND;
|
||||
d_fs_in = fs_in;
|
||||
//d_preamble_duration_seconds = (1.0 / GPS_CA_TELEMETRY_RATE_BITS_SECOND) * GPS_CA_PREAMBLE_LENGTH_BITS;
|
||||
//std::cout<<"d_preamble_duration_seconds="<<d_preamble_duration_seconds<<"\r\n";
|
||||
// set the preamble
|
||||
@ -371,6 +366,10 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
//todo: implement averaging
|
||||
|
||||
d_average_count++;
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
if (d_average_count == d_decimation_output_factor)
|
||||
{
|
||||
d_average_count = 0;
|
||||
|
@ -48,8 +48,7 @@ class gps_l1_ca_telemetry_decoder_cc;
|
||||
typedef boost::shared_ptr<gps_l1_ca_telemetry_decoder_cc> gps_l1_ca_telemetry_decoder_cc_sptr;
|
||||
|
||||
gps_l1_ca_telemetry_decoder_cc_sptr
|
||||
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the NAV data defined in IS-GPS-200E
|
||||
@ -90,11 +89,9 @@ public:
|
||||
|
||||
private:
|
||||
friend gps_l1_ca_telemetry_decoder_cc_sptr
|
||||
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in,unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
gps_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
bool gps_word_parityCheck(unsigned int gpsword);
|
||||
|
||||
@ -102,7 +99,7 @@ private:
|
||||
unsigned short int d_preambles_bits[GPS_CA_PREAMBLE_LENGTH_BITS];
|
||||
// class private vars
|
||||
|
||||
signed int *d_preambles_symbols;
|
||||
int *d_preambles_symbols;
|
||||
unsigned int d_samples_per_bit;
|
||||
long unsigned int d_sample_counter;
|
||||
long unsigned int d_preamble_index;
|
||||
@ -125,14 +122,12 @@ private:
|
||||
int d_average_count;
|
||||
int d_decimation_output_factor;
|
||||
|
||||
long d_fs_in;
|
||||
//double d_preamble_duration_seconds;
|
||||
// navigation message vars
|
||||
Gps_Navigation_Message d_nav;
|
||||
GpsL1CaSubframeFsm d_GPS_FSM;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> d_queue;
|
||||
unsigned int d_vector_length;
|
||||
bool d_dump;
|
||||
Gnss_Satellite d_satellite;
|
||||
int d_channel;
|
||||
|
@ -48,21 +48,15 @@ using google::LogMessage;
|
||||
|
||||
|
||||
gps_l2_m_telemetry_decoder_cc_sptr
|
||||
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
{
|
||||
return gps_l2_m_telemetry_decoder_cc_sptr(new gps_l2_m_telemetry_decoder_cc(satellite, if_freq,
|
||||
fs_in, vector_length, queue, dump));
|
||||
return gps_l2_m_telemetry_decoder_cc_sptr(new gps_l2_m_telemetry_decoder_cc(satellite, queue, dump));
|
||||
}
|
||||
|
||||
|
||||
|
||||
gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc(
|
||||
Gnss_Satellite satellite,
|
||||
long if_freq,
|
||||
long fs_in,
|
||||
unsigned
|
||||
int vector_length,
|
||||
boost::shared_ptr<gr::msg_queue> queue,
|
||||
bool dump) :
|
||||
gr::block("gps_l2_m_telemetry_decoder_cc",
|
||||
@ -73,7 +67,6 @@ gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc(
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
LOG(INFO) << "GPS L2C M TELEMETRY PROCESSING: satellite " << d_satellite;
|
||||
d_fs_in = fs_in;
|
||||
d_block_size = GPS_L2_SAMPLES_PER_SYMBOL * GPS_L2_SYMBOLS_PER_BIT * GPS_L2_CNAV_DATA_PAGE_BITS * 2; // two CNAV frames
|
||||
d_decimation_output_factor = 0;
|
||||
//set_output_multiple (1);
|
||||
@ -98,10 +91,13 @@ gps_l2_m_telemetry_decoder_cc::~gps_l2_m_telemetry_decoder_cc()
|
||||
|
||||
|
||||
void gps_l2_m_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
unsigned ninputs = ninput_items_required.size ();
|
||||
for (unsigned i = 0; i < ninputs; i++)
|
||||
ninput_items_required[i] = noutput_items;
|
||||
}
|
||||
//LOG(INFO) << "forecast(): " << "noutput_items=" << noutput_items << "\tninput_items_required ninput_items_required.size()=" << ninput_items_required.size();
|
||||
}
|
||||
|
||||
@ -262,6 +258,10 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_in
|
||||
}
|
||||
|
||||
d_average_count++;
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
if (d_average_count == d_decimation_output_factor)
|
||||
{
|
||||
d_average_count = 0;
|
||||
|
@ -53,8 +53,7 @@ class gps_l2_m_telemetry_decoder_cc;
|
||||
typedef boost::shared_ptr<gps_l2_m_telemetry_decoder_cc> gps_l2_m_telemetry_decoder_cc_sptr;
|
||||
|
||||
gps_l2_m_telemetry_decoder_cc_sptr
|
||||
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
|
||||
@ -87,17 +86,14 @@ public:
|
||||
|
||||
private:
|
||||
friend gps_l2_m_telemetry_decoder_cc_sptr
|
||||
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in,unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l2_m_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
gps_l2_m_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
|
||||
void align_samples();
|
||||
|
||||
concurrent_queue<Gps_CNAV_Iono> *d_iono_queue;
|
||||
concurrent_queue<Gps_CNAV_Ephemeris> *d_ephemeris_queue;
|
||||
long d_fs_in;
|
||||
|
||||
bool d_dump;
|
||||
Gnss_Satellite d_satellite;
|
||||
|
@ -48,21 +48,15 @@ using google::LogMessage;
|
||||
|
||||
|
||||
sbas_l1_telemetry_decoder_cc_sptr
|
||||
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
|
||||
{
|
||||
return sbas_l1_telemetry_decoder_cc_sptr(new sbas_l1_telemetry_decoder_cc(satellite, if_freq,
|
||||
fs_in, vector_length, queue, dump));
|
||||
return sbas_l1_telemetry_decoder_cc_sptr(new sbas_l1_telemetry_decoder_cc(satellite, queue, dump));
|
||||
}
|
||||
|
||||
|
||||
|
||||
sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc(
|
||||
Gnss_Satellite satellite,
|
||||
long if_freq,
|
||||
long fs_in,
|
||||
unsigned
|
||||
int vector_length,
|
||||
boost::shared_ptr<gr::msg_queue> queue,
|
||||
bool dump) :
|
||||
gr::block("sbas_l1_telemetry_decoder_cc",
|
||||
@ -73,7 +67,6 @@ sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc(
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
LOG(INFO) << "SBAS L1 TELEMETRY PROCESSING: satellite " << d_satellite;
|
||||
d_fs_in = fs_in;
|
||||
d_block_size = d_samples_per_symbol * d_symbols_per_bit * d_block_size_in_bits;
|
||||
d_channel = 0;
|
||||
set_output_multiple (1);
|
||||
@ -187,6 +180,10 @@ int sbas_l1_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int
|
||||
current_synchro_data[i].Flag_valid_word = false; // indicate to observable block that this synchro object isn't valid for pseudorange computation
|
||||
}
|
||||
consume_each(noutput_items); // tell scheduler input items consumed
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return noutput_items; // tell scheduler output items produced
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,7 @@ class sbas_l1_telemetry_decoder_cc;
|
||||
typedef boost::shared_ptr<sbas_l1_telemetry_decoder_cc> sbas_l1_telemetry_decoder_cc_sptr;
|
||||
|
||||
sbas_l1_telemetry_decoder_cc_sptr
|
||||
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
|
||||
@ -83,10 +82,8 @@ public:
|
||||
|
||||
private:
|
||||
friend sbas_l1_telemetry_decoder_cc_sptr
|
||||
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in,unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
sbas_l1_telemetry_decoder_cc(Gnss_Satellite satellite, long if_freq, long fs_in, unsigned
|
||||
int vector_length, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
sbas_l1_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
|
||||
|
||||
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
|
||||
void align_samples();
|
||||
@ -95,8 +92,6 @@ private:
|
||||
static const int d_symbols_per_bit = 2;
|
||||
static const int d_block_size_in_bits = 30;
|
||||
|
||||
long d_fs_in;
|
||||
|
||||
bool d_dump;
|
||||
Gnss_Satellite d_satellite;
|
||||
int d_channel;
|
||||
|
@ -83,9 +83,12 @@ galileo_e1_dll_pll_veml_make_tracking_cc(
|
||||
|
||||
void galileo_e1_dll_pll_veml_tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc(
|
||||
@ -210,10 +213,10 @@ void galileo_e1_dll_pll_veml_tracking_cc::start_tracking()
|
||||
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_rem_code_phase_samples = 0.0;
|
||||
d_rem_carr_phase_rad = 0;
|
||||
d_acc_carrier_phase_rad = 0;
|
||||
d_rem_carr_phase_rad = 0.0;
|
||||
d_acc_carrier_phase_rad = 0.0;
|
||||
|
||||
d_acc_code_phase_secs = 0;
|
||||
d_acc_code_phase_secs = 0.0;
|
||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
|
||||
d_current_prn_length_samples = d_vector_length;
|
||||
|
||||
@ -326,7 +329,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
|
||||
double acq_trk_shif_correction_samples;
|
||||
int acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::fmod(static_cast<double>(acq_to_trk_delay_samples), static_cast<double>(d_current_prn_length_samples));
|
||||
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
d_sample_counter = d_sample_counter + samples_offset; //count for the processed samples
|
||||
d_pull_in = false;
|
||||
@ -394,7 +397,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
|
||||
double T_prn_seconds;
|
||||
double T_prn_samples;
|
||||
double K_blk_samples;
|
||||
// Compute the next buffer lenght based in the new period of the PRN sequence and the code phase error estimation
|
||||
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
|
||||
T_chip_seconds = 1.0 / d_code_freq_chips;
|
||||
T_prn_seconds = T_chip_seconds * Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
T_prn_samples = T_prn_seconds * static_cast<double>(d_fs_in);
|
||||
@ -582,7 +585,11 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
|
||||
}
|
||||
consume_each(d_current_prn_length_samples); // this is required for gr_block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
//std::cout<<"Galileo tracking output at sample "<<d_sample_counter<<std::endl;
|
||||
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,12 @@ galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking
|
||||
|
||||
void Galileo_E1_Tcp_Connector_Tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = (int)d_vector_length*2; // set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
@ -589,6 +592,10 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
|
||||
}
|
||||
consume_each(d_current_prn_length_samples); // this is needed in gr::block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,12 @@ galileo_e5a_dll_pll_make_tracking_cc(
|
||||
|
||||
void Galileo_E5a_Dll_Pll_Tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length)*2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
|
||||
long if_freq,
|
||||
@ -828,6 +831,10 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
|
||||
d_secondary_delay = (d_secondary_delay + 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH;
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -84,9 +84,12 @@ galileo_volk_e1_dll_pll_veml_make_tracking_cc(
|
||||
|
||||
void galileo_volk_e1_dll_pll_veml_tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
galileo_volk_e1_dll_pll_veml_tracking_cc::galileo_volk_e1_dll_pll_veml_tracking_cc(
|
||||
@ -340,10 +343,10 @@ galileo_volk_e1_dll_pll_veml_tracking_cc::~galileo_volk_e1_dll_pll_veml_tracking
|
||||
int galileo_volk_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
double carr_error_hz;
|
||||
double carr_error_filt_hz;
|
||||
double code_error_chips;
|
||||
double code_error_filt_chips;
|
||||
double carr_error_hz = 0.0;
|
||||
double carr_error_filt_hz = 0.0;
|
||||
double code_error_chips = 0.0;
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
@ -411,7 +414,7 @@ int galileo_volk_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr
|
||||
|
||||
// ################## PLL ##########################################################
|
||||
// PLL discriminator
|
||||
carr_error_hz = pll_cloop_two_quadrant_atan(*d_Prompt) / static_cast<float>(GPS_TWO_PI);
|
||||
carr_error_hz = pll_cloop_two_quadrant_atan(*d_Prompt) / GPS_TWO_PI;
|
||||
// Carrier discriminator filter
|
||||
carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz);
|
||||
// New carrier Doppler frequency estimation
|
||||
@ -629,7 +632,11 @@ int galileo_volk_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr
|
||||
}
|
||||
consume_each(d_current_prn_length_samples); // this is required for gr_block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
//std::cout<<"Galileo tracking output at sample "<<d_sample_counter<<std::endl;
|
||||
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -83,9 +83,12 @@ gps_l1_ca_dll_fll_pll_tracking_cc_sptr gps_l1_ca_dll_fll_pll_make_tracking_cc(
|
||||
|
||||
|
||||
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = d_vector_length * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc(
|
||||
@ -650,6 +653,10 @@ int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vecto
|
||||
}
|
||||
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -76,9 +76,12 @@ gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
|
||||
void gps_l1_ca_dll_pll_c_aid_tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -322,7 +325,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vec
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carrier_phase_rad, d_carrier_phase_step_rad, d_rem_code_phase_chips, d_code_phase_step_chips, d_correlation_length_samples);
|
||||
|
||||
// UPDATE INTEGRATION TIME
|
||||
CURRENT_INTEGRATION_TIME_S=(static_cast<double>(d_correlation_length_samples)/static_cast<double>(d_fs_in));
|
||||
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_correlation_length_samples) / static_cast<double>(d_fs_in);
|
||||
|
||||
// ################## PLL ##########################################################
|
||||
// Update PLL discriminator [rads/Ti -> Secs/Ti]
|
||||
@ -363,7 +366,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vec
|
||||
old_d_rem_code_phase_samples=d_rem_code_phase_samples;
|
||||
d_rem_code_phase_samples = K_blk_samples - static_cast<double>(d_correlation_length_samples); //rounding error < 1 sample
|
||||
|
||||
|
||||
// UPDATE REMNANT CARRIER PHASE
|
||||
CORRECTED_INTEGRATION_TIME_S=(static_cast<double>(d_correlation_length_samples)/static_cast<double>(d_fs_in));
|
||||
//remnant carrier phase [rad]
|
||||
@ -372,7 +374,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vec
|
||||
//carrier phase accumulator prior to update the PLL estimators (accumulated carrier in this loop depends on the old estimations!)
|
||||
d_acc_carrier_phase_cycles -= d_carrier_doppler_hz * CORRECTED_INTEGRATION_TIME_S;
|
||||
|
||||
|
||||
//################### PLL COMMANDS #################################################
|
||||
//carrier phase step (NCO phase increment per sample) [rads/sample]
|
||||
d_carrier_phase_step_rad = GPS_TWO_PI * d_carrier_doppler_hz / static_cast<double>(d_fs_in);
|
||||
@ -383,7 +384,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vec
|
||||
//remnant code phase [chips]
|
||||
d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
|
||||
|
||||
|
||||
// ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
|
||||
if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES)
|
||||
{
|
||||
@ -547,6 +547,10 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vec
|
||||
consume_each(d_correlation_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter += d_correlation_length_samples; //count for the processed samples
|
||||
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -81,9 +81,12 @@ gps_l1_ca_dll_pll_make_optim_tracking_cc(
|
||||
|
||||
void Gps_L1_Ca_Dll_Pll_Optim_Tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = d_gnuradio_forecast_samples; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -338,10 +341,10 @@ int Gps_L1_Ca_Dll_Pll_Optim_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
{
|
||||
// stream to collect cout calls to improve thread safety
|
||||
std::stringstream tmp_str_stream;
|
||||
double carr_error_hz;
|
||||
double carr_error_filt_hz;
|
||||
double code_error_chips;
|
||||
double code_error_filt_chips;
|
||||
double carr_error_hz = 0.0;
|
||||
double carr_error_filt_hz = 0.0;
|
||||
double code_error_chips = 0.0;
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
@ -604,6 +607,10 @@ int Gps_L1_Ca_Dll_Pll_Optim_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
|
||||
consume_each(d_current_prn_length_samples); // this is necesary in gr_block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,12 @@ gps_l1_ca_dll_pll_make_tracking_cc(
|
||||
|
||||
void Gps_L1_Ca_Dll_Pll_Tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -204,16 +207,16 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_HZ;
|
||||
T_chip_mod_seconds = 1/d_code_freq_chips;
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
T_prn_mod_samples = T_prn_mod_seconds * static_cast<float>(d_fs_in);
|
||||
T_prn_mod_samples = T_prn_mod_seconds * static_cast<double>(d_fs_in);
|
||||
|
||||
d_current_prn_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<float>(d_fs_in);
|
||||
double T_prn_true_samples = T_prn_true_seconds * static_cast<double>(d_fs_in);
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
double corrected_acq_phase_samples, delay_correction_samples;
|
||||
corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<float>(d_fs_in)), T_prn_true_samples);
|
||||
corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<double>(d_fs_in)), T_prn_true_samples);
|
||||
if (corrected_acq_phase_samples < 0)
|
||||
{
|
||||
corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples;
|
||||
@ -235,9 +238,9 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_rem_code_phase_samples = 0;
|
||||
d_rem_carr_phase_rad = 0;
|
||||
d_acc_carrier_phase_rad = 0;
|
||||
d_acc_code_phase_secs = 0;
|
||||
d_rem_carr_phase_rad = 0.0;
|
||||
d_acc_carrier_phase_rad = 0.0;
|
||||
d_acc_code_phase_secs = 0.0;
|
||||
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
@ -248,7 +251,6 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
std::cout << "Tracking start on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
|
||||
|
||||
|
||||
// enable tracking
|
||||
d_pull_in = true;
|
||||
d_enable_tracking = true;
|
||||
@ -336,10 +338,10 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// process vars
|
||||
double carr_error_hz;
|
||||
double carr_error_filt_hz;
|
||||
double code_error_chips;
|
||||
double code_error_filt_chips;
|
||||
double carr_error_hz = 0.0;
|
||||
double carr_error_filt_hz = 0.0;
|
||||
double code_error_chips = 0.0;
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex* in = (gr_complex*) input_items[0]; //PRN start block alignment
|
||||
@ -623,7 +625,11 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||
|
||||
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
//LOG(INFO)<<"GPS tracking output end on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter<<std::endl;
|
||||
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,12 @@ gps_l1_ca_dll_pll_make_tracking_gpu_cc(
|
||||
|
||||
void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -541,7 +544,10 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items, gr_vecto
|
||||
|
||||
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
//LOG(INFO)<<"GPS tracking output end on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter<<std::endl;
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -83,9 +83,12 @@ gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
|
||||
void Gps_L1_Ca_Tcp_Connector_Tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = (int)d_vector_length*2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -660,6 +663,10 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter_seconds = d_sample_counter_seconds + ( ((double)d_current_prn_length_samples) / (double)d_fs_in );
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -81,9 +81,12 @@ gps_l2_m_dll_pll_make_tracking_cc(
|
||||
|
||||
void gps_l2_m_dll_pll_tracking_cc::forecast (int noutput_items,
|
||||
gr_vector_int &ninput_items_required)
|
||||
{
|
||||
if (noutput_items != 0)
|
||||
{
|
||||
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -627,7 +630,10 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int
|
||||
}
|
||||
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
|
||||
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
|
||||
//LOG(INFO)<<"GPS L2 tracking output end on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter<<std::endl;
|
||||
if((noutput_items == 0) || (ninput_items[0] == 0))
|
||||
{
|
||||
LOG(WARNING) << "noutput_items = 0";
|
||||
}
|
||||
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ gnss_sdr_supl_client::gnss_sdr_supl_client()
|
||||
lac = 0;
|
||||
ci = 0;
|
||||
supl_ctx_new(&ctx);
|
||||
assist = {0};
|
||||
assist = {};
|
||||
server_port = 0;
|
||||
request = 0;
|
||||
}
|
||||
|
@ -1434,7 +1434,6 @@ int Rtcm::set_DF011(const Gnss_Synchro & gnss_synchro)
|
||||
int Rtcm::set_DF012(const Gnss_Synchro & gnss_synchro)
|
||||
{
|
||||
const double lambda = GPS_C_m_s / GPS_L1_FREQ_HZ;
|
||||
double L1_pseudorange = gnss_synchro.Pseudorange_m;
|
||||
double ambiguity = std::floor( gnss_synchro.Pseudorange_m / 299792.458 );
|
||||
double gps_L1_pseudorange = std::round(( gnss_synchro.Pseudorange_m - ambiguity * 299792.458) / 0.02 );
|
||||
double gps_L1_pseudorange_c = static_cast<double>(gps_L1_pseudorange) * 0.02 + ambiguity * 299792.458;
|
||||
|
@ -468,7 +468,7 @@ int Sbas_Telemetry_Data::getbits(const unsigned char *buff, int pos, int len)
|
||||
Sbas_Telemetry_Data::gtime_t Sbas_Telemetry_Data::epoch2time(const double *ep)
|
||||
{
|
||||
const int doy[] = {1, 32, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};
|
||||
gtime_t time = {0};
|
||||
gtime_t time = {};
|
||||
int days, sec, year = (int)ep[0], mon = (int)ep[1], day = (int)ep[2];
|
||||
|
||||
if (year < 1970 || 2099 < year || mon < 1 || 12 < mon) return time;
|
||||
|
@ -30,8 +30,6 @@
|
||||
*/
|
||||
|
||||
#include "tracking_loop_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(TrackingLoopFilterTest, FirstOrderLoop)
|
||||
@ -51,7 +49,7 @@ TEST(TrackingLoopFilterTest, FirstOrderLoop)
|
||||
EXPECT_EQ( theFilter.get_include_last_integrator(), include_last_integrator );
|
||||
EXPECT_EQ( theFilter.get_order(), loop_order );
|
||||
|
||||
std::vector< float > sample_data = { 0, 0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > sample_data = { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 };
|
||||
|
||||
theFilter.initialize( 0.0 );
|
||||
|
||||
@ -61,10 +59,10 @@ TEST(TrackingLoopFilterTest, FirstOrderLoop)
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_FLOAT_EQ( result, sample_data[i]*g1 );
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_FLOAT_EQ( result, sample_data[i]*g1 );
|
||||
}
|
||||
}
|
||||
|
||||
TEST(TrackingLoopFilterTest, FirstOrderLoopWithLastIntegrator)
|
||||
{
|
||||
@ -83,20 +81,17 @@ TEST(TrackingLoopFilterTest, FirstOrderLoopWithLastIntegrator)
|
||||
EXPECT_EQ( theFilter.get_include_last_integrator(), include_last_integrator );
|
||||
EXPECT_EQ( theFilter.get_order(), loop_order );
|
||||
|
||||
std::vector< float > sample_data = { 0, 0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > sample_data = { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > expected_out = { 0.0, 0.0, 0.01, 0.02, 0.02, 0.02 };
|
||||
|
||||
theFilter.initialize( 0.0 );
|
||||
|
||||
float g1 = noise_bandwidth*4.0;
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
ASSERT_NEAR( result, expected_out[i], 1e-4 );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@ -118,7 +113,7 @@ TEST(TrackingLoopFilterTest, SecondOrderLoop)
|
||||
EXPECT_EQ( theFilter.get_include_last_integrator(), include_last_integrator );
|
||||
EXPECT_EQ( theFilter.get_order(), loop_order );
|
||||
|
||||
std::vector< float > sample_data = { 0, 0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > sample_data = { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > expected_out = { 0.0, 0.0, 13.37778, 0.0889, 0.0889, 0.0889 };
|
||||
|
||||
theFilter.initialize( 0.0 );
|
||||
@ -127,10 +122,10 @@ TEST(TrackingLoopFilterTest, SecondOrderLoop)
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
TEST(TrackingLoopFilterTest, SecondOrderLoopWithLastIntegrator)
|
||||
{
|
||||
@ -149,21 +144,17 @@ TEST(TrackingLoopFilterTest, SecondOrderLoopWithLastIntegrator)
|
||||
EXPECT_EQ( theFilter.get_include_last_integrator(), include_last_integrator );
|
||||
EXPECT_EQ( theFilter.get_order(), loop_order );
|
||||
|
||||
std::vector< float > sample_data = { 0, 0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > sample_data = { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > expected_out = { 0.0, 0.0, 0.006689, 0.013422, 0.013511, 0.013600 };
|
||||
|
||||
theFilter.initialize( 0.0 );
|
||||
|
||||
float g1 = noise_bandwidth*4.0;
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
|
||||
ASSERT_NEAR( result, expected_out[i], 1e-4 );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@ -184,7 +175,7 @@ TEST(TrackingLoopFilterTest, ThirdOrderLoop)
|
||||
EXPECT_EQ( theFilter.get_include_last_integrator(), include_last_integrator );
|
||||
EXPECT_EQ( theFilter.get_order(), loop_order );
|
||||
|
||||
std::vector< float > sample_data = { 0, 0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > sample_data = { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > expected_out = { 0.0, 0.0, 15.31877, 0.04494, 0.04520, 0.04546};
|
||||
|
||||
theFilter.initialize( 0.0 );
|
||||
@ -193,10 +184,10 @@ TEST(TrackingLoopFilterTest, ThirdOrderLoop)
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
TEST(TrackingLoopFilterTest, ThirdOrderLoopWithLastIntegrator)
|
||||
{
|
||||
@ -215,20 +206,17 @@ TEST(TrackingLoopFilterTest, ThirdOrderLoopWithLastIntegrator)
|
||||
EXPECT_EQ( theFilter.get_include_last_integrator(), include_last_integrator );
|
||||
EXPECT_EQ( theFilter.get_order(), loop_order );
|
||||
|
||||
std::vector< float > sample_data = { 0, 0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > sample_data = { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 };
|
||||
std::vector< float > expected_out = { 0.0, 0.0, 0.007659, 0.015341, 0.015386, 0.015432};
|
||||
|
||||
theFilter.initialize( 0.0 );
|
||||
|
||||
float g1 = noise_bandwidth*4.0;
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
ASSERT_NEAR( result, expected_out[i], 1e-4 );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,6 +73,7 @@ DECLARE_string(log_dir);
|
||||
#include "arithmetic/magnitude_squared_test.cc"
|
||||
#include "arithmetic/multiply_test.cc"
|
||||
#include "arithmetic/code_generation_test.cc"
|
||||
#include "arithmetic/tracking_loop_filter_test.cc"
|
||||
#include "configuration/file_configuration_test.cc"
|
||||
#include "configuration/in_memory_configuration_test.cc"
|
||||
#include "control_thread/control_message_factory_test.cc"
|
||||
|
Loading…
Reference in New Issue
Block a user