[hamradio-commits] [gnss-sdr] 16/251: Faster local carrier update (25% of improvement)
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:31 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 1011bb086367f99a02bf0b7e41066be79d3ef183
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Sun May 3 13:15:17 2015 +0200
Faster local carrier update (25% of improvement)
---
.../galileo_e1_dll_pll_veml_tracking_cc.cc | 16 +++++++++-------
.../gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc | 15 ++++++++++-----
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc
index becfcf9..06f0267 100755
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc
@@ -259,17 +259,19 @@ void galileo_e1_dll_pll_veml_tracking_cc::update_local_code()
memcpy(d_very_late_code, &d_very_early_code[2 * very_early_late_spc_samples], d_current_prn_length_samples * sizeof(gr_complex));
}
+
void galileo_e1_dll_pll_veml_tracking_cc::update_local_carrier()
{
- float phase_rad, phase_step_rad;
- // Compute the carrier phase step for the K-1 carrier doppler estimation
- phase_step_rad = static_cast<float>(GPS_TWO_PI) * d_carrier_doppler_hz / static_cast<float>(d_fs_in);
- // Initialize the carrier phase with the remanent carrier phase of the K-2 loop
- phase_rad = d_rem_carr_phase_rad;
+ float sin_f, cos_f;
+ float phase_step_rad = static_cast<float>(2 * GALILEO_PI) * d_carrier_doppler_hz / static_cast<float>(d_fs_in);
+ int phase_step_rad_i = gr::fxpt::float_to_fixed(phase_step_rad);
+ int phase_rad_i = gr::fxpt::float_to_fixed(d_rem_carr_phase_rad);
+
for(int i = 0; i < d_current_prn_length_samples; i++)
{
- d_carr_sign[i] = gr_complex(cos(phase_rad), -sin(phase_rad));
- phase_rad += phase_step_rad;
+ gr::fxpt::sincos(phase_rad_i, &sin_f, &cos_f);
+ d_carr_sign[i] = std::complex<float>(cos_f, -sin_f);
+ phase_rad_i += phase_step_rad_i;
}
}
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc
index ea7eb5a..88c499e 100644
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc
@@ -40,6 +40,7 @@
#include <sstream>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h>
+#include <gnuradio/fxpt.h> // fixed point sine and cosine
#include <glog/logging.h>
#include "gnss_synchro.h"
#include "galileo_e5_signal_processing.h"
@@ -364,19 +365,23 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::update_local_code()
}
+
void Galileo_E5a_Dll_Pll_Tracking_cc::update_local_carrier()
{
- float phase_rad, phase_step_rad;
+ float sin_f, cos_f;
+ float phase_step_rad = static_cast<float>(2 * GALILEO_PI) * d_carrier_doppler_hz / static_cast<float>(d_fs_in);
+ int phase_step_rad_i = gr::fxpt::float_to_fixed(phase_step_rad);
+ int phase_rad_i = gr::fxpt::float_to_fixed(d_rem_carr_phase_rad);
- phase_step_rad = 2 * static_cast<float>(GALILEO_PI) * d_carrier_doppler_hz / static_cast<float>(d_fs_in);
- phase_rad = d_rem_carr_phase_rad;
for(int i = 0; i < d_current_prn_length_samples; i++)
{
- d_carr_sign[i] = gr_complex(cos(phase_rad), -sin(phase_rad));
- phase_rad += phase_step_rad;
+ gr::fxpt::sincos(phase_rad_i, &sin_f, &cos_f);
+ d_carr_sign[i] = std::complex<float>(cos_f, -sin_f);
+ phase_rad_i += phase_step_rad_i;
}
}
+
int Galileo_E5a_Dll_Pll_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)
{
--
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