mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Fixes in testing code
This commit is contained in:
parent
4267150445
commit
396415b6f2
@ -341,7 +341,6 @@ int StaticPositionSystemTest::configure_receiver()
|
||||
// Set Acquisition
|
||||
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
|
||||
config->set_property("Acquisition_1C.item_type", "gr_complex");
|
||||
config->set_property("Acquisition_1C.if", std::to_string(zero));
|
||||
config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms));
|
||||
config->set_property("Acquisition_1C.threshold", std::to_string(threshold));
|
||||
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
|
||||
@ -356,7 +355,6 @@ int StaticPositionSystemTest::configure_receiver()
|
||||
config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||
//config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_C_Aid_Tracking");
|
||||
config->set_property("Tracking_1C.item_type", "gr_complex");
|
||||
config->set_property("Tracking_1C.if", std::to_string(zero));
|
||||
config->set_property("Tracking_1C.dump", "false");
|
||||
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
|
||||
config->set_property("Tracking_1C.pll_bw_hz", std::to_string(pll_bw_hz));
|
||||
@ -630,6 +628,7 @@ void StaticPositionSystemTest::print_results(const std::vector<double> & east,
|
||||
g2.cmd("set yrange [-" + std::to_string(range_3d) + ":" + std::to_string(range_3d) + "]");
|
||||
g2.cmd("set zrange [-" + std::to_string(range_3d) + ":" + std::to_string(range_3d) + "]");
|
||||
g2.cmd("set view equal xyz");
|
||||
g2.cmd("set ticslevel 0");
|
||||
|
||||
g2.cmd("set style fill transparent solid 0.30 border\n set parametric\n set urange [0:2.0*pi]\n set vrange [-pi/2:pi/2]\n r = " +
|
||||
std::to_string(ninty_sas) +
|
||||
@ -640,7 +639,7 @@ void StaticPositionSystemTest::print_results(const std::vector<double> & east,
|
||||
g2.savetopdf("Position_test_3D");
|
||||
g2.showonscreen(); // window output
|
||||
}
|
||||
catch (GnuplotException ge)
|
||||
catch (const GnuplotException & ge)
|
||||
{
|
||||
std::cout << ge.what() << std::endl;
|
||||
}
|
||||
|
@ -96,7 +96,6 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
powers_of_two.push_back(d_fft_size);
|
||||
execution_times_powers_of_two.push_back(exec_time / 1e-3);
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@ -141,7 +140,7 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
g2.savetopdf("FFT_execution_times", 18);
|
||||
g2.showonscreen(); // window output
|
||||
}
|
||||
catch (GnuplotException ge)
|
||||
catch (const GnuplotException & ge)
|
||||
{
|
||||
std::cout << ge.what() << std::endl;
|
||||
}
|
||||
|
@ -34,16 +34,16 @@ bool observables_dump_reader::read_binary_obs()
|
||||
{
|
||||
try
|
||||
{
|
||||
for(int i = 0; i < n_channels; i++)
|
||||
{
|
||||
d_dump_file.read(reinterpret_cast<char *>(&RX_time[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&TOW_at_current_symbol_s[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&Carrier_Doppler_hz[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&Acc_carrier_phase_hz[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&Pseudorange_m[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&PRN[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&valid[i]), sizeof(double));
|
||||
}
|
||||
for(int i = 0; i < n_channels; i++)
|
||||
{
|
||||
d_dump_file.read(reinterpret_cast<char *>(&RX_time[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&TOW_at_current_symbol_s[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&Carrier_Doppler_hz[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&Acc_carrier_phase_hz[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&Pseudorange_m[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&PRN[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&valid[i]), sizeof(double));
|
||||
}
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
|
@ -32,7 +32,8 @@
|
||||
|
||||
bool tracking_dump_reader::read_binary_obs()
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
d_dump_file.read(reinterpret_cast<char *>(&abs_E), sizeof(float));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&abs_P), sizeof(float));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&abs_L), sizeof(float));
|
||||
|
@ -34,16 +34,16 @@ bool true_observables_reader::read_binary_obs()
|
||||
{
|
||||
try
|
||||
{
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
d_dump_file.read(reinterpret_cast<char *>(&gps_time_sec[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&doppler_l1_hz), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_l1_cycles[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&dist_m[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&true_dist_m[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&carrier_phase_l1_cycles[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&prn[i]), sizeof(double));
|
||||
}
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
d_dump_file.read(reinterpret_cast<char *>(&gps_time_sec[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&doppler_l1_hz), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_l1_cycles[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&dist_m[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&true_dist_m[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&carrier_phase_l1_cycles[i]), sizeof(double));
|
||||
d_dump_file.read(reinterpret_cast<char *>(&prn[i]), sizeof(double));
|
||||
}
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
|
@ -87,21 +87,21 @@ void GalileoE1DllPllVemlTrackingInternalTest::init()
|
||||
gnss_synchro.PRN = 11;
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "8000000");
|
||||
config->set_property("Tracking_Galileo.item_type", "gr_complex");
|
||||
config->set_property("Tracking_Galileo.dump", "false");
|
||||
config->set_property("Tracking_Galileo.dump_filename", "../data/veml_tracking_ch_");
|
||||
config->set_property("Tracking_Galileo.implementation", "Galileo_E1_DLL_PLL_VEML_Tracking");
|
||||
config->set_property("Tracking_Galileo.early_late_space_chips", "0.15");
|
||||
config->set_property("Tracking_Galileo.very_early_late_space_chips", "0.6");
|
||||
config->set_property("Tracking_Galileo.pll_bw_hz", "30.0");
|
||||
config->set_property("Tracking_Galileo.dll_bw_hz", "2.0");
|
||||
config->set_property("Tracking_1B.implementation", "Galileo_E1_DLL_PLL_VEML_Tracking");
|
||||
config->set_property("Tracking_1B.item_type", "gr_complex");
|
||||
config->set_property("Tracking_1B.dump", "false");
|
||||
config->set_property("Tracking_1B.dump_filename", "../data/veml_tracking_ch_");
|
||||
config->set_property("Tracking_1B.early_late_space_chips", "0.15");
|
||||
config->set_property("Tracking_1B.very_early_late_space_chips", "0.6");
|
||||
config->set_property("Tracking_1B.pll_bw_hz", "30.0");
|
||||
config->set_property("Tracking_1B.dll_bw_hz", "2.0");
|
||||
}
|
||||
|
||||
|
||||
TEST_F(GalileoE1DllPllVemlTrackingInternalTest, Instantiate)
|
||||
{
|
||||
init();
|
||||
auto tracking = factory->GetBlock(config, "Tracking", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1);
|
||||
auto tracking = factory->GetBlock(config, "Tracking_1B", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1);
|
||||
EXPECT_STREQ("Galileo_E1_DLL_PLL_VEML_Tracking", tracking->implementation().c_str());
|
||||
}
|
||||
|
||||
@ -117,16 +117,16 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun)
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
|
||||
// Example using smart pointers and the block factory
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1);
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking_1B", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1);
|
||||
std::shared_ptr<GalileoE1DllPllVemlTracking> tracking = std::dynamic_pointer_cast<GalileoE1DllPllVemlTracking>(trk_);
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
}) << "Failure setting channel." << std::endl;
|
||||
}) << "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
}) << "Failure setting gnss_synchro." << std::endl;
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->connect(top_block);
|
||||
@ -136,8 +136,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun)
|
||||
top_block->connect(source, 0, valve, 0);
|
||||
top_block->connect(valve, 0, tracking->get_left_block(), 0);
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
|
||||
}) << "Failure connecting the blocks of tracking test." << std::endl;
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
||||
@ -146,7 +145,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun)
|
||||
top_block->run(); //Start threads and wait
|
||||
end = std::chrono::system_clock::now();
|
||||
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;
|
||||
}
|
||||
@ -165,7 +164,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
|
||||
// Example using smart pointers and the block factory
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1);
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking_1B", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1);
|
||||
std::shared_ptr<TrackingInterface> tracking = std::dynamic_pointer_cast<TrackingInterface>(trk_);
|
||||
|
||||
// gnss_synchro.Acq_delay_samples = 1753; // 4 Msps
|
||||
@ -176,15 +175,15 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
}) << "Failure setting channel." << std::endl;
|
||||
}) << "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
}) << "Failure setting gnss_synchro." << std::endl;
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->connect(top_block);
|
||||
}) << "Failure connecting tracking to the top_block." << std::endl;
|
||||
}) << "Failure connecting tracking to the top_block.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
std::string path = std::string(TEST_PATH);
|
||||
@ -198,7 +197,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
||||
top_block->connect(skip_head, 0, valve, 0);
|
||||
top_block->connect(valve, 0, tracking->get_left_block(), 0);
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
}) << "Failure connecting the blocks of tracking test." << std::endl;
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
||||
@ -207,7 +206,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
||||
top_block->run(); // Start threads and wait
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
}) << "Failure running the top_block." << std::endl;
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
std::cout << "Tracked " << num_samples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||
}
|
||||
|
@ -81,22 +81,22 @@ void GalileoE5aTrackingTest::init()
|
||||
{
|
||||
gnss_synchro.Channel_ID = 0;
|
||||
gnss_synchro.System = 'E';
|
||||
std::string signal = "5Q";
|
||||
std::string signal = "5X";
|
||||
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||
gnss_synchro.PRN = 11;
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "32000000");
|
||||
config->set_property("Tracking_Galileo.item_type", "gr_complex");
|
||||
config->set_property("Tracking_Galileo.dump", "false");
|
||||
config->set_property("Tracking_Galileo.dump_filename", "../data/e5a_tracking_ch_");
|
||||
config->set_property("Tracking_Galileo.implementation", "Galileo_E5a_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking_Galileo.early_late_space_chips", "0.5");
|
||||
config->set_property("Tracking_Galileo.order", "2");
|
||||
config->set_property("Tracking_Galileo.pll_bw_hz_init","20.0");
|
||||
config->set_property("Tracking_Galileo.pll_bw_hz", "5");
|
||||
config->set_property("Tracking_Galileo.dll_bw_hz_init","2.0");
|
||||
config->set_property("Tracking_Galileo.dll_bw_hz", "2");
|
||||
config->set_property("Tracking_Galileo.ti_ms", "1");
|
||||
config->set_property("Tracking_5X.implementation", "Galileo_E5a_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking_5X.item_type", "gr_complex");
|
||||
config->set_property("Tracking_5X.dump", "false");
|
||||
config->set_property("Tracking_5X.dump_filename", "../data/e5a_tracking_ch_");
|
||||
config->set_property("Tracking_5X.early_late_space_chips", "0.5");
|
||||
config->set_property("Tracking_5X.order", "2");
|
||||
config->set_property("Tracking_5X.pll_bw_hz_init","20.0");
|
||||
config->set_property("Tracking_5X.pll_bw_hz", "5");
|
||||
config->set_property("Tracking_5X.dll_bw_hz_init","2.0");
|
||||
config->set_property("Tracking_5X.dll_bw_hz", "2");
|
||||
config->set_property("Tracking_5X.ti_ms", "1");
|
||||
}
|
||||
|
||||
|
||||
@ -105,13 +105,13 @@ TEST_F(GalileoE5aTrackingTest, ValidationOfResults)
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
std::chrono::duration<double> elapsed_seconds(0);
|
||||
int fs_in = 32000000;
|
||||
int nsamples = 32000000*5;
|
||||
int nsamples = 32000000 * 5;
|
||||
init();
|
||||
queue = gr::msg_queue::make(0);
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
|
||||
// Example using smart pointers and the block factory
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking", "Galileo_E5a_DLL_PLL_Tracking", 1, 1);
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(config, "Tracking_5X", "Galileo_E5a_DLL_PLL_Tracking", 1, 1);
|
||||
std::shared_ptr<TrackingInterface> tracking = std::dynamic_pointer_cast<TrackingInterface>(trk_);
|
||||
|
||||
//REAL
|
||||
@ -123,15 +123,15 @@ TEST_F(GalileoE5aTrackingTest, ValidationOfResults)
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
}) << "Failure setting channel." << std::endl;
|
||||
}) << "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
}) << "Failure setting gnss_synchro." << std::endl;
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->connect(top_block);
|
||||
}) << "Failure connecting tracking to the top_block." << std::endl;
|
||||
}) << "Failure connecting tracking to the top_block.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
gr::analog::sig_source_c::sptr source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000, 1, gr_complex(0));
|
||||
@ -140,8 +140,7 @@ TEST_F(GalileoE5aTrackingTest, ValidationOfResults)
|
||||
top_block->connect(source, 0, valve, 0);
|
||||
top_block->connect(valve, 0, tracking->get_left_block(), 0);
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
|
||||
}) << "Failure connecting the blocks of tracking test." << std::endl;
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
||||
@ -150,7 +149,7 @@ TEST_F(GalileoE5aTrackingTest, ValidationOfResults)
|
||||
top_block->run(); // Start threads and wait
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
}) << "Failure running the top_block." << std::endl;
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
std::cout << "Tracked " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||
}
|
||||
|
@ -555,7 +555,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
||||
g2.showonscreen(); // window output
|
||||
|
||||
}
|
||||
catch (GnuplotException ge)
|
||||
catch (const GnuplotException & ge)
|
||||
{
|
||||
std::cout << ge.what() << std::endl;
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
{
|
||||
throw std::exception();
|
||||
};
|
||||
})<< "Failure opening true observables file" << std::endl;
|
||||
}) << "Failure opening true observables file";
|
||||
|
||||
top_block = gr::make_top_block("Tracking test");
|
||||
std::shared_ptr<GpsL1CaDllPllCAidTrackingFpga> tracking = std::make_shared<GpsL1CaDllPllCAidTrackingFpga> (config.get(), "Tracking_1C", 1, 1);
|
||||
@ -479,7 +479,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
{
|
||||
throw std::exception();
|
||||
};
|
||||
})<< "Failure reading true observables file" << std::endl;
|
||||
}) << "Failure reading true observables file";
|
||||
|
||||
//restart the epoch counter
|
||||
true_obs_data.restart();
|
||||
@ -497,24 +497,24 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
})<< "Failure setting channel." << std::endl;
|
||||
}) << "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
})<< "Failure setting gnss_synchro." << std::endl;
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
tracking->connect(top_block);
|
||||
})<< "Failure connecting tracking to the top_block." << std::endl;
|
||||
}) << "Failure connecting tracking to the top_block.";
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
{
|
||||
gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro));
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
})<< "Failure connecting the blocks of tracking test." << std::endl;
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
||||
@ -533,7 +533,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
tracking->reset();// unlock the channel
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
})<< "Failure running the top_block." << std::endl;
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
// wait until child thread terminates
|
||||
t.join();
|
||||
@ -568,7 +568,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga)
|
||||
{
|
||||
throw std::exception();
|
||||
};
|
||||
})<< "Failure opening tracking dump file" << std::endl;
|
||||
}) << "Failure opening tracking dump file";
|
||||
|
||||
nepoch = trk_dump.num_epochs();
|
||||
std::cout << "Measured observation epochs=" << nepoch << std::endl;
|
||||
|
@ -155,9 +155,9 @@ void GpsL2MDllPllTrackingTest::init()
|
||||
TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
|
||||
{
|
||||
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);
|
||||
int fs_in = 5000000;
|
||||
int nsamples = fs_in*9;
|
||||
int nsamples = fs_in * 9;
|
||||
|
||||
init();
|
||||
queue = gr::msg_queue::make(0);
|
||||
@ -171,15 +171,15 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_channel(gnss_synchro.Channel_ID);
|
||||
}) << "Failure setting channel." << std::endl;
|
||||
}) << "Failure setting channel.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->set_gnss_synchro(&gnss_synchro);
|
||||
}) << "Failure setting gnss_synchro." << std::endl;
|
||||
}) << "Failure setting gnss_synchro.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
tracking->connect(top_block);
|
||||
}) << "Failure connecting tracking to the top_block." << std::endl;
|
||||
}) << "Failure connecting tracking to the top_block.";
|
||||
|
||||
ASSERT_NO_THROW( {
|
||||
//gr::analog::sig_source_c::sptr source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000, 1, gr_complex(0));
|
||||
@ -193,7 +193,7 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
|
||||
top_block->connect(valve, 0, tracking->get_left_block(), 0);
|
||||
top_block->connect(tracking->get_right_block(), 0, sink, 0);
|
||||
top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||
}) << "Failure connecting the blocks of tracking test." << std::endl;
|
||||
}) << "Failure connecting the blocks of tracking test.";
|
||||
|
||||
tracking->start_tracking();
|
||||
|
||||
@ -202,7 +202,7 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults)
|
||||
top_block->run(); // Start threads and wait
|
||||
end = std::chrono::system_clock::now();
|
||||
elapsed_seconds = end - start;
|
||||
}) << "Failure running the top_block." << std::endl;
|
||||
}) << "Failure running the top_block.";
|
||||
|
||||
// TODO: Verify tracking results
|
||||
std::cout << "Tracked " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||
|
@ -57,10 +57,10 @@ TEST(TrackingLoopFilterTest, FirstOrderLoop)
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_FLOAT_EQ( result, sample_data[i]*g1 );
|
||||
}
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_FLOAT_EQ( result, sample_data[i]*g1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -88,10 +88,10 @@ TEST(TrackingLoopFilterTest, FirstOrderLoopWithLastIntegrator)
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -120,10 +120,10 @@ TEST(TrackingLoopFilterTest, SecondOrderLoop)
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -151,10 +151,10 @@ TEST(TrackingLoopFilterTest, SecondOrderLoopWithLastIntegrator)
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -182,10 +182,10 @@ TEST(TrackingLoopFilterTest, ThirdOrderLoop)
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -213,10 +213,10 @@ TEST(TrackingLoopFilterTest, ThirdOrderLoopWithLastIntegrator)
|
||||
|
||||
float result = 0.0;
|
||||
for( unsigned int i = 0; i < sample_data.size(); ++i )
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
{
|
||||
result = theFilter.apply( sample_data[i] );
|
||||
EXPECT_NEAR( result, expected_out[i], 1e-4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user