1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 11:40:33 +00:00

small fixes and cleaning

This commit is contained in:
Carles Fernandez 2016-04-08 15:10:46 +02:00
parent b8f984292a
commit 045d384061
17 changed files with 141 additions and 137 deletions

View File

@ -272,11 +272,11 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_local_code(std::complex<f
void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -152,11 +152,11 @@ void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> * code)
void galileo_pcps_8ms_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -182,11 +182,11 @@ void pcps_acquisition_cc::update_local_carrier(gr_complex* carrier_vector, int c
void pcps_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -163,11 +163,11 @@ void pcps_acquisition_fine_doppler_cc::set_local_code(std::complex<float> * code
void pcps_acquisition_fine_doppler_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -184,11 +184,11 @@ void pcps_acquisition_sc::update_local_carrier(gr_complex* carrier_vector, int c
void pcps_acquisition_sc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -157,11 +157,11 @@ void pcps_assisted_acquisition_cc::set_local_code(std::complex<float> * code)
void pcps_assisted_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -167,11 +167,11 @@ void pcps_cccwsr_acquisition_cc::set_local_code(std::complex<float>* code_data,
void pcps_cccwsr_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -153,11 +153,11 @@ pcps_multithread_acquisition_cc::~pcps_multithread_acquisition_cc()
void pcps_multithread_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -289,11 +289,11 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(std::string kernel_filen
void pcps_opencl_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -196,11 +196,11 @@ void pcps_quicksync_acquisition_cc::set_local_code(std::complex<float>* code)
void pcps_quicksync_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
//DLOG(INFO) << "START init";
d_gnss_synchro->Acq_delay_samples = 0.0;

View File

@ -163,11 +163,11 @@ void pcps_tong_acquisition_cc::set_local_code(std::complex<float> * code)
void pcps_tong_acquisition_cc::init()
{
d_gnss_synchro->Flag_valid_acquisition=false;
d_gnss_synchro->Flag_valid_symbol_output=false;
d_gnss_synchro->Flag_valid_pseudorange=false;
d_gnss_synchro->Flag_valid_word=false;
d_gnss_synchro->Flag_preamble=false;
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
d_gnss_synchro->Flag_valid_pseudorange = false;
d_gnss_synchro->Flag_valid_word = false;
d_gnss_synchro->Flag_preamble = false;
d_gnss_synchro->Acq_delay_samples = 0.0;
d_gnss_synchro->Acq_doppler_hz = 0.0;

View File

@ -270,7 +270,6 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri
double code_error_chips = 0.0;
double code_error_filt_chips = 0.0;
// Block input data and block output stream pointers
const gr_complex* in = (gr_complex*) input_items[0];
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0];
@ -279,8 +278,8 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri
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;
if (d_pull_in == true)
{
/*
@ -420,6 +419,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri
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'};
*out[0] = current_synchro_data;
if(d_dump)

View File

@ -108,8 +108,8 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
gr::block("Galileo_E1_Tcp_Connector_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{
// Telemetry bit synchronization message port input
this->message_port_register_in(pmt::mp("preamble_timestamp_s"));
// Telemetry bit synchronization message port input
this->message_port_register_in(pmt::mp("preamble_timestamp_s"));
this->set_relative_rate(1.0/vector_length);
// initialize internal vars
@ -157,8 +157,8 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
d_local_code_shift_chips[3] = d_very_early_late_spc_chips;
d_local_code_shift_chips[4] = d_very_early_late_spc_chips * 2.0;
d_correlation_length_samples=d_vector_length;
d_correlation_length_samples = d_vector_length;
multicorrelator_cpu.init(2 * d_correlation_length_samples, d_n_correlator_taps);
//--- Perform initializations ------------------------------
@ -268,15 +268,15 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
float code_error_filt_chips;
tcp_packet_data tcp_data;
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data;
// Block input data and block output stream pointers
const gr_complex* in = (gr_complex*) input_items[0];
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0];
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data;
// Block input data and block output stream pointers
const gr_complex* in = (gr_complex*) input_items[0];
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0];
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;
if (d_pull_in == true)
{
/*
@ -418,8 +418,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
current_synchro_data.Carrier_Doppler_hz = (double)d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_symbol_output = true;
current_synchro_data.correlation_length_ms=4;
current_synchro_data.correlation_length_ms = 4;
}
else
{
@ -433,6 +432,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
d_tcp_com.send_receive_tcp_packet_galileo_e1(tx_variables_array, &tcp_data);
}
//assign the GNURadio block output data
current_synchro_data.System = {'E'};
*out[0] = current_synchro_data;
if(d_dump)
{
@ -441,7 +441,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr
float prompt_Q;
float tmp_VE, tmp_E, tmp_P, tmp_L, tmp_VL;
float tmp_float;
tmp_float=0;
tmp_float = 0;
double tmp_double;
prompt_I = (*d_Prompt).real();
prompt_Q = (*d_Prompt).imag();

View File

@ -208,6 +208,10 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
d_acc_code_phase_secs = 0;
d_state = 0;
d_rem_code_phase_chips = 0.0;
d_code_phase_step_chips = 0.0;
d_carrier_phase_step_rad = 0.0;
systemName["E"] = std::string("Galileo");
}

View File

@ -41,7 +41,6 @@
#include <sstream>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h>
#include <gnuradio/fxpt.h> // fixed point sine and cosine
#include <glog/logging.h>
#include <volk/volk.h>
#include "gps_sdr_signal_processing.h"
@ -158,8 +157,6 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc(
d_enable_tracking = false;
d_pull_in = false;
// CN0 estimation and lock detector buffers
d_cn0_estimation_counter = 0;
d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES];
@ -180,6 +177,9 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc(
d_acc_carrier_phase_rad = 0.0;
d_code_phase_samples = 0.0;
d_acc_code_phase_secs = 0.0;
d_rem_code_phase_chips = 0.0;
d_code_phase_step_chips = 0.0;
d_carrier_phase_step_rad = 0.0;
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
}
@ -192,7 +192,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
*/
d_acq_code_phase_samples = d_acquisition_gnss_synchro->Acq_delay_samples;
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
long int acq_trk_diff_samples;
double acq_trk_diff_seconds;
@ -299,11 +299,10 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data = Gnss_Synchro();
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)
{
@ -323,7 +322,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
// ################# CARRIER WIPEOFF AND CORRELATORS ##############################
// perform carrier wipe-off and compute Early, Prompt and Late correlation
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs,in);
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,
@ -432,8 +431,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_symbol_output = true;
current_synchro_data.correlation_length_ms=1;
current_synchro_data.correlation_length_ms = 1;
}
else
{
@ -450,19 +448,18 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
*out[0] = current_synchro_data;
if(d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file
float prompt_I;
float prompt_Q;
float tmp_E, tmp_P, tmp_L;
double tmp_double;
prompt_I = d_correlator_outs[1].real();
prompt_Q = d_correlator_outs[1].imag();
tmp_E = std::abs<float>(d_correlator_outs[0]);
tmp_P = std::abs<float>(d_correlator_outs[1]);
tmp_L = std::abs<float>(d_correlator_outs[2]);
// MULTIPLEXED FILE RECORDING - Record results to file
float prompt_I;
float prompt_Q;
float tmp_E, tmp_P, tmp_L;
double tmp_double;
prompt_I = d_correlator_outs[1].real();
prompt_Q = d_correlator_outs[1].imag();
tmp_E = std::abs<float>(d_correlator_outs[0]);
tmp_P = std::abs<float>(d_correlator_outs[1]);
tmp_L = std::abs<float>(d_correlator_outs[2]);
try
{
// EPR
d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
@ -527,21 +524,23 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_channel(unsigned int channel)
d_dump_filename.append(".dat");
d_dump_file.exceptions (std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
}
catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what() << std::endl;
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
}
}
}
}
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue)
{
d_channel_internal_queue = channel_internal_queue;
}
void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{
d_acquisition_gnss_synchro = p_gnss_synchro;

View File

@ -126,26 +126,26 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
d_ca_code = static_cast<gr_complex*>(volk_malloc((GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_get_alignment()));
// correlator outputs (scalar)
d_n_correlator_taps = 3; // Very-Early, Early, Prompt, Late, Very-Late
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++)
{
d_correlator_outs[n] = gr_complex(0,0);
}
// map memory pointers of correlator outputs
d_Early = &d_correlator_outs[0];
d_Prompt = &d_correlator_outs[1];
d_Late = &d_correlator_outs[2];
d_n_correlator_taps = 3; // Very-Early, Early, Prompt, Late, Very-Late
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++)
{
d_correlator_outs[n] = gr_complex(0,0);
}
// map memory pointers of correlator outputs
d_Early = &d_correlator_outs[0];
d_Prompt = &d_correlator_outs[1];
d_Late = &d_correlator_outs[2];
d_local_code_shift_chips = static_cast<float*>(volk_malloc(d_n_correlator_taps * sizeof(float), volk_get_alignment()));
// Set TAPs delay values [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[2] = d_early_late_spc_chips;
d_local_code_shift_chips = static_cast<float*>(volk_malloc(d_n_correlator_taps * sizeof(float), volk_get_alignment()));
// Set TAPs delay values [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[2] = d_early_late_spc_chips;
d_correlation_length_samples=d_vector_length;
d_correlation_length_samples=d_vector_length;
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 ------------------------------
// define initial code frequency basis of NCO
@ -309,16 +309,15 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
float code_nco;
tcp_packet_data tcp_data;
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data;
// Block input data and block output stream pointers
const gr_complex* in = (gr_complex*) input_items[0];
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0];
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data;
// Block input data and block output stream pointers
const gr_complex* in = (gr_complex*) input_items[0];
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0];
if (d_enable_tracking == true)
{
// Fill the acquisition data
// Fill the acquisition data
current_synchro_data = *d_acquisition_gnss_synchro;
/*
* Receiver signal alignment
@ -363,7 +362,6 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
d_code_phase_step_chips,
d_current_prn_length_samples);
//! Variable used for control
d_control_id++;
@ -487,6 +485,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri
}
//assign the GNURadio block output data
current_synchro_data.System = {'G'};
*out[0] = current_synchro_data;
if(d_dump)
{

View File

@ -78,7 +78,6 @@ gps_l2_m_dll_pll_make_tracking_cc(
}
void gps_l2_m_dll_pll_tracking_cc::forecast (int noutput_items,
gr_vector_int &ninput_items_required)
{
@ -185,6 +184,10 @@ gps_l2_m_dll_pll_tracking_cc::gps_l2_m_dll_pll_tracking_cc(
d_code_phase_samples = 0.0;
d_acc_code_phase_secs = 0.0;
d_rem_code_phase_chips = 0.0;
d_code_phase_step_chips = 0.0;
d_carrier_phase_step_rad = 0.0;
LOG(INFO) << "d_vector_length" << d_vector_length;
}
@ -220,7 +223,7 @@ void gps_l2_m_dll_pll_tracking_cc::start_tracking()
double T_prn_true_seconds = GPS_L2_M_CODE_LENGTH_CHIPS / GPS_L2_M_CODE_RATE_HZ;
double T_prn_true_samples = T_prn_true_seconds * static_cast<float>(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 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<float>(d_fs_in)), T_prn_true_samples);
@ -306,8 +309,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
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)
@ -328,7 +330,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
// ################# CARRIER WIPEOFF AND CORRELATORS ##############################
// perform carrier wipe-off and compute Early, Prompt and Late correlation
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs,in);
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,
@ -452,16 +454,16 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(
if(d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file
float prompt_I;
float prompt_Q;
float tmp_E, tmp_P, tmp_L;
double tmp_double;
prompt_I = d_correlator_outs[1].real();
prompt_Q = d_correlator_outs[1].imag();
tmp_E = std::abs<float>(d_correlator_outs[0]);
tmp_P = std::abs<float>(d_correlator_outs[1]);
tmp_L = std::abs<float>(d_correlator_outs[2]);
// MULTIPLEXED FILE RECORDING - Record results to file
float prompt_I;
float prompt_Q;
float tmp_E, tmp_P, tmp_L;
double tmp_double;
prompt_I = d_correlator_outs[1].real();
prompt_Q = d_correlator_outs[1].imag();
tmp_E = std::abs<float>(d_correlator_outs[0]);
tmp_P = std::abs<float>(d_correlator_outs[1]);
tmp_L = std::abs<float>(d_correlator_outs[2]);
try
{
// EPR
@ -526,11 +528,11 @@ void gps_l2_m_dll_pll_tracking_cc::set_channel(unsigned int channel)
d_dump_filename.append(".dat");
d_dump_file.exceptions (std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
}
catch (std::ifstream::failure& e)
{
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what() << std::endl;
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
}
}
}