mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-05 02:07:02 +00:00
Faster local carrier update (25% of improvement)
This commit is contained in:
parent
caa10a583f
commit
1011bb0863
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user