[hamradio-commits] [gnss-sdr] 182/251: Implementation of a missing output decimation for the Galileo E1 telemetry decoder block
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit d61b3847e50dcb807e7244d581d359bf1b2ad929
Author: Javier <jarribas at cttc.es>
Date: Mon Jun 22 16:08:28 2015 +0200
Implementation of a missing output decimation for the Galileo E1
telemetry
decoder block
---
.../adapters/galileo_e1b_telemetry_decoder.cc | 5 +++++
.../galileo_e1b_telemetry_decoder_cc.cc | 24 +++++++++++++++++++---
.../galileo_e1b_telemetry_decoder_cc.h | 10 +++++++++
3 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc
index 89e5b26..d24e492 100644
--- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc
+++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc
@@ -76,6 +76,11 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c
telemetry_decoder_->set_iono_queue(&global_galileo_iono_queue);
telemetry_decoder_->set_almanac_queue(&global_galileo_almanac_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;
}
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc
index 570c5a9..0c861fc 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc
@@ -180,6 +180,8 @@ galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
d_channel = 0;
Prn_timestamp_at_preamble_ms = 0.0;
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();
}
}
- //3. Make the output (copy the object contents to the GNURadio reserved memory)
- *out[0] = current_synchro_data;
+ //todo: implement averaging
+ 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)
{
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h
index b2d8093..9af1bd8 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h
@@ -72,6 +72,12 @@ public:
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_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
*/
@@ -132,6 +138,10 @@ private:
Gnss_Satellite d_satellite;
int d_channel;
+ // output averaging and decimation
+ int d_average_count;
+ int d_decimation_output_factor;
+
double d_preamble_time_seconds;
double d_TOW_at_Preamble;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list