1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Add more parameters to Observables test

This commit is contained in:
Carles Fernandez 2019-11-14 12:15:41 +01:00
parent a00ec7b4cd
commit b8ae6434cc
2 changed files with 24 additions and 19 deletions

View File

@ -58,6 +58,10 @@ DEFINE_double(DLL_bw_hz_start, 1.0, "DLL Wide configuration start sweep value [H
DEFINE_double(DLL_bw_hz_stop, 1.0, "DLL Wide configuration stop sweep value [Hz]"); DEFINE_double(DLL_bw_hz_stop, 1.0, "DLL Wide configuration stop sweep value [Hz]");
DEFINE_double(DLL_bw_hz_step, 0.25, "DLL Wide configuration sweep step value [Hz]"); DEFINE_double(DLL_bw_hz_step, 0.25, "DLL Wide configuration sweep step value [Hz]");
DEFINE_double(fll_bw_hz, 4.0, "FLL filter bandwidth [Hz]");
DEFINE_bool(enable_fll_pull_in, false, "Enable FLL in pull-in phase");
DEFINE_bool(enable_fll_steady_state, false, "Enable FLL in steady-state phase");
DEFINE_double(PLL_narrow_bw_hz, 5.0, "PLL Narrow configuration value [Hz]"); DEFINE_double(PLL_narrow_bw_hz, 5.0, "PLL Narrow configuration value [Hz]");
DEFINE_double(DLL_narrow_bw_hz, 0.75, "DLL Narrow configuration value [Hz]"); DEFINE_double(DLL_narrow_bw_hz, 0.75, "DLL Narrow configuration value [Hz]");

View File

@ -661,7 +661,6 @@ void HybridObservablesTest::configure_receiver(
bool high_dyn) bool high_dyn)
{ {
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
config->set_property("Tracking.dump", "true");
if (high_dyn) if (high_dyn)
{ {
config->set_property("Tracking.high_dyn", "true"); config->set_property("Tracking.high_dyn", "true");
@ -670,8 +669,6 @@ void HybridObservablesTest::configure_receiver(
{ {
config->set_property("Tracking.high_dyn", "false"); config->set_property("Tracking.high_dyn", "false");
} }
config->set_property("Tracking.smoother_length", std::to_string(smoother_length));
config->set_property("Tracking.dump_filename", "./tracking_ch_");
config->set_property("Tracking.implementation", implementation); config->set_property("Tracking.implementation", implementation);
config->set_property("Tracking.item_type", "gr_complex"); config->set_property("Tracking.item_type", "gr_complex");
config->set_property("Tracking.pll_bw_hz", std::to_string(PLL_wide_bw_hz)); config->set_property("Tracking.pll_bw_hz", std::to_string(PLL_wide_bw_hz));
@ -679,6 +676,12 @@ void HybridObservablesTest::configure_receiver(
config->set_property("Tracking.extend_correlation_symbols", std::to_string(extend_correlation_symbols)); config->set_property("Tracking.extend_correlation_symbols", std::to_string(extend_correlation_symbols));
config->set_property("Tracking.pll_bw_narrow_hz", std::to_string(PLL_narrow_bw_hz)); config->set_property("Tracking.pll_bw_narrow_hz", std::to_string(PLL_narrow_bw_hz));
config->set_property("Tracking.dll_bw_narrow_hz", std::to_string(DLL_narrow_bw_hz)); config->set_property("Tracking.dll_bw_narrow_hz", std::to_string(DLL_narrow_bw_hz));
config->set_property("Tracking.fll_bw_hz", std::to_string(FLAGS_fll_bw_hz));
config->set_property("Tracking.enable_fll_pull_in", FLAGS_enable_fll_pull_in ? "true" : "false");
config->set_property("Tracking.enable_fll_steady_state", FLAGS_enable_fll_steady_state ? "true" : "false");
config->set_property("Tracking.smoother_length", std::to_string(smoother_length));
config->set_property("Tracking.dump", "true");
config->set_property("Tracking.dump_filename", "./tracking_ch_");
config->set_property("Observables.implementation", "Hybrid_Observables"); config->set_property("Observables.implementation", "Hybrid_Observables");
config->set_property("Observables.dump", "true"); config->set_property("Observables.dump", "true");
config->set_property("TelemetryDecoder.dump", "true"); config->set_property("TelemetryDecoder.dump", "true");
@ -696,7 +699,7 @@ void HybridObservablesTest::configure_receiver(
std::memcpy(static_cast<void*>(gnss_synchro_master.Signal), str, 3); // copy string into synchro char array: 2 char + null std::memcpy(static_cast<void*>(gnss_synchro_master.Signal), str, 3); // copy string into synchro char array: 2 char + null
config->set_property("Tracking.early_late_space_chips", "0.5"); config->set_property("Tracking.early_late_space_chips", "0.5");
config->set_property("Tracking.early_late_space_narrow_chips", "0.5"); config->set_property("Tracking.early_late_space_narrow_chips", "0.1");
config->set_property("TelemetryDecoder.implementation", "GPS_L1_CA_Telemetry_Decoder"); config->set_property("TelemetryDecoder.implementation", "GPS_L1_CA_Telemetry_Decoder");
} }
@ -743,8 +746,8 @@ void HybridObservablesTest::configure_receiver(
} }
config->set_property("Tracking.early_late_space_chips", "0.5"); config->set_property("Tracking.early_late_space_chips", "0.5");
config->set_property("Tracking.track_pilot", "true"); config->set_property("Tracking.track_pilot", "true");
config->set_property("Tracking.pll_filter_order", "2"); //config->set_property("Tracking.pll_filter_order", "2");
config->set_property("Tracking.dll_filter_order", "2"); //config->set_property("Tracking.dll_filter_order", "2");
config->set_property("TelemetryDecoder.implementation", "Galileo_E5a_Telemetry_Decoder"); config->set_property("TelemetryDecoder.implementation", "Galileo_E5a_Telemetry_Decoder");
} }
@ -758,8 +761,8 @@ void HybridObservablesTest::configure_receiver(
config->set_property("Tracking.early_late_space_chips", "0.5"); config->set_property("Tracking.early_late_space_chips", "0.5");
config->set_property("Tracking.track_pilot", "true"); config->set_property("Tracking.track_pilot", "true");
config->set_property("Tracking.pll_filter_order", "2"); //config->set_property("Tracking.pll_filter_order", "2");
config->set_property("Tracking.dll_filter_order", "2"); //config->set_property("Tracking.dll_filter_order", "2");
config->set_property("TelemetryDecoder.implementation", "GPS_L5_Telemetry_Decoder"); config->set_property("TelemetryDecoder.implementation", "GPS_L5_Telemetry_Decoder");
} }
@ -776,6 +779,9 @@ void HybridObservablesTest::configure_receiver(
std::cout << "implementation: " << config->property("Tracking.implementation", std::string("undefined")) << " \n"; std::cout << "implementation: " << config->property("Tracking.implementation", std::string("undefined")) << " \n";
std::cout << "pll_bw_hz: " << config->property("Tracking.pll_bw_hz", 0.0) << " Hz\n"; std::cout << "pll_bw_hz: " << config->property("Tracking.pll_bw_hz", 0.0) << " Hz\n";
std::cout << "dll_bw_hz: " << config->property("Tracking.dll_bw_hz", 0.0) << " Hz\n"; std::cout << "dll_bw_hz: " << config->property("Tracking.dll_bw_hz", 0.0) << " Hz\n";
std::cout << "fll_bw_hz: " << config->property("Tracking.fll_bw_hz", 0.0) << " Hz\n";
std::cout << "enable_fll_pull_in: " << config->property("Tracking.enable_fll_pull_in", false) << "\n";
std::cout << "enable_fll_steady_state: " << config->property("Tracking.enable_fll_steady_state", false) << "\n";
std::cout << "pll_bw_narrow_hz: " << config->property("Tracking.pll_bw_narrow_hz", 0.0) << " Hz\n"; std::cout << "pll_bw_narrow_hz: " << config->property("Tracking.pll_bw_narrow_hz", 0.0) << " Hz\n";
std::cout << "dll_bw_narrow_hz: " << config->property("Tracking.dll_bw_narrow_hz", 0.0) << " Hz\n"; std::cout << "dll_bw_narrow_hz: " << config->property("Tracking.dll_bw_narrow_hz", 0.0) << " Hz\n";
std::cout << "extend_correlation_symbols: " << config->property("Tracking.extend_correlation_symbols", 0) << " Symbols\n"; std::cout << "extend_correlation_symbols: " << config->property("Tracking.extend_correlation_symbols", 0) << " Symbols\n";
@ -785,6 +791,7 @@ void HybridObservablesTest::configure_receiver(
std::cout << "*****************************************\n"; std::cout << "*****************************************\n";
} }
void HybridObservablesTest::check_results_carrier_phase( void HybridObservablesTest::check_results_carrier_phase(
arma::mat& true_ch0, arma::mat& true_ch0,
arma::vec& true_tow_s, arma::vec& true_tow_s,
@ -792,7 +799,6 @@ void HybridObservablesTest::check_results_carrier_phase(
const std::string& data_title) const std::string& data_title)
{ {
// 1. True value interpolation to match the measurement times // 1. True value interpolation to match the measurement times
double t0 = measured_ch0(0, 0); double t0 = measured_ch0(0, 0);
int size1 = measured_ch0.col(0).n_rows; int size1 = measured_ch0.col(0).n_rows;
double t1 = measured_ch0(size1 - 1, 0); double t1 = measured_ch0(size1 - 1, 0);
@ -873,7 +879,6 @@ void HybridObservablesTest::check_results_carrier_phase_double_diff(
const std::string& data_title) const std::string& data_title)
{ {
// 1. True value interpolation to match the measurement times // 1. True value interpolation to match the measurement times
double t0 = std::max(measured_ch0(0, 0), measured_ch1(0, 0)); double t0 = std::max(measured_ch0(0, 0), measured_ch1(0, 0));
int size1 = measured_ch0.col(0).n_rows; int size1 = measured_ch0.col(0).n_rows;
int size2 = measured_ch1.col(0).n_rows; int size2 = measured_ch1.col(0).n_rows;
@ -969,7 +974,6 @@ void HybridObservablesTest::check_results_carrier_doppler_double_diff(
const std::string& data_title) const std::string& data_title)
{ {
// 1. True value interpolation to match the measurement times // 1. True value interpolation to match the measurement times
double t0 = std::max(measured_ch0(0, 0), measured_ch1(0, 0)); double t0 = std::max(measured_ch0(0, 0), measured_ch1(0, 0));
int size1 = measured_ch0.col(0).n_rows; int size1 = measured_ch0.col(0).n_rows;
int size2 = measured_ch1.col(0).n_rows; int size2 = measured_ch1.col(0).n_rows;
@ -1062,7 +1066,6 @@ void HybridObservablesTest::check_results_carrier_doppler(
const std::string& data_title) const std::string& data_title)
{ {
// 1. True value interpolation to match the measurement times // 1. True value interpolation to match the measurement times
double t0 = measured_ch0(0, 0); double t0 = measured_ch0(0, 0);
int size1 = measured_ch0.col(0).n_rows; int size1 = measured_ch0.col(0).n_rows;
double t1 = measured_ch0(size1 - 1, 0); double t1 = measured_ch0(size1 - 1, 0);
@ -1137,6 +1140,7 @@ void HybridObservablesTest::check_results_carrier_doppler(
} }
} }
void HybridObservablesTest::check_results_duplicated_satellite( void HybridObservablesTest::check_results_duplicated_satellite(
arma::mat& measured_sat1, arma::mat& measured_sat1,
arma::mat& measured_sat2, arma::mat& measured_sat2,
@ -1389,6 +1393,7 @@ void HybridObservablesTest::check_results_duplicated_satellite(
} }
} }
bool HybridObservablesTest::save_mat_xy(std::vector<double>& x, std::vector<double>& y, std::string filename) bool HybridObservablesTest::save_mat_xy(std::vector<double>& x, std::vector<double>& y, std::string filename)
{ {
try try
@ -1435,7 +1440,6 @@ void HybridObservablesTest::check_results_code_pseudorange(
const std::string& data_title) const std::string& data_title)
{ {
// 1. True value interpolation to match the measurement times // 1. True value interpolation to match the measurement times
double t0 = std::max(measured_ch0(0, 0), measured_ch1(0, 0)); double t0 = std::max(measured_ch0(0, 0), measured_ch1(0, 0));
int size1 = measured_ch0.col(0).n_rows; int size1 = measured_ch0.col(0).n_rows;
int size2 = measured_ch1.col(0).n_rows; int size2 = measured_ch1.col(0).n_rows;
@ -1522,6 +1526,7 @@ void HybridObservablesTest::check_results_code_pseudorange(
} }
} }
bool HybridObservablesTest::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_Synchro gnss) bool HybridObservablesTest::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_Synchro gnss)
{ {
// Open and read reference RINEX observables file // Open and read reference RINEX observables file
@ -1662,6 +1667,8 @@ bool HybridObservablesTest::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_S
} }
return true; return true;
} }
TEST_F(HybridObservablesTest, ValidationOfResults) TEST_F(HybridObservablesTest, ValidationOfResults)
{ {
// Configure the signal generator // Configure the signal generator
@ -1699,7 +1706,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
} }
} }
configure_receiver(FLAGS_PLL_bw_hz_start, configure_receiver(FLAGS_PLL_bw_hz_start,
FLAGS_DLL_bw_hz_start, FLAGS_DLL_bw_hz_start,
FLAGS_PLL_narrow_bw_hz, FLAGS_PLL_narrow_bw_hz,
@ -1708,7 +1714,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
FLAGS_smoother_length, FLAGS_smoother_length,
FLAGS_high_dyn); FLAGS_high_dyn);
for (auto& n : gnss_synchro_vec) for (auto& n : gnss_synchro_vec)
{ {
// setup the signal synchronization, simulating an acquisition // setup the signal synchronization, simulating an acquisition
@ -1814,7 +1819,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
}) << "Failure connecting tracking to the top_block."; }) << "Failure connecting tracking to the top_block.";
} }
ASSERT_NO_THROW({ ASSERT_NO_THROW({
std::string file; std::string file;
if (!FLAGS_enable_external_signal_file) if (!FLAGS_enable_external_signal_file)
@ -1982,7 +1986,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
} }
} }
if (FLAGS_duplicated_satellites_test) if (FLAGS_duplicated_satellites_test)
{ {
// special test mode for duplicated satellites // special test mode for duplicated satellites
@ -2083,7 +2086,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
<< "Error finding observation time epoch in the reference data"; << "Error finding observation time epoch in the reference data";
} }
for (unsigned int n = 0; n < measured_obs_vec.size(); n++) for (unsigned int n = 0; n < measured_obs_vec.size(); n++)
{ {
// debug save to .mat // debug save to .mat
@ -2123,7 +2125,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
measured_obs_vec.at(n).col(3).colptr(0) + measured_obs_vec.at(n).col(3).n_rows); measured_obs_vec.at(n).col(3).colptr(0) + measured_obs_vec.at(n).col(3).n_rows);
save_mat_xy(tmp_vector_x6, tmp_vector_y6, std::string("measured_cp_ch_" + std::to_string(n))); save_mat_xy(tmp_vector_x6, tmp_vector_y6, std::string("measured_cp_ch_" + std::to_string(n)));
if (epoch_counters_vec.at(n) > 100) // discard non-valid channels if (epoch_counters_vec.at(n) > 100) // discard non-valid channels
{ {
arma::vec true_TOW_ref_ch_s = true_obs_vec.at(min_pr_ch_id).col(0) - receiver_time_offset_ref_channel_s(0); arma::vec true_TOW_ref_ch_s = true_obs_vec.at(min_pr_ch_id).col(0) - receiver_time_offset_ref_channel_s(0);