mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-06 18:57:02 +00:00
Fix typos
This commit is contained in:
parent
0159fd8dfc
commit
c9790a6549
@ -105,24 +105,24 @@ void GlonassL1CaPcpsAcquisitionTest::init()
|
||||
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||
gnss_synchro.PRN = 1;
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "62314000");
|
||||
config->set_property("Acquisition.item_type", "gr_complex");
|
||||
config->set_property("Acquisition.if", "9540000");
|
||||
config->set_property("Acquisition.coherent_integration_time_ms", "1");
|
||||
config->set_property("Acquisition.dump", "true");
|
||||
config->set_property("Acquisition.dump_filename", "./acquisition.dat");
|
||||
config->set_property("Acquisition.implementation", "Glonass_L1_CA_PCPS_Acquisition");
|
||||
config->set_property("Acquisition.threshold", "0.001");
|
||||
config->set_property("Acquisition.doppler_max", "5000");
|
||||
config->set_property("Acquisition.doppler_step", "500");
|
||||
config->set_property("Acquisition.repeat_satellite", "false");
|
||||
config->set_property("Acquisition.pfa", "0.0");
|
||||
config->set_property("Acquisition_1G.item_type", "gr_complex");
|
||||
config->set_property("Acquisition_1G.if", "9540000");
|
||||
config->set_property("Acquisition_1G.coherent_integration_time_ms", "1");
|
||||
config->set_property("Acquisition_1G.dump", "true");
|
||||
config->set_property("Acquisition_1G.dump_filename", "./acquisition.dat");
|
||||
config->set_property("Acquisition_1G.implementation", "Glonass_L1_CA_PCPS_Acquisition");
|
||||
config->set_property("Acquisition_1G.threshold", "0.001");
|
||||
config->set_property("Acquisition_1G.doppler_max", "5000");
|
||||
config->set_property("Acquisition_1G.doppler_step", "500");
|
||||
config->set_property("Acquisition_1G.repeat_satellite", "false");
|
||||
//config->set_property("Acquisition_1G.pfa", "0.0");
|
||||
}
|
||||
|
||||
|
||||
TEST_F(GlonassL1CaPcpsAcquisitionTest, Instantiate)
|
||||
{
|
||||
init();
|
||||
boost::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = boost::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
|
||||
boost::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = boost::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 1);
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ConnectAndRun)
|
||||
|
||||
top_block = gr::make_top_block("Acquisition test");
|
||||
init();
|
||||
boost::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = boost::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
|
||||
boost::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = boost::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 1);
|
||||
boost::shared_ptr<GlonassL1CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL1CaPcpsAcquisitionTest_msg_rx_make();
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
@ -146,15 +146,14 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ConnectAndRun)
|
||||
top_block->connect(source, 0, valve, 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"));
|
||||
|
||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
||||
}) << "Failure connecting the blocks of acquisition test.";
|
||||
|
||||
EXPECT_NO_THROW( {
|
||||
begin = std::chrono::system_clock::now();
|
||||
top_block->run(); // Start threads and wait
|
||||
end = std::chrono::system_clock::now();
|
||||
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;
|
||||
}
|
||||
@ -169,33 +168,37 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
|
||||
double expected_delay_samples = 31874;
|
||||
double expected_doppler_hz = -9500;
|
||||
init();
|
||||
std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
|
||||
std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 1);
|
||||
|
||||
boost::shared_ptr<GlonassL1CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL1CaPcpsAcquisitionTest_msg_rx_make();
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
acquisition->set_channel(1);
|
||||
}) << "Failure setting channel." << std::endl;
|
||||
}) << "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||
}) << "Failure setting gnss_synchro." << std::endl;
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
acquisition->set_threshold(0.001);
|
||||
}) << "Failure setting threshold." << std::endl;
|
||||
acquisition->set_threshold(0.0001);
|
||||
}) << "Failure setting threshold.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
acquisition->set_doppler_max(10000);
|
||||
}) << "Failure setting doppler_max." << std::endl;
|
||||
}) << "Failure setting doppler_max.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
acquisition->set_doppler_step(250);
|
||||
}) << "Failure setting doppler_step." << std::endl;
|
||||
}) << "Failure setting doppler_step.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
acquisition->connect(top_block);
|
||||
}) << "Failure connecting acquisition to the top_block." << std::endl;
|
||||
}) << "Failure connecting acquisition to the top_block.";
|
||||
|
||||
acquisition->set_local_code();
|
||||
acquisition->set_state(1); // Ensure that acquisition starts at the first sample
|
||||
acquisition->init();
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
std::string path = std::string(TEST_PATH);
|
||||
@ -204,19 +207,14 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
|
||||
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->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
}) << "Failure connecting the blocks of acquisition test." << std::endl;
|
||||
|
||||
|
||||
acquisition->set_state(1); // Ensure that acquisition starts at the first sample
|
||||
acquisition->init();
|
||||
}) << "Failure connecting the blocks of acquisition test.";
|
||||
|
||||
EXPECT_NO_THROW( {
|
||||
begin = std::chrono::system_clock::now();
|
||||
top_block->run(); // Start threads and wait
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - begin;
|
||||
}) << "Failure running the top_block." << std::endl;
|
||||
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
|
||||
std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user