mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-22 14:00:13 +00:00
Remove tabs
This commit is contained in:
parent
b2045076bd
commit
c5b3e7597a
@ -615,7 +615,6 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
int acq_doppler_max = config->property("Acquisition.doppler_max", FLAGS_external_signal_acquisition_doppler_max_hz);
|
||||
int acq_doppler_step = config->property("Acquisition.doppler_step", FLAGS_external_signal_acquisition_doppler_step_hz);
|
||||
|
||||
|
||||
for (unsigned int PRN = 1; PRN < MAX_PRN_IDX; PRN++)
|
||||
{
|
||||
tmp_gnss_synchro.PRN = PRN;
|
||||
@ -709,7 +708,6 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
tmp_gnss_synchro.Acq_samplestamp_samples = 0; // do not take into account the filter internal state initialisation
|
||||
tmp_gnss_synchro.Acq_samplestamp_samples = tmp_gnss_synchro.Acq_samplestamp_samples; // delay due to the downsampling filter in the acquisition
|
||||
|
||||
|
||||
gnss_synchro_vec.push_back(tmp_gnss_synchro);
|
||||
}
|
||||
else
|
||||
@ -717,10 +715,7 @@ bool HybridObservablesTestFpga::acquire_signal()
|
||||
std::cout << " . ";
|
||||
}
|
||||
|
||||
|
||||
top_block->stop();
|
||||
|
||||
|
||||
std::cout.flush();
|
||||
}
|
||||
std::cout << "]" << std::endl;
|
||||
@ -857,6 +852,7 @@ void HybridObservablesTestFpga::configure_receiver(
|
||||
std::cout << "*****************************************\n";
|
||||
}
|
||||
|
||||
|
||||
void HybridObservablesTestFpga::check_results_carrier_phase(
|
||||
arma::mat& true_ch0,
|
||||
arma::vec& true_tow_s,
|
||||
@ -1195,6 +1191,7 @@ void HybridObservablesTestFpga::check_results_carrier_doppler(
|
||||
ASSERT_LT(rmse_ch0, 30);
|
||||
}
|
||||
|
||||
|
||||
bool HybridObservablesTestFpga::save_mat_xy(std::vector<double>& x, std::vector<double>& y, std::string filename)
|
||||
{
|
||||
try
|
||||
@ -1230,6 +1227,7 @@ bool HybridObservablesTestFpga::save_mat_xy(std::vector<double>& x, std::vector<
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HybridObservablesTestFpga::check_results_code_pseudorange(
|
||||
arma::mat& true_ch0,
|
||||
arma::mat& true_ch1,
|
||||
@ -1319,6 +1317,7 @@ void HybridObservablesTestFpga::check_results_code_pseudorange(
|
||||
ASSERT_GT(min_error, -10.0);
|
||||
}
|
||||
|
||||
|
||||
bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_Synchro gnss)
|
||||
{
|
||||
// Open and read reference RINEX observables file
|
||||
@ -1459,6 +1458,8 @@ bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gn
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
{
|
||||
// pointer to the DMA thread that sends the samples to the acquisition engine
|
||||
@ -1475,7 +1476,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
generate_signal();
|
||||
}
|
||||
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
std::chrono::duration<double> elapsed_seconds(0);
|
||||
|
||||
@ -1556,7 +1556,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The HW has been reset after the acquisition phase when the acquisition class was destroyed.
|
||||
// No more samples remained in the DMA. Therefore any intermediate state in the LPF of the
|
||||
// GPS L1 / Galileo E1 filter has been cleared.
|
||||
@ -1567,7 +1566,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
// instantiate the acquisition modules in order to use them to reset the HW.
|
||||
// (note that the constructor of the acquisition modules resets the HW too)
|
||||
|
||||
|
||||
std::shared_ptr<AcquisitionInterface> acquisition;
|
||||
|
||||
// reset the HW to clear the sample counters: the acquisition constructor generates a reset
|
||||
@ -1597,7 +1595,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
throw(std::exception());
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<TrackingInterface>> tracking_ch_vec;
|
||||
std::vector<std::shared_ptr<TelemetryDecoderInterface>> tlm_ch_vec;
|
||||
|
||||
@ -1608,7 +1605,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);
|
||||
@ -1673,7 +1669,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
gnss_sdr_fpga_sample_counter_sptr ch_out_fpga_sample_counter;
|
||||
ch_out_fpga_sample_counter = gnss_sdr_make_fpga_sample_counter(fs, observable_interval_ms);
|
||||
|
||||
|
||||
for (unsigned int n = 0; n < tracking_ch_vec.size(); n++)
|
||||
{
|
||||
//top_block->connect(gr_interleaved_char_to_complex, 0, tracking_ch_vec.at(n)->get_left_block(), 0);
|
||||
@ -1687,10 +1682,8 @@ 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.";
|
||||
|
||||
|
||||
args.file = file;
|
||||
args.nsamples_tx = baseband_sampling_freq * FLAGS_duration;
|
||||
;
|
||||
|
||||
args.skip_used_samples = 0;
|
||||
|
||||
@ -1699,7 +1692,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
for (auto& n : tracking_ch_vec)
|
||||
{
|
||||
n->start_tracking();
|
||||
@ -1709,10 +1701,8 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
send_samples_start_obs_test = 1;
|
||||
pthread_mutex_unlock(&mutex_obs_test);
|
||||
|
||||
|
||||
top_block->start();
|
||||
|
||||
|
||||
EXPECT_NO_THROW({
|
||||
start = std::chrono::system_clock::now();
|
||||
//top_block->run(); // Start threads and wait
|
||||
@ -1720,23 +1710,18 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
elapsed_seconds = end - start;
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
|
||||
// wait for the child DMA process to finish
|
||||
pthread_join(thread_DMA, nullptr);
|
||||
|
||||
|
||||
top_block->stop();
|
||||
|
||||
|
||||
// reset the HW AGAIN
|
||||
acquisition->stop_acquisition();
|
||||
|
||||
|
||||
// pthread_mutex_lock(&mutex_obs_test);
|
||||
// send_samples_start_obs_test = 0;
|
||||
// pthread_mutex_unlock(&mutex_obs_test);
|
||||
|
||||
|
||||
// check results
|
||||
// Matrices for storing columnwise true GPS time, Range, Doppler and Carrier phase
|
||||
std::vector<arma::mat> true_obs_vec;
|
||||
@ -1789,7 +1774,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
<< "Failure reading RINEX file";
|
||||
}
|
||||
|
||||
|
||||
// read measured values
|
||||
Observables_Dump_Reader estimated_observables(tracking_ch_vec.size());
|
||||
ASSERT_NO_THROW({
|
||||
@ -1828,7 +1812,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Cut measurement tail zeros
|
||||
arma::uvec index;
|
||||
for (auto& n : measured_obs_vec)
|
||||
@ -1859,7 +1842,6 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Correct the clock error using true values (it is not possible for a receiver to correct
|
||||
// the receiver clock offset error at the observables level because it is required the
|
||||
// decoding of the ephemeris data and solve the PVT equations)
|
||||
@ -1969,6 +1951,5 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user