mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-01 07:43:04 +00:00
Remove tabs from the source code
This commit is contained in:
@@ -129,14 +129,14 @@ void GalileoE1DllPllVemlTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
|
||||
void GalileoE1DllPllVemlTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GalileoE1DllPllVemlTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GalileoE1DllPllVemlTracking::get_left_block()
|
||||
|
||||
@@ -130,14 +130,14 @@ void GalileoE1TcpConnectorTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchr
|
||||
|
||||
void GalileoE1TcpConnectorTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GalileoE1TcpConnectorTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GalileoE1TcpConnectorTracking::get_left_block()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Galileo E5a data and pilot Signals
|
||||
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
||||
* \based on work from:
|
||||
* <ul>
|
||||
* <ul>
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* </ul>
|
||||
@@ -137,14 +137,14 @@ void GalileoE5aDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
|
||||
void GalileoE5aDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GalileoE5aDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GalileoE5aDllPllTracking::get_left_block()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Galileo E5a data and pilot Signals
|
||||
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
||||
* \based on work from:
|
||||
* <ul>
|
||||
* <ul>
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* </ul>
|
||||
|
||||
@@ -100,23 +100,25 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
|
||||
extend_correlation_ms,
|
||||
early_late_space_chips);
|
||||
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
|
||||
}else if(item_type_.compare("cshort") == 0)
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
tracking_sc = gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
f_if,
|
||||
fs_in,
|
||||
vector_length,
|
||||
queue_,
|
||||
dump,
|
||||
dump_filename,
|
||||
pll_bw_hz,
|
||||
dll_bw_hz,
|
||||
pll_bw_narrow_hz,
|
||||
dll_bw_narrow_hz,
|
||||
early_late_space_chips);
|
||||
DLOG(INFO) << "tracking(" << tracking_sc->unique_id() << ")";
|
||||
}else
|
||||
}
|
||||
else if(item_type_.compare("cshort") == 0)
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
tracking_sc = gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
f_if,
|
||||
fs_in,
|
||||
vector_length,
|
||||
queue_,
|
||||
dump,
|
||||
dump_filename,
|
||||
pll_bw_hz,
|
||||
dll_bw_hz,
|
||||
pll_bw_narrow_hz,
|
||||
dll_bw_narrow_hz,
|
||||
early_late_space_chips);
|
||||
DLOG(INFO) << "tracking(" << tracking_sc->unique_id() << ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type.";
|
||||
@@ -185,14 +187,14 @@ void GpsL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
|
||||
void GpsL1CaDllPllCAidTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GpsL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block()
|
||||
|
||||
@@ -125,14 +125,14 @@ void GpsL1CaDllPllTrackingGPU::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
|
||||
void GpsL1CaDllPllTrackingGPU::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GpsL1CaDllPllTrackingGPU::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GpsL1CaDllPllTrackingGPU::get_left_block()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* \file gps_l1_ca_tcp_connector_tracking.cc
|
||||
* \brief Implementation of an adapter of a TCP connector block based on code DLL + carrier PLL
|
||||
* \author David Pubill, 2012. dpubill(at)cttc.es
|
||||
* Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
*
|
||||
* Code DLL + carrier PLL according to the algorithms described in:
|
||||
@@ -123,14 +123,14 @@ void GpsL1CaTcpConnectorTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
|
||||
void GpsL1CaTcpConnectorTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GpsL1CaTcpConnectorTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GpsL1CaTcpConnectorTracking::get_left_block()
|
||||
|
||||
@@ -125,14 +125,14 @@ void GpsL2MDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
|
||||
void GpsL2MDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
void GpsL2MDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
if(top_block) { /* top_block is not null */};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GpsL2MDllPllTracking::get_left_block()
|
||||
|
||||
@@ -309,11 +309,11 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri
|
||||
double code_phase_step_half_chips = (2.0 * d_code_freq_chips) / (static_cast<double>(d_fs_in));
|
||||
double rem_code_phase_half_chips = d_rem_code_phase_samples * (2.0*d_code_freq_chips / d_fs_in);
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_half_chips,
|
||||
code_phase_step_half_chips,
|
||||
d_correlation_length_samples);
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_half_chips,
|
||||
code_phase_step_half_chips,
|
||||
d_correlation_length_samples);
|
||||
|
||||
// ################## PLL ##########################################################
|
||||
// PLL discriminator
|
||||
@@ -410,11 +410,11 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri
|
||||
}
|
||||
else
|
||||
{
|
||||
*d_Early = gr_complex(0,0);
|
||||
*d_Prompt = gr_complex(0,0);
|
||||
*d_Late = gr_complex(0,0);
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
current_synchro_data.Tracking_timestamp_secs = (static_cast<double>(d_sample_counter) + static_cast<double>(d_rem_code_phase_samples)) / static_cast<double>(d_fs_in);
|
||||
*d_Early = gr_complex(0,0);
|
||||
*d_Prompt = gr_complex(0,0);
|
||||
*d_Late = gr_complex(0,0);
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
current_synchro_data.Tracking_timestamp_secs = (static_cast<double>(d_sample_counter) + static_cast<double>(d_rem_code_phase_samples)) / static_cast<double>(d_fs_in);
|
||||
}
|
||||
//assign the GNURadio block output data
|
||||
current_synchro_data.System = {'E'};
|
||||
|
||||
@@ -303,11 +303,11 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
|
||||
double code_phase_step_half_chips = (2.0 * d_code_freq_chips) / (static_cast<double>(d_fs_in));
|
||||
double rem_code_phase_half_chips = d_rem_code_phase_samples * (2.0*d_code_freq_chips / d_fs_in);
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_half_chips,
|
||||
code_phase_step_half_chips,
|
||||
d_correlation_length_samples);
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_half_chips,
|
||||
code_phase_step_half_chips,
|
||||
d_correlation_length_samples);
|
||||
|
||||
// ################## TCP CONNECTOR ##########################################################
|
||||
//! Variable used for control
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
|
||||
#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
|
||||
#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* tracking block for Galileo E5a signals
|
||||
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
||||
* \based on work from:
|
||||
* <ul>
|
||||
* <ul>
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* </ul>
|
||||
@@ -323,51 +323,51 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary()
|
||||
// 1. Transform replica to 1 and -1
|
||||
int sec_code_signed[Galileo_E5a_Q_SECONDARY_CODE_LENGTH];
|
||||
for (unsigned int i = 0; i < Galileo_E5a_Q_SECONDARY_CODE_LENGTH; i++)
|
||||
{
|
||||
if (Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN-1].at(i) == '0')
|
||||
{
|
||||
sec_code_signed[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sec_code_signed[i] = -1;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1].at(i) == '0')
|
||||
{
|
||||
sec_code_signed[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sec_code_signed[i] = -1;
|
||||
}
|
||||
}
|
||||
// 2. Transform buffer to 1 and -1
|
||||
int in_corr[CN0_ESTIMATION_SAMPLES];
|
||||
for (unsigned int i = 0; i < CN0_ESTIMATION_SAMPLES; i++)
|
||||
{
|
||||
if (d_Prompt_buffer[i].real() >0)
|
||||
{
|
||||
in_corr[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
in_corr[i] = -1;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (d_Prompt_buffer[i].real() >0)
|
||||
{
|
||||
in_corr[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
in_corr[i] = -1;
|
||||
}
|
||||
}
|
||||
// 3. Serial search
|
||||
int out_corr;
|
||||
int current_best_ = 0;
|
||||
for (unsigned int i = 0; i < Galileo_E5a_Q_SECONDARY_CODE_LENGTH; i++)
|
||||
{
|
||||
out_corr = 0;
|
||||
for (unsigned int j = 0; j < CN0_ESTIMATION_SAMPLES; j++)
|
||||
{
|
||||
//reverse replica sign since i*i=-1 (conjugated complex)
|
||||
out_corr += in_corr[j] * -sec_code_signed[(j+i) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH];
|
||||
}
|
||||
if (abs(out_corr) > current_best_)
|
||||
{
|
||||
current_best_ = abs(out_corr);
|
||||
d_secondary_delay = i;
|
||||
}
|
||||
}
|
||||
{
|
||||
out_corr = 0;
|
||||
for (unsigned int j = 0; j < CN0_ESTIMATION_SAMPLES; j++)
|
||||
{
|
||||
//reverse replica sign since i*i=-1 (conjugated complex)
|
||||
out_corr += in_corr[j] * -sec_code_signed[(j + i) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH];
|
||||
}
|
||||
if (abs(out_corr) > current_best_)
|
||||
{
|
||||
current_best_ = abs(out_corr);
|
||||
d_secondary_delay = i;
|
||||
}
|
||||
}
|
||||
if (current_best_ == CN0_ESTIMATION_SAMPLES) // all bits correlate
|
||||
{
|
||||
d_secondary_lock = true;
|
||||
d_secondary_delay = (d_secondary_delay + CN0_ESTIMATION_SAMPLES - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
{
|
||||
d_secondary_lock = true;
|
||||
d_secondary_delay = (d_secondary_delay + CN0_ESTIMATION_SAMPLES - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -388,10 +388,10 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
|
||||
// Fill the acquisition data
|
||||
current_synchro_data = *d_acquisition_gnss_synchro;
|
||||
|
||||
/* States: 0 Tracking not enabled
|
||||
* 1 Pull-in of primary code (alignment).
|
||||
* 3 Tracking algorithm. Correlates EPL each loop and accumulates the result
|
||||
* until it reaches integration time.
|
||||
/* States: 0 Tracking not enabled
|
||||
* 1 Pull-in of primary code (alignment).
|
||||
* 3 Tracking algorithm. Correlates EPL each loop and accumulates the result
|
||||
* until it reaches integration time.
|
||||
*/
|
||||
switch (d_state)
|
||||
{
|
||||
@@ -402,7 +402,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
|
||||
d_Prompt = gr_complex(0,0);
|
||||
d_Late = gr_complex(0,0);
|
||||
d_Prompt_data = gr_complex(0,0);
|
||||
current_synchro_data.Tracking_timestamp_secs = static_cast<double>(d_sample_counter) / static_cast<double>(d_fs_in);
|
||||
current_synchro_data.Tracking_timestamp_secs = static_cast<double>(d_sample_counter) / static_cast<double>(d_fs_in);
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
break;
|
||||
@@ -440,8 +440,8 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
|
||||
// Secondary code Chip
|
||||
if (d_secondary_lock)
|
||||
{
|
||||
// sec_sign_Q = gr_complex((Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN-1].at(d_secondary_delay)=='0' ? 1 : -1),0);
|
||||
// sec_sign_I = gr_complex((Galileo_E5a_I_SECONDARY_CODE.at(d_secondary_delay%Galileo_E5a_I_SECONDARY_CODE_LENGTH)=='0' ? 1 : -1),0);
|
||||
// sec_sign_Q = gr_complex((Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN-1].at(d_secondary_delay)=='0' ? 1 : -1),0);
|
||||
// sec_sign_I = gr_complex((Galileo_E5a_I_SECONDARY_CODE.at(d_secondary_delay%Galileo_E5a_I_SECONDARY_CODE_LENGTH)=='0' ? 1 : -1),0);
|
||||
sec_sign_Q = gr_complex((Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN-1].at(d_secondary_delay) == '0' ? -1 : 1), 0);
|
||||
sec_sign_I = gr_complex((Galileo_E5a_I_SECONDARY_CODE.at(d_secondary_delay % Galileo_E5a_I_SECONDARY_CODE_LENGTH) == '0' ? -1 : 1), 0);
|
||||
}
|
||||
@@ -480,18 +480,18 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute
|
||||
double code_phase_step_chips = d_code_freq_chips / (static_cast<double>(d_fs_in));
|
||||
double rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / d_fs_in);
|
||||
multicorrelator_cpu_Q.Carrier_wipeoff_multicorrelator_resampler(
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
|
||||
multicorrelator_cpu_I.Carrier_wipeoff_multicorrelator_resampler(
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_chips,
|
||||
code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
|
||||
|
||||
// Accumulate results (coherent integration since there are no bit transitions in pilot signal)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* tracking block for Galileo E5a signals
|
||||
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
||||
* \based on work from:
|
||||
* <ul>
|
||||
* <ul>
|
||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
* </ul>
|
||||
|
||||
@@ -336,8 +336,8 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri
|
||||
double old_d_rem_code_phase_samples;
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
// Fill the acquisition data
|
||||
current_synchro_data = *d_acquisition_gnss_synchro;
|
||||
// Fill the acquisition data
|
||||
current_synchro_data = *d_acquisition_gnss_synchro;
|
||||
// Receiver signal alignment
|
||||
if (d_pull_in == true)
|
||||
{
|
||||
@@ -360,10 +360,10 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri
|
||||
// perform carrier wipe-off and compute Early, Prompt and Late correlation
|
||||
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs,in);
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carrier_phase_rad,
|
||||
d_carrier_phase_step_rad,
|
||||
d_rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_correlation_length_samples);
|
||||
d_carrier_phase_step_rad,
|
||||
d_rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_correlation_length_samples);
|
||||
|
||||
// ####### coherent intergration extension
|
||||
// keep the last symbols
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -136,7 +136,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
d_correlator_outs_16sc = static_cast<lv_16sc_t*>(volk_malloc(d_n_correlator_taps*sizeof(lv_16sc_t), volk_get_alignment()));
|
||||
for (int n = 0; n < d_n_correlator_taps; n++)
|
||||
{
|
||||
d_correlator_outs_16sc[n] = lv_16sc_t(0,0);
|
||||
d_correlator_outs_16sc[n] = lv_16sc_t(0,0);
|
||||
}
|
||||
|
||||
d_local_code_shift_chips = static_cast<float*>(volk_malloc(d_n_correlator_taps*sizeof(float), volk_get_alignment()));
|
||||
@@ -314,7 +314,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri
|
||||
double old_d_rem_code_phase_samples;
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
// Fill the acquisition data
|
||||
// Fill the acquisition data
|
||||
current_synchro_data = *d_acquisition_gnss_synchro;
|
||||
// Receiver signal alignment
|
||||
if (d_pull_in == true)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <queue>
|
||||
|
||||
@@ -325,10 +325,10 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
|
||||
// perform carrier wipe-off and compute Early, Prompt and Late correlation
|
||||
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, in);
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad,
|
||||
d_carrier_phase_step_rad,
|
||||
d_rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
d_carrier_phase_step_rad,
|
||||
d_rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
|
||||
// ################## PLL ##########################################################
|
||||
// PLL discriminator
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_CC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -310,8 +310,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu
|
||||
double old_d_rem_code_phase_samples;
|
||||
if (d_enable_tracking == true)
|
||||
{
|
||||
|
||||
// Fill the acquisition data
|
||||
// Fill the acquisition data
|
||||
current_synchro_data = *d_acquisition_gnss_synchro;
|
||||
// Receiver signal alignment
|
||||
if (d_pull_in == true)
|
||||
@@ -338,10 +337,10 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu
|
||||
memcpy(in_gpu, in, sizeof(gr_complex) * d_correlation_length_samples);
|
||||
cudaProfilerStart();
|
||||
multicorrelator_gpu->Carrier_wipeoff_multicorrelator_resampler_cuda( static_cast<float>(d_rem_carrier_phase_rad),
|
||||
static_cast<float>(d_carrier_phase_step_rad),
|
||||
static_cast<float>(d_code_phase_step_chips),
|
||||
static_cast<float>(d_rem_code_phase_chips),
|
||||
d_correlation_length_samples, d_n_correlator_taps);
|
||||
static_cast<float>(d_carrier_phase_step_rad),
|
||||
static_cast<float>(d_code_phase_step_chips),
|
||||
static_cast<float>(d_rem_code_phase_chips),
|
||||
d_correlation_length_samples, d_n_correlator_taps);
|
||||
cudaProfilerStop();
|
||||
//std::cout<<"c_out[0]="<<d_correlator_outs[0]<<"c_out[1]="<<d_correlator_outs[1]<<"c_out[2]="<<d_correlator_outs[2]<<std::endl;
|
||||
|
||||
@@ -388,7 +387,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu
|
||||
d_rem_code_phase_samples = K_blk_samples - static_cast<double>(d_correlation_length_samples); //rounding error < 1 sample
|
||||
|
||||
// UPDATE REMNANT CARRIER PHASE
|
||||
CORRECTED_INTEGRATION_TIME_S=(static_cast<double>(d_correlation_length_samples)/static_cast<double>(d_fs_in));
|
||||
CORRECTED_INTEGRATION_TIME_S = (static_cast<double>(d_correlation_length_samples)/static_cast<double>(d_fs_in));
|
||||
//remnant carrier phase [rad]
|
||||
d_rem_carrier_phase_rad = fmod(d_rem_carrier_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * CORRECTED_INTEGRATION_TIME_S, GPS_TWO_PI);
|
||||
// UPDATE CARRIER PHASE ACCUULATOR
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -209,9 +209,9 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
// of the receiver operation when is connecting to simulink server.
|
||||
// if (d_sample_counter<d_acq_sample_stamp)
|
||||
// {
|
||||
// acq_trk_diff_samples=0; //disable the correction
|
||||
// acq_trk_diff_samples=0; //disable the correction
|
||||
// }else{
|
||||
// acq_trk_diff_samples = d_sample_counter - d_acq_sample_stamp;//-d_vector_length;
|
||||
// acq_trk_diff_samples = d_sample_counter - d_acq_sample_stamp;//-d_vector_length;
|
||||
// }
|
||||
acq_trk_diff_samples = (long int)d_sample_counter - (long int)d_acq_sample_stamp;
|
||||
std::cout << "acq_trk_diff_samples=" << acq_trk_diff_samples << std::endl;
|
||||
@@ -357,10 +357,10 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
|
||||
double rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_hz / d_fs_in);
|
||||
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad,
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
carr_phase_step_rad,
|
||||
rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
|
||||
//! Variable used for control
|
||||
d_control_id++;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -279,14 +279,14 @@ void gps_l2_m_dll_pll_tracking_cc::start_tracking()
|
||||
|
||||
gps_l2_m_dll_pll_tracking_cc::~gps_l2_m_dll_pll_tracking_cc()
|
||||
{
|
||||
d_dump_file.close();
|
||||
d_dump_file.close();
|
||||
|
||||
volk_free(d_local_code_shift_chips);
|
||||
volk_free(d_correlator_outs);
|
||||
volk_free(d_ca_code);
|
||||
volk_free(d_local_code_shift_chips);
|
||||
volk_free(d_correlator_outs);
|
||||
volk_free(d_ca_code);
|
||||
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
|
||||
|
||||
@@ -332,10 +332,10 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
|
||||
// perform carrier wipe-off and compute Early, Prompt and Late correlation
|
||||
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, in);
|
||||
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad,
|
||||
d_carrier_phase_step_rad,
|
||||
d_rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
d_carrier_phase_step_rad,
|
||||
d_rem_code_phase_chips,
|
||||
d_code_phase_step_chips,
|
||||
d_current_prn_length_samples);
|
||||
|
||||
// ################## PLL ##########################################################
|
||||
// PLL discriminator
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_CC_H
|
||||
|
||||
#include <fstream>
|
||||
#include <queue>
|
||||
|
||||
@@ -60,9 +60,8 @@ cpu_multicorrelator::~cpu_multicorrelator()
|
||||
|
||||
|
||||
bool cpu_multicorrelator::init(
|
||||
int max_signal_length_samples,
|
||||
int n_correlators
|
||||
)
|
||||
int max_signal_length_samples,
|
||||
int n_correlators)
|
||||
{
|
||||
// ALLOCATE MEMORY FOR INTERNAL vectors
|
||||
size_t size = max_signal_length_samples * sizeof(std::complex<float>);
|
||||
@@ -79,12 +78,10 @@ bool cpu_multicorrelator::init(
|
||||
|
||||
|
||||
bool cpu_multicorrelator::set_local_code_and_taps(
|
||||
int code_length_chips,
|
||||
const std::complex<float>* local_code_in,
|
||||
float *shifts_chips
|
||||
)
|
||||
int code_length_chips,
|
||||
const std::complex<float>* local_code_in,
|
||||
float *shifts_chips)
|
||||
{
|
||||
|
||||
d_local_code_in = local_code_in;
|
||||
d_shifts_chips = shifts_chips;
|
||||
d_code_length_chips = code_length_chips;
|
||||
@@ -111,7 +108,6 @@ void cpu_multicorrelator::update_local_code(int correlator_length_samples, float
|
||||
d_code_length_chips,
|
||||
d_n_correlators,
|
||||
correlator_length_samples);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ bool cpu_multicorrelator_16sc::init(
|
||||
|
||||
|
||||
bool cpu_multicorrelator_16sc::set_local_code_and_taps(
|
||||
int code_length_chips,
|
||||
const lv_16sc_t* local_code_in,
|
||||
float *shifts_chips)
|
||||
int code_length_chips,
|
||||
const lv_16sc_t* local_code_in,
|
||||
float *shifts_chips)
|
||||
{
|
||||
d_local_code_in = local_code_in;
|
||||
d_shifts_chips = shifts_chips;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
/*
|
||||
* Signal-to-Noise (SNR) (\f$\rho\f$) estimator using the Signal-to-Noise Variance (SNV) estimator:
|
||||
* \f{equation}
|
||||
* \hat{\rho}=\frac{\hat{P}_s}{\hat{P}_n}=\frac{\hat{P}_s}{\hat{P}_{tot}-\hat{P}_s},
|
||||
* \hat{\rho}=\frac{\hat{P}_s}{\hat{P}_n}=\frac{\hat{P}_s}{\hat{P}_{tot}-\hat{P}_s},
|
||||
* \f}
|
||||
* where \f$\hat{P}_s=\left(\frac{1}{N}\sum^{N-1}_{i=0}|Re(Pc(i))|\right)^2\f$ is the estimation of the signal power,
|
||||
* \f$\hat{P}_{tot}=\frac{1}{N}\sum^{N-1}_{i=0}|Pc(i)|^2\f$ is the estimator of the total power, \f$|\cdot|\f$ is the absolute value,
|
||||
@@ -60,22 +60,22 @@
|
||||
*
|
||||
* The SNR value is converted to CN0 [dB-Hz], taking to account the receiver bandwidth and the PRN code gain, using the following formula:
|
||||
* \f{equation}
|
||||
* CN0_{dB}=10*log(\hat{\rho})+10*log(\frac{f_s}{2})-10*log(L_{PRN}),
|
||||
* CN0_{dB}=10*log(\hat{\rho})+10*log(\frac{f_s}{2})-10*log(L_{PRN}),
|
||||
* \f}
|
||||
* where \f$f_s\f$ is the sampling frequency and \f$L_{PRN}\f$ is the PRN sequence length.
|
||||
*
|
||||
*/
|
||||
float cn0_svn_estimator(gr_complex* Prompt_buffer, int length, long fs_in, double code_length)
|
||||
{
|
||||
double SNR = 0;
|
||||
double SNR_dB_Hz = 0;
|
||||
double SNR = 0;
|
||||
double SNR_dB_Hz = 0;
|
||||
double Psig = 0;
|
||||
double Ptot = 0;
|
||||
for (int i=0; i<length; i++)
|
||||
{
|
||||
Psig += std::abs(static_cast<double>(Prompt_buffer[i].real()));
|
||||
Ptot += static_cast<double>(Prompt_buffer[i].imag()) * static_cast<double>(Prompt_buffer[i].imag())
|
||||
+ static_cast<double>(Prompt_buffer[i].real()) * static_cast<double>(Prompt_buffer[i].real());
|
||||
+ static_cast<double>(Prompt_buffer[i].real()) * static_cast<double>(Prompt_buffer[i].real());
|
||||
}
|
||||
Psig = Psig / static_cast<double>(length);
|
||||
Psig = Psig * Psig;
|
||||
@@ -89,7 +89,7 @@ float cn0_svn_estimator(gr_complex* Prompt_buffer, int length, long fs_in, doubl
|
||||
/*
|
||||
* The estimate of the cosine of twice the carrier phase error is given by
|
||||
* \f{equation}
|
||||
* \cos(2\phi)=\frac{NBD}{NBP},
|
||||
* \cos(2\phi)=\frac{NBD}{NBP},
|
||||
* \f}
|
||||
* where \f$NBD=(\sum^{N-1}_{i=0}Im(Pc(i)))^2-(\sum^{N-1}_{i=0}Re(Pc(i)))^2\f$,
|
||||
* \f$NBP=(\sum^{N-1}_{i=0}Im(Pc(i)))^2+(\sum^{N-1}_{i=0}Re(Pc(i)))^2\f$, and
|
||||
|
||||
@@ -80,7 +80,7 @@ float cn0_svn_estimator(gr_complex* Prompt_buffer, int length, long fs_in, doubl
|
||||
*
|
||||
* The Carrier Phase Lock Detector block uses the estimate of the cosine of twice the carrier phase error is given by
|
||||
* \f{equation}
|
||||
* C2\phi=\frac{NBD}{NBP},
|
||||
* C2\phi=\frac{NBD}{NBP},
|
||||
* \f}
|
||||
* where \f$NBD=(\sum^{N-1}_{i=0}|Im(Pc(i))|)^2+(\sum^{N-1}_{i=0}|Re(Pc(i))|)^2\f$,
|
||||
* \f$NBP=\sum^{N-1}_{i=0}Im(Pc(i))^2-\sum^{N-1}_{i=0}Re(Pc(i))^2\f$, and
|
||||
|
||||
@@ -40,12 +40,10 @@ tcp_communication::tcp_communication() : tcp_socket_(io_service_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
tcp_communication::~tcp_communication()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
{
|
||||
try
|
||||
@@ -54,10 +52,10 @@ int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), d_port_);
|
||||
boost::asio::ip::tcp::acceptor acceptor(io_service_, endpoint);
|
||||
|
||||
if (d_port_ == d_port_ch0_)
|
||||
{
|
||||
std::cout << "Server ready. Listening for TCP connections..." << std::endl;
|
||||
}
|
||||
if (d_port_ == d_port_ch0_)
|
||||
{
|
||||
std::cout << "Server ready. Listening for TCP connections..." << std::endl;
|
||||
}
|
||||
|
||||
// Reuse the IP address for each connection
|
||||
acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
|
||||
@@ -78,12 +76,11 @@ int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, tcp_packet_data *tcp_data_)
|
||||
{
|
||||
int controlc = 0;
|
||||
boost::array<float, NUM_RX_VARIABLES> readbuf;
|
||||
float d_control_id_ = buf.data()[0];
|
||||
int controlc = 0;
|
||||
boost::array<float, NUM_RX_VARIABLES> readbuf;
|
||||
float d_control_id_ = buf.data()[0];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -92,17 +89,17 @@ void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, N
|
||||
|
||||
// Read the received TCP packet
|
||||
tcp_socket_.read_some(boost::asio::buffer(readbuf));
|
||||
|
||||
//! Control. The GNSS-SDR program ends if an error in a TCP packet is detected.
|
||||
if (d_control_id_ != readbuf.data()[0])
|
||||
{
|
||||
throw "Packet error!";
|
||||
}
|
||||
|
||||
// Recover the variables received
|
||||
tcp_data_->proc_pack_code_error = readbuf.data()[1];
|
||||
tcp_data_->proc_pack_carr_error = readbuf.data()[2];
|
||||
tcp_data_->proc_pack_carrier_doppler_hz = readbuf.data()[3];
|
||||
//! Control. The GNSS-SDR program ends if an error in a TCP packet is detected.
|
||||
if (d_control_id_ != readbuf.data()[0])
|
||||
{
|
||||
throw "Packet error!";
|
||||
}
|
||||
|
||||
// Recover the variables received
|
||||
tcp_data_->proc_pack_code_error = readbuf.data()[1];
|
||||
tcp_data_->proc_pack_carr_error = readbuf.data()[2];
|
||||
tcp_data_->proc_pack_carrier_doppler_hz = readbuf.data()[3];
|
||||
}
|
||||
|
||||
catch(std::exception& e)
|
||||
@@ -113,11 +110,12 @@ void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, N
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, tcp_packet_data *tcp_data_)
|
||||
{
|
||||
int controlc = 0;
|
||||
boost::array<float, NUM_RX_VARIABLES> readbuf;
|
||||
float d_control_id_ = buf.data()[0];
|
||||
int controlc = 0;
|
||||
boost::array<float, NUM_RX_VARIABLES> readbuf;
|
||||
float d_control_id_ = buf.data()[0];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -127,16 +125,16 @@ void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NU
|
||||
// Read the received TCP packet
|
||||
tcp_socket_.read_some(boost::asio::buffer(readbuf));
|
||||
|
||||
//! Control. The GNSS-SDR program ends if an error in a TCP packet is detected.
|
||||
if (d_control_id_ != readbuf.data()[0])
|
||||
{
|
||||
throw "Packet error!";
|
||||
}
|
||||
//! Control. The GNSS-SDR program ends if an error in a TCP packet is detected.
|
||||
if (d_control_id_ != readbuf.data()[0])
|
||||
{
|
||||
throw "Packet error!";
|
||||
}
|
||||
|
||||
// Recover the variables received
|
||||
tcp_data_->proc_pack_code_error = readbuf.data()[1];
|
||||
tcp_data_->proc_pack_carr_error = readbuf.data()[2];
|
||||
tcp_data_->proc_pack_carrier_doppler_hz = readbuf.data()[3];
|
||||
// Recover the variables received
|
||||
tcp_data_->proc_pack_code_error = readbuf.data()[1];
|
||||
tcp_data_->proc_pack_carr_error = readbuf.data()[2];
|
||||
tcp_data_->proc_pack_carrier_doppler_hz = readbuf.data()[3];
|
||||
}
|
||||
|
||||
catch(std::exception& e)
|
||||
@@ -147,6 +145,7 @@ void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NU
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void tcp_communication::close_tcp_connection(size_t d_port_)
|
||||
{
|
||||
// Close the TCP connection
|
||||
|
||||
@@ -39,8 +39,8 @@ void Tracking_FLL_PLL_filter::set_params(float fll_bw_hz, float pll_bw_hz, int o
|
||||
/*
|
||||
* Filter design (Kaplan 2nd ed., Pag. 181 Fig. 181)
|
||||
*/
|
||||
d_order=order;
|
||||
if (d_order==3)
|
||||
d_order = order;
|
||||
if (d_order == 3)
|
||||
{
|
||||
/*
|
||||
* 3rd order PLL with 2nd order FLL assist
|
||||
@@ -73,7 +73,7 @@ void Tracking_FLL_PLL_filter::set_params(float fll_bw_hz, float pll_bw_hz, int o
|
||||
|
||||
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_w = 0;
|
||||
@@ -92,7 +92,7 @@ void Tracking_FLL_PLL_filter::initialize(float d_acq_carrier_doppler_hz)
|
||||
float Tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s)
|
||||
{
|
||||
float carrier_error_hz;
|
||||
if (d_order==3)
|
||||
if (d_order == 3)
|
||||
{
|
||||
/*
|
||||
* 3rd order PLL with 2nd order FLL assist
|
||||
@@ -111,10 +111,10 @@ float Tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float
|
||||
carrier_error_hz = 0.5 * (pll_w_new + d_pll_w) + d_pll_a2 * d_pll_w0p * PLL_discriminator;
|
||||
d_pll_w = pll_w_new;
|
||||
/*std::cout<<" d_pll_w = "<<carrier_error_hz<<
|
||||
", pll_w_new = "<<pll_w_new
|
||||
<<", PLL_discriminator=" <<PLL_discriminator
|
||||
<<" FLL_discriminator ="<<FLL_discriminator
|
||||
<<" correlation_time_s = "<<correlation_time_s<<"\r\n";*/
|
||||
", pll_w_new = "<<pll_w_new
|
||||
<<", PLL_discriminator=" <<PLL_discriminator
|
||||
<<" FLL_discriminator ="<<FLL_discriminator
|
||||
<<" correlation_time_s = "<<correlation_time_s<<"\r\n";*/
|
||||
}
|
||||
|
||||
return carrier_error_hz;
|
||||
@@ -122,7 +122,6 @@ float Tracking_FLL_PLL_filter::get_carrier_error(float FLL_discriminator, float
|
||||
}
|
||||
|
||||
|
||||
|
||||
Tracking_FLL_PLL_filter::Tracking_FLL_PLL_filter ()
|
||||
{
|
||||
d_order = 0;
|
||||
@@ -138,6 +137,7 @@ Tracking_FLL_PLL_filter::Tracking_FLL_PLL_filter ()
|
||||
d_pll_w0p = 0;
|
||||
}
|
||||
|
||||
|
||||
Tracking_FLL_PLL_filter::~Tracking_FLL_PLL_filter ()
|
||||
{}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/*
|
||||
* FLL four quadrant arctan discriminator:
|
||||
* \f{equation}
|
||||
* \frac{\phi_2-\phi_1}{t_2-t1}=\frac{ATAN2(cross,dot)}{t_1-t_2},
|
||||
* \frac{\phi_2-\phi_1}{t_2-t1}=\frac{ATAN2(cross,dot)}{t_1-t_2},
|
||||
* \f}
|
||||
* where \f$cross=I_{PS1}Q_{PS2}-I_{PS2}Q_{PS1}\f$ and \f$dot=I_{PS1}I_{PS2}+Q_{PS1}Q_{PS2}\f$,
|
||||
* \f$I_{PS1},Q_{PS1}\f$ are the inphase and quadrature prompt correlator outputs respectively at sample time \f$t_1\f$, and
|
||||
@@ -58,7 +58,7 @@ double fll_four_quadrant_atan(gr_complex prompt_s1, gr_complex prompt_s2, double
|
||||
/*
|
||||
* PLL four quadrant arctan discriminator:
|
||||
* \f{equation}
|
||||
* \phi=ATAN2(Q_{PS},I_{PS}),
|
||||
* \phi=ATAN2(Q_{PS},I_{PS}),
|
||||
* \f}
|
||||
* where \f$I_{PS1},Q_{PS1}\f$ are the inphase and quadrature prompt correlator outputs respectively. The output is in [radians].
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ double pll_four_quadrant_atan(gr_complex prompt_s1)
|
||||
/*
|
||||
* PLL Costas loop two quadrant arctan discriminator:
|
||||
* \f{equation}
|
||||
* \phi=ATAN\left(\frac{Q_{PS}}{I_{PS}}\right),
|
||||
* \phi=ATAN\left(\frac{Q_{PS}}{I_{PS}}\right),
|
||||
* \f}
|
||||
* where \f$I_{PS1},Q_{PS1}\f$ are the inphase and quadrature prompt correlator outputs respectively. The output is in [radians].
|
||||
*/
|
||||
@@ -91,7 +91,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1)
|
||||
/*
|
||||
* DLL Noncoherent Early minus Late envelope normalized discriminator:
|
||||
* \f{equation}
|
||||
* error=\frac{1}{2}\frac{E-L}{E+L},
|
||||
* error=\frac{1}{2}\frac{E-L}{E+L},
|
||||
* \f}
|
||||
* where \f$E=\sqrt{I_{ES}^2+Q_{ES}^2}\f$ is the Early correlator output absolute value and
|
||||
* \f$L=\sqrt{I_{LS}^2+Q_{LS}^2}\f$ is the Late correlator output absolute value. The output is in [chips].
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
*
|
||||
* FLL four quadrant arctan discriminator:
|
||||
* \f{equation}
|
||||
* \frac{\phi_2-\phi_1}{t_2-t1}=\frac{ATAN2(cross,dot)}{t_1-t_2},
|
||||
* \frac{\phi_2-\phi_1}{t_2-t1}=\frac{ATAN2(cross,dot)}{t_1-t_2},
|
||||
* \f}
|
||||
* where \f$cross=I_{PS1}Q_{PS2}-I_{PS2}Q_{PS1}\f$ and \f$dot=I_{PS1}I_{PS2}+Q_{PS1}Q_{PS2}\f$,
|
||||
* \f$I_{PS1},Q_{PS1}\f$ are the inphase and quadrature prompt correlator outputs respectively at sample time \f$t_1\f$, and
|
||||
@@ -57,7 +57,7 @@ double fll_four_quadrant_atan(gr_complex prompt_s1, gr_complex prompt_s2, double
|
||||
*
|
||||
* PLL four quadrant arctan discriminator:
|
||||
* \f{equation}
|
||||
* \phi=ATAN2(Q_{PS},I_{PS}),
|
||||
* \phi=ATAN2(Q_{PS},I_{PS}),
|
||||
* \f}
|
||||
* where \f$I_{PS1},Q_{PS1}\f$ are the inphase and quadrature prompt correlator outputs respectively. The output is in [radians].
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ double pll_four_quadrant_atan(gr_complex prompt_s1);
|
||||
*
|
||||
* PLL Costas loop two quadrant arctan discriminator:
|
||||
* \f{equation}
|
||||
* \phi=ATAN\left(\frac{Q_{PS}}{I_{PS}}\right),
|
||||
* \phi=ATAN\left(\frac{Q_{PS}}{I_{PS}}\right),
|
||||
* \f}
|
||||
* where \f$I_{PS1},Q_{PS1}\f$ are the inphase and quadrature prompt correlator outputs respectively. The output is in [radians].
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1);
|
||||
*
|
||||
* DLL Noncoherent Early minus Late envelope normalized discriminator:
|
||||
* \f{equation}
|
||||
* error=\frac{E-L}{E+L},
|
||||
* error=\frac{E-L}{E+L},
|
||||
* \f}
|
||||
* where \f$E=\sqrt{I_{ES}^2+Q_{ES}^2}\f$ is the Early correlator output absolute value and
|
||||
* \f$L=\sqrt{I_{LS}^2+Q_{LS}^2}\f$ is the Late correlator output absolute value. The output is in [chips].
|
||||
|
||||
Reference in New Issue
Block a user