Change of the set_doppler_freq_shift(float phase) to set_doppler_freq_shift(float doppler_freq_hz), and set_prn_code_phase(signed int phase) to set_prn_code_phase(signed int phase_samples), which are more appropiate, in tracking_interface. Minor changes in tracking adapters to be coherent with the new variable names

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@77 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas 2011-11-07 11:47:49 +00:00
parent bd51c2ab7c
commit dcc3e4d858
6 changed files with 74 additions and 61 deletions

View File

@ -25,7 +25,7 @@ SignalConditioner.sample_freq_out=4000000
SignalConditioner.dump=false
;######### CHANNELS CONFIGURATION CONFIG ############
Channels.count=6
Channels.count=4
;######### ACQUISITION CONFIG ############
@ -38,48 +38,35 @@ Acquisition.sampled_ms=1
;######### ACQUISITION 0 CONFIG ############
Acquisition0.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition0.threshold=0.06
Acquisition0.threshold=0.055
Acquisition0.doppler_max=10000
Acquisition0.doppler_step=500
Acquisition0.satellite=11
Acquisition0.repeat_satellite=false
Acquisition0.satellite=2
Acquisition0.repeat_satellite=true
;######### ACQUISITION 1 CONFIG ############
Acquisition1.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition1.threshold=0.06
Acquisition1.threshold=0.055
Acquisition1.doppler_max=10000
Acquisition1.doppler_step=500
Acquisition1.repeat_satellite=false
Acquisition1.satellite=1
Acquisition1.repeat_satellite=true
;######### ACQUISITION 2 CONFIG ############
Acquisition2.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition2.threshold=0.06
Acquisition2.threshold=0.055
Acquisition2.doppler_max=10000
Acquisition2.doppler_step=500
Acquisition2.repeat_satellite=false
Acquisition2.satellite=11
Acquisition2.repeat_satellite=true
;######### ACQUISITION 3 CONFIG ############
Acquisition3.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition3.threshold=0.06
Acquisition3.threshold=0.055
Acquisition3.doppler_max=10000
Acquisition3.doppler_step=500
Acquisition3.repeat_satellite=false
;######### ACQUISITION 3 CONFIG ############
Acquisition4.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition4.threshold=0.06
Acquisition4.doppler_max=10000
Acquisition4.doppler_step=500
Acquisition4.repeat_satellite=false
;######### ACQUISITION 3 CONFIG ############
Acquisition5.implementation=GPS_L1_CA_PCPS_Acquisition
Acquisition5.threshold=0.06
Acquisition5.doppler_max=10000
Acquisition5.doppler_step=500
Acquisition5.repeat_satellite=false
Acquisition3.satellite=32
Acquisition3.repeat_satellite=true
;######### TRACKING CONFIG ############
Tracking.implementation=GPS_L1_CA_DLL_PLL_Tracking

View File

@ -1,10 +1,12 @@
/*!
* \file gnss_tracking_a.cc
* \brief Brief description of the file here
* \file gps_l1_ca_dll_pll_tracking.cc
* \brief code DLL + carrier PLL
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
* Javier Arribas, 2011. jarribas(at)cttc.es
*
* Detailed description of the file here if needed.
* Code DLL + carrier PLL according to the algorithms described in [1]
* [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
* A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, Birkha user, 2007
*
* -------------------------------------------------------------------------
*
@ -110,14 +112,14 @@ void GpsL1CaDllPllTracking::set_channel_queue(
tracking_->set_channel_queue(channel_internal_queue_);
}
void GpsL1CaDllPllTracking::set_prn_code_phase(signed int phase)
void GpsL1CaDllPllTracking::set_prn_code_phase(signed int phase_samples)
{
return tracking_->set_acq_code_phase((double)phase);
return tracking_->set_acq_code_phase((float)phase_samples);
}
void GpsL1CaDllPllTracking::set_doppler_freq_shift(float phase)
void GpsL1CaDllPllTracking::set_doppler_freq_shift(float doppler_freq_hz)
{
return tracking_->set_acq_doppler(phase);
return tracking_->set_acq_doppler(doppler_freq_hz);
}
void GpsL1CaDllPllTracking::set_acq_sample_stamp(

View File

@ -1,9 +1,12 @@
/*!
* \file gnss_correlator_a.h
* \brief Brief description of the file here
* \author Javier Arribas, 2011. jarribas(at)cttc.es
* \file gps_l1_ca_dll_pll_tracking.h
* \brief code DLL + carrier PLL
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
* Javier Arribas, 2011. jarribas(at)cttc.es
*
* Detailed description of the file here if needed.
* Code DLL + carrier PLL according to the algorithms described in [1]
* [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
* A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, Birkha user, 2007
*
* -------------------------------------------------------------------------
*
@ -30,7 +33,6 @@
* -------------------------------------------------------------------------
*/
#ifndef GPS_L1_CA_DLL_PLL_TRACKING_H_
#define GPS_L1_CA_DLL_PLL_TRACKING_H_
@ -76,8 +78,8 @@ public:
void set_satellite(unsigned int satellite);
void set_channel(unsigned int channel);
void set_prn_code_phase(signed int phase);
void set_doppler_freq_shift(float phase);
void set_prn_code_phase(signed int phase_samples);
void set_doppler_freq_shift(float doppler_freq_hz);
void set_channel_queue(concurrent_queue<int> *channel_internal_queue);
void start_tracking();

View File

@ -1,17 +1,37 @@
//! Single-delta GPS L1 CA DLL+PLL tracking
/*!
* Tracking based on the Kay Borre book MATLAB-based GPS receiver
* \file gps_l1_ca_dll_pll_tracking_cc.cc
* \brief code DLL + carrier PLL
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
* Javier Arribas, 2011. jarribas(at)cttc.es
*
* Code DLL + carrier PLL according to the algorithms described in [1]
* [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
* A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, Birkha user, 2007
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
/**
* Copyright notice
*/
/**
* Author: Javier Arribas, 2011. jarribas(at)cttc.es
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@ -428,7 +448,7 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
Psig=Psig/(float)CN0_ESTIMATION_SAMPLES;
Psig=Psig*Psig;
d_SNR_SNV=Psig/(Ptot/(float)CN0_ESTIMATION_SAMPLES-Psig);
d_SNR_SNV_dB_Hz=10*std::log10(d_SNR_SNV)+10*log10(d_fs_in/2)-10*log10(d_code_length);
d_SNR_SNV_dB_Hz=10*log10(d_SNR_SNV)+10*log10(d_fs_in/2)-10*log10(d_code_length);
NBD=tmp_sum_abs_I*tmp_sum_abs_I+tmp_sum_abs_Q*tmp_sum_abs_Q;
NBP=tmp_sum_sqr_I-tmp_sum_sqr_Q;
d_carrier_lock_test=NBD/NBP;
@ -441,7 +461,7 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
{
d_carrier_lock_fail_counter++;
}else{
d_carrier_lock_fail_counter--;
if (d_carrier_lock_fail_counter>0) d_carrier_lock_fail_counter--;
}
if (d_carrier_lock_fail_counter>200)
{
@ -449,7 +469,7 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
tracking_message=3; //loss of lock
d_channel_internal_queue->push(tracking_message);
d_carrier_lock_fail_counter=0;
d_enable_tracking=false; // TODO: check if disabling tranking is consistent with the channel state machine
d_enable_tracking=false; // TODO: check if disabling tracking is consistent with the channel state machine
}
//std::cout<<"d_carrier_lock_fail_counter"<<d_carrier_lock_fail_counter<<"\r\n";

View File

@ -1,9 +1,12 @@
/*!
* \file gps_l1_ca_dll_pll_tracking_cc.h
* \brief Brief description of the file here
* \author Javier Arribas, 2011. jarribas(at)cttc.es
* \brief code DLL + carrier PLL
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
* Javier Arribas, 2011. jarribas(at)cttc.es
*
* Detailed description of the file here if needed.
* Code DLL + carrier PLL according to the algorithms described in [1]
* [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
* A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, Birkha user, 2007
*
* -------------------------------------------------------------------------
*
@ -29,7 +32,6 @@
*
* -------------------------------------------------------------------------
*/
#ifndef GPS_L1_CA_DLL_PLL_TRACKING_CC_H
#define GPS_L1_CA_DLL_PLL_TRACKING_CC_H

View File

@ -58,8 +58,8 @@ public:
virtual void start_tracking() = 0;
virtual void set_satellite(unsigned int satellite) = 0;
virtual void set_channel(unsigned int channel) = 0;
virtual void set_prn_code_phase(signed int phase) = 0;
virtual void set_doppler_freq_shift(float phase) = 0;
virtual void set_prn_code_phase(signed int phase_samples) = 0;
virtual void set_doppler_freq_shift(float doppler_freq_hz) = 0;
virtual void set_acq_sample_stamp(unsigned long int sample_stamp) = 0;
virtual void set_channel_queue(concurrent_queue<int> *channel_internal_queue) = 0;