mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 10:24:51 +00:00
Fix unit tests
This commit is contained in:
parent
cc178495c9
commit
dfb5f1118c
@ -253,6 +253,12 @@ void GNSSFlowgraph::connect()
|
||||
try
|
||||
{
|
||||
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
||||
if(fs == 0.0)
|
||||
{
|
||||
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
|
||||
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
|
||||
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
|
||||
}
|
||||
ch_out_sample_counter = gnss_sdr_make_sample_counter(fs);
|
||||
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0);
|
||||
top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse
|
||||
|
@ -114,6 +114,7 @@ TEST_F(ControlThreadTest, InstantiateRunControlMessages)
|
||||
config->set_property("Observables.item_type", "gr_complex");
|
||||
config->set_property("PVT.implementation", "RTKLIB_PVT");
|
||||
config->set_property("PVT.item_type", "gr_complex");
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
|
||||
std::shared_ptr<ControlThread> control_thread = std::make_shared<ControlThread>(config);
|
||||
|
||||
@ -174,6 +175,7 @@ TEST_F(ControlThreadTest, InstantiateRunControlMessages2)
|
||||
config->set_property("Observables.item_type", "gr_complex");
|
||||
config->set_property("PVT.implementation", "RTKLIB_PVT");
|
||||
config->set_property("PVT.item_type", "gr_complex");
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
|
||||
std::unique_ptr<ControlThread> control_thread2(new ControlThread(config));
|
||||
|
||||
@ -238,6 +240,7 @@ TEST_F(ControlThreadTest, StopReceiverProgrammatically)
|
||||
config->set_property("Observables.item_type", "gr_complex");
|
||||
config->set_property("PVT.implementation", "RTKLIB_PVT");
|
||||
config->set_property("PVT.item_type", "gr_complex");
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
|
||||
std::shared_ptr<ControlThread> control_thread = std::make_shared<ControlThread>(config);
|
||||
gr::msg_queue::sptr control_queue = gr::msg_queue::make(0);
|
||||
|
@ -49,6 +49,7 @@ TEST(GNSSFlowgraph, InstantiateConnectStartStopOldNotation)
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
|
||||
config->set_property("GNSS-SDR.SUPL_gps_enabled", "false");
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
config->set_property("SignalSource.sampling_frequency", "4000000");
|
||||
config->set_property("SignalSource.implementation", "File_Signal_Source");
|
||||
config->set_property("SignalSource.item_type", "gr_complex");
|
||||
@ -82,7 +83,7 @@ TEST(GNSSFlowgraph, InstantiateConnectStartStopOldNotation)
|
||||
TEST(GNSSFlowgraph, InstantiateConnectStartStop)
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
config->set_property("SignalSource.sampling_frequency", "4000000");
|
||||
config->set_property("SignalSource.implementation", "File_Signal_Source");
|
||||
config->set_property("SignalSource.item_type", "gr_complex");
|
||||
@ -116,7 +117,7 @@ TEST(GNSSFlowgraph, InstantiateConnectStartStop)
|
||||
TEST(GNSSFlowgraph, InstantiateConnectStartStopGalileoE1B)
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
config->set_property("SignalSource.sampling_frequency", "4000000");
|
||||
config->set_property("SignalSource.implementation", "File_Signal_Source");
|
||||
config->set_property("SignalSource.item_type", "gr_complex");
|
||||
@ -151,7 +152,7 @@ TEST(GNSSFlowgraph, InstantiateConnectStartStopGalileoE1B)
|
||||
TEST(GNSSFlowgraph, InstantiateConnectStartStopHybrid)
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
|
||||
config->set_property("GNSS-SDR.internal_fs_sps", "4000000");
|
||||
config->set_property("SignalSource.sampling_frequency", "4000000");
|
||||
config->set_property("SignalSource.implementation", "File_Signal_Source");
|
||||
config->set_property("SignalSource.item_type", "gr_complex");
|
||||
|
Loading…
Reference in New Issue
Block a user