mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Add Galileo acquisition grid
and other fixes in tests
This commit is contained in:
parent
41b5365244
commit
4267150445
@ -46,7 +46,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
|||||||
{
|
{
|
||||||
configuration_ = configuration;
|
configuration_ = configuration;
|
||||||
std::string default_item_type = "gr_complex";
|
std::string default_item_type = "gr_complex";
|
||||||
std::string default_dump_filename = "../data/acquisition.dat";
|
std::string default_dump_filename = "./data/acquisition.dat";
|
||||||
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
DEFINE_string(gnuplot_executable, "", "Gnuplot binary path");
|
DEFINE_string(gnuplot_executable, "", "Gnuplot binary path");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DEFINE_bool(plot_acq_grid, false, "Plots acquisition grid with gnuplot");
|
||||||
DEFINE_int32(plot_decimate, 1, "Decimate plots");
|
DEFINE_int32(plot_decimate, 1, "Decimate plots");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -238,15 +238,14 @@ void GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms", std::to_string(integration_time_ms));
|
config->set_property("Acquisition_1B.coherent_integration_time_ms", std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "0.2");
|
||||||
config->set_property("Acquisition.threshold", "0.2");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -324,15 +323,14 @@ void GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms", std::to_string(integration_time_ms));
|
config->set_property("Acquisition_1B.coherent_integration_time_ms", std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.pfa", "0.1");
|
||||||
config->set_property("Acquisition.pfa", "0.1");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -421,43 +419,43 @@ void GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test::stop_queue()
|
|||||||
TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, Instantiate)
|
TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
||||||
{
|
{
|
||||||
int nsamples = floor(fs_in*integration_time_ms*1e-3);
|
int nsamples = floor(fs_in * integration_time_ms * 1e-3);
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0.0);
|
||||||
|
|
||||||
config_1();
|
config_1();
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
@ -466,14 +464,14 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -485,33 +483,33 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1, queue);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1, queue);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -523,7 +521,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -546,7 +544,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -574,33 +572,33 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProb
|
|||||||
config_2();
|
config_2();
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -612,7 +610,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProb
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -637,7 +635,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProb
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
stop_queue();
|
stop_queue();
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
|
@ -241,17 +241,16 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.bit_transition_flag","false");
|
config->set_property("Acquisition_1B.bit_transition_flag","false");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "0.1");
|
||||||
config->set_property("Acquisition.threshold", "0.1");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -267,7 +266,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::config_2()
|
|||||||
|
|
||||||
expected_delay_chips = 600;
|
expected_delay_chips = 600;
|
||||||
expected_doppler_hz = 750;
|
expected_doppler_hz = 750;
|
||||||
max_doppler_error_hz = 2/(3*integration_time_ms*1e-3);
|
max_doppler_error_hz = 2 / (3 * integration_time_ms * 1e-3);
|
||||||
max_delay_error_chips = 0.50;
|
max_delay_error_chips = 0.50;
|
||||||
|
|
||||||
num_of_realizations = 100;
|
num_of_realizations = 100;
|
||||||
@ -331,17 +330,16 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.bit_transition_flag","false");
|
config->set_property("Acquisition_1B.bit_transition_flag","false");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.pfa", "0.1");
|
||||||
config->set_property("Acquisition.pfa", "0.1");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -424,7 +422,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test::stop_queue()
|
|||||||
TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, Instantiate)
|
TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,7 +436,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
config_1();
|
config_1();
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
@ -449,14 +447,14 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -467,33 +465,33 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
config_1();
|
config_1();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -505,7 +503,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -528,7 +526,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
stop_queue();
|
stop_queue();
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
@ -553,33 +551,33 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
|
|||||||
config_2();
|
config_2();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -591,7 +589,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -616,7 +614,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -158,17 +158,16 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoCTest::init()
|
|||||||
signal.copy(gnss_synchro.Signal, 2, 0);
|
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||||
gnss_synchro.PRN = 11;
|
gnss_synchro.PRN = 11;
|
||||||
|
|
||||||
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
||||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.coherent_integration_time_ms", "4");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms", "4");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
config->set_property("Acquisition_1B.threshold", "0.1");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.threshold", "0.1");
|
config->set_property("Acquisition_1B.doppler_step", "125");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.repeat_satellite", "false");
|
||||||
config->set_property("Acquisition.doppler_step", "125");
|
config->set_property("Acquisition_1B.cboc", "true");
|
||||||
config->set_property("Acquisition.repeat_satellite", "false");
|
|
||||||
config->set_property("Acquisition0.cboc", "true");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -205,7 +204,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoCTest::stop_queue()
|
|||||||
TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, Instantiate)
|
TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, Instantiate)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
||||||
EXPECT_STREQ("Galileo_E1_PCPS_Ambiguous_Acquisition", acquisition->implementation().c_str());
|
EXPECT_STREQ("Galileo_E1_PCPS_Ambiguous_Acquisition", acquisition->implementation().c_str());
|
||||||
}
|
}
|
||||||
@ -221,7 +220,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ConnectAndRun)
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
init();
|
init();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
@ -232,14 +231,14 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,27 +257,27 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
|
|||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(gnss_synchro.Channel_ID);
|
acquisition->set_channel(gnss_synchro.Channel_ID);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.00001));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.00001));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 250));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 250));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
std::string path = std::string(TEST_PATH);
|
std::string path = std::string(TEST_PATH);
|
||||||
@ -288,7 +287,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
|
|||||||
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
||||||
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
start_queue();
|
start_queue();
|
||||||
@ -296,14 +295,14 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
|
|||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
acquisition->set_state(1);
|
acquisition->set_state(1);
|
||||||
}) << "Failure starting acquisition" << std::endl;
|
}) << "Failure starting acquisition";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -47,8 +47,11 @@
|
|||||||
#include "gnss_sdr_valve.h"
|
#include "gnss_sdr_valve.h"
|
||||||
#include "gnss_signal.h"
|
#include "gnss_signal.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include "gnuplot_i.h"
|
||||||
|
#include "test_flags.h"
|
||||||
|
#include "acquisition_dump_reader.h"
|
||||||
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
||||||
|
#include "Galileo_E1.h"
|
||||||
|
|
||||||
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
||||||
class GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx;
|
class GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx;
|
||||||
@ -121,6 +124,7 @@ protected:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
void plot_grid();
|
||||||
|
|
||||||
gr::top_block_sptr top_block;
|
gr::top_block_sptr top_block;
|
||||||
std::shared_ptr<GNSSBlockFactory> factory;
|
std::shared_ptr<GNSSBlockFactory> factory;
|
||||||
@ -134,28 +138,93 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::init()
|
|||||||
{
|
{
|
||||||
gnss_synchro.Channel_ID = 0;
|
gnss_synchro.Channel_ID = 0;
|
||||||
gnss_synchro.System = 'E';
|
gnss_synchro.System = 'E';
|
||||||
std::string signal = "1C";
|
std::string signal = "1B";
|
||||||
signal.copy(gnss_synchro.Signal, 2, 0);
|
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||||
gnss_synchro.PRN = 1;
|
gnss_synchro.PRN = 1;
|
||||||
|
|
||||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.if", "0");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms", "4");
|
config->set_property("Acquisition_1B.coherent_integration_time_ms", "4");
|
||||||
config->set_property("Acquisition.dump", "false");
|
if(FLAGS_plot_acq_grid == true)
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
{
|
||||||
config->set_property("Acquisition.threshold", "0.0001");
|
config->set_property("Acquisition_1B.dump", "true");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
}
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
else
|
||||||
config->set_property("Acquisition.repeat_satellite", "false");
|
{
|
||||||
config->set_property("Acquisition1.cboc", "true");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
|
}
|
||||||
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
||||||
|
config->set_property("Acquisition_1B.threshold", "0.0001");
|
||||||
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
|
config->set_property("Acquisition_1B.repeat_satellite", "false");
|
||||||
|
config->set_property("Acquisition_1B.cboc", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GalileoE1PcpsAmbiguousAcquisitionTest::plot_grid()
|
||||||
|
{
|
||||||
|
//load the measured values
|
||||||
|
std::string basename = "./data/acquisition_E_1B";
|
||||||
|
unsigned int sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||||
|
unsigned int doppler_max = 10000; // !!!
|
||||||
|
unsigned int doppler_step = 250; // !!
|
||||||
|
unsigned int samples_per_code = static_cast<unsigned int>(round(4000000 / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); // !!
|
||||||
|
acquisition_dump_reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code);
|
||||||
|
|
||||||
|
if(!acq_dump.read_binary_acq()) std::cout << "Error reading files" << std::endl;
|
||||||
|
|
||||||
|
std::vector<int> doppler = acq_dump.doppler;
|
||||||
|
std::vector<unsigned int> samples = acq_dump.samples;
|
||||||
|
std::vector<std::vector<float> > mag = acq_dump.mag;
|
||||||
|
|
||||||
|
const std::string gnuplot_executable(FLAGS_gnuplot_executable);
|
||||||
|
if(gnuplot_executable.empty())
|
||||||
|
{
|
||||||
|
std::cout << "WARNING: Although the flag plot_acq_grid has been set to TRUE," << std::endl;
|
||||||
|
std::cout << "gnuplot has not been found in your system." << std::endl;
|
||||||
|
std::cout << "Test results will not be plotted." << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Plotting the acquisition grid..." << std::endl;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
boost::filesystem::path p(gnuplot_executable);
|
||||||
|
boost::filesystem::path dir = p.parent_path();
|
||||||
|
std::string gnuplot_path = dir.native();
|
||||||
|
Gnuplot::set_GNUPlotPath(gnuplot_path);
|
||||||
|
|
||||||
|
Gnuplot g1("lines");
|
||||||
|
g1.set_title("Galileo E1b/c signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN));
|
||||||
|
g1.set_xlabel("Doppler [Hz]");
|
||||||
|
g1.set_ylabel("Sample");
|
||||||
|
//g1.cmd("set view 60, 105, 1, 1");
|
||||||
|
g1.plot_grid3d(doppler, samples, mag);
|
||||||
|
|
||||||
|
g1.savetops("Galileo_E1_acq_grid");
|
||||||
|
g1.savetopdf("Galileo_E1_acq_grid");
|
||||||
|
g1.showonscreen();
|
||||||
|
}
|
||||||
|
catch (const GnuplotException & ge)
|
||||||
|
{
|
||||||
|
std::cout << ge.what() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::string data_str = "./data";
|
||||||
|
if (boost::filesystem::exists(data_str))
|
||||||
|
{
|
||||||
|
boost::filesystem::remove_all(data_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, Instantiate)
|
TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, Instantiate)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +238,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ConnectAndRun)
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
|
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
|
||||||
init();
|
init();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx_make();
|
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
@ -180,14 +249,14 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(),pmt::mp("events"), msg_rx,pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(),pmt::mp("events"), msg_rx,pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,37 +266,47 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
|
|
||||||
|
if(FLAGS_plot_acq_grid == true)
|
||||||
|
{
|
||||||
|
std::string data_str = "./data";
|
||||||
|
if (boost::filesystem::exists(data_str))
|
||||||
|
{
|
||||||
|
boost::filesystem::remove_all(data_str);
|
||||||
|
}
|
||||||
|
boost::filesystem::create_directory(data_str);
|
||||||
|
}
|
||||||
|
|
||||||
double expected_delay_samples = 2920; //18250;
|
double expected_delay_samples = 2920; //18250;
|
||||||
double expected_doppler_hz = -632;
|
double expected_doppler_hz = -632;
|
||||||
init();
|
init();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1);
|
||||||
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisition> acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisition> acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx_make();
|
boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(gnss_synchro.Channel_ID);
|
acquisition->set_channel(gnss_synchro.Channel_ID);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 1e-9));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 1e-9));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 250));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 250));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
std::string path = std::string(TEST_PATH);
|
std::string path = std::string(TEST_PATH);
|
||||||
@ -236,7 +315,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
||||||
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
acquisition->set_local_code();
|
acquisition->set_local_code();
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
@ -248,7 +327,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
|
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
|
||||||
std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
@ -263,5 +342,10 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_LE(doppler_error_hz, 166) << "Doppler error exceeds the expected value: 166 Hz = 2/(3*integration period)";
|
EXPECT_LE(doppler_error_hz, 166) << "Doppler error exceeds the expected value: 166 Hz = 2/(3*integration period)";
|
||||||
EXPECT_LT(delay_error_chips, 0.175) << "Delay error exceeds the expected value: 0.175 chips";
|
EXPECT_LT(delay_error_chips, 0.175) << "Delay error exceeds the expected value: 0.175 chips";
|
||||||
|
|
||||||
|
if(FLAGS_plot_acq_grid == true)
|
||||||
|
{
|
||||||
|
plot_grid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,16 +242,16 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisitionTest::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.if", "0");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.threshold", "0.7");
|
config->set_property("Acquisition_1B.threshold", "0.7");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.dump", "false");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -331,16 +331,15 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisitionTest::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "0.00215"); // Pfa,a = 0.1
|
||||||
config->set_property("Acquisition.threshold", "0.00215"); // Pfa,a = 0.1
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -425,7 +424,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisitionTest::stop_queue()
|
|||||||
TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, Instantiate)
|
TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,7 +439,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ConnectAndRun)
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
@ -451,14 +450,14 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test."<< std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -469,33 +468,33 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
config_1();
|
config_1();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.00001));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.00001));
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -508,7 +507,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -532,7 +531,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -552,12 +551,12 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
#ifdef OLD_BOOST
|
#ifdef OLD_BOOST
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
ch_thread.timed_join(boost::posix_time::seconds(1));
|
ch_thread.timed_join(boost::posix_time::seconds(1));
|
||||||
}) << "Failure while waiting the queue to stop" << std::endl;
|
}) << "Failure while waiting the queue to stop";
|
||||||
#endif
|
#endif
|
||||||
#ifndef OLD_BOOST
|
#ifndef OLD_BOOST
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
|
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
|
||||||
}) << "Failure while waiting the queue to stop" << std::endl;
|
}) << "Failure while waiting the queue to stop";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -568,33 +567,33 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResultsProbabili
|
|||||||
config_2();
|
config_2();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.00215));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.00215));
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -607,7 +606,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResultsProbabili
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -635,7 +634,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResultsProbabili
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -260,18 +260,17 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.bit_transition_flag","false");
|
config->set_property("Acquisition_1B.bit_transition_flag","false");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "1");
|
||||||
config->set_property("Acquisition.threshold", "1");
|
config->set_property("Acquisition_1Bdoppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1B.folding_factor", "2");
|
||||||
config->set_property("Acquisition.folding_factor", "2");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -355,18 +354,17 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.bit_transition_flag","false");
|
config->set_property("Acquisition_1B.bit_transition_flag","false");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", std::to_string(FLAGS_e1_value_threshold));
|
||||||
config->set_property("Acquisition.threshold", std::to_string(FLAGS_e1_value_threshold));
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "125");
|
||||||
config->set_property("Acquisition.doppler_step", "125");
|
config->set_property("Acquisition_1B.folding_factor", "2");
|
||||||
config->set_property("Acquisition.folding_factor", "2");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -446,18 +444,17 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::config_3()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1B.max_dwells", "1");
|
||||||
config->set_property("Acquisition.bit_transition_flag","false");
|
config->set_property("Acquisition_1B.bit_transition_flag","false");
|
||||||
config->set_property("Acquisition.implementation", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "0.2");
|
||||||
config->set_property("Acquisition.threshold", "0.2");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "125");
|
||||||
config->set_property("Acquisition.doppler_step", "125");
|
config->set_property("Acquisition_1B.folding_factor", "4");
|
||||||
config->set_property("Acquisition.folding_factor", "4");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -551,7 +548,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::stop_queue()
|
|||||||
TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, Instantiate)
|
TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,7 +564,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ConnectAndRun)
|
|||||||
|
|
||||||
config_1();
|
config_1();
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
@ -580,14 +577,14 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test."<< std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
begin = std::chrono::system_clock::now();
|
begin = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - begin;
|
elapsed_seconds = end - begin;
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
LOG(INFO) << "----end connect and run test-----";
|
LOG(INFO) << "----end connect and run test-----";
|
||||||
@ -602,33 +599,33 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(0);
|
acquisition->set_channel(0);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 125));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 125));
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(1);
|
acquisition->set_threshold(1);
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -641,7 +638,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
@ -666,7 +663,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -693,33 +690,33 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(50);
|
acquisition->set_doppler_step(50);
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(5);
|
acquisition->set_threshold(5);
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -732,7 +729,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -757,7 +754,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
@ -781,33 +778,33 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx> msg_rx = GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.0));
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -819,7 +816,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -846,7 +843,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -246,17 +246,16 @@ void GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition_Galileo.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition_Galileo.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition_Galileo.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition_Galileo.tong_init_val", "1");
|
config->set_property("Acquisition_1B.tong_init_val", "1");
|
||||||
config->set_property("Acquisition_Galileo.tong_max_val", "8");
|
config->set_property("Acquisition_1B.tong_max_val", "8");
|
||||||
config->set_property("Acquisition_Galileo.implementation", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "0.3");
|
||||||
config->set_property("Acquisition_Galileo.threshold", "0.3");
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition_Galileo.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition_Galileo.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition_Galileo.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -336,17 +335,16 @@ void GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition_Galileo.item_type", "gr_complex");
|
config->set_property("Acquisition_1B.implementation", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition");
|
||||||
config->set_property("Acquisition_Galileo.if", "0");
|
config->set_property("Acquisition_1B.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition_Galileo.coherent_integration_time_ms",
|
config->set_property("Acquisition_1B.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition_Galileo.tong_init_val", "1");
|
config->set_property("Acquisition_1B.tong_init_val", "1");
|
||||||
config->set_property("Acquisition_Galileo.tong_max_val", "8");
|
config->set_property("Acquisition_1B.tong_max_val", "8");
|
||||||
config->set_property("Acquisition_Galileo.implementation", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition");
|
config->set_property("Acquisition_1B.threshold", "0.00028"); // Pfa,a = 0.1
|
||||||
config->set_property("Acquisition_Galileo.threshold", "0.00028"); // Pfa,a = 0.1
|
config->set_property("Acquisition_1B.doppler_max", "10000");
|
||||||
config->set_property("Acquisition_Galileo.doppler_max", "10000");
|
config->set_property("Acquisition_1B.doppler_step", "250");
|
||||||
config->set_property("Acquisition_Galileo.doppler_step", "250");
|
config->set_property("Acquisition_1B.dump", "false");
|
||||||
config->set_property("Acquisition_Galileo.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -431,7 +429,7 @@ void GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test::stop_queue()
|
|||||||
TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, Instantiate)
|
TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,11 +438,11 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
{
|
{
|
||||||
int nsamples = floor(fs_in*integration_time_ms*1e-3);
|
int nsamples = floor(fs_in*integration_time_ms*1e-3);
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0.0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
config_1();
|
config_1();
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
@ -453,14 +451,14 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
|
boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
|
||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
std::chrono::duration<double> elapsed_seconds = end - start;
|
std::chrono::duration<double> elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -471,33 +469,33 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
config_1();
|
config_1();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(5000);
|
acquisition->set_doppler_max(5000);
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(100);
|
acquisition->set_doppler_step(100);
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(0.01);
|
acquisition->set_threshold(0.01);
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
@ -510,7 +508,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -534,7 +532,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -560,33 +558,33 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsPro
|
|||||||
config_2();
|
config_2();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 1);
|
||||||
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_);
|
||||||
boost::shared_ptr<GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1B.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1B.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.00028));
|
acquisition->set_threshold(config->property("Acquisition_1B.threshold", 0.00028));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -598,7 +596,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsPro
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -623,7 +621,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsPro
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -257,15 +257,13 @@ void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
|
config->set_property("Acquisition_5X.implementation", "Galileo_E5a_Noncoherent_IQ_Acquisition_CAF");
|
||||||
config->set_property("Acquisition_5X.item_type", "gr_complex");
|
config->set_property("Acquisition_5X.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition_5X.if", "0");
|
|
||||||
config->set_property("Acquisition_5X.coherent_integration_time_ms",
|
config->set_property("Acquisition_5X.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition_5X.max_dwells", "1");
|
config->set_property("Acquisition_5X.max_dwells", "1");
|
||||||
config->set_property("Acquisition_5X.CAF_window_hz",std::to_string(CAF_window_hz));
|
config->set_property("Acquisition_5X.CAF_window_hz",std::to_string(CAF_window_hz));
|
||||||
config->set_property("Acquisition_5X.Zero_padding",std::to_string(Zero_padding));
|
config->set_property("Acquisition_5X.Zero_padding",std::to_string(Zero_padding));
|
||||||
|
|
||||||
config->set_property("Acquisition_5X.implementation", "Galileo_E5a_Noncoherent_IQ_Acquisition_CAF");
|
|
||||||
config->set_property("Acquisition_5X.pfa","0.003");
|
config->set_property("Acquisition_5X.pfa","0.003");
|
||||||
// config->set_property("Acquisition_5X.threshold", "0.01");
|
// config->set_property("Acquisition_5X.threshold", "0.01");
|
||||||
config->set_property("Acquisition_5X.doppler_max", "10000");
|
config->set_property("Acquisition_5X.doppler_max", "10000");
|
||||||
@ -298,12 +296,11 @@ void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest::config_2()
|
|||||||
|
|
||||||
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(fs_in));
|
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(fs_in));
|
||||||
|
|
||||||
|
config->set_property("Acquisition_5X.implementation", "Galileo_E5a_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition_5X.item_type", "gr_complex");
|
config->set_property("Acquisition_5X.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition_5X.if", "0");
|
|
||||||
config->set_property("Acquisition_5X.coherent_integration_time_ms",
|
config->set_property("Acquisition_5X.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition_5X.max_dwells", "1");
|
config->set_property("Acquisition_5X.max_dwells", "1");
|
||||||
config->set_property("Acquisition_5X.implementation", "Galileo_E5a_PCPS_Acquisition");
|
|
||||||
config->set_property("Acquisition_5X.threshold", "0.1");
|
config->set_property("Acquisition_5X.threshold", "0.1");
|
||||||
config->set_property("Acquisition_5X.doppler_max", "10000");
|
config->set_property("Acquisition_5X.doppler_max", "10000");
|
||||||
config->set_property("Acquisition_5X.doppler_step", "250");
|
config->set_property("Acquisition_5X.doppler_step", "250");
|
||||||
@ -530,7 +527,7 @@ void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest::stop_queue()
|
|||||||
TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, Instantiate)
|
TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition_5X", 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -541,7 +538,7 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ConnectAndRun)
|
|||||||
int nsamples = 21000*3;
|
int nsamples = 21000*3;
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition_5X", 1, 1);
|
||||||
boost::shared_ptr<GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx> msg_rx = GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx> msg_rx = GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx_make(channel_internal_queue);
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
@ -553,14 +550,14 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test."<< std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -571,32 +568,32 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
|
|||||||
config_1();
|
config_1();
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition_5X", 1, 1);
|
||||||
boost::shared_ptr<GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx> msg_rx = GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx> msg_rx = GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(0);
|
acquisition->set_channel(0);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition_5X.doppler_max", 5000));
|
acquisition->set_doppler_max(config->property("Acquisition_5X.doppler_max", 5000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition_5X.doppler_step", 100));
|
acquisition->set_doppler_step(config->property("Acquisition_5X.doppler_step", 100));
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition_5X.threshold", 0.0001));
|
acquisition->set_threshold(config->property("Acquisition_5X.threshold", 0.0001));
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
// USING THE SIGNAL GENERATOR
|
// USING THE SIGNAL GENERATOR
|
||||||
|
|
||||||
@ -609,7 +606,7 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
@ -641,7 +638,7 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -244,17 +244,16 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
config->set_property("Acquisition_1C.threshold", "0.8");
|
||||||
config->set_property("Acquisition.threshold", "0.8");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -332,17 +331,16 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
config->set_property("Acquisition_1C.pfa", "0.1");
|
||||||
config->set_property("Acquisition.pfa", "0.1");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -439,7 +437,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
|
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
@ -449,14 +447,14 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test."<< std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
|
|
||||||
@ -470,33 +468,33 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
|
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(10000);
|
acquisition->set_doppler_max(10000);
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(500);
|
acquisition->set_doppler_step(500);
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(0.5);
|
acquisition->set_threshold(0.5);
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -507,7 +505,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
|
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
|
||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
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.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -530,7 +528,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
@ -548,12 +546,12 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
#ifdef OLD_BOOST
|
#ifdef OLD_BOOST
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
ch_thread.timed_join(boost::posix_time::seconds(1));
|
ch_thread.timed_join(boost::posix_time::seconds(1));
|
||||||
}) << "Failure while waiting the queue to stop" << std::endl;
|
}) << "Failure while waiting the queue to stop";
|
||||||
#endif
|
#endif
|
||||||
#ifndef OLD_BOOST
|
#ifndef OLD_BOOST
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
|
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
|
||||||
}) << "Failure while waiting the queue to stop" << std::endl;
|
}) << "Failure while waiting the queue to stop";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -566,33 +564,33 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
config_2();
|
config_2();
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
|
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0));
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -603,7 +601,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
|
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
|
||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
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::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -628,7 +626,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
@ -643,12 +641,12 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
#ifdef OLD_BOOST
|
#ifdef OLD_BOOST
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
ch_thread.timed_join(boost::posix_time::seconds(1));
|
ch_thread.timed_join(boost::posix_time::seconds(1));
|
||||||
}) << "Failure while waiting the queue to stop" << std::endl;
|
}) << "Failure while waiting the queue to stop";
|
||||||
#endif
|
#endif
|
||||||
#ifndef OLD_BOOST
|
#ifndef OLD_BOOST
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
|
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
|
||||||
}) << "Failure while waiting the queue to stop" << std::endl;
|
}) << "Failure while waiting the queue to stop";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,6 @@
|
|||||||
#include "acquisition_dump_reader.h"
|
#include "acquisition_dump_reader.h"
|
||||||
#include "gps_l1_ca_pcps_acquisition.h"
|
#include "gps_l1_ca_pcps_acquisition.h"
|
||||||
|
|
||||||
DEFINE_bool(plot_acq_grid, false, "Plots results of GpsL1CaPcpsAcquisitionTest with gnuplot");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
||||||
class GpsL1CaPcpsAcquisitionTest_msg_rx;
|
class GpsL1CaPcpsAcquisitionTest_msg_rx;
|
||||||
@ -144,10 +141,9 @@ void GpsL1CaPcpsAcquisitionTest::init()
|
|||||||
std::string signal = "1C";
|
std::string signal = "1C";
|
||||||
signal.copy(gnss_synchro.Signal, 2, 0);
|
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||||
gnss_synchro.PRN = 1;
|
gnss_synchro.PRN = 1;
|
||||||
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
|
||||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||||
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition_1C.if", "0");
|
|
||||||
config->set_property("Acquisition_1C.coherent_integration_time_ms", "1");
|
config->set_property("Acquisition_1C.coherent_integration_time_ms", "1");
|
||||||
if(FLAGS_plot_acq_grid == true)
|
if(FLAGS_plot_acq_grid == true)
|
||||||
{
|
{
|
||||||
|
@ -259,19 +259,17 @@ void GpsL1CaPcpsAcquisitionTestFpga::init()
|
|||||||
signal.copy(gnss_synchro.Signal, 2, 0);
|
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||||
gnss_synchro.PRN = 1;
|
gnss_synchro.PRN = 1;
|
||||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||||
config->set_property("Acquisition.item_type", "cshort");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "cshort");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms", "1");
|
config->set_property("Acquisition_1C.coherent_integration_time_ms", "1");
|
||||||
config->set_property("Acquisition.dump", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.implementation",
|
config->set_property("Acquisition_1C.threshold", "0.001");
|
||||||
"GPS_L1_CA_PCPS_Acquisition");
|
config->set_property("Acquisition_1C.doppler_max", "5000");
|
||||||
config->set_property("Acquisition.threshold", "0.001");
|
config->set_property("Acquisition_1C.doppler_step", "500");
|
||||||
config->set_property("Acquisition.doppler_max", "5000");
|
config->set_property("Acquisition_1C.repeat_satellite", "false");
|
||||||
config->set_property("Acquisition.doppler_step", "500");
|
config->set_property("Acquisition_1C.pfa", "0.0");
|
||||||
config->set_property("Acquisition.repeat_satellite", "false");
|
config->set_property("Acquisition_1C.select_queue_Fpga", "0");
|
||||||
config->set_property("Acquisition.pfa", "0.0");
|
config->set_property("Acquisition_1C.devicename", "/dev/uio0");
|
||||||
config->set_property("Acquisition.select_queue_Fpga", "0");
|
|
||||||
config->set_property("Acquisition.devicename", "/dev/uio0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +277,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTestFpga, Instantiate)
|
|||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionFpga> acquisition =
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionFpga> acquisition =
|
||||||
boost::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 1);
|
boost::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition_1C", 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -294,39 +292,39 @@ TEST_F(GpsL1CaPcpsAcquisitionTestFpga, ValidationOfResults)
|
|||||||
init();
|
init();
|
||||||
|
|
||||||
std::shared_ptr < GpsL1CaPcpsAcquisitionFpga > acquisition =
|
std::shared_ptr < GpsL1CaPcpsAcquisitionFpga > acquisition =
|
||||||
std::make_shared < GpsL1CaPcpsAcquisitionFpga > (config.get(), "Acquisition", 0, 1);
|
std::make_shared < GpsL1CaPcpsAcquisitionFpga > (config.get(), "Acquisition_1C", 0, 1);
|
||||||
|
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionTestFpga_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionTestFpga_msg_rx_make();
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionTestFpga_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionTestFpga_msg_rx_make();
|
||||||
|
|
||||||
ASSERT_NO_THROW(
|
ASSERT_NO_THROW(
|
||||||
{
|
{
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
})<< "Failure setting channel." << std::endl;
|
})<< "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW(
|
ASSERT_NO_THROW(
|
||||||
{
|
{
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
})<< "Failure setting gnss_synchro." << std::endl;
|
})<< "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW(
|
ASSERT_NO_THROW(
|
||||||
{
|
{
|
||||||
acquisition->set_threshold(0.1);
|
acquisition->set_threshold(0.1);
|
||||||
})<< "Failure setting threshold." << std::endl;
|
})<< "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW(
|
ASSERT_NO_THROW(
|
||||||
{
|
{
|
||||||
acquisition->set_doppler_max(10000);
|
acquisition->set_doppler_max(10000);
|
||||||
})<< "Failure setting doppler_max." << std::endl;
|
})<< "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW(
|
ASSERT_NO_THROW(
|
||||||
{
|
{
|
||||||
acquisition->set_doppler_step(250);
|
acquisition->set_doppler_step(250);
|
||||||
})<< "Failure setting doppler_step." << std::endl;
|
})<< "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW(
|
ASSERT_NO_THROW(
|
||||||
{
|
{
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
})<< "Failure connecting acquisition to the top_block." << std::endl;
|
})<< "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
// uncomment the next line to load the file from the current directory
|
// uncomment the next line to load the file from the current directory
|
||||||
std::string file = "./GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat";
|
std::string file = "./GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat";
|
||||||
@ -349,7 +347,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTestFpga, ValidationOfResults)
|
|||||||
top_block->connect(file_source, 0, throttle_block, 0);
|
top_block->connect(file_source, 0, throttle_block, 0);
|
||||||
top_block->connect(throttle_block, 0, null_sink, 0);
|
top_block->connect(throttle_block, 0, null_sink, 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
})<< "Failure connecting the blocks of acquisition test." << std::endl;
|
})<< "Failure connecting the blocks of acquisition test." ;
|
||||||
|
|
||||||
acquisition->set_state(1); // Ensure that acquisition starts at the first state
|
acquisition->set_state(1); // Ensure that acquisition starts at the first state
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
@ -366,7 +364,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTestFpga, ValidationOfResults)
|
|||||||
top_block->wait();
|
top_block->wait();
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
})<< "Failure running the top_block." << std::endl;
|
})<< "Failure running the top_block.";
|
||||||
|
|
||||||
t3.join();
|
t3.join();
|
||||||
|
|
||||||
|
@ -240,17 +240,16 @@ void GpsL1CaPcpsOpenClAcquisitionGSoC2013Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_OpenCl_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_OpenCl_Acquisition");
|
config->set_property("Acquisition_1C.threshold", "0.8");
|
||||||
config->set_property("Acquisition.threshold", "0.8");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -328,17 +327,16 @@ void GpsL1CaPcpsOpenClAcquisitionGSoC2013Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_OpenCl_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_OpenCl_Acquisition");
|
config->set_property("Acquisition_1C.pfa", "0.1");
|
||||||
config->set_property("Acquisition.pfa", "0.1");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -423,7 +421,7 @@ void GpsL1CaPcpsOpenClAcquisitionGSoC2013Test::stop_queue()
|
|||||||
TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, Instantiate)
|
TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsOpenClAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsOpenClAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -434,7 +432,7 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
|
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsOpenClAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsOpenClAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
@ -444,14 +442,14 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -466,27 +464,27 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -498,7 +496,7 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -521,7 +519,7 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
@ -544,32 +542,32 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResultsProbabilitie
|
|||||||
{
|
{
|
||||||
config_2();
|
config_2();
|
||||||
|
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsOpenClAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsOpenClAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -581,7 +579,7 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResultsProbabilitie
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -606,7 +604,7 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResultsProbabilitie
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
|
@ -255,17 +255,16 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_QuickSync_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_QuickSync_Acquisition");
|
config->set_property("Acquisition_1C.threshold", "250");
|
||||||
config->set_property("Acquisition.threshold", "250");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -347,17 +346,16 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_QuickSync_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "1");
|
config->set_property("Acquisition_1C.max_dwells", "1");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_QuickSync_Acquisition");
|
config->set_property("Acquisition_1C.threshold", std::to_string(FLAGS_value_threshold));
|
||||||
config->set_property("Acquisition.threshold", std::to_string(FLAGS_value_threshold));
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "100");
|
||||||
config->set_property("Acquisition.doppler_step", "100");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -439,17 +437,16 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::config_3()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_QuickSync_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.max_dwells", "2");
|
config->set_property("Acquisition_1C.max_dwells", "2");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_QuickSync_Acquisition");
|
config->set_property("Acquisition_1C.threshold", "0.01");
|
||||||
config->set_property("Acquisition.threshold", "0.01");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.bit_transition_flag", "false");
|
||||||
config->set_property("Acquisition.bit_transition_flag", "false");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -537,7 +534,7 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::stop_queue()
|
|||||||
TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, Instantiate)
|
TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -545,13 +542,13 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ConnectAndRun)
|
|||||||
{
|
{
|
||||||
int nsamples = floor(fs_in * integration_time_ms * 1e-3);
|
int nsamples = floor(fs_in * integration_time_ms * 1e-3);
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0.0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
@ -560,14 +557,14 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test."<< std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block."<< std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -578,32 +575,32 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResults)
|
|||||||
config_1();
|
config_1();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(10000);
|
acquisition->set_doppler_max(10000);
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(250);
|
acquisition->set_doppler_step(250);
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(100);
|
acquisition->set_threshold(100);
|
||||||
}) << "Failure setting threshold."<< std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -616,7 +613,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -642,7 +639,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -672,32 +669,32 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsWithNoise
|
|||||||
config_1();
|
config_1();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(10000);
|
acquisition->set_doppler_max(10000);
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(250);
|
acquisition->set_doppler_step(250);
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(100);
|
acquisition->set_threshold(100);
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -710,7 +707,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsWithNoise
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -736,7 +733,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsWithNoise
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -764,32 +761,20 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
|
|||||||
config_2();
|
config_2();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel."<< std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro."<< std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
/* ASSERT_NO_THROW( {
|
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
|
||||||
}) << "Failure setting doppler_max."<< std::endl;
|
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
|
||||||
}) << "Failure setting doppler_step."<< std::endl;
|
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
|
||||||
}) << "Failure setting threshold."<< std::endl; */
|
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block."<< std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
acquisition->reset();
|
acquisition->reset();
|
||||||
@ -802,7 +787,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -829,7 +814,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -240,17 +240,16 @@ void GpsL1CaPcpsTongAcquisitionGSoC2013Test::config_1()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
config->set_property("Acquisition_1C.threshold", "0.8");
|
||||||
config->set_property("Acquisition.threshold", "0.8");
|
config->set_property("Acquisition_1C.tong_init_val", "1");
|
||||||
config->set_property("Acquisition.tong_init_val", "1");
|
config->set_property("Acquisition_1C.tong_max_val", "8");
|
||||||
config->set_property("Acquisition.tong_max_val", "8");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -328,17 +327,16 @@ void GpsL1CaPcpsTongAcquisitionGSoC2013Test::config_2()
|
|||||||
config->set_property("InputFilter.filter_type", "bandpass");
|
config->set_property("InputFilter.filter_type", "bandpass");
|
||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.coherent_integration_time_ms",
|
config->set_property("Acquisition_1C.coherent_integration_time_ms",
|
||||||
std::to_string(integration_time_ms));
|
std::to_string(integration_time_ms));
|
||||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
config->set_property("Acquisition_1C.threshold", "0.00108"); // Pfa,a = 0.1
|
||||||
config->set_property("Acquisition.threshold", "0.00108"); // Pfa,a = 0.1
|
config->set_property("Acquisition_1C.tong_init_val", "1");
|
||||||
config->set_property("Acquisition.tong_init_val", "1");
|
config->set_property("Acquisition_1C.tong_max_val", "8");
|
||||||
config->set_property("Acquisition.tong_max_val", "8");
|
config->set_property("Acquisition_1C.doppler_max", "10000");
|
||||||
config->set_property("Acquisition.doppler_max", "10000");
|
config->set_property("Acquisition_1C.doppler_step", "250");
|
||||||
config->set_property("Acquisition.doppler_step", "250");
|
config->set_property("Acquisition_1C.dump", "false");
|
||||||
config->set_property("Acquisition.dump", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -422,7 +420,7 @@ void GpsL1CaPcpsTongAcquisitionGSoC2013Test::stop_queue()
|
|||||||
TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, Instantiate)
|
TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, Instantiate)
|
||||||
{
|
{
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -435,7 +433,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
config_1();
|
config_1();
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
@ -445,14 +443,14 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -464,32 +462,32 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -501,7 +499,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
// i = 0 --> satellite in acquisition is visible
|
// i = 0 --> satellite in acquisition is visible
|
||||||
// i = 1 --> satellite in acquisition is not visible
|
// i = 1 --> satellite in acquisition is not visible
|
||||||
@ -525,7 +523,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResults)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
@ -552,32 +550,32 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
config_2();
|
config_2();
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition", 1, 1);
|
acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 1);
|
||||||
boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
|
acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000));
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
|
acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500));
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
|
acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0));
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
|
|
||||||
@ -589,7 +587,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
signal_source->connect(top_block);
|
signal_source->connect(top_block);
|
||||||
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
|
||||||
|
|
||||||
@ -614,7 +612,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
|||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
stop_queue();
|
stop_queue();
|
||||||
|
|
||||||
|
@ -148,14 +148,13 @@ void GpsL2MPcpsAcquisitionTest::init()
|
|||||||
sampling_freqeuncy_hz = 5000000;
|
sampling_freqeuncy_hz = 5000000;
|
||||||
nsamples = round(static_cast<double>(sampling_freqeuncy_hz) * GPS_L2_M_PERIOD) * 2;
|
nsamples = round(static_cast<double>(sampling_freqeuncy_hz) * GPS_L2_M_PERIOD) * 2;
|
||||||
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(sampling_freqeuncy_hz));
|
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(sampling_freqeuncy_hz));
|
||||||
config->set_property("Acquisition.item_type", "gr_complex");
|
config->set_property("Acquisition_2S.implementation", "GPS_L2_M_PCPS_Acquisition");
|
||||||
config->set_property("Acquisition.if", "0");
|
config->set_property("Acquisition_2S.item_type", "gr_complex");
|
||||||
config->set_property("Acquisition.dump", "false");
|
config->set_property("Acquisition_2S.dump", "false");
|
||||||
config->set_property("Acquisition.implementation", "GPS_L2_M_PCPS_Acquisition");
|
config->set_property("Acquisition_2S.threshold", "0.001");
|
||||||
config->set_property("Acquisition.threshold", "0.001");
|
config->set_property("Acquisition_2S.doppler_max", "5000");
|
||||||
config->set_property("Acquisition.doppler_max", "5000");
|
config->set_property("Acquisition_2S.doppler_step", "100");
|
||||||
config->set_property("Acquisition.doppler_step", "100");
|
config->set_property("Acquisition_2S.repeat_satellite", "false");
|
||||||
config->set_property("Acquisition.repeat_satellite", "false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -163,7 +162,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, Instantiate)
|
|||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
|
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition_2S", 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -175,7 +174,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ConnectAndRun)
|
|||||||
queue = gr::msg_queue::make(0);
|
queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
|
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition_2S", 1, 1);
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
@ -184,15 +183,14 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ConnectAndRun)
|
|||||||
top_block->connect(source, 0, valve, 0);
|
top_block->connect(source, 0, valve, 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
boost::shared_ptr<GpsL2MPcpsAcquisitionTest_msg_rx> msg_rx = GpsL2MPcpsAcquisitionTest_msg_rx_make();
|
boost::shared_ptr<GpsL2MPcpsAcquisitionTest_msg_rx> msg_rx = GpsL2MPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
@ -207,32 +205,32 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ValidationOfResults)
|
|||||||
double expected_delay_samples = 1;//2004;
|
double expected_delay_samples = 1;//2004;
|
||||||
double expected_doppler_hz = 1200;//3000;
|
double expected_doppler_hz = 1200;//3000;
|
||||||
init();
|
init();
|
||||||
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
|
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition_2S", 1, 1);
|
||||||
boost::shared_ptr<GpsL2MPcpsAcquisitionTest_msg_rx> msg_rx = GpsL2MPcpsAcquisitionTest_msg_rx_make();
|
boost::shared_ptr<GpsL2MPcpsAcquisitionTest_msg_rx> msg_rx = GpsL2MPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_channel(1);
|
acquisition->set_channel(1);
|
||||||
}) << "Failure setting channel." << std::endl;
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
}) << "Failure setting gnss_synchro." << std::endl;
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_threshold(0.001);
|
acquisition->set_threshold(0.001);
|
||||||
}) << "Failure setting threshold." << std::endl;
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_max(5000);
|
acquisition->set_doppler_max(5000);
|
||||||
}) << "Failure setting doppler_max." << std::endl;
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_doppler_step(10);
|
acquisition->set_doppler_step(10);
|
||||||
}) << "Failure setting doppler_step." << std::endl;
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->connect(top_block);
|
acquisition->connect(top_block);
|
||||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
std::string path = std::string(TEST_PATH);
|
std::string path = std::string(TEST_PATH);
|
||||||
@ -249,20 +247,20 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ValidationOfResults)
|
|||||||
top_block->connect(file_source, 0, valve , 0);
|
top_block->connect(file_source, 0, valve , 0);
|
||||||
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
acquisition->set_local_code();
|
acquisition->set_local_code();
|
||||||
acquisition->set_state(1); // Ensure that acquisition starts at the first sample
|
acquisition->set_state(1); // Ensure that acquisition starts at the first sample
|
||||||
acquisition->init();
|
acquisition->init();
|
||||||
}) << "Failure set_state and init acquisition test" << std::endl;
|
}) << "Failure set_state and init acquisition test";
|
||||||
|
|
||||||
EXPECT_NO_THROW( {
|
EXPECT_NO_THROW( {
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
top_block->run(); // Start threads and wait
|
top_block->run(); // Start threads and wait
|
||||||
end = std::chrono::system_clock::now();
|
end = std::chrono::system_clock::now();
|
||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block." << std::endl;
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
//unsigned long int Acq_samplestamp_samples = gnss_synchro.Acq_samplestamp_samples;
|
//unsigned long int Acq_samplestamp_samples = gnss_synchro.Acq_samplestamp_samples;
|
||||||
std::cout << "Acquisition process runtime duration: " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Acquisition process runtime duration: " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user