mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-06-13 16:56:52 +00:00
Tracking Classes are now upper case.
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@125 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
69f9d8f902
commit
32690a7d59
|
@ -61,21 +61,33 @@ using google::LogMessage;
|
||||||
|
|
||||||
gps_l1_ca_dll_fll_pll_tracking_cc_sptr
|
gps_l1_ca_dll_fll_pll_tracking_cc_sptr
|
||||||
gps_l1_ca_dll_fll_pll_make_tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
gps_l1_ca_dll_fll_pll_make_tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
||||||
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename, int order, float fll_bw_hz, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips) {
|
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename, int order,
|
||||||
|
float fll_bw_hz, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips)
|
||||||
|
{
|
||||||
|
|
||||||
return gps_l1_ca_dll_fll_pll_tracking_cc_sptr(new gps_l1_ca_dll_fll_pll_tracking_cc(satellite, if_freq,
|
return gps_l1_ca_dll_fll_pll_tracking_cc_sptr(new Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc(satellite, if_freq,
|
||||||
fs_in, vector_length, queue, dump, dump_filename, order, fll_bw_hz, pll_bw_hz,dll_bw_hz,early_late_space_chips));
|
fs_in, vector_length, queue, dump, dump_filename, order, fll_bw_hz, pll_bw_hz,dll_bw_hz,
|
||||||
|
early_late_space_chips));
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::forecast (int noutput_items,
|
|
||||||
gr_vector_int &ninput_items_required){
|
|
||||||
|
|
||||||
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
|
||||||
|
{
|
||||||
ninput_items_required[0] =d_vector_length*2; //set the required available samples in each call
|
ninput_items_required[0] =d_vector_length*2; //set the required available samples in each call
|
||||||
}
|
}
|
||||||
|
|
||||||
gps_l1_ca_dll_fll_pll_tracking_cc::gps_l1_ca_dll_fll_pll_tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
|
||||||
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename, int order, float fll_bw_hz, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips) :
|
|
||||||
gr_block ("gps_l1_ca_dll_fll_pll_tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
|
||||||
gr_make_io_signature(5, 5, sizeof(double))) {
|
Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc(unsigned int satellite,
|
||||||
|
long if_freq, long fs_in, unsigned int vector_length, gr_msg_queue_sptr queue, bool dump,
|
||||||
|
std::string dump_filename, int order, float fll_bw_hz, float pll_bw_hz, float dll_bw_hz,
|
||||||
|
float early_late_space_chips) :
|
||||||
|
gr_block ("Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
||||||
|
gr_make_io_signature(5, 5, sizeof(double)))
|
||||||
|
{
|
||||||
//gr_sync_decimator ("gps_l1_ca_dll_pll_tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
//gr_sync_decimator ("gps_l1_ca_dll_pll_tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
||||||
// gr_make_io_signature(3, 3, sizeof(float)),vector_length) {
|
// gr_make_io_signature(3, 3, sizeof(float)),vector_length) {
|
||||||
// initialize internal vars
|
// initialize internal vars
|
||||||
|
@ -117,10 +129,12 @@ gps_l1_ca_dll_fll_pll_tracking_cc::gps_l1_ca_dll_fll_pll_tracking_cc(unsigned in
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
d_carrier_lock_threshold = 5;
|
d_carrier_lock_threshold = 5;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::start_tracking(){
|
|
||||||
|
|
||||||
|
|
||||||
|
void Gps_L1_Ca_Dll_Fll_Pll_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
|
||||||
|
@ -193,7 +207,7 @@ void gps_l1_ca_dll_fll_pll_tracking_cc::start_tracking(){
|
||||||
std::cout<<"PULL-IN Doppler [Hz]= "<<d_carrier_doppler_hz<<" Code Phase correction [samples]="<<delay_correction_samples<<" PULL-IN Code Phase [samples]= "<<d_acq_code_phase_samples<<"\r\n";
|
std::cout<<"PULL-IN Doppler [Hz]= "<<d_carrier_doppler_hz<<" Code Phase correction [samples]="<<delay_correction_samples<<" PULL-IN Code Phase [samples]= "<<d_acq_code_phase_samples<<"\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::update_local_code()
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::update_local_code()
|
||||||
{
|
{
|
||||||
float tcode_chips;
|
float tcode_chips;
|
||||||
float rem_code_phase_chips;
|
float rem_code_phase_chips;
|
||||||
|
@ -217,7 +231,7 @@ void gps_l1_ca_dll_fll_pll_tracking_cc::update_local_code()
|
||||||
//d_code_phase_samples=d_code_phase_samples+(float)d_fs_in*GPS_L1_CA_CODE_LENGTH_CHIPS*(1/d_code_freq_hz-1/GPS_L1_CA_CODE_RATE_HZ);
|
//d_code_phase_samples=d_code_phase_samples+(float)d_fs_in*GPS_L1_CA_CODE_LENGTH_CHIPS*(1/d_code_freq_hz-1/GPS_L1_CA_CODE_RATE_HZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::update_local_carrier()
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::update_local_carrier()
|
||||||
{
|
{
|
||||||
float phase, phase_step;
|
float phase, phase_step;
|
||||||
phase_step = (float)TWO_PI*d_carrier_doppler_hz/(float)d_fs_in;
|
phase_step = (float)TWO_PI*d_carrier_doppler_hz/(float)d_fs_in;
|
||||||
|
@ -230,7 +244,7 @@ void gps_l1_ca_dll_fll_pll_tracking_cc::update_local_carrier()
|
||||||
d_acc_carrier_phase_rad=d_acc_carrier_phase_rad+d_rem_carr_phase;
|
d_acc_carrier_phase_rad=d_acc_carrier_phase_rad+d_rem_carr_phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
gps_l1_ca_dll_fll_pll_tracking_cc::~gps_l1_ca_dll_fll_pll_tracking_cc() {
|
Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::~Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc() {
|
||||||
d_dump_file.close();
|
d_dump_file.close();
|
||||||
delete[] d_ca_code;
|
delete[] d_ca_code;
|
||||||
delete[] d_early_code;
|
delete[] d_early_code;
|
||||||
|
@ -244,7 +258,7 @@ gps_l1_ca_dll_fll_pll_tracking_cc::~gps_l1_ca_dll_fll_pll_tracking_cc() {
|
||||||
* Notice that this is a class derived from gr_sync_decimator, so each of the ninput_items has vector_length samples
|
* Notice that this is a class derived from gr_sync_decimator, so each of the ninput_items has vector_length samples
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int gps_l1_ca_dll_fll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
int Gps_L1_Ca_Dll_Fll_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) {
|
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) {
|
||||||
|
|
||||||
// if ((unsigned int)ninput_items[0]<(d_vector_length*2))
|
// if ((unsigned int)ninput_items[0]<(d_vector_length*2))
|
||||||
|
@ -527,22 +541,22 @@ int gps_l1_ca_dll_fll_pll_tracking_cc::general_work (int noutput_items, gr_vecto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::set_acq_code_phase(float code_phase) {
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_acq_code_phase(float code_phase) {
|
||||||
d_acq_code_phase_samples=code_phase;
|
d_acq_code_phase_samples=code_phase;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking code phase set to " << d_acq_code_phase_samples;
|
LOG_AT_LEVEL(INFO) << "Tracking code phase set to " << d_acq_code_phase_samples;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::set_acq_doppler(float doppler) {
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_acq_doppler(float doppler) {
|
||||||
d_acq_carrier_doppler_hz = doppler;
|
d_acq_carrier_doppler_hz = doppler;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking carrier doppler set to " << d_acq_carrier_doppler_hz;
|
LOG_AT_LEVEL(INFO) << "Tracking carrier doppler set to " << d_acq_carrier_doppler_hz;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::set_satellite(unsigned int satellite) {
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_satellite(unsigned int satellite) {
|
||||||
d_satellite = satellite;
|
d_satellite = satellite;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking Satellite set to " << d_satellite;
|
LOG_AT_LEVEL(INFO) << "Tracking Satellite set to " << d_satellite;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::set_channel(unsigned int channel) {
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_channel(unsigned int channel) {
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking Channel set to " << d_channel;
|
LOG_AT_LEVEL(INFO) << "Tracking Channel set to " << d_channel;
|
||||||
// ############# ENABLE DATA FILE LOG #################
|
// ############# ENABLE DATA FILE LOG #################
|
||||||
|
@ -564,12 +578,12 @@ void gps_l1_ca_dll_fll_pll_tracking_cc::set_channel(unsigned int channel) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::set_acq_sample_stamp(unsigned long int sample_stamp)
|
void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_acq_sample_stamp(unsigned long int sample_stamp)
|
||||||
{
|
{
|
||||||
d_acq_sample_stamp = sample_stamp;
|
d_acq_sample_stamp = sample_stamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_fll_pll_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue)
|
void Gps_L1_Ca_Dll_Fll_Pll_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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include "concurrent_queue.h"
|
#include "concurrent_queue.h"
|
||||||
|
|
||||||
class gps_l1_ca_dll_fll_pll_tracking_cc;
|
class Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc;
|
||||||
typedef boost::shared_ptr<gps_l1_ca_dll_fll_pll_tracking_cc>
|
typedef boost::shared_ptr<Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc>
|
||||||
gps_l1_ca_dll_fll_pll_tracking_cc_sptr;
|
gps_l1_ca_dll_fll_pll_tracking_cc_sptr;
|
||||||
|
|
||||||
gps_l1_ca_dll_fll_pll_tracking_cc_sptr
|
gps_l1_ca_dll_fll_pll_tracking_cc_sptr
|
||||||
|
@ -71,7 +71,7 @@ gps_l1_ca_dll_fll_pll_make_tracking_cc(unsigned int satellite,
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a DLL and a FLL assisted PLL tracking loop block
|
* \brief This class implements a DLL and a FLL assisted PLL tracking loop block
|
||||||
*/
|
*/
|
||||||
class gps_l1_ca_dll_fll_pll_tracking_cc: public gr_block
|
class Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc: public gr_block
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -90,7 +90,7 @@ private:
|
||||||
float dll_bw_hz,
|
float dll_bw_hz,
|
||||||
float early_late_space_chips);
|
float early_late_space_chips);
|
||||||
|
|
||||||
gps_l1_ca_dll_fll_pll_tracking_cc(unsigned int satellite,
|
Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc(unsigned int satellite,
|
||||||
long if_freq,
|
long if_freq,
|
||||||
long fs_in, unsigned
|
long fs_in, unsigned
|
||||||
int vector_length,
|
int vector_length,
|
||||||
|
@ -149,7 +149,7 @@ private:
|
||||||
|
|
||||||
// FLL + PLL filter
|
// FLL + PLL filter
|
||||||
float d_FLL_discriminator_hz; // This is a class variable because FLL needs to have memory
|
float d_FLL_discriminator_hz; // This is a class variable because FLL needs to have memory
|
||||||
tracking_FLL_PLL_filter d_carrier_loop_filter;
|
Tracking_FLL_PLL_filter d_carrier_loop_filter;
|
||||||
float d_acc_carrier_phase_rad;
|
float d_acc_carrier_phase_rad;
|
||||||
|
|
||||||
unsigned long int d_sample_counter;
|
unsigned long int d_sample_counter;
|
||||||
|
@ -174,7 +174,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~gps_l1_ca_dll_fll_pll_tracking_cc();
|
~Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc();
|
||||||
|
|
||||||
void set_satellite(unsigned int satellite);
|
void set_satellite(unsigned int satellite);
|
||||||
void set_channel(unsigned int channel);
|
void set_channel(unsigned int channel);
|
||||||
|
|
|
@ -64,15 +64,16 @@ using google::LogMessage;
|
||||||
|
|
||||||
gps_l1_ca_dll_pll_tracking_cc_sptr
|
gps_l1_ca_dll_pll_tracking_cc_sptr
|
||||||
gps_l1_ca_dll_pll_make_tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
gps_l1_ca_dll_pll_make_tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
||||||
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips)
|
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename,
|
||||||
|
float pll_bw_hz, float dll_bw_hz, float early_late_space_chips)
|
||||||
{
|
{
|
||||||
return gps_l1_ca_dll_pll_tracking_cc_sptr(new gps_l1_ca_dll_pll_tracking_cc(satellite, if_freq,
|
return gps_l1_ca_dll_pll_tracking_cc_sptr(new Gps_L1_Ca_Dll_Pll_Tracking_cc(satellite, 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_tracking_cc::forecast (int noutput_items,
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::forecast (int noutput_items,
|
||||||
gr_vector_int &ninput_items_required)
|
gr_vector_int &ninput_items_required)
|
||||||
{
|
{
|
||||||
ninput_items_required[0] = (int)d_vector_length*2; //set the required available samples in each call
|
ninput_items_required[0] = (int)d_vector_length*2; //set the required available samples in each call
|
||||||
|
@ -80,13 +81,13 @@ void gps_l1_ca_dll_pll_tracking_cc::forecast (int noutput_items,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gps_l1_ca_dll_pll_tracking_cc::gps_l1_ca_dll_pll_tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc(unsigned int satellite, long if_freq, long fs_in, unsigned
|
||||||
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips) :
|
int vector_length, gr_msg_queue_sptr queue, bool dump, std::string dump_filename, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips) :
|
||||||
gr_block ("gps_l1_ca_dll_pll_tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
gr_block ("Gps_L1_Ca_Dll_Pll_Tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
||||||
gr_make_io_signature(5, 5, sizeof(double)))
|
gr_make_io_signature(5, 5, sizeof(double)))
|
||||||
{
|
{
|
||||||
|
|
||||||
//gr_sync_decimator ("gps_l1_ca_dll_pll_tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
//gr_sync_decimator ("Gps_L1_Ca_Dll_Pll_Tracking_cc", gr_make_io_signature (1, 1, sizeof(gr_complex)),
|
||||||
// gr_make_io_signature(3, 3, sizeof(float)),vector_length) {
|
// gr_make_io_signature(3, 3, sizeof(float)),vector_length) {
|
||||||
// initialize internal vars
|
// initialize internal vars
|
||||||
d_queue = queue;
|
d_queue = queue;
|
||||||
|
@ -145,7 +146,7 @@ gps_l1_ca_dll_pll_tracking_cc::gps_l1_ca_dll_pll_tracking_cc(unsigned int satell
|
||||||
d_carrier_lock_threshold = 5;
|
d_carrier_lock_threshold = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::start_tracking()
|
void Gps_L1_Ca_Dll_Pll_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
|
||||||
|
@ -224,7 +225,7 @@ void gps_l1_ca_dll_pll_tracking_cc::start_tracking()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::update_local_code()
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::update_local_code()
|
||||||
{
|
{
|
||||||
float tcode_chips;
|
float tcode_chips;
|
||||||
float rem_code_phase_chips;
|
float rem_code_phase_chips;
|
||||||
|
@ -258,7 +259,7 @@ void gps_l1_ca_dll_pll_tracking_cc::update_local_code()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::update_local_carrier()
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::update_local_carrier()
|
||||||
{
|
{
|
||||||
float phase_rad, phase_step_rad;
|
float phase_rad, phase_step_rad;
|
||||||
|
|
||||||
|
@ -276,7 +277,7 @@ void gps_l1_ca_dll_pll_tracking_cc::update_local_carrier()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gps_l1_ca_dll_pll_tracking_cc::~gps_l1_ca_dll_pll_tracking_cc()
|
Gps_L1_Ca_Dll_Pll_Tracking_cc::~Gps_L1_Ca_Dll_Pll_Tracking_cc()
|
||||||
{
|
{
|
||||||
d_dump_file.close();
|
d_dump_file.close();
|
||||||
delete[] d_ca_code;
|
delete[] d_ca_code;
|
||||||
|
@ -296,7 +297,7 @@ gps_l1_ca_dll_pll_tracking_cc::~gps_l1_ca_dll_pll_tracking_cc()
|
||||||
* Notice that this is a class derived from gr_sync_decimator, so each of the ninput_items has vector_length samples
|
* Notice that this is a class derived from gr_sync_decimator, so each of the ninput_items has vector_length samples
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
int Gps_L1_Ca_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)
|
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -317,7 +318,8 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||||
d_Prompt = gr_complex(0,0);
|
d_Prompt = gr_complex(0,0);
|
||||||
d_Late = gr_complex(0,0);
|
d_Late = gr_complex(0,0);
|
||||||
|
|
||||||
if (d_enable_tracking==true){
|
if (d_enable_tracking == true)
|
||||||
|
{
|
||||||
/*
|
/*
|
||||||
* Receiver signal alignment
|
* Receiver signal alignment
|
||||||
*/
|
*/
|
||||||
|
@ -349,7 +351,8 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||||
double **out = (double **) &output_items[0];
|
double **out = (double **) &output_items[0];
|
||||||
|
|
||||||
// check for samples consistency
|
// check for samples consistency
|
||||||
for(int i=0; i<d_current_prn_length_samples; i++) {
|
for(int i=0; i<d_current_prn_length_samples; i++)
|
||||||
|
{
|
||||||
if (std::isnan(in[i].real()) == true or std::isnan(in[i].imag()) == true)// or std::isinf(in[i].real())==true or std::isinf(in[i].imag())==true)
|
if (std::isnan(in[i].real()) == true or std::isnan(in[i].imag()) == true)// or std::isinf(in[i].real())==true or std::isinf(in[i].imag())==true)
|
||||||
{
|
{
|
||||||
const int samples_available = ninput_items[0];
|
const int samples_available = ninput_items[0];
|
||||||
|
@ -373,7 +376,8 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||||
/*!
|
/*!
|
||||||
* \todo Use SIMD-enabled correlators
|
* \todo Use SIMD-enabled correlators
|
||||||
*/
|
*/
|
||||||
for(int i=0; i<d_current_prn_length_samples; i++) {
|
for(int i=0; i<d_current_prn_length_samples; i++)
|
||||||
|
{
|
||||||
//Perform the carrier wipe-off
|
//Perform the carrier wipe-off
|
||||||
bb_signal_sample = in[i] * d_carr_sign[i];
|
bb_signal_sample = in[i] * d_carr_sign[i];
|
||||||
// Now get early, late, and prompt values for each
|
// Now get early, late, and prompt values for each
|
||||||
|
@ -515,7 +519,8 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||||
*out[4] = 0;
|
*out[4] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(d_dump) {
|
if(d_dump)
|
||||||
|
{
|
||||||
// MULTIPLEXED FILE RECORDING - Record results to file
|
// MULTIPLEXED FILE RECORDING - Record results to file
|
||||||
float prompt_I;
|
float prompt_I;
|
||||||
float prompt_Q;
|
float prompt_Q;
|
||||||
|
@ -580,7 +585,7 @@ int gps_l1_ca_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::set_acq_code_phase(float code_phase)
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_acq_code_phase(float code_phase)
|
||||||
{
|
{
|
||||||
d_acq_code_phase_samples = code_phase;
|
d_acq_code_phase_samples = code_phase;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking code phase set to " << d_acq_code_phase_samples;
|
LOG_AT_LEVEL(INFO) << "Tracking code phase set to " << d_acq_code_phase_samples;
|
||||||
|
@ -589,7 +594,9 @@ void gps_l1_ca_dll_pll_tracking_cc::set_acq_code_phase(float code_phase)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::set_acq_doppler(float doppler)
|
|
||||||
|
|
||||||
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_acq_doppler(float doppler)
|
||||||
{
|
{
|
||||||
d_acq_carrier_doppler_hz = doppler;
|
d_acq_carrier_doppler_hz = doppler;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking carrier doppler set to " << d_acq_carrier_doppler_hz;
|
LOG_AT_LEVEL(INFO) << "Tracking carrier doppler set to " << d_acq_carrier_doppler_hz;
|
||||||
|
@ -597,13 +604,19 @@ void gps_l1_ca_dll_pll_tracking_cc::set_acq_doppler(float doppler)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::set_satellite(unsigned int satellite)
|
|
||||||
|
|
||||||
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_satellite(unsigned int satellite)
|
||||||
{
|
{
|
||||||
d_satellite = satellite;
|
d_satellite = satellite;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking Satellite set to " << d_satellite;
|
LOG_AT_LEVEL(INFO) << "Tracking Satellite set to " << d_satellite;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::set_channel(unsigned int channel)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_channel(unsigned int channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
LOG_AT_LEVEL(INFO) << "Tracking Channel set to " << d_channel;
|
LOG_AT_LEVEL(INFO) << "Tracking Channel set to " << d_channel;
|
||||||
|
@ -630,7 +643,7 @@ void gps_l1_ca_dll_pll_tracking_cc::set_channel(unsigned int channel)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::set_acq_sample_stamp(unsigned long int sample_stamp)
|
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_acq_sample_stamp(unsigned long int sample_stamp)
|
||||||
{
|
{
|
||||||
d_acq_sample_stamp = sample_stamp;
|
d_acq_sample_stamp = sample_stamp;
|
||||||
}
|
}
|
||||||
|
@ -638,7 +651,7 @@ void gps_l1_ca_dll_pll_tracking_cc::set_acq_sample_stamp(unsigned long int sampl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gps_l1_ca_dll_pll_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue)
|
void Gps_L1_Ca_Dll_Pll_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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include "concurrent_queue.h"
|
#include "concurrent_queue.h"
|
||||||
|
|
||||||
class gps_l1_ca_dll_pll_tracking_cc;
|
class Gps_L1_Ca_Dll_Pll_Tracking_cc;
|
||||||
typedef boost::shared_ptr<gps_l1_ca_dll_pll_tracking_cc>
|
typedef boost::shared_ptr<Gps_L1_Ca_Dll_Pll_Tracking_cc>
|
||||||
gps_l1_ca_dll_pll_tracking_cc_sptr;
|
gps_l1_ca_dll_pll_tracking_cc_sptr;
|
||||||
|
|
||||||
gps_l1_ca_dll_pll_tracking_cc_sptr
|
gps_l1_ca_dll_pll_tracking_cc_sptr
|
||||||
|
@ -68,7 +68,7 @@ gps_l1_ca_dll_pll_make_tracking_cc(unsigned int satellite, 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_tracking_cc: public gr_block
|
class Gps_L1_Ca_Dll_Pll_Tracking_cc: public gr_block
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -84,7 +84,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_tracking_cc(unsigned int satellite, long if_freq,
|
Gps_L1_Ca_Dll_Pll_Tracking_cc(unsigned int satellite, long if_freq,
|
||||||
long fs_in, unsigned
|
long fs_in, unsigned
|
||||||
int vector_length,
|
int vector_length,
|
||||||
gr_msg_queue_sptr queue,
|
gr_msg_queue_sptr queue,
|
||||||
|
@ -128,8 +128,8 @@ private:
|
||||||
float d_rem_carr_phase_rad;
|
float d_rem_carr_phase_rad;
|
||||||
|
|
||||||
// PLL and DLL filter library
|
// PLL and DLL filter library
|
||||||
tracking_2nd_DLL_filter d_code_loop_filter;
|
Tracking_2nd_DLL_filter d_code_loop_filter;
|
||||||
tracking_2nd_PLL_filter d_carrier_loop_filter;
|
Tracking_2nd_PLL_filter d_carrier_loop_filter;
|
||||||
|
|
||||||
// acquisition
|
// acquisition
|
||||||
float d_acq_code_phase_samples;
|
float d_acq_code_phase_samples;
|
||||||
|
@ -168,7 +168,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~gps_l1_ca_dll_pll_tracking_cc();
|
~Gps_L1_Ca_Dll_Pll_Tracking_cc();
|
||||||
|
|
||||||
void set_satellite(unsigned int satellite);
|
void set_satellite(unsigned int satellite);
|
||||||
void set_channel(unsigned int channel);
|
void set_channel(unsigned int channel);
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "tracking_2nd_DLL_filter.h"
|
#include "tracking_2nd_DLL_filter.h"
|
||||||
|
|
||||||
|
|
||||||
void tracking_2nd_DLL_filter::calculate_lopp_coef(float* tau1,float* tau2, float lbw, float zeta, float k)
|
void Tracking_2nd_DLL_filter::calculate_lopp_coef(float* tau1,float* tau2, float lbw, float zeta, float k)
|
||||||
{
|
{
|
||||||
// Solve natural frequency
|
// Solve natural frequency
|
||||||
float Wn;
|
float Wn;
|
||||||
|
@ -50,7 +50,7 @@ void tracking_2nd_DLL_filter::calculate_lopp_coef(float* tau1,float* tau2, float
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void tracking_2nd_DLL_filter::set_DLL_BW(float dll_bw_hz)
|
void Tracking_2nd_DLL_filter::set_DLL_BW(float dll_bw_hz)
|
||||||
{
|
{
|
||||||
//Calculate filter coefficient values
|
//Calculate filter coefficient values
|
||||||
d_dllnoisebandwidth = dll_bw_hz;
|
d_dllnoisebandwidth = dll_bw_hz;
|
||||||
|
@ -59,7 +59,7 @@ void tracking_2nd_DLL_filter::set_DLL_BW(float dll_bw_hz)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void tracking_2nd_DLL_filter::initialize(float d_acq_code_phase_samples)
|
void Tracking_2nd_DLL_filter::initialize(float d_acq_code_phase_samples)
|
||||||
{
|
{
|
||||||
// code tracking loop parameters
|
// code tracking loop parameters
|
||||||
d_old_code_nco = 0.0;
|
d_old_code_nco = 0.0;
|
||||||
|
@ -68,7 +68,7 @@ void tracking_2nd_DLL_filter::initialize(float d_acq_code_phase_samples)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float tracking_2nd_DLL_filter::get_code_nco(float DLL_discriminator)
|
float Tracking_2nd_DLL_filter::get_code_nco(float DLL_discriminator)
|
||||||
{
|
{
|
||||||
float code_nco;
|
float code_nco;
|
||||||
code_nco = d_old_code_nco + (d_tau2_code/d_tau1_code)*(DLL_discriminator - d_old_code_error) + DLL_discriminator * (d_pdi_code/d_tau1_code);
|
code_nco = d_old_code_nco + (d_tau2_code/d_tau1_code)*(DLL_discriminator - d_old_code_error) + DLL_discriminator * (d_pdi_code/d_tau1_code);
|
||||||
|
@ -79,12 +79,13 @@ float tracking_2nd_DLL_filter::get_code_nco(float DLL_discriminator)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tracking_2nd_DLL_filter::tracking_2nd_DLL_filter ()
|
Tracking_2nd_DLL_filter::Tracking_2nd_DLL_filter ()
|
||||||
{
|
{
|
||||||
d_pdi_code = 0.001;// Summation interval for code
|
d_pdi_code = 0.001;// Summation interval for code
|
||||||
d_dlldampingratio = 0.7;
|
d_dlldampingratio = 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
tracking_2nd_DLL_filter::~tracking_2nd_DLL_filter ()
|
|
||||||
|
Tracking_2nd_DLL_filter::~Tracking_2nd_DLL_filter ()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
* K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S. H. Jensen, A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach,
|
* K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S. H. Jensen, A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach,
|
||||||
* Birkhauser, 2007, Applied and Numerical Harmonic Analysis.
|
* Birkhauser, 2007, Applied and Numerical Harmonic Analysis.
|
||||||
*/
|
*/
|
||||||
class tracking_2nd_DLL_filter
|
class Tracking_2nd_DLL_filter
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// PLL filter parameters
|
// PLL filter parameters
|
||||||
|
@ -58,12 +58,13 @@ private:
|
||||||
float d_old_code_nco;
|
float d_old_code_nco;
|
||||||
|
|
||||||
void calculate_lopp_coef(float* tau1,float* tau2, float lbw, float zeta, float k);
|
void calculate_lopp_coef(float* tau1,float* tau2, float lbw, float zeta, float k);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_DLL_BW(float dll_bw_hz); //! Set DLL loop bandwidth [Hz]
|
void set_DLL_BW(float dll_bw_hz); //! Set DLL loop bandwidth [Hz]
|
||||||
void initialize(float d_acq_code_phase_samples);
|
void initialize(float d_acq_code_phase_samples);
|
||||||
float get_code_nco(float DLL_discriminator);
|
float get_code_nco(float DLL_discriminator);
|
||||||
tracking_2nd_DLL_filter();
|
Tracking_2nd_DLL_filter();
|
||||||
~tracking_2nd_DLL_filter();
|
~Tracking_2nd_DLL_filter();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
#include "tracking_2nd_PLL_filter.h"
|
#include "tracking_2nd_PLL_filter.h"
|
||||||
|
|
||||||
|
|
||||||
void tracking_2nd_PLL_filter::calculate_lopp_coef(float* tau1,float* tau2, float lbw, float zeta, float k){
|
void Tracking_2nd_PLL_filter::calculate_lopp_coef(float* tau1,float* tau2, float lbw, float zeta, float k)
|
||||||
|
{
|
||||||
// Solve natural frequency
|
// Solve natural frequency
|
||||||
float Wn;
|
float Wn;
|
||||||
Wn = lbw*8*zeta / (4*zeta*zeta + 1);
|
Wn = lbw*8*zeta / (4*zeta*zeta + 1);
|
||||||
|
@ -46,20 +47,28 @@ void tracking_2nd_PLL_filter::calculate_lopp_coef(float* tau1,float* tau2, float
|
||||||
*tau2 = (2.0 * zeta) / Wn;
|
*tau2 = (2.0 * zeta) / Wn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tracking_2nd_PLL_filter::set_PLL_BW(float pll_bw_hz)
|
|
||||||
|
|
||||||
|
void Tracking_2nd_PLL_filter::set_PLL_BW(float pll_bw_hz)
|
||||||
{
|
{
|
||||||
//Calculate filter coefficient values
|
//Calculate filter coefficient values
|
||||||
d_pllnoisebandwidth = pll_bw_hz;
|
d_pllnoisebandwidth = pll_bw_hz;
|
||||||
calculate_lopp_coef(&d_tau1_carr, &d_tau2_carr, d_pllnoisebandwidth, d_plldampingratio, 0.25);// Calculate filter coefficient values
|
calculate_lopp_coef(&d_tau1_carr, &d_tau2_carr, d_pllnoisebandwidth, d_plldampingratio, 0.25);// Calculate filter coefficient values
|
||||||
}
|
}
|
||||||
void tracking_2nd_PLL_filter::initialize(float d_acq_carrier_doppler_hz)
|
|
||||||
|
|
||||||
|
|
||||||
|
void Tracking_2nd_PLL_filter::initialize(float d_acq_carrier_doppler_hz)
|
||||||
{
|
{
|
||||||
// carrier/Costas loop parameters
|
// carrier/Costas loop parameters
|
||||||
d_old_carr_nco = 0.0;
|
d_old_carr_nco = 0.0;
|
||||||
d_old_carr_error = 0.0;
|
d_old_carr_error = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
float tracking_2nd_PLL_filter::get_carrier_nco(float PLL_discriminator)
|
|
||||||
|
|
||||||
|
|
||||||
|
float Tracking_2nd_PLL_filter::get_carrier_nco(float PLL_discriminator)
|
||||||
{
|
{
|
||||||
float carr_nco;
|
float carr_nco;
|
||||||
carr_nco = d_old_carr_nco+(d_tau2_carr/d_tau1_carr)*(PLL_discriminator - d_old_carr_error) + PLL_discriminator * (d_pdi_carr/d_tau1_carr);
|
carr_nco = d_old_carr_nco+(d_tau2_carr/d_tau1_carr)*(PLL_discriminator - d_old_carr_error) + PLL_discriminator * (d_pdi_carr/d_tau1_carr);
|
||||||
|
@ -68,14 +77,17 @@ float tracking_2nd_PLL_filter::get_carrier_nco(float PLL_discriminator)
|
||||||
return carr_nco;
|
return carr_nco;
|
||||||
}
|
}
|
||||||
|
|
||||||
tracking_2nd_PLL_filter::tracking_2nd_PLL_filter ()
|
|
||||||
|
|
||||||
|
Tracking_2nd_PLL_filter::Tracking_2nd_PLL_filter ()
|
||||||
{
|
{
|
||||||
//--- PLL variables --------------------------------------------------------
|
//--- PLL variables --------------------------------------------------------
|
||||||
d_pdi_carr = 0.001;// Summation interval for carrier
|
d_pdi_carr = 0.001;// Summation interval for carrier
|
||||||
d_plldampingratio=0.65;
|
d_plldampingratio=0.65;
|
||||||
}
|
}
|
||||||
|
|
||||||
tracking_2nd_PLL_filter::~tracking_2nd_PLL_filter ()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Tracking_2nd_PLL_filter::~Tracking_2nd_PLL_filter ()
|
||||||
|
{}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
* K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S. H. Jensen, A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach,
|
* K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S. H. Jensen, A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach,
|
||||||
* Birkhauser, 2007, Applied and Numerical Harmonic Analysis.
|
* Birkhauser, 2007, Applied and Numerical Harmonic Analysis.
|
||||||
*/
|
*/
|
||||||
class tracking_2nd_PLL_filter
|
class Tracking_2nd_PLL_filter
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// PLL filter parameters
|
// PLL filter parameters
|
||||||
|
@ -63,8 +63,8 @@ public:
|
||||||
void set_PLL_BW(float pll_bw_hz); //! Set PLL loop bandwidth [Hz]
|
void set_PLL_BW(float pll_bw_hz); //! Set PLL loop bandwidth [Hz]
|
||||||
void initialize(float d_acq_carrier_doppler_hz);
|
void initialize(float d_acq_carrier_doppler_hz);
|
||||||
float get_carrier_nco(float PLL_discriminator);
|
float get_carrier_nco(float PLL_discriminator);
|
||||||
tracking_2nd_PLL_filter();
|
Tracking_2nd_PLL_filter();
|
||||||
~tracking_2nd_PLL_filter();
|
~Tracking_2nd_PLL_filter();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "tracking_FLL_PLL_filter.h"
|
#include "tracking_FLL_PLL_filter.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
void tracking_FLL_PLL_filter::set_params(float fll_bw_hz,float pll_bw_hz, int order)
|
void Tracking_FLL_PLL_filter::set_params(float fll_bw_hz,float pll_bw_hz, int order)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Filter design (Kaplan 2nd ed., Pag. 181 Fig. 181)
|
* Filter design (Kaplan 2nd ed., Pag. 181 Fig. 181)
|
||||||
|
@ -54,7 +54,8 @@ void tracking_FLL_PLL_filter::set_params(float fll_bw_hz,float pll_bw_hz, int or
|
||||||
|
|
||||||
d_pll_w0f = fll_bw_hz/0.53;
|
d_pll_w0f = fll_bw_hz/0.53;
|
||||||
d_pll_w0f2 = d_pll_w0f*d_pll_w0f;
|
d_pll_w0f2 = d_pll_w0f*d_pll_w0f;
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* 2nd order PLL with 1st order FLL assist
|
* 2nd order PLL with 1st order FLL assist
|
||||||
|
@ -64,21 +65,31 @@ void tracking_FLL_PLL_filter::set_params(float fll_bw_hz,float pll_bw_hz, int or
|
||||||
d_pll_w0p2 = d_pll_w0p*d_pll_w0p;
|
d_pll_w0p2 = d_pll_w0p*d_pll_w0p;
|
||||||
d_pll_w0f = fll_bw_hz/0.25;
|
d_pll_w0f = fll_bw_hz/0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void tracking_FLL_PLL_filter::initialize(float d_acq_carrier_doppler_hz)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Tracking_FLL_PLL_filter::initialize(float d_acq_carrier_doppler_hz)
|
||||||
{
|
{
|
||||||
if (d_order==3)
|
if (d_order==3)
|
||||||
{
|
{
|
||||||
d_pll_x = 2.0 * d_acq_carrier_doppler_hz;
|
d_pll_x = 2.0 * d_acq_carrier_doppler_hz;
|
||||||
d_pll_w = 0;
|
d_pll_w = 0;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
d_pll_w = d_acq_carrier_doppler_hz;
|
d_pll_w = d_acq_carrier_doppler_hz;
|
||||||
d_pll_x = 0;
|
d_pll_x = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
float Tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s)
|
||||||
{
|
{
|
||||||
float carrier_error_hz;
|
float carrier_error_hz;
|
||||||
if (d_order==3)
|
if (d_order==3)
|
||||||
|
@ -89,7 +100,8 @@ float tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float
|
||||||
d_pll_w = d_pll_w + correlation_time_s * (d_pll_w0p3 * PLL_discriminator + d_pll_w0f2 * FLL_discriminator);
|
d_pll_w = d_pll_w + correlation_time_s * (d_pll_w0p3 * PLL_discriminator + d_pll_w0f2 * FLL_discriminator);
|
||||||
d_pll_x = d_pll_x + correlation_time_s * (0.5*d_pll_w + d_pll_a2 * d_pll_w0f * FLL_discriminator + d_pll_a3 * d_pll_w0p2 * PLL_discriminator);
|
d_pll_x = d_pll_x + correlation_time_s * (0.5*d_pll_w + d_pll_a2 * d_pll_w0f * FLL_discriminator + d_pll_a3 * d_pll_w0p2 * PLL_discriminator);
|
||||||
carrier_error_hz = 0.5*d_pll_x + d_pll_b3 * d_pll_w0p * PLL_discriminator;
|
carrier_error_hz = 0.5*d_pll_x + d_pll_b3 * d_pll_w0p * PLL_discriminator;
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* 2nd order PLL with 1st order FLL assist
|
* 2nd order PLL with 1st order FLL assist
|
||||||
|
@ -109,12 +121,11 @@ float tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tracking_FLL_PLL_filter::tracking_FLL_PLL_filter ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
tracking_FLL_PLL_filter::~tracking_FLL_PLL_filter ()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
Tracking_FLL_PLL_filter::Tracking_FLL_PLL_filter ()
|
||||||
|
{}
|
||||||
|
|
||||||
|
Tracking_FLL_PLL_filter::~Tracking_FLL_PLL_filter ()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a hybrid FLL and PLL filter for tracking carrier loop
|
* \brief This class implements a hybrid FLL and PLL filter for tracking carrier loop
|
||||||
*/
|
*/
|
||||||
class tracking_FLL_PLL_filter
|
class Tracking_FLL_PLL_filter
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// FLL + PLL filter parameters
|
// FLL + PLL filter parameters
|
||||||
|
@ -53,8 +53,8 @@ public:
|
||||||
void set_params(float fll_bw_hz,float pll_bw_hz, int order);
|
void set_params(float fll_bw_hz,float pll_bw_hz, int order);
|
||||||
void initialize(float d_acq_carrier_doppler_hz);
|
void initialize(float d_acq_carrier_doppler_hz);
|
||||||
float get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s);
|
float get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s);
|
||||||
tracking_FLL_PLL_filter();
|
Tracking_FLL_PLL_filter();
|
||||||
~tracking_FLL_PLL_filter();
|
~Tracking_FLL_PLL_filter();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user