1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-17 20:53:02 +00:00

Fix tests

This commit is contained in:
Antonio Ramos 2018-03-20 17:24:16 +01:00
parent 06dbe4cf4e
commit 5a86de623b
8 changed files with 119 additions and 116 deletions

View File

@ -78,7 +78,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
extend_correlation_symbols = 1; extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << std::endl;
} }
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{ {
std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
} }

View File

@ -81,7 +81,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH; extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
} }
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{ {
std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
} }

View File

@ -84,7 +84,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
{ {
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
} }
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) if ((symbols_extended_correlator > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{ {
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
} }

View File

@ -80,7 +80,7 @@ GpsL5iDllPllTracking::GpsL5iDllPllTracking(
extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH; extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
} }
if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
{ {
std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
} }

View File

@ -641,7 +641,6 @@ private:
{ {
public: public:
Rtcm_Session(boost::asio::ip::tcp::socket socket, Rtcm_Listener_Room& room) : socket_(std::move(socket)), room_(room) {} Rtcm_Session(boost::asio::ip::tcp::socket socket, Rtcm_Listener_Room& room) : socket_(std::move(socket)), room_(room) {}
inline void start() inline void start()
{ {
room_.join(shared_from_this()); room_.join(shared_from_this());
@ -665,12 +664,13 @@ private:
boost::asio::async_read(socket_, boost::asio::async_read(socket_,
boost::asio::buffer(read_msg_.data(), Rtcm_Message::header_length), boost::asio::buffer(read_msg_.data(), Rtcm_Message::header_length),
[this, self](boost::system::error_code ec, std::size_t /*length*/) { [this, self](boost::system::error_code ec, std::size_t /*length*/) {
if (!ec && read_msg_.decode_header()) if (!ec and read_msg_.decode_header())
{ {
do_read_message_body(); do_read_message_body();
} }
else if (!ec && !read_msg_.decode_header()) else if (!ec and !read_msg_.decode_header())
{ {
/* TODO: The commented code throws an exception. Solve it!
client_says += read_msg_.data(); client_says += read_msg_.data();
bool first = true; bool first = true;
while (client_says.length() >= 80) while (client_says.length() >= 80)
@ -683,6 +683,7 @@ private:
std::cout << client_says.substr(0, 80) << std::endl; std::cout << client_says.substr(0, 80) << std::endl;
client_says = client_says.substr(80, client_says.length() - 80); client_says = client_says.substr(80, client_says.length() - 80);
} }
*/
do_read_message_header(); do_read_message_header();
} }
else else
@ -719,8 +720,7 @@ private:
{ {
auto self(shared_from_this()); auto self(shared_from_this());
boost::asio::async_write(socket_, boost::asio::async_write(socket_,
boost::asio::buffer(write_msgs_.front().body(), boost::asio::buffer(write_msgs_.front().body(), write_msgs_.front().body_length()),
write_msgs_.front().body_length()),
[this, self](boost::system::error_code ec, std::size_t /*length*/) { [this, self](boost::system::error_code ec, std::size_t /*length*/) {
if (!ec) if (!ec)
{ {

View File

@ -184,17 +184,17 @@ public:
int configure_generator(); int configure_generator();
int generate_signal(); int generate_signal();
void check_results_carrier_phase( void check_results_carrier_phase(
arma::mat& true_ch0, arma::mat& true_ch0,
arma::mat& true_ch1, arma::mat& true_ch1,
arma::vec& true_tow_s, arma::vec& true_tow_s,
arma::mat& measured_ch0, arma::mat& measured_ch0,
arma::mat& measured_ch1); arma::mat& measured_ch1);
void check_results_code_psudorange( void check_results_code_psudorange(
arma::mat& true_ch0, arma::mat& true_ch0,
arma::mat& true_ch1, arma::mat& true_ch1,
arma::vec& true_tow_s, arma::vec& true_tow_s,
arma::mat& measured_ch0, arma::mat& measured_ch0,
arma::mat& measured_ch1); arma::mat& measured_ch1);
HybridObservablesTest() HybridObservablesTest()
{ {
@ -281,23 +281,23 @@ void HybridObservablesTest::configure_receiver()
// Set Tracking // Set Tracking
config->set_property("Tracking_1C.item_type", "gr_complex"); config->set_property("Tracking_1C.item_type", "gr_complex");
config->set_property("Tracking_1C.if", "0");
config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump", "true");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
config->set_property("Tracking_1C.pll_bw_hz", "35.0"); config->set_property("Tracking_1C.pll_bw_hz", "35.0");
config->set_property("Tracking_1C.dll_bw_hz", "0.5"); config->set_property("Tracking_1C.dll_bw_hz", "0.5");
config->set_property("Tracking_1C.early_late_space_chips", "0.5"); config->set_property("Tracking_1C.early_late_space_chips", "0.5");
config->set_property("Tracking_1C.unified", "true");
config->set_property("TelemetryDecoder_1C.dump", "true"); config->set_property("TelemetryDecoder_1C.dump", "true");
config->set_property("Observables.dump", "true"); config->set_property("Observables.dump", "true");
} }
void HybridObservablesTest::check_results_carrier_phase( void HybridObservablesTest::check_results_carrier_phase(
arma::mat& true_ch0, arma::mat& true_ch0,
arma::mat& true_ch1, arma::mat& true_ch1,
arma::vec& true_tow_s, arma::vec& true_tow_s,
arma::mat& measured_ch0, arma::mat& measured_ch0,
arma::mat& measured_ch1) arma::mat& measured_ch1)
{ {
//1. True value interpolation to match the measurement times //1. True value interpolation to match the measurement times
@ -358,12 +358,12 @@ void HybridObservablesTest::check_results_carrier_phase(
<< " [cycles]" << std::endl; << " [cycles]" << std::endl;
std::cout.precision(ss); std::cout.precision(ss);
ASSERT_LT(rmse_ch0, 5e-2); ASSERT_LT(rmse_ch0, 5e-2);
ASSERT_LT(error_mean_ch0, 5e-2); ASSERT_LT(error_mean_ch0, 5e-2);
ASSERT_GT(error_mean_ch0, -5e-2); ASSERT_GT(error_mean_ch0, -5e-2);
ASSERT_LT(error_var_ch0, 5e-2); ASSERT_LT(error_var_ch0, 5e-2);
ASSERT_LT(max_error_ch0, 5e-2); ASSERT_LT(max_error_ch0, 5e-2);
ASSERT_GT(min_error_ch0, -5e-2); ASSERT_GT(min_error_ch0, -5e-2);
//5. report //5. report
ss = std::cout.precision(); ss = std::cout.precision();
@ -375,21 +375,21 @@ void HybridObservablesTest::check_results_carrier_phase(
<< " [cycles]" << std::endl; << " [cycles]" << std::endl;
std::cout.precision(ss); std::cout.precision(ss);
ASSERT_LT(rmse_ch1, 5e-2); ASSERT_LT(rmse_ch1, 5e-2);
ASSERT_LT(error_mean_ch1, 5e-2); ASSERT_LT(error_mean_ch1, 5e-2);
ASSERT_GT(error_mean_ch1, -5e-2); ASSERT_GT(error_mean_ch1, -5e-2);
ASSERT_LT(error_var_ch1, 5e-2); ASSERT_LT(error_var_ch1, 5e-2);
ASSERT_LT(max_error_ch1, 5e-2); ASSERT_LT(max_error_ch1, 5e-2);
ASSERT_GT(min_error_ch1, -5e-2); ASSERT_GT(min_error_ch1, -5e-2);
} }
void HybridObservablesTest::check_results_code_psudorange( void HybridObservablesTest::check_results_code_psudorange(
arma::mat& true_ch0, arma::mat& true_ch0,
arma::mat& true_ch1, arma::mat& true_ch1,
arma::vec& true_tow_s, arma::vec& true_tow_s,
arma::mat& measured_ch0, arma::mat& measured_ch0,
arma::mat& measured_ch1) arma::mat& measured_ch1)
{ {
//1. True value interpolation to match the measurement times //1. True value interpolation to match the measurement times
@ -438,12 +438,12 @@ void HybridObservablesTest::check_results_code_psudorange(
<< " [meters]" << std::endl; << " [meters]" << std::endl;
std::cout.precision(ss); std::cout.precision(ss);
ASSERT_LT(rmse, 0.5); ASSERT_LT(rmse, 0.5);
ASSERT_LT(error_mean, 0.5); ASSERT_LT(error_mean, 0.5);
ASSERT_GT(error_mean, -0.5); ASSERT_GT(error_mean, -0.5);
ASSERT_LT(error_var, 0.5); ASSERT_LT(error_var, 0.5);
ASSERT_LT(max_error, 2.0); ASSERT_LT(max_error, 2.0);
ASSERT_GT(min_error, -2.0); ASSERT_GT(min_error, -2.0);
} }
@ -543,7 +543,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
boost::shared_ptr<HybridObservablesTest_tlm_msg_rx> tlm_msg_rx_ch2 = HybridObservablesTest_tlm_msg_rx_make(); boost::shared_ptr<HybridObservablesTest_tlm_msg_rx> tlm_msg_rx_ch2 = HybridObservablesTest_tlm_msg_rx_make();
//Observables //Observables
std::shared_ptr<ObservablesInterface> observables(new HybridObservables(config.get(), "Observables",3, 2)); std::shared_ptr<ObservablesInterface> observables(new HybridObservables(config.get(), "Observables", 3, 2));
ASSERT_NO_THROW({ ASSERT_NO_THROW({
tracking_ch0->set_channel(gnss_synchro_ch0.Channel_ID); tracking_ch0->set_channel(gnss_synchro_ch0.Channel_ID);
@ -604,10 +604,10 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
true_observables_reader true_observables; true_observables_reader true_observables;
ASSERT_NO_THROW({ ASSERT_NO_THROW({
if(true_observables.open_obs_file(std::string("./obs_out.bin")) == false) if (true_observables.open_obs_file(std::string("./obs_out.bin")) == false)
{ {
throw std::exception(); throw std::exception();
} }
}) << "Failure opening true observables file"; }) << "Failure opening true observables file";
unsigned int nepoch = static_cast<unsigned int>(true_observables.num_epochs()); unsigned int nepoch = static_cast<unsigned int>(true_observables.num_epochs());
@ -620,27 +620,27 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
true_observables.restart(); true_observables.restart();
long int epoch_counter = 0; long int epoch_counter = 0;
ASSERT_NO_THROW({ ASSERT_NO_THROW({
while(true_observables.read_binary_obs()) while (true_observables.read_binary_obs())
{ {
if(round(true_observables.prn[0]) != gnss_synchro_ch0.PRN) if (round(true_observables.prn[0]) != gnss_synchro_ch0.PRN)
{ {
std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl; std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl;
throw std::exception(); throw std::exception();
} }
if(round(true_observables.prn[1]) != gnss_synchro_ch1.PRN) if (round(true_observables.prn[1]) != gnss_synchro_ch1.PRN)
{ {
std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl; std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl;
throw std::exception(); throw std::exception();
} }
true_ch0(epoch_counter, 0) = true_observables.gps_time_sec[0]; true_ch0(epoch_counter, 0) = true_observables.gps_time_sec[0];
true_ch0(epoch_counter, 1) = true_observables.dist_m[0]; true_ch0(epoch_counter, 1) = true_observables.dist_m[0];
true_ch0(epoch_counter, 2) = true_observables.doppler_l1_hz[0]; true_ch0(epoch_counter, 2) = true_observables.doppler_l1_hz[0];
true_ch0(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[0]; true_ch0(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[0];
true_ch1(epoch_counter, 0) = true_observables.gps_time_sec[1]; true_ch1(epoch_counter, 0) = true_observables.gps_time_sec[1];
true_ch1(epoch_counter, 1) = true_observables.dist_m[1]; true_ch1(epoch_counter, 1) = true_observables.dist_m[1];
true_ch1(epoch_counter, 2) = true_observables.doppler_l1_hz[1]; true_ch1(epoch_counter, 2) = true_observables.doppler_l1_hz[1];
true_ch1(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[1]; true_ch1(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[1];
epoch_counter++; epoch_counter++;
} }
@ -649,10 +649,10 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
//read measured values //read measured values
observables_dump_reader estimated_observables(2); //two channels observables_dump_reader estimated_observables(2); //two channels
ASSERT_NO_THROW({ ASSERT_NO_THROW({
if(estimated_observables.open_obs_file(std::string("./observables.dat")) == false) if (estimated_observables.open_obs_file(std::string("./observables.dat")) == false)
{ {
throw std::exception(); throw std::exception();
} }
}) << "Failure opening dump observables file"; }) << "Failure opening dump observables file";
nepoch = static_cast<unsigned int>(estimated_observables.num_epochs()); nepoch = static_cast<unsigned int>(estimated_observables.num_epochs());
@ -665,43 +665,51 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
estimated_observables.restart(); estimated_observables.restart();
epoch_counter = 0; epoch_counter = 0;
long int epoch_counter2 = 0; long int epoch_counter2 = 0;
while(estimated_observables.read_binary_obs()) while (estimated_observables.read_binary_obs())
{
if(static_cast<bool>(estimated_observables.valid[0]))
{ {
measured_ch0(epoch_counter, 0) = estimated_observables.RX_time[0]; if (static_cast<bool>(estimated_observables.valid[0]))
measured_ch0(epoch_counter, 1) = estimated_observables.TOW_at_current_symbol_s[0]; {
measured_ch0(epoch_counter, 2) = estimated_observables.Carrier_Doppler_hz[0]; measured_ch0(epoch_counter, 0) = estimated_observables.RX_time[0];
measured_ch0(epoch_counter, 3) = estimated_observables.Acc_carrier_phase_hz[0]; measured_ch0(epoch_counter, 1) = estimated_observables.TOW_at_current_symbol_s[0];
measured_ch0(epoch_counter, 4) = estimated_observables.Pseudorange_m[0]; measured_ch0(epoch_counter, 2) = estimated_observables.Carrier_Doppler_hz[0];
epoch_counter++; measured_ch0(epoch_counter, 3) = estimated_observables.Acc_carrier_phase_hz[0];
measured_ch0(epoch_counter, 4) = estimated_observables.Pseudorange_m[0];
epoch_counter++;
}
if (static_cast<bool>(estimated_observables.valid[1]))
{
measured_ch1(epoch_counter2, 0) = estimated_observables.RX_time[1];
measured_ch1(epoch_counter2, 1) = estimated_observables.TOW_at_current_symbol_s[1];
measured_ch1(epoch_counter2, 2) = estimated_observables.Carrier_Doppler_hz[1];
measured_ch1(epoch_counter2, 3) = estimated_observables.Acc_carrier_phase_hz[1];
measured_ch1(epoch_counter2, 4) = estimated_observables.Pseudorange_m[1];
epoch_counter2++;
}
} }
if(static_cast<bool>(estimated_observables.valid[1]))
{
measured_ch1(epoch_counter2, 0) = estimated_observables.RX_time[1];
measured_ch1(epoch_counter2, 1) = estimated_observables.TOW_at_current_symbol_s[1];
measured_ch1(epoch_counter2, 2) = estimated_observables.Carrier_Doppler_hz[1];
measured_ch1(epoch_counter2, 3) = estimated_observables.Acc_carrier_phase_hz[1];
measured_ch1(epoch_counter2, 4) = estimated_observables.Pseudorange_m[1];
epoch_counter2++;
}
}
//Cut measurement tail zeros //Cut measurement tail zeros
arma::uvec index = arma::find(measured_ch0.col(0) > 0.0, 1, "last"); arma::uvec index = arma::find(measured_ch0.col(0) > 0.0, 1, "last");
if((index.size() > 0) and index(0) < (nepoch - 1)) if ((index.size() > 0) and index(0) < (nepoch - 1))
{ measured_ch0.shed_rows(index(0) + 1, nepoch - 1); } {
measured_ch0.shed_rows(index(0) + 1, nepoch - 1);
}
index = arma::find(measured_ch1.col(0) > 0.0, 1, "last"); index = arma::find(measured_ch1.col(0) > 0.0, 1, "last");
if((index.size() > 0) and index(0) < (nepoch - 1)) if ((index.size() > 0) and index(0) < (nepoch - 1))
{ measured_ch1.shed_rows(index(0) + 1, nepoch - 1); } {
measured_ch1.shed_rows(index(0) + 1, nepoch - 1);
}
//Cut measurement initial transitory of the measurements //Cut measurement initial transitory of the measurements
index = arma::find(measured_ch0.col(0) >= true_ch0(0, 0), 1, "first"); index = arma::find(measured_ch0.col(0) >= true_ch0(0, 0), 1, "first");
if((index.size() > 0) and (index(0) > 0)) if ((index.size() > 0) and (index(0) > 0))
{ measured_ch0.shed_rows(0, index(0)); } {
measured_ch0.shed_rows(0, index(0));
}
index = arma::find(measured_ch1.col(0) >= true_ch1(0, 0), 1, "first"); index = arma::find(measured_ch1.col(0) >= true_ch1(0, 0), 1, "first");
if((index.size() > 0) and (index(0) > 0)) if ((index.size() > 0) and (index(0) > 0))
{ measured_ch1.shed_rows(0, index(0)); } {
measured_ch1.shed_rows(0, index(0));
}
//Correct the clock error using true values (it is not possible for a receiver to correct //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 //the receiver clock offset error at the observables level because it is required the
@ -709,14 +717,14 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
//Find the reference satellite (the nearest) and compute the receiver time offset at observable level //Find the reference satellite (the nearest) and compute the receiver time offset at observable level
arma::vec receiver_time_offset_s; arma::vec receiver_time_offset_s;
if(measured_ch0(0, 4) < measured_ch1(0, 4)) if (measured_ch0(0, 4) < measured_ch1(0, 4))
{ {
receiver_time_offset_s = true_ch0.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0; receiver_time_offset_s = true_ch0.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0;
} }
else else
{ {
receiver_time_offset_s = true_ch1.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0; receiver_time_offset_s = true_ch1.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0;
} }
arma::vec corrected_reference_TOW_s = true_ch0.col(0) - receiver_time_offset_s; arma::vec corrected_reference_TOW_s = true_ch0.col(0) - receiver_time_offset_s;
std::cout << "Receiver time offset: " << receiver_time_offset_s(0) * 1e3 << " [ms]" << std::endl; std::cout << "Receiver time offset: " << receiver_time_offset_s(0) * 1e3 << " [ms]" << std::endl;
@ -724,5 +732,5 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
check_results_code_psudorange(true_ch0, true_ch1, corrected_reference_TOW_s, measured_ch0, measured_ch1); check_results_code_psudorange(true_ch0, true_ch1, corrected_reference_TOW_s, measured_ch0, measured_ch1);
check_results_carrier_phase(true_ch0, true_ch1, corrected_reference_TOW_s, measured_ch0, measured_ch1); check_results_carrier_phase(true_ch0, true_ch1, corrected_reference_TOW_s, measured_ch0, measured_ch1);
std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl; std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl;
} }

View File

@ -265,13 +265,12 @@ void GpsL1CATelemetryDecoderTest::configure_receiver()
// Set Tracking // Set Tracking
config->set_property("Tracking_1C.item_type", "gr_complex"); config->set_property("Tracking_1C.item_type", "gr_complex");
config->set_property("Tracking_1C.if", "0");
config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump", "true");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
config->set_property("Tracking_1C.pll_bw_hz", "20.0"); config->set_property("Tracking_1C.pll_bw_hz", "20.0");
config->set_property("Tracking_1C.dll_bw_hz", "1.5"); config->set_property("Tracking_1C.dll_bw_hz", "1.5");
config->set_property("Tracking_1C.early_late_space_chips", "0.5"); config->set_property("Tracking_1C.early_late_space_chips", "0.5");
config->set_property("Tracking_1C.unified", "true");
config->set_property("TelemetryDecoder_1C.dump", "true"); config->set_property("TelemetryDecoder_1C.dump", "true");
} }

View File

@ -225,11 +225,7 @@ void GpsL1CADllPllTrackingTest::configure_receiver()
config->set_property("Tracking_1C.pll_bw_hz", "20.0"); config->set_property("Tracking_1C.pll_bw_hz", "20.0");
config->set_property("Tracking_1C.dll_bw_hz", "2.0"); config->set_property("Tracking_1C.dll_bw_hz", "2.0");
config->set_property("Tracking_1C.early_late_space_chips", "0.5"); config->set_property("Tracking_1C.early_late_space_chips", "0.5");
config->set_property("Tracking_1C.pll_bw_narrow_hz", "20.0");
config->set_property("Tracking_1C.dll_bw_narrow_hz", "2.0");
config->set_property("Tracking_1C.early_late_space_narrow_chips", "0.5");
config->set_property("Tracking_1C.unified", "true"); config->set_property("Tracking_1C.unified", "true");
config->set_property("Tracking_1C.extend_correlation_ms", "1");
config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump", "true");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
} }
@ -395,7 +391,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
true_obs_data.restart(); true_obs_data.restart();
std::cout << "Initial Doppler [Hz]=" << true_obs_data.doppler_l1_hz << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl; std::cout << "Initial Doppler [Hz]=" << true_obs_data.doppler_l1_hz << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl;
gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD; gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast<double>(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD;
gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz; gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz;
gnss_synchro.Acq_samplestamp_samples = 0; gnss_synchro.Acq_samplestamp_samples = 0;