mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-10 02:24:10 +00:00
Implementation of a missing output decimation for the Galileo E1
telemetry decoder block
This commit is contained in:
parent
a31542cbf6
commit
d61b3847e5
@ -76,6 +76,11 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c
|
|||||||
telemetry_decoder_->set_iono_queue(&global_galileo_iono_queue);
|
telemetry_decoder_->set_iono_queue(&global_galileo_iono_queue);
|
||||||
telemetry_decoder_->set_almanac_queue(&global_galileo_almanac_queue);
|
telemetry_decoder_->set_almanac_queue(&global_galileo_almanac_queue);
|
||||||
telemetry_decoder_->set_utc_model_queue(&global_galileo_utc_model_queue);
|
telemetry_decoder_->set_utc_model_queue(&global_galileo_utc_model_queue);
|
||||||
|
|
||||||
|
//decimation factor
|
||||||
|
int decimation_factor = configuration->property(role + ".decimation_factor", 1);
|
||||||
|
telemetry_decoder_->set_decimation(decimation_factor);
|
||||||
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,6 +180,8 @@ galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
|
|||||||
d_channel = 0;
|
d_channel = 0;
|
||||||
Prn_timestamp_at_preamble_ms = 0.0;
|
Prn_timestamp_at_preamble_ms = 0.0;
|
||||||
flag_TOW_set = false;
|
flag_TOW_set = false;
|
||||||
|
d_average_count = 0;
|
||||||
|
d_decimation_output_factor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -495,13 +497,29 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
|||||||
LOG(WARNING) << "Exception writing observables dump file " << e.what();
|
LOG(WARNING) << "Exception writing observables dump file " << e.what();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
//todo: implement averaging
|
||||||
*out[0] = current_synchro_data;
|
d_average_count++;
|
||||||
|
if (d_average_count == d_decimation_output_factor)
|
||||||
|
{
|
||||||
|
d_average_count = 0;
|
||||||
|
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||||
|
*out[0] = current_synchro_data;
|
||||||
|
//std::cout<<"GPS L1 TLM output on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter/d_decimation_output_factor<<std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void galileo_e1b_telemetry_decoder_cc::set_decimation(int decimation)
|
||||||
|
{
|
||||||
|
d_decimation_output_factor = decimation;
|
||||||
|
}
|
||||||
|
|
||||||
void galileo_e1b_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
|
void galileo_e1b_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
|
||||||
{
|
{
|
||||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
|
@ -72,6 +72,12 @@ public:
|
|||||||
void set_iono_queue(concurrent_queue<Galileo_Iono> *iono_queue); //!< Set the iono data queue
|
void set_iono_queue(concurrent_queue<Galileo_Iono> *iono_queue); //!< Set the iono data queue
|
||||||
void set_almanac_queue(concurrent_queue<Galileo_Almanac> *almanac_queue); //!< Set the almanac data queue
|
void set_almanac_queue(concurrent_queue<Galileo_Almanac> *almanac_queue); //!< Set the almanac data queue
|
||||||
void set_utc_model_queue(concurrent_queue<Galileo_Utc_Model> *utc_model_queue); //!< Set the UTC model queue
|
void set_utc_model_queue(concurrent_queue<Galileo_Utc_Model> *utc_model_queue); //!< Set the UTC model queue
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Set decimation factor to average the GPS synchronization estimation output from the tracking module.
|
||||||
|
*/
|
||||||
|
void set_decimation(int decimation);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This is where all signal processing takes place
|
* \brief This is where all signal processing takes place
|
||||||
*/
|
*/
|
||||||
@ -132,6 +138,10 @@ private:
|
|||||||
Gnss_Satellite d_satellite;
|
Gnss_Satellite d_satellite;
|
||||||
int d_channel;
|
int d_channel;
|
||||||
|
|
||||||
|
// output averaging and decimation
|
||||||
|
int d_average_count;
|
||||||
|
int d_decimation_output_factor;
|
||||||
|
|
||||||
double d_preamble_time_seconds;
|
double d_preamble_time_seconds;
|
||||||
|
|
||||||
double d_TOW_at_Preamble;
|
double d_TOW_at_Preamble;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user