mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Code formatting (cpplint.py --filter=-,+whitespace/tab,+whitespace/comments)
This commit is contained in:
parent
207b01a6c0
commit
d65daac971
@ -1895,14 +1895,15 @@ std::map<int, Gnss_Synchro> rtklib_pvt_gs::interpolate_observables(std::map<int,
|
||||
return interp_observables_map;
|
||||
}
|
||||
|
||||
|
||||
void rtklib_pvt_gs::initialize_and_apply_carrier_phase_offset()
|
||||
{
|
||||
//we have a valid PVT. First check if we need to reset the initial carrier phase offsets to match their pseudoranges
|
||||
// we have a valid PVT. First check if we need to reset the initial carrier phase offsets to match their pseudoranges
|
||||
std::map<int, Gnss_Synchro>::iterator observables_iter;
|
||||
for (observables_iter = gnss_observables_map.begin(); observables_iter != gnss_observables_map.end(); observables_iter++)
|
||||
{
|
||||
//check if an initialization is required (new satellite or loss of lock)
|
||||
//it is set to false by the work function if the gnss_synchro is not valid
|
||||
// check if an initialization is required (new satellite or loss of lock)
|
||||
// it is set to false by the work function if the gnss_synchro is not valid
|
||||
if (channel_initialized.at(observables_iter->second.Channel_ID) == false)
|
||||
{
|
||||
double wavelength_m = 0;
|
||||
@ -1948,11 +1949,12 @@ void rtklib_pvt_gs::initialize_and_apply_carrier_phase_offset()
|
||||
channel_initialized.at(observables_iter->second.Channel_ID) = true;
|
||||
DLOG(INFO) << "initialized carrier phase at channel " << observables_iter->second.Channel_ID;
|
||||
}
|
||||
//apply the carrier phase offset to this satellite
|
||||
// apply the carrier phase offset to this satellite
|
||||
observables_iter->second.Carrier_phase_rads = observables_iter->second.Carrier_phase_rads + initial_carrier_phase_offset_estimation_rads.at(observables_iter->second.Channel_ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
@ -2075,7 +2077,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
else
|
||||
{
|
||||
channel_initialized.at(i) = false; //the current channel is not reporting valid observable
|
||||
channel_initialized.at(i) = false; // the current channel is not reporting valid observable
|
||||
}
|
||||
}
|
||||
|
||||
@ -2159,8 +2161,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
|
||||
if (flag_pvt_valid == true)
|
||||
{
|
||||
//initialize (if needed) the accumulated phase offset and apply it to the active channels
|
||||
//required to report accumulated phase cycles comparable to pseudoranges
|
||||
// initialize (if needed) the accumulated phase offset and apply it to the active channels
|
||||
// required to report accumulated phase cycles comparable to pseudoranges
|
||||
initialize_and_apply_carrier_phase_offset();
|
||||
|
||||
double Rx_clock_offset_s = d_user_pvt_solver->get_time_offset_s();
|
||||
|
@ -119,11 +119,11 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
||||
//
|
||||
// We can avoid this by doing linear correlation, effectively doubling the
|
||||
// size of the input buffer and padding the code with zeros.
|
||||
//if (acq_parameters.bit_transition_flag)
|
||||
//{
|
||||
//d_fft_size = d_consumed_samples * 2;
|
||||
//acq_parameters.max_dwells = 1; // Activation of acq_parameters.bit_transition_flag invalidates the value of acq_parameters.max_dwells
|
||||
//}
|
||||
// if (acq_parameters.bit_transition_flag)
|
||||
// {
|
||||
// d_fft_size = d_consumed_samples * 2;
|
||||
// acq_parameters.max_dwells = 1; // Activation of acq_parameters.bit_transition_flag invalidates the value of acq_parameters.max_dwells
|
||||
// }
|
||||
|
||||
d_tmp_buffer = volk_gnsssdr::vector<float>(d_fft_size);
|
||||
d_fft_codes = volk_gnsssdr::vector<std::complex<float>>(d_fft_size);
|
||||
|
@ -186,7 +186,7 @@ void hybrid_observables_gs::msg_handler_pvt_to_observables(const pmt::pmt_t &msg
|
||||
double new_rx_clock_offset_s;
|
||||
new_rx_clock_offset_s = boost::any_cast<double>(pmt::any_ref(msg));
|
||||
T_rx_TOW_ms = T_rx_TOW_ms - static_cast<int>(round(new_rx_clock_offset_s * 1000.0));
|
||||
//align the receiver clock to integer multiple of 20 ms
|
||||
// align the receiver clock to integer multiple of 20 ms
|
||||
if (T_rx_TOW_ms % 20)
|
||||
{
|
||||
T_rx_TOW_ms += 20 - T_rx_TOW_ms % 20;
|
||||
@ -479,7 +479,7 @@ void hybrid_observables_gs::update_TOW(const std::vector<Gnss_Synchro> &data)
|
||||
}
|
||||
}
|
||||
T_rx_TOW_ms = TOW_ref;
|
||||
//align the receiver clock to integer multiple of 20 ms
|
||||
// align the receiver clock to integer multiple of 20 ms
|
||||
if (T_rx_TOW_ms % 20)
|
||||
{
|
||||
T_rx_TOW_ms += 20 - T_rx_TOW_ms % 20;
|
||||
@ -527,6 +527,7 @@ void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void hybrid_observables_gs::smooth_pseudoranges(std::vector<Gnss_Synchro> &data)
|
||||
{
|
||||
std::vector<Gnss_Synchro>::iterator it;
|
||||
@ -534,7 +535,7 @@ void hybrid_observables_gs::smooth_pseudoranges(std::vector<Gnss_Synchro> &data)
|
||||
{
|
||||
if (it->Flag_valid_pseudorange)
|
||||
{
|
||||
//0. get wavelength for the current signal
|
||||
// 0. get wavelength for the current signal
|
||||
double wavelength_m = 0;
|
||||
switch (mapStringValues_[it->Signal])
|
||||
{
|
||||
@ -575,11 +576,11 @@ void hybrid_observables_gs::smooth_pseudoranges(std::vector<Gnss_Synchro> &data)
|
||||
break;
|
||||
}
|
||||
|
||||
//todo: propagate the PLL lock status in Gnss_Synchro
|
||||
//1. check if last PLL lock status was false and initialize last d_channel_last_pseudorange_smooth
|
||||
// todo: propagate the PLL lock status in Gnss_Synchro
|
||||
// 1. check if last PLL lock status was false and initialize last d_channel_last_pseudorange_smooth
|
||||
if (d_channel_last_pll_lock.at(it->Channel_ID) == true)
|
||||
{
|
||||
//2. Compute the smoothed pseudorange for this channel
|
||||
// 2. Compute the smoothed pseudorange for this channel
|
||||
// Hatch filter algorithm (https://insidegnss.com/can-you-list-all-the-properties-of-the-carrier-smoothing-filter/)
|
||||
double r_sm = d_channel_last_pseudorange_smooth.at(it->Channel_ID);
|
||||
double factor = ((d_smooth_filter_M - 1.0) / d_smooth_filter_M);
|
||||
@ -678,12 +679,12 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused)
|
||||
compute_pranges(epoch_data);
|
||||
}
|
||||
|
||||
//Carrier smoothing (optional)
|
||||
// Carrier smoothing (optional)
|
||||
if (d_conf.enable_carrier_smoothing == true)
|
||||
{
|
||||
smooth_pseudoranges(epoch_data);
|
||||
}
|
||||
//output the observables set to the PVT block
|
||||
// output the observables set to the PVT block
|
||||
for (uint32_t n = 0; n < d_nchannels_out; n++)
|
||||
{
|
||||
out[n][0] = epoch_data[n];
|
||||
|
@ -265,9 +265,9 @@ bool config_ad9361_rx_local(uint64_t bandwidth_,
|
||||
{
|
||||
throw std::runtime_error("Unable to set BB rate");
|
||||
// set bw
|
||||
//params.push_back("in_voltage_rf_bandwidth=" + boost::to_string(bandwidth));
|
||||
// params.push_back("in_voltage_rf_bandwidth=" + boost::to_string(bandwidth));
|
||||
}
|
||||
//wr_ch_str(rx_chan1, "rf_port_select", rf_port_select_.c_str());
|
||||
// wr_ch_str(rx_chan1, "rf_port_select", rf_port_select_.c_str());
|
||||
ret = iio_device_attr_write(ad9361_phy, "in_voltage0_rf_port_select", rf_port_select_.c_str());
|
||||
if (ret)
|
||||
{
|
||||
@ -514,9 +514,9 @@ bool config_ad9361_rx_remote(const std::string &remote_host,
|
||||
{
|
||||
throw std::runtime_error("Unable to set BB rate");
|
||||
// set bw
|
||||
//params.push_back("in_voltage_rf_bandwidth=" + boost::to_string(bandwidth));
|
||||
// params.push_back("in_voltage_rf_bandwidth=" + boost::to_string(bandwidth));
|
||||
}
|
||||
//wr_ch_str(rx_chan1, "rf_port_select", rf_port_select_.c_str());
|
||||
// wr_ch_str(rx_chan1, "rf_port_select", rf_port_select_.c_str());
|
||||
ret = iio_device_attr_write(ad9361_phy, "in_voltage0_rf_port_select", rf_port_select_.c_str());
|
||||
if (ret)
|
||||
{
|
||||
|
@ -213,7 +213,6 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
d_code_loop_filter.initialize(); // initialize the code filter
|
||||
|
||||
// generate local reference ALWAYS starting at chip 1 (1 sample per chip)
|
||||
//glonass_l1_ca_code_gen_complex(gsl::span<gr_complex>(d_ca_code.data(), GLONASS_L1_CA_CODE_LENGTH_CHIPS), 0);
|
||||
glonass_l1_ca_code_gen_complex(d_ca_code, 0);
|
||||
|
||||
multicorrelator_cpu.set_local_code_and_taps(static_cast<int32_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code.data(), d_local_code_shift_chips.data());
|
||||
|
@ -238,7 +238,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::config_1()
|
||||
std::to_string(integration_time_ms));
|
||||
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||
config->set_property("Acquisition_1B.bit_transition_flag", "false");
|
||||
//config->set_property("Acquisition_1B.threshold", "0.1");
|
||||
// config->set_property("Acquisition_1B.threshold", "2.5");
|
||||
config->set_property("Acquisition_1B.pfa", "0.0001");
|
||||
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||
|
@ -155,7 +155,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoCTest::init()
|
||||
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||
config->set_property("Acquisition_1B.coherent_integration_time_ms", "4");
|
||||
config->set_property("Acquisition_1B.dump", "false");
|
||||
//config->set_property("Acquisition_1B.threshold", "0.1");
|
||||
// config->set_property("Acquisition_1B.threshold", "2.5");
|
||||
config->set_property("Acquisition_1B.pfa", "0.001");
|
||||
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||
config->set_property("Acquisition_1B.doppler_step", "125");
|
||||
|
@ -166,7 +166,7 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::init()
|
||||
config->set_property("Acquisition_1B.dump", "false");
|
||||
}
|
||||
config->set_property("Acquisition_1B.dump_filename", "./tmp-acq-gal1/acquisition");
|
||||
//config->set_property("Acquisition_1B.threshold", "0.0001");
|
||||
// config->set_property("Acquisition_1B.threshold", "2.5");
|
||||
config->set_property("Acquisition_1B.pfa", "0.001");
|
||||
config->set_property("Acquisition_1B.doppler_max", std::to_string(doppler_max));
|
||||
config->set_property("Acquisition_1B.doppler_step", std::to_string(doppler_step));
|
||||
|
@ -66,7 +66,7 @@ private:
|
||||
|
||||
public:
|
||||
int rx_message;
|
||||
~GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx(); //!< Default destructor
|
||||
~GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx(); // Default destructor
|
||||
};
|
||||
|
||||
|
||||
@ -243,7 +243,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_1()
|
||||
std::to_string(integration_time_ms));
|
||||
config->set_property("Acquisition.max_dwells", "1");
|
||||
config->set_property("Acquisition.implementation", "GLONASS_L1_CA_PCPS_Acquisition");
|
||||
//config->set_property("Acquisition.threshold", "0.8");
|
||||
// config->set_property("Acquisition.threshold", "2.5");
|
||||
config->set_property("Acquisition.pfa", "0.001");
|
||||
config->set_property("Acquisition.doppler_max", "10000");
|
||||
config->set_property("Acquisition.doppler_step", "250");
|
||||
@ -487,10 +487,6 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
|
||||
acquisition->set_doppler_step(500);
|
||||
}) << "Failure setting doppler_step.";
|
||||
|
||||
//ASSERT_NO_THROW({
|
||||
//acquisition->set_threshold(0.05);
|
||||
//}) << "Failure setting threshold.";
|
||||
|
||||
ASSERT_NO_THROW({
|
||||
acquisition->connect(top_block);
|
||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
@ -575,10 +571,6 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResultsProbabilities)
|
||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
||||
}) << "Failure setting doppler_step.";
|
||||
|
||||
//ASSERT_NO_THROW({
|
||||
//acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
||||
//}) << "Failure setting threshold.";
|
||||
|
||||
ASSERT_NO_THROW({
|
||||
acquisition->connect(top_block);
|
||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
|
@ -241,7 +241,7 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test::config_1()
|
||||
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||
std::to_string(integration_time_ms));
|
||||
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||
//config->set_property("Acquisition_1C.threshold", "0.8");
|
||||
// config->set_property("Acquisition_1C.threshold", "2.5");
|
||||
config->set_property("Acquisition_1C.pfa", "0.001");
|
||||
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||
@ -480,10 +480,6 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
|
||||
acquisition->set_doppler_step(500);
|
||||
}) << "Failure setting doppler_step.";
|
||||
|
||||
//ASSERT_NO_THROW({
|
||||
//acquisition->set_threshold(0.5);
|
||||
//}) << "Failure setting threshold.";
|
||||
|
||||
ASSERT_NO_THROW({
|
||||
acquisition->connect(top_block);
|
||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
@ -569,10 +565,6 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
||||
acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500));
|
||||
}) << "Failure setting doppler_step.";
|
||||
|
||||
//ASSERT_NO_THROW({
|
||||
//acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0));
|
||||
//}) << "Failure setting threshold.";
|
||||
|
||||
ASSERT_NO_THROW({
|
||||
acquisition->connect(top_block);
|
||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
|
@ -129,7 +129,6 @@ HybridObservablesTest_msg_rx::~HybridObservablesTest_msg_rx() = default;
|
||||
|
||||
// ###########################################################
|
||||
|
||||
|
||||
// ######## GNURADIO BLOCK MESSAGE RECEVER FOR TLM MESSAGES #########
|
||||
class HybridObservablesTest_tlm_msg_rx;
|
||||
|
||||
@ -149,11 +148,13 @@ public:
|
||||
~HybridObservablesTest_tlm_msg_rx(); //!< Default destructor
|
||||
};
|
||||
|
||||
|
||||
HybridObservablesTest_tlm_msg_rx_sptr HybridObservablesTest_tlm_msg_rx_make()
|
||||
{
|
||||
return HybridObservablesTest_tlm_msg_rx_sptr(new HybridObservablesTest_tlm_msg_rx());
|
||||
}
|
||||
|
||||
|
||||
void HybridObservablesTest_tlm_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
{
|
||||
try
|
||||
@ -168,6 +169,7 @@ void HybridObservablesTest_tlm_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HybridObservablesTest_tlm_msg_rx::HybridObservablesTest_tlm_msg_rx() : gr::block("HybridObservablesTest_tlm_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_in(pmt::mp("events"));
|
||||
@ -175,6 +177,7 @@ HybridObservablesTest_tlm_msg_rx::HybridObservablesTest_tlm_msg_rx() : gr::block
|
||||
rx_message = 0;
|
||||
}
|
||||
|
||||
|
||||
HybridObservablesTest_tlm_msg_rx::~HybridObservablesTest_tlm_msg_rx() = default;
|
||||
|
||||
|
||||
@ -289,6 +292,7 @@ public:
|
||||
size_t item_size;
|
||||
};
|
||||
|
||||
|
||||
int HybridObservablesTest::configure_generator()
|
||||
{
|
||||
// Configure signal generator
|
||||
@ -538,7 +542,6 @@ bool HybridObservablesTest::acquire_signal()
|
||||
// top_block->connect(head_samples, 0, acquisition->get_left_block(), 0);
|
||||
}
|
||||
|
||||
|
||||
boost::shared_ptr<Acquisition_msg_rx> msg_rx;
|
||||
try
|
||||
{
|
||||
@ -734,8 +737,8 @@ void HybridObservablesTest::configure_receiver(
|
||||
}
|
||||
config->set_property("Tracking.early_late_space_chips", "0.5");
|
||||
config->set_property("Tracking.track_pilot", "true");
|
||||
//config->set_property("Tracking.pll_filter_order", "2");
|
||||
//config->set_property("Tracking.dll_filter_order", "2");
|
||||
// config->set_property("Tracking.pll_filter_order", "2");
|
||||
// config->set_property("Tracking.dll_filter_order", "2");
|
||||
|
||||
config->set_property("TelemetryDecoder.implementation", "Galileo_E5a_Telemetry_Decoder");
|
||||
}
|
||||
@ -749,8 +752,8 @@ void HybridObservablesTest::configure_receiver(
|
||||
|
||||
config->set_property("Tracking.early_late_space_chips", "0.5");
|
||||
config->set_property("Tracking.track_pilot", "true");
|
||||
//config->set_property("Tracking.pll_filter_order", "2");
|
||||
//config->set_property("Tracking.dll_filter_order", "2");
|
||||
// config->set_property("Tracking.pll_filter_order", "2");
|
||||
// config->set_property("Tracking.dll_filter_order", "2");
|
||||
|
||||
config->set_property("TelemetryDecoder.implementation", "GPS_L5_Telemetry_Decoder");
|
||||
}
|
||||
@ -2016,7 +2019,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
||||
if (sat1_ch_id != -1 and sat2_ch_id != -1)
|
||||
{
|
||||
// compute single differences for the duplicated satellite
|
||||
|
||||
check_results_duplicated_satellite(
|
||||
measured_obs_vec.at(sat1_ch_id),
|
||||
measured_obs_vec.at(sat2_ch_id),
|
||||
|
@ -441,7 +441,7 @@ void* handler_DMA_obs_test(void* arguments)
|
||||
dma_index += 4;
|
||||
}
|
||||
|
||||
//std::cout << "DMA: sending nsamples_block_size = " << nsamples_block_size << " samples" << std::endl;
|
||||
// std::cout << "DMA: sending nsamples_block_size = " << nsamples_block_size << " samples" << std::endl;
|
||||
if (write(tx_fd, input_samples_dma.data(), (int)(nsamples_block_size * 4)) != (int)(nsamples_block_size * 4))
|
||||
{
|
||||
std::cerr << "Error: DMA could not send all the required samples " << std::endl;
|
||||
@ -527,6 +527,7 @@ private:
|
||||
bool acquisition_successful;
|
||||
};
|
||||
|
||||
|
||||
bool HybridObservablesTestFpga::acquire_signal()
|
||||
{
|
||||
pthread_t thread_DMA, thread_acquisition;
|
||||
@ -542,7 +543,7 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
// Satellite signal definition
|
||||
Gnss_Synchro tmp_gnss_synchro;
|
||||
tmp_gnss_synchro.Channel_ID = 0;
|
||||
//config = std::make_shared<InMemoryConfiguration>();
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq));
|
||||
|
||||
std::shared_ptr<AcquisitionInterface> acquisition;
|
||||
@ -1228,6 +1229,7 @@ void HybridObservablesTestFpga::check_results_carrier_doppler(
|
||||
ASSERT_LT(rmse_ch0, 30);
|
||||
}
|
||||
|
||||
|
||||
void HybridObservablesTestFpga::check_results_duplicated_satellite(
|
||||
arma::mat& measured_sat1,
|
||||
arma::mat& measured_sat2,
|
||||
@ -1724,7 +1726,6 @@ bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gn
|
||||
|
||||
} // End of 'try' block
|
||||
|
||||
|
||||
catch (const gpstk::FFStreamError& e)
|
||||
{
|
||||
std::cout << e;
|
||||
@ -1845,7 +1846,7 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
std::cout << "Estimated Initial Doppler " << n.Acq_doppler_hz
|
||||
<< " [Hz], estimated Initial code delay " << n.Acq_delay_samples << " [Samples]"
|
||||
<< " Acquisition SampleStamp is " << n.Acq_samplestamp_samples << std::endl;
|
||||
//n.Acq_samplestamp_samples = 0;
|
||||
// n.Acq_samplestamp_samples = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1896,7 +1897,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
gnss_synchro_vec.at(n).Channel_ID = n;
|
||||
|
||||
// create the tracking channels and create the telemetry decoders
|
||||
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking", config->property("Tracking.implementation", std::string("undefined")), 1, 1);
|
||||
tracking_ch_vec.push_back(std::dynamic_pointer_cast<TrackingInterface>(trk_));
|
||||
std::shared_ptr<GNSSBlockInterface> tlm_ = factory->GetBlock(config, "TelemetryDecoder", config->property("TelemetryDecoder.implementation", std::string("undefined")), 1, 1);
|
||||
@ -1973,7 +1973,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
top_block->connect(ch_out_fpga_sample_counter, 0, observables->get_left_block(), tracking_ch_vec.size()); // extra port for the sample counter pulse
|
||||
}) << "Failure connecting the blocks.";
|
||||
|
||||
|
||||
top_block->start();
|
||||
|
||||
usleep(1000000); // give time for the system to start before receiving the start tracking command.
|
||||
@ -2015,7 +2014,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
|
||||
acquisition->stop_acquisition();
|
||||
|
||||
|
||||
EXPECT_NO_THROW({
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
@ -2343,6 +2341,5 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl;
|
||||
}
|
||||
|
@ -142,6 +142,7 @@ struct acquisition_handler_args_trk_pull_in_test
|
||||
std::shared_ptr<AcquisitionInterface> acquisition;
|
||||
};
|
||||
|
||||
|
||||
void* handler_acquisition_trk_pull_in_test(void* arguments)
|
||||
{
|
||||
// the acquisition is a blocking function so we have to
|
||||
@ -151,6 +152,7 @@ void* handler_acquisition_trk_pull_in_test(void* arguments)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
void* handler_DMA_trk_pull_in_test(void* arguments)
|
||||
{
|
||||
const int MAX_INPUT_SAMPLES_TOTAL = 16384;
|
||||
@ -196,7 +198,6 @@ void* handler_DMA_trk_pull_in_test(void* arguments)
|
||||
//**************************************************************************
|
||||
// Open input file
|
||||
//**************************************************************************
|
||||
|
||||
uint32_t skip_samples = static_cast<uint32_t>(FLAGS_skip_samples);
|
||||
|
||||
if (skip_samples + skip_used_samples > 0)
|
||||
@ -299,6 +300,7 @@ void* handler_DMA_trk_pull_in_test(void* arguments)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
class TrackingPullInTestFpga : public ::testing::Test
|
||||
{
|
||||
public:
|
||||
@ -377,10 +379,11 @@ public:
|
||||
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue;
|
||||
|
||||
static const int32_t TEST_TRK_PULL_IN_TEST_SKIP_SAMPLES = 1024; //48
|
||||
static const int32_t TEST_TRK_PULL_IN_TEST_SKIP_SAMPLES = 1024; // 48
|
||||
static constexpr float DMA_SIGNAL_SCALING_FACTOR = 8.0;
|
||||
};
|
||||
|
||||
|
||||
int TrackingPullInTestFpga::configure_generator(double CN0_dBHz, int file_idx)
|
||||
{
|
||||
// Configure signal generator
|
||||
@ -402,6 +405,7 @@ int TrackingPullInTestFpga::configure_generator(double CN0_dBHz, int file_idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int TrackingPullInTestFpga::generate_signal()
|
||||
{
|
||||
int child_status;
|
||||
@ -473,6 +477,7 @@ private:
|
||||
bool acquisition_successful;
|
||||
};
|
||||
|
||||
|
||||
void TrackingPullInTestFpga::configure_receiver(
|
||||
double PLL_wide_bw_hz,
|
||||
double DLL_wide_bw_hz,
|
||||
@ -572,7 +577,7 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
|
||||
// Satellite signal definition
|
||||
Gnss_Synchro tmp_gnss_synchro;
|
||||
tmp_gnss_synchro.Channel_ID = 0;
|
||||
//config = std::make_shared<InMemoryConfiguration>();
|
||||
// config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq));
|
||||
|
||||
std::shared_ptr<AcquisitionInterface> acquisition;
|
||||
@ -924,7 +929,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
<< " Acquisition SampleStamp is " << acq_samplestamp_map.find(FLAGS_test_satellite_PRN)->second << std::endl;
|
||||
}
|
||||
|
||||
long long int acq_to_trk_delay_samples = ceil(static_cast<double>(FLAGS_fs_gen_sps) * FLAGS_acq_to_trk_delay_s);
|
||||
int64_t acq_to_trk_delay_samples = ceil(static_cast<double>(FLAGS_fs_gen_sps) * FLAGS_acq_to_trk_delay_s);
|
||||
|
||||
// set the scaling factor
|
||||
args.scaling_factor = DMA_SIGNAL_SCALING_FACTOR;
|
||||
@ -945,13 +950,11 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
// simulate Code Delay error in acquisition
|
||||
gnss_synchro.Acq_delay_samples = true_acq_delay_samples + (acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) / GPS_L1_CA_CODE_RATE_CPS) * static_cast<double>(baseband_sampling_freq);
|
||||
|
||||
|
||||
// We need to reset the HW again in order to reset the sample counter.
|
||||
// The HW is reset by sending a command to the acquisition HW accelerator
|
||||
// In order to send the reset command to the HW we instantiate the acquisition module.
|
||||
std::shared_ptr<AcquisitionInterface> acquisition;
|
||||
|
||||
|
||||
// reset the HW to clear the sample counters: the acquisition constructor generates a reset
|
||||
if (implementation == "GPS_L1_CA_DLL_PLL_Tracking_Fpga")
|
||||
{
|
||||
@ -981,7 +984,6 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
|
||||
acquisition->stop_acquisition(); // reset the whole system including the sample counters
|
||||
|
||||
|
||||
// create flowgraph
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking", config->property("Tracking.implementation", std::string("undefined")), 1, 1);
|
||||
@ -1016,7 +1018,6 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
|
||||
|
||||
// initialize the internal status of the LPF in the FPGA in the L1/E1 frequency band
|
||||
|
||||
// ********************************************************************
|
||||
@ -1025,10 +1026,8 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
std::cout << "--- START TRACKING WITH PULL-IN ERROR: " << acq_doppler_error_hz_values.at(current_acq_doppler_error_idx) << " [Hz] and " << acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) << " [Chips] ---" << std::endl;
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
|
||||
|
||||
top_block->start();
|
||||
|
||||
|
||||
usleep(1000000); // give time for the system to start before receiving the start tracking command.
|
||||
|
||||
if (acq_to_trk_delay_samples > 0)
|
||||
@ -1046,7 +1045,6 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::cout << " Starting tracking...\n";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
Loading…
Reference in New Issue
Block a user