1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2018-06-07 12:10:31 +02:00
commit 851479888d
3 changed files with 42 additions and 19 deletions

View File

@ -255,8 +255,8 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->first; DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->first;
} }
} }
// GPS L2 // GPS L2 (ephemeris disabled due to an incompatibility with RTKLIB solver)
if (sig_.compare("2S") == 0) if (sig_.compare("2S_disabled") == 0)
{ {
gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN); gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.cend()) if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.cend())

View File

@ -46,7 +46,7 @@
#include "glonass_l1_ca_pcps_acquisition.h" #include "glonass_l1_ca_pcps_acquisition.h"
#include "signal_generator.h" #include "signal_generator.h"
#include "signal_generator_c.h" #include "signal_generator_c.h"
#include "fir_filter.h" #include "freq_xlating_fir_filter.h"
#include "gen_signal_source.h" #include "gen_signal_source.h"
#include "gnss_sdr_valve.h" #include "gnss_sdr_valve.h"
#include "boost/shared_ptr.hpp" #include "boost/shared_ptr.hpp"
@ -226,7 +226,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_1()
config->set_property("SignalSource.data_flag", "false"); config->set_property("SignalSource.data_flag", "false");
config->set_property("SignalSource.BW_BB", "0.97"); config->set_property("SignalSource.BW_BB", "0.97");
config->set_property("InputFilter.implementation", "Fir_Filter"); config->set_property("InputFilter.implementation", "Freq_Xlating_Fir_Filter");
config->set_property("InputFilter.input_item_type", "gr_complex"); config->set_property("InputFilter.input_item_type", "gr_complex");
config->set_property("InputFilter.output_item_type", "gr_complex"); config->set_property("InputFilter.output_item_type", "gr_complex");
config->set_property("InputFilter.taps_item_type", "float"); config->set_property("InputFilter.taps_item_type", "float");
@ -244,6 +244,8 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_1()
config->set_property("InputFilter.band2_error", "1.0"); config->set_property("InputFilter.band2_error", "1.0");
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("InputFilter.sampling_frequency", std::to_string(fs_in));
config->set_property("InputFilter.IF", "4000000");
config->set_property("Acquisition.item_type", "gr_complex"); config->set_property("Acquisition.item_type", "gr_complex");
config->set_property("Acquisition.coherent_integration_time_ms", config->set_property("Acquisition.coherent_integration_time_ms",
@ -313,7 +315,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_2()
config->set_property("SignalSource.data_flag", "true"); config->set_property("SignalSource.data_flag", "true");
config->set_property("SignalSource.BW_BB", "0.97"); config->set_property("SignalSource.BW_BB", "0.97");
config->set_property("InputFilter.implementation", "Fir_Filter"); config->set_property("InputFilter.implementation", "Freq_Xlating_Fir_Filter");
config->set_property("InputFilter.input_item_type", "gr_complex"); config->set_property("InputFilter.input_item_type", "gr_complex");
config->set_property("InputFilter.output_item_type", "gr_complex"); config->set_property("InputFilter.output_item_type", "gr_complex");
config->set_property("InputFilter.taps_item_type", "float"); config->set_property("InputFilter.taps_item_type", "float");
@ -331,6 +333,8 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_2()
config->set_property("InputFilter.band2_error", "1.0"); config->set_property("InputFilter.band2_error", "1.0");
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("InputFilter.sampling_frequency", std::to_string(fs_in));
config->set_property("InputFilter.IF", "4000000");
config->set_property("Acquisition.item_type", "gr_complex"); config->set_property("Acquisition.item_type", "gr_complex");
config->set_property("Acquisition.coherent_integration_time_ms", config->set_property("Acquisition.coherent_integration_time_ms",
@ -503,12 +507,11 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
acquisition->init(); acquisition->init();
ASSERT_NO_THROW({ ASSERT_NO_THROW({
boost::shared_ptr<GenSignalSource> signal_source; std::shared_ptr<SignalGenerator> signal_generator = std::make_shared<SignalGenerator>(config.get(), "SignalSource", 0, 1, queue);
SignalGenerator* signal_generator = new SignalGenerator(config.get(), "SignalSource", 0, 1, queue); std::shared_ptr<FreqXlatingFirFilter> filter = std::make_shared<FreqXlatingFirFilter>(config.get(), "InputFilter", 1, 1);
FirFilter* filter = new FirFilter(config.get(), "InputFilter", 1, 1); signal_generator->connect(top_block);
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue)); top_block->connect(signal_generator->get_right_block(), 0, filter->get_left_block(), 0);
signal_source->connect(top_block); top_block->connect(filter->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."; }) << "Failure connecting the blocks of acquisition test.";
// i = 0 --> satellite in acquisition is visible // i = 0 --> satellite in acquisition is visible
@ -598,12 +601,11 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResultsProbabilities)
acquisition->init(); acquisition->init();
ASSERT_NO_THROW({ ASSERT_NO_THROW({
boost::shared_ptr<GenSignalSource> signal_source; std::shared_ptr<SignalGenerator> signal_generator = std::make_shared<SignalGenerator>(config.get(), "SignalSource", 0, 1, queue);
SignalGenerator* signal_generator = new SignalGenerator(config.get(), "SignalSource", 0, 1, queue); std::shared_ptr<FreqXlatingFirFilter> filter = std::make_shared<FreqXlatingFirFilter>(config.get(), "InputFilter", 1, 1);
FirFilter* filter = new FirFilter(config.get(), "InputFilter", 1, 1); signal_generator->connect(top_block);
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue)); top_block->connect(signal_generator->get_right_block(), 0, filter->get_left_block(), 0);
signal_source->connect(top_block); top_block->connect(filter->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."; }) << "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;

View File

@ -46,6 +46,7 @@
#include "in_memory_configuration.h" #include "in_memory_configuration.h"
#include "gnss_sdr_valve.h" #include "gnss_sdr_valve.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "freq_xlating_fir_filter.h"
#include "glonass_l1_ca_pcps_acquisition.h" #include "glonass_l1_ca_pcps_acquisition.h"
@ -138,6 +139,25 @@ void GlonassL1CaPcpsAcquisitionTest::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", "62314000"); config->set_property("GNSS-SDR.internal_fs_sps", "62314000");
config->set_property("InputFilter.IF", "9540000");
config->set_property("InputFilter.input_item_type", "gr_complex");
config->set_property("InputFilter.output_item_type", "gr_complex");
config->set_property("InputFilter.taps_item_type", "float");
config->set_property("InputFilter.number_of_taps", "11");
config->set_property("InputFilter.number_of_bands", "2");
config->set_property("InputFilter.band1_begin", "0.0");
config->set_property("InputFilter.band1_end", "0.97");
config->set_property("InputFilter.band2_begin", "0.98");
config->set_property("InputFilter.band2_end", "1.0");
config->set_property("InputFilter.ampl1_begin", "1.0");
config->set_property("InputFilter.ampl1_end", "1.0");
config->set_property("InputFilter.ampl2_begin", "0.0");
config->set_property("InputFilter.ampl2_end", "0.0");
config->set_property("InputFilter.band1_error", "1.0");
config->set_property("InputFilter.band2_error", "1.0");
config->set_property("InputFilter.filter_type", "bandpass");
config->set_property("InputFilter.grid_density", "16");
config->set_property("InputFilter.sampling_frequency", "62314000");
config->set_property("Acquisition_1G.item_type", "gr_complex"); config->set_property("Acquisition_1G.item_type", "gr_complex");
config->set_property("Acquisition_1G.coherent_integration_time_ms", "1"); config->set_property("Acquisition_1G.coherent_integration_time_ms", "1");
config->set_property("Acquisition_1G.dump", "true"); config->set_property("Acquisition_1G.dump", "true");
@ -201,7 +221,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
double expected_doppler_hz = -9500; double expected_doppler_hz = -9500;
init(); init();
std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 0); std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 0);
std::shared_ptr<FreqXlatingFirFilter> input_filter = std::make_shared<FreqXlatingFirFilter>(config.get(), "InputFilter", 1, 1);
boost::shared_ptr<GlonassL1CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL1CaPcpsAcquisitionTest_msg_rx_make(); boost::shared_ptr<GlonassL1CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL1CaPcpsAcquisitionTest_msg_rx_make();
ASSERT_NO_THROW({ ASSERT_NO_THROW({
@ -237,7 +257,8 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
std::string file = path + "signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat"; std::string file = path + "signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat";
const char* file_name = file.c_str(); const char* file_name = file.c_str();
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, input_filter->get_left_block(), 0);
top_block->connect(input_filter->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."; }) << "Failure connecting the blocks of acquisition test.";