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

Update test

This commit is contained in:
Gastd 2017-07-18 18:24:29 -03:00
parent 32b9919fc5
commit a178376ad1

View File

@ -178,7 +178,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_1()
config->set_property("SignalSource.item_type", "gr_complex");
config->set_property("SignalSource.num_satellites", "1");
config->set_property("SignalSource.num_satellites", "4");
config->set_property("SignalSource.system_0", "R");
config->set_property("SignalSource.PRN_0", "10");
@ -186,8 +186,26 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_1()
config->set_property("SignalSource.doppler_Hz_0", std::to_string(expected_doppler_hz));
config->set_property("SignalSource.delay_chips_0", std::to_string(expected_delay_chips));
config->set_property("SignalSource.system_1", "R");
config->set_property("SignalSource.PRN_1", "15");
config->set_property("SignalSource.CN0_dB_1", "44");
config->set_property("SignalSource.doppler_Hz_1", "1000");
config->set_property("SignalSource.delay_chips_1", "100");
config->set_property("SignalSource.system_2", "R");
config->set_property("SignalSource.PRN_2", "21");
config->set_property("SignalSource.CN0_dB_2", "44");
config->set_property("SignalSource.doppler_Hz_2", "2000");
config->set_property("SignalSource.delay_chips_2", "200");
config->set_property("SignalSource.system_3", "G");
config->set_property("SignalSource.PRN_3", "22");
config->set_property("SignalSource.CN0_dB_3", "44");
config->set_property("SignalSource.doppler_Hz_3", "3000");
config->set_property("SignalSource.delay_chips_3", "300");
config->set_property("SignalSource.noise_flag", "false");
config->set_property("SignalSource.data_flag", "false");
config->set_property("SignalSource.data_flag", "true");
config->set_property("SignalSource.BW_BB", "0.97");
config->set_property("InputFilter.implementation", "Fir_Filter");
@ -273,8 +291,8 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_2()
config->set_property("SignalSource.doppler_Hz_3", "3000");
config->set_property("SignalSource.delay_chips_3", "300");
config->set_property("SignalSource.noise_flag", "true");
config->set_property("SignalSource.data_flag", "true");
config->set_property("SignalSource.noise_flag", "false");
config->set_property("SignalSource.data_flag", "false");
config->set_property("SignalSource.BW_BB", "0.97");
config->set_property("InputFilter.implementation", "Fir_Filter");
@ -302,7 +320,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_2()
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.pfa", "0.1");
config->set_property("Acquisition.pfa", "0.0001");
config->set_property("Acquisition.doppler_max", "10000");
config->set_property("Acquisition.doppler_step", "250");
config->set_property("Acquisition.bit_transition_flag", "false");
@ -349,9 +367,12 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::process_message()
// The value 511.0 must be a variable, chips/length
double delay_error_chips = std::abs((double)expected_delay_chips - (double)(gnss_synchro.Acq_delay_samples-5)*511.0/((double)fs_in*1e-3));
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
// std::cout << "doppler_error_hz = " << doppler_error_hz << std::endl;
mse_delay += std::pow(delay_error_chips, 2);
// std::cout << "mse_delay = " << mse_delay << std::endl;
mse_doppler += std::pow(doppler_error_hz, 2);
// std::cout << "mse_doppler = " << mse_doppler << std::endl;
if ((delay_error_chips < max_delay_error_chips) && (doppler_error_hz < max_doppler_error_hz))
{
@ -448,11 +469,11 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
}) << "Failure setting doppler_max."<< std::endl;
ASSERT_NO_THROW( {
acquisition->set_doppler_step(500);
acquisition->set_doppler_step(250);
}) << "Failure setting doppler_step."<< std::endl;
ASSERT_NO_THROW( {
acquisition->set_threshold(0.5);
acquisition->set_threshold(0.05);
}) << "Failure setting threshold."<< std::endl;
ASSERT_NO_THROW( {
@ -462,14 +483,14 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
acquisition->init();
ASSERT_NO_THROW( {
//ASSERT_NO_THROW( {
boost::shared_ptr<GenSignalSource> signal_source;
SignalGenerator* signal_generator = new SignalGenerator(config.get(), "SignalSource", 0, 1, queue);
FirFilter* filter = new FirFilter(config.get(), "InputFilter", 1, 1);
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
signal_source->connect(top_block);
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
}) << "Failure connecting the blocks of acquisition test." << std::endl;
//}) << "Failure connecting the blocks of acquisition test." << std::endl;
// i = 0 --> satellite in acquisition is visible
// i = 1 --> satellite in acquisition is not visible
@ -566,7 +587,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResultsProbabilities)
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
}) << "Failure connecting the blocks of acquisition test." << std::endl;
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
std::cout << "Probability of false alarm (target) = " << 0.0001 << std::endl;
// i = 0 --> satellite in acquisition is visible (prob of detection and prob of detection with wrong estimation)
// i = 1 --> satellite in acquisition is not visible (prob of false detection)
@ -615,3 +636,4 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResultsProbabilities)
delete acquisition;
}