1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-07 07:50:32 +00:00

Merge branch 'next' of git://github.com/Arribas/gnss-sdr into

tracking_arribas

# Conflicts:
#	src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
#	src/core/receiver/gnss_block_factory.cc
This commit is contained in:
Carles Fernandez 2015-11-27 14:53:33 +01:00
commit bfbea68c8f
9 changed files with 85 additions and 79 deletions

View File

@ -241,7 +241,7 @@ Tracking_GPS.pll_bw_hz=55.0;
Tracking_GPS.dll_bw_hz=1.5 Tracking_GPS.dll_bw_hz=1.5
;#fll_bw_hz: FLL loop filter bandwidth [Hz] ;#fll_bw_hz: FLL loop filter bandwidth [Hz]
Tracking_GPS.fll_bw_hz=10.0; Tracking_GPS.fll_bw_hz=2.0;
;#order: PLL/DLL loop filter order [2] or [3] ;#order: PLL/DLL loop filter order [2] or [3]
Tracking_GPS.order=3; Tracking_GPS.order=3;

View File

@ -233,7 +233,7 @@ Acquisition_1B.doppler_step=125
;######### TRACKING GPS CONFIG ############ ;######### TRACKING GPS CONFIG ############
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking] ;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Artemisa_Tracking Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version. ;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
Tracking_1C.item_type=gr_complex Tracking_1C.item_type=gr_complex
@ -247,7 +247,7 @@ Tracking_1C.dump=true
Tracking_1C.dump_filename=../data/epl_tracking_ch_ Tracking_1C.dump_filename=../data/epl_tracking_ch_
;#pll_bw_hz: PLL loop filter bandwidth [Hz] ;#pll_bw_hz: PLL loop filter bandwidth [Hz]
Tracking_1C.pll_bw_hz=15.0; Tracking_1C.pll_bw_hz=20.0;
;#dll_bw_hz: DLL loop filter bandwidth [Hz] ;#dll_bw_hz: DLL loop filter bandwidth [Hz]
Tracking_1C.dll_bw_hz=1.5; Tracking_1C.dll_bw_hz=1.5;

View File

@ -28,7 +28,7 @@ set(TRACKING_ADAPTER_SOURCES
gps_l1_ca_dll_fll_pll_tracking.cc gps_l1_ca_dll_fll_pll_tracking.cc
gps_l1_ca_dll_pll_optim_tracking.cc gps_l1_ca_dll_pll_optim_tracking.cc
gps_l1_ca_dll_pll_tracking.cc gps_l1_ca_dll_pll_tracking.cc
gps_l1_ca_dll_pll_artemisa_tracking.cc gps_l1_ca_dll_pll_c_aid_tracking.cc
gps_l1_ca_tcp_connector_tracking.cc gps_l1_ca_tcp_connector_tracking.cc
galileo_e5a_dll_pll_tracking.cc galileo_e5a_dll_pll_tracking.cc
gps_l2_m_dll_pll_tracking.cc gps_l2_m_dll_pll_tracking.cc

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l1_ca_dll_pll_artemisa_tracking.cc * \file gps_l1_ca_dll_pll_c_aid_tracking.cc
* \brief Implementation of an adapter of a DLL+PLL tracking loop block * \brief Implementation of an adapter of a DLL+PLL tracking loop block
* for GPS L1 C/A to a TrackingInterface * for GPS L1 C/A to a TrackingInterface
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
@ -36,7 +36,7 @@
*/ */
#include "gps_l1_ca_dll_pll_artemisa_tracking.h" #include "gps_l1_ca_dll_pll_c_aid_tracking.h"
#include <glog/logging.h> #include <glog/logging.h>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
@ -44,7 +44,7 @@
using google::LogMessage; using google::LogMessage;
GpsL1CaDllPllArtemisaTracking::GpsL1CaDllPllArtemisaTracking( GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams, unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) : boost::shared_ptr<gr::msg_queue> queue) :
@ -80,7 +80,7 @@ GpsL1CaDllPllArtemisaTracking::GpsL1CaDllPllArtemisaTracking(
if (item_type.compare("gr_complex") == 0) if (item_type.compare("gr_complex") == 0)
{ {
item_size_ = sizeof(gr_complex); item_size_ = sizeof(gr_complex);
tracking_ = gps_l1_ca_dll_pll_artemisa_make_tracking_cc( tracking_ = gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
f_if, f_if,
fs_in, fs_in,
vector_length, vector_length,
@ -102,11 +102,11 @@ GpsL1CaDllPllArtemisaTracking::GpsL1CaDllPllArtemisaTracking(
} }
GpsL1CaDllPllArtemisaTracking::~GpsL1CaDllPllArtemisaTracking() GpsL1CaDllPllCAidTracking::~GpsL1CaDllPllCAidTracking()
{} {}
void GpsL1CaDllPllArtemisaTracking::start_tracking() void GpsL1CaDllPllCAidTracking::start_tracking()
{ {
tracking_->start_tracking(); tracking_->start_tracking();
} }
@ -114,7 +114,7 @@ void GpsL1CaDllPllArtemisaTracking::start_tracking()
/* /*
* Set tracking channel unique ID * Set tracking channel unique ID
*/ */
void GpsL1CaDllPllArtemisaTracking::set_channel(unsigned int channel) void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel)
{ {
channel_ = channel; channel_ = channel;
tracking_->set_channel(channel); tracking_->set_channel(channel);
@ -123,36 +123,36 @@ void GpsL1CaDllPllArtemisaTracking::set_channel(unsigned int channel)
/* /*
* Set tracking channel internal queue * Set tracking channel internal queue
*/ */
void GpsL1CaDllPllArtemisaTracking::set_channel_queue( void GpsL1CaDllPllCAidTracking::set_channel_queue(
concurrent_queue<int> *channel_internal_queue) concurrent_queue<int> *channel_internal_queue)
{ {
channel_internal_queue_ = channel_internal_queue; channel_internal_queue_ = channel_internal_queue;
tracking_->set_channel_queue(channel_internal_queue_); tracking_->set_channel_queue(channel_internal_queue_);
} }
void GpsL1CaDllPllArtemisaTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) void GpsL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{ {
tracking_->set_gnss_synchro(p_gnss_synchro); tracking_->set_gnss_synchro(p_gnss_synchro);
} }
void GpsL1CaDllPllArtemisaTracking::connect(gr::top_block_sptr top_block) void GpsL1CaDllPllCAidTracking::connect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator //nothing to connect, now the tracking uses gr_sync_decimator
} }
void GpsL1CaDllPllArtemisaTracking::disconnect(gr::top_block_sptr top_block) void GpsL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator //nothing to disconnect, now the tracking uses gr_sync_decimator
} }
gr::basic_block_sptr GpsL1CaDllPllArtemisaTracking::get_left_block() gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block()
{ {
return tracking_; return tracking_;
} }
gr::basic_block_sptr GpsL1CaDllPllArtemisaTracking::get_right_block() gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_right_block()
{ {
return tracking_; return tracking_;
} }

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l1_ca_dll_pll_artemisa_tracking.h * \file gps_l1_ca_dll_pll_c_aid_tracking.h
* \brief Interface of an adapter of a DLL+PLL tracking loop block * \brief Interface of an adapter of a DLL+PLL tracking loop block
* for GPS L1 C/A to a TrackingInterface * for GPS L1 C/A to a TrackingInterface
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
@ -35,13 +35,13 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_ARTEMISA_TRACKING_H_ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_ARTEMISA_TRACKING_H_ #define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_
#include <string> #include <string>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include "tracking_interface.h" #include "tracking_interface.h"
#include "gps_l1_ca_dll_pll_artemisa_tracking_cc.h" #include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h"
class ConfigurationInterface; class ConfigurationInterface;
@ -49,27 +49,27 @@ class ConfigurationInterface;
/*! /*!
* \brief This class implements a code DLL + carrier PLL tracking loop * \brief This class implements a code DLL + carrier PLL tracking loop
*/ */
class GpsL1CaDllPllArtemisaTracking : public TrackingInterface class GpsL1CaDllPllCAidTracking : public TrackingInterface
{ {
public: public:
GpsL1CaDllPllArtemisaTracking(ConfigurationInterface* configuration, GpsL1CaDllPllCAidTracking(ConfigurationInterface* configuration,
std::string role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue); boost::shared_ptr<gr::msg_queue> queue);
virtual ~GpsL1CaDllPllArtemisaTracking(); virtual ~GpsL1CaDllPllCAidTracking();
std::string role() std::string role()
{ {
return role_; return role_;
} }
//! Returns "gps_l1_ca_dll_pll_artemisa_tracking" //! Returns "gps_l1_ca_dll_pll_c_aid_tracking"
std::string implementation() std::string implementation()
{ {
return "gps_l1_ca_dll_pll_artemisa_tracking"; return "gps_l1_ca_dll_pll_c_aid_tracking";
} }
size_t item_size() size_t item_size()
{ {
@ -101,7 +101,7 @@ public:
void start_tracking(); void start_tracking();
private: private:
gps_l1_ca_dll_pll_artemisa_tracking_cc_sptr tracking_; gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr tracking_;
size_t item_size_; size_t item_size_;
unsigned int channel_; unsigned int channel_;
std::string role_; std::string role_;
@ -111,4 +111,4 @@ private:
concurrent_queue<int> *channel_internal_queue_; concurrent_queue<int> *channel_internal_queue_;
}; };
#endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_ARTEMISA_TRACKING_H_ #endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_

View File

@ -33,6 +33,7 @@ set(TRACKING_GR_BLOCKS_SOURCES
gps_l1_ca_tcp_connector_tracking_cc.cc gps_l1_ca_tcp_connector_tracking_cc.cc
galileo_e5a_dll_pll_tracking_cc.cc galileo_e5a_dll_pll_tracking_cc.cc
gps_l2_m_dll_pll_tracking_cc.cc gps_l2_m_dll_pll_tracking_cc.cc
gps_l1_ca_dll_pll_c_aid_tracking_cc.cc
${OPT_TRACKING_BLOCKS} ${OPT_TRACKING_BLOCKS}
) )

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l1_ca_dll_pll_artemisa_tracking_cc.cc * \file gps_l1_ca_dll_pll_c_aid_tracking_cc.cc
* \brief Implementation of a code DLL + carrier PLL tracking block * \brief Implementation of a code DLL + carrier PLL tracking block
* \author Javier Arribas, 2015. jarribas(at)cttc.es * \author Javier Arribas, 2015. jarribas(at)cttc.es
* *
@ -28,7 +28,7 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include "gps_l1_ca_dll_pll_artemisa_tracking_cc.h" #include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h"
#include <cmath> #include <cmath>
#include <iostream> #include <iostream>
#include <memory> #include <memory>
@ -56,8 +56,8 @@
using google::LogMessage; using google::LogMessage;
gps_l1_ca_dll_pll_artemisa_tracking_cc_sptr gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
gps_l1_ca_dll_pll_artemisa_make_tracking_cc( gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
long if_freq, long if_freq,
long fs_in, long fs_in,
unsigned int vector_length, unsigned int vector_length,
@ -68,13 +68,13 @@ gps_l1_ca_dll_pll_artemisa_make_tracking_cc(
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips) float early_late_space_chips)
{ {
return gps_l1_ca_dll_pll_artemisa_tracking_cc_sptr(new gps_l1_ca_dll_pll_artemisa_tracking_cc(if_freq, return gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr(new gps_l1_ca_dll_pll_c_aid_tracking_cc(if_freq,
fs_in, vector_length, queue, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips)); fs_in, vector_length, queue, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips));
} }
void gps_l1_ca_dll_pll_artemisa_tracking_cc::forecast (int noutput_items, void gps_l1_ca_dll_pll_c_aid_tracking_cc::forecast (int noutput_items,
gr_vector_int &ninput_items_required) gr_vector_int &ninput_items_required)
{ {
ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call ninput_items_required[0] = static_cast<int>(d_vector_length) * 2; //set the required available samples in each call
@ -82,7 +82,7 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::forecast (int noutput_items,
gps_l1_ca_dll_pll_artemisa_tracking_cc::gps_l1_ca_dll_pll_artemisa_tracking_cc( gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
long if_freq, long if_freq,
long fs_in, long fs_in,
unsigned int vector_length, unsigned int vector_length,
@ -92,7 +92,7 @@ gps_l1_ca_dll_pll_artemisa_tracking_cc::gps_l1_ca_dll_pll_artemisa_tracking_cc(
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips) : float early_late_space_chips) :
gr::block("gps_l1_ca_dll_pll_artemisa_tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::block("gps_l1_ca_dll_pll_c_aid_tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
// initialize internal vars // initialize internal vars
@ -116,19 +116,19 @@ gps_l1_ca_dll_pll_artemisa_tracking_cc::gps_l1_ca_dll_pll_artemisa_tracking_cc(
d_ca_code = static_cast<gr_complex*>(volk_malloc(static_cast<int>(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_get_alignment())); d_ca_code = static_cast<gr_complex*>(volk_malloc(static_cast<int>(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_get_alignment()));
// correlator outputs (scalar) // correlator outputs (scalar)
d_n_correlator_taps=3; // Early, Prompt, and Late d_n_correlator_taps = 3; // Early, Prompt, and Late
d_correlator_outs = static_cast<gr_complex*>(volk_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_get_alignment())); d_correlator_outs = static_cast<gr_complex*>(volk_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_get_alignment()));
for (int n=0;n<d_n_correlator_taps;n++) for (int n = 0; n < d_n_correlator_taps; n++)
{ {
d_correlator_outs[n] = gr_complex(0,0); d_correlator_outs[n] = gr_complex(0,0);
} }
d_local_code_shift_chips = static_cast<float*>(volk_malloc(d_n_correlator_taps*sizeof(float), volk_get_alignment())); d_local_code_shift_chips = static_cast<float*>(volk_malloc(d_n_correlator_taps*sizeof(float), volk_get_alignment()));
// Set TAPs delay values [chips] // Set TAPs delay values [chips]
d_local_code_shift_chips[0]=-d_early_late_spc_chips; d_local_code_shift_chips[0] = - d_early_late_spc_chips;
d_local_code_shift_chips[1]=0.0; d_local_code_shift_chips[1] = 0.0;
d_local_code_shift_chips[2]=d_early_late_spc_chips; d_local_code_shift_chips[2] = d_early_late_spc_chips;
multicorrelator_cpu.init(2*d_correlation_length_samples,d_n_correlator_taps); multicorrelator_cpu.init(2 * d_correlation_length_samples, d_n_correlator_taps);
//--- Perform initializations ------------------------------ //--- Perform initializations ------------------------------
// define initial code frequency basis of NCO // define initial code frequency basis of NCO
@ -158,8 +158,7 @@ gps_l1_ca_dll_pll_artemisa_tracking_cc::gps_l1_ca_dll_pll_artemisa_tracking_cc(
systemName["G"] = std::string("GPS"); systemName["G"] = std::string("GPS");
systemName["S"] = std::string("SBAS"); systemName["S"] = std::string("SBAS");
set_relative_rate(1.0 / (static_cast<double>(d_vector_length) * 2.0));
set_relative_rate(1.0/((double)d_vector_length*2));
d_channel_internal_queue = 0; d_channel_internal_queue = 0;
d_acquisition_gnss_synchro = 0; d_acquisition_gnss_synchro = 0;
@ -170,12 +169,12 @@ gps_l1_ca_dll_pll_artemisa_tracking_cc::gps_l1_ca_dll_pll_artemisa_tracking_cc(
d_acc_carrier_phase_cycles = 0.0; d_acc_carrier_phase_cycles = 0.0;
d_code_phase_samples = 0.0; d_code_phase_samples = 0.0;
d_pll_to_dll_assist_secs_Ti=0.0; d_pll_to_dll_assist_secs_Ti = 0.0;
//set_min_output_buffer((long int)300); //set_min_output_buffer((long int)300);
} }
void gps_l1_ca_dll_pll_artemisa_tracking_cc::start_tracking() void gps_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
{ {
/* /*
* correct the code phase according to the delay between acq and trk * correct the code phase according to the delay between acq and trk
@ -206,7 +205,7 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::start_tracking()
double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ; 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<double>(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 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 N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
double corrected_acq_phase_samples, delay_correction_samples; 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<double>(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);
@ -219,7 +218,7 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::start_tracking()
d_acq_code_phase_samples = corrected_acq_phase_samples; d_acq_code_phase_samples = corrected_acq_phase_samples;
d_carrier_doppler_hz = d_acq_carrier_doppler_hz; d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
d_carrier_phase_step_rad=GPS_TWO_PI*d_carrier_doppler_hz/static_cast<double>(d_fs_in); d_carrier_phase_step_rad = GPS_TWO_PI * d_carrier_doppler_hz/static_cast<double>(d_fs_in);
// DLL/PLL filter initialization // DLL/PLL filter initialization
d_carrier_loop_filter.initialize(d_acq_carrier_doppler_hz); //The carrier loop filter implements the Doppler accumulator d_carrier_loop_filter.initialize(d_acq_carrier_doppler_hz); //The carrier loop filter implements the Doppler accumulator
@ -228,9 +227,8 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::start_tracking()
// generate local reference ALWAYS starting at chip 1 (1 sample per chip) // generate local reference ALWAYS starting at chip 1 (1 sample per chip)
gps_l1_ca_code_gen_complex(d_ca_code, d_acquisition_gnss_synchro->PRN, 0); gps_l1_ca_code_gen_complex(d_ca_code, d_acquisition_gnss_synchro->PRN, 0);
multicorrelator_cpu.set_local_code_and_taps(static_cast<int>(GPS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
multicorrelator_cpu.set_local_code_and_taps(static_cast<int>(GPS_L1_CA_CODE_LENGTH_CHIPS),d_ca_code,d_local_code_shift_chips); for (int n = 0; n < d_n_correlator_taps; n++)
for (int n=0;n<d_n_correlator_taps;n++)
{ {
d_correlator_outs[n] = gr_complex(0,0); d_correlator_outs[n] = gr_complex(0,0);
} }
@ -238,9 +236,9 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::start_tracking()
d_carrier_lock_fail_counter = 0; d_carrier_lock_fail_counter = 0;
d_rem_code_phase_samples = 0.0; d_rem_code_phase_samples = 0.0;
d_rem_carrier_phase_rad = 0.0; d_rem_carrier_phase_rad = 0.0;
d_rem_code_phase_chips =0.0; d_rem_code_phase_chips = 0.0;
d_acc_carrier_phase_cycles = 0.0; d_acc_carrier_phase_cycles = 0.0;
d_pll_to_dll_assist_secs_Ti=0.0; d_pll_to_dll_assist_secs_Ti = 0.0;
d_code_phase_samples = d_acq_code_phase_samples; d_code_phase_samples = d_acq_code_phase_samples;
@ -262,7 +260,7 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::start_tracking()
} }
gps_l1_ca_dll_pll_artemisa_tracking_cc::~gps_l1_ca_dll_pll_artemisa_tracking_cc() gps_l1_ca_dll_pll_c_aid_tracking_cc::~gps_l1_ca_dll_pll_c_aid_tracking_cc()
{ {
d_dump_file.close(); d_dump_file.close();
@ -276,7 +274,7 @@ gps_l1_ca_dll_pll_artemisa_tracking_cc::~gps_l1_ca_dll_pll_artemisa_tracking_cc(
int gps_l1_ca_dll_pll_artemisa_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items, int gps_l1_ca_dll_pll_c_aid_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) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
// Block input data and block output stream pointers // Block input data and block output stream pointers
@ -287,13 +285,13 @@ int gps_l1_ca_dll_pll_artemisa_tracking_cc::general_work (int noutput_items, gr_
Gnss_Synchro current_synchro_data = Gnss_Synchro(); Gnss_Synchro current_synchro_data = Gnss_Synchro();
// process vars // process vars
double code_error_chips_Ti=0.0; double code_error_chips_Ti = 0.0;
double code_error_filt_chips=0.0; double code_error_filt_chips = 0.0;
double code_error_filt_secs_Ti=0.0; double code_error_filt_secs_Ti = 0.0;
double CURRENT_INTEGRATION_TIME_S; double CURRENT_INTEGRATION_TIME_S;
double CORRECTED_INTEGRATION_TIME_S; double CORRECTED_INTEGRATION_TIME_S;
double dll_code_error_secs_Ti=0.0; double dll_code_error_secs_Ti = 0.0;
double carr_phase_error_secs_Ti=0.0; double carr_phase_error_secs_Ti = 0.0;
double old_d_rem_code_phase_samples; double old_d_rem_code_phase_samples;
if (d_enable_tracking == true) if (d_enable_tracking == true)
{ {
@ -347,7 +345,7 @@ int gps_l1_ca_dll_pll_artemisa_tracking_cc::general_work (int noutput_items, gr_
code_error_filt_secs_Ti = code_error_filt_chips*CURRENT_INTEGRATION_TIME_S/d_code_freq_chips; // [s/Ti] code_error_filt_secs_Ti = code_error_filt_chips*CURRENT_INTEGRATION_TIME_S/d_code_freq_chips; // [s/Ti]
// DLL code error estimation [s/Ti] // DLL code error estimation [s/Ti]
// TODO: PLL carrier aid to DLL is disabled. Re-enable it and measure performance // TODO: PLL carrier aid to DLL is disabled. Re-enable it and measure performance
dll_code_error_secs_Ti=-code_error_filt_secs_Ti;//+d_pll_to_dll_assist_secs_Ti; dll_code_error_secs_Ti=-code_error_filt_secs_Ti+d_pll_to_dll_assist_secs_Ti;
// ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT ####################### // ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT #######################
// keep alignment parameters for the next input buffer // keep alignment parameters for the next input buffer
@ -552,7 +550,7 @@ int gps_l1_ca_dll_pll_artemisa_tracking_cc::general_work (int noutput_items, gr_
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
} }
void gps_l1_ca_dll_pll_artemisa_tracking_cc::set_channel(unsigned int channel) void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(unsigned int channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "Tracking Channel set to " << d_channel; LOG(INFO) << "Tracking Channel set to " << d_channel;
@ -577,12 +575,12 @@ void gps_l1_ca_dll_pll_artemisa_tracking_cc::set_channel(unsigned int channel)
} }
} }
void gps_l1_ca_dll_pll_artemisa_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue)
{ {
d_channel_internal_queue = channel_internal_queue; d_channel_internal_queue = channel_internal_queue;
} }
void gps_l1_ca_dll_pll_artemisa_tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{ {
d_acquisition_gnss_synchro = p_gnss_synchro; d_acquisition_gnss_synchro = p_gnss_synchro;
} }

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l1_ca_dll_pll_artemisa_tracking_cc.h * \file gps_l1_ca_dll_pll_c_aid_tracking_cc.h
* \brief Interface of a code DLL + carrier PLL tracking block * \brief Interface of a code DLL + carrier PLL tracking block
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
* Javier Arribas, 2011. jarribas(at)cttc.es * Javier Arribas, 2011. jarribas(at)cttc.es
@ -34,8 +34,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_ARTEMISA_TRACKING_CC_H #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_ARTEMISA_TRACKING_CC_H #define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H
#include <fstream> #include <fstream>
#include <queue> #include <queue>
@ -52,13 +52,13 @@
#include "tracking_FLL_PLL_filter.h" #include "tracking_FLL_PLL_filter.h"
#include "cpu_multicorrelator.h" #include "cpu_multicorrelator.h"
class gps_l1_ca_dll_pll_artemisa_tracking_cc; class gps_l1_ca_dll_pll_c_aid_tracking_cc;
typedef boost::shared_ptr<gps_l1_ca_dll_pll_artemisa_tracking_cc> typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_cc>
gps_l1_ca_dll_pll_artemisa_tracking_cc_sptr; gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr;
gps_l1_ca_dll_pll_artemisa_tracking_cc_sptr gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
gps_l1_ca_dll_pll_artemisa_make_tracking_cc(long if_freq, gps_l1_ca_dll_pll_c_aid_make_tracking_cc(long if_freq,
long fs_in, unsigned long fs_in, unsigned
int vector_length, int vector_length,
boost::shared_ptr<gr::msg_queue> queue, boost::shared_ptr<gr::msg_queue> queue,
@ -73,10 +73,10 @@ gps_l1_ca_dll_pll_artemisa_make_tracking_cc(long if_freq,
/*! /*!
* \brief This class implements a DLL + PLL tracking loop block * \brief This class implements a DLL + PLL tracking loop block
*/ */
class gps_l1_ca_dll_pll_artemisa_tracking_cc: public gr::block class gps_l1_ca_dll_pll_c_aid_tracking_cc: public gr::block
{ {
public: public:
~gps_l1_ca_dll_pll_artemisa_tracking_cc(); ~gps_l1_ca_dll_pll_c_aid_tracking_cc();
void set_channel(unsigned int channel); void set_channel(unsigned int channel);
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro);
@ -89,8 +89,8 @@ public:
void forecast (int noutput_items, gr_vector_int &ninput_items_required); void forecast (int noutput_items, gr_vector_int &ninput_items_required);
private: private:
friend gps_l1_ca_dll_pll_artemisa_tracking_cc_sptr friend gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
gps_l1_ca_dll_pll_artemisa_make_tracking_cc(long if_freq, gps_l1_ca_dll_pll_c_aid_make_tracking_cc(long if_freq,
long fs_in, unsigned long fs_in, unsigned
int vector_length, int vector_length,
boost::shared_ptr<gr::msg_queue> queue, boost::shared_ptr<gr::msg_queue> queue,
@ -100,7 +100,7 @@ private:
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);
gps_l1_ca_dll_pll_artemisa_tracking_cc(long if_freq, gps_l1_ca_dll_pll_c_aid_tracking_cc(long if_freq,
long fs_in, unsigned long fs_in, unsigned
int vector_length, int vector_length,
boost::shared_ptr<gr::msg_queue> queue, boost::shared_ptr<gr::msg_queue> queue,
@ -179,4 +179,4 @@ private:
std::string sys; std::string sys;
}; };
#endif //GNSS_SDR_GPS_L1_CA_DLL_PLL_ARTEMISA_TRACKING_CC_H #endif //GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H

View File

@ -78,6 +78,7 @@
#include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h" #include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h"
#include "galileo_e5a_noncoherent_iq_acquisition_caf.h" #include "galileo_e5a_noncoherent_iq_acquisition_caf.h"
#include "gps_l1_ca_dll_pll_tracking.h" #include "gps_l1_ca_dll_pll_tracking.h"
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
#include "gps_l1_ca_dll_pll_optim_tracking.h" #include "gps_l1_ca_dll_pll_optim_tracking.h"
#include "gps_l1_ca_dll_fll_pll_tracking.h" #include "gps_l1_ca_dll_fll_pll_tracking.h"
#include "gps_l1_ca_tcp_connector_tracking.h" #include "gps_l1_ca_tcp_connector_tracking.h"
@ -1576,6 +1577,12 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
out_streams, queue)); out_streams, queue));
block = std::move(block_); block = std::move(block_);
} }
if (implementation.compare("GPS_L1_CA_DLL_PLL_C_Aid_Tracking") == 0)
{
std::unique_ptr<TrackingInterface> block_(new GpsL1CaDllPllCAidTracking(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
else if (implementation.compare("GPS_L1_CA_DLL_PLL_Optim_Tracking") == 0) else if (implementation.compare("GPS_L1_CA_DLL_PLL_Optim_Tracking") == 0)
{ {
std::unique_ptr<TrackingInterface> block_(new GpsL1CaDllPllOptimTracking(configuration.get(), role, in_streams, std::unique_ptr<TrackingInterface> block_(new GpsL1CaDllPllOptimTracking(configuration.get(), role, in_streams,