mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-07 18:54:06 +00:00
Code cleaning
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@261 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
@@ -35,14 +35,11 @@
|
|||||||
#include "file_output_filter.h"
|
#include "file_output_filter.h"
|
||||||
#include "in_memory_configuration.h"
|
#include "in_memory_configuration.h"
|
||||||
|
|
||||||
TEST(FileOutputFilter, Instantiate) {
|
TEST(FileOutputFilter, Instantiate)
|
||||||
|
{
|
||||||
InMemoryConfiguration* config = new InMemoryConfiguration();
|
InMemoryConfiguration* config = new InMemoryConfiguration();
|
||||||
|
|
||||||
config->set_property("Test.filename", "../data/output.dat");
|
config->set_property("Test.filename", "../data/output.dat");
|
||||||
config->set_property("Test.item_type", "float");
|
config->set_property("Test.item_type", "float");
|
||||||
|
|
||||||
FileOutputFilter *output_filter = new FileOutputFilter(config, "Test", 1, 0);
|
FileOutputFilter *output_filter = new FileOutputFilter(config, "Test", 1, 0);
|
||||||
|
|
||||||
delete output_filter;
|
delete output_filter;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,21 +30,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <gr_block.h>
|
#include <gr_block.h>
|
||||||
#include <gr_msg_queue.h>
|
#include <gr_msg_queue.h>
|
||||||
#include <gr_top_block.h>
|
#include <gr_top_block.h>
|
||||||
#include <gr_null_sink.h>
|
#include <gr_null_sink.h>
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "file_signal_source.h"
|
#include "file_signal_source.h"
|
||||||
#include "in_memory_configuration.h"
|
#include "in_memory_configuration.h"
|
||||||
|
|
||||||
TEST(FileSignalSource, Instantiate) {
|
TEST(FileSignalSource, Instantiate)
|
||||||
|
{
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
InMemoryConfiguration* config = new InMemoryConfiguration();
|
InMemoryConfiguration* config = new InMemoryConfiguration();
|
||||||
|
|
||||||
config->set_property("Test.samples", "0");
|
config->set_property("Test.samples", "0");
|
||||||
@@ -62,10 +58,9 @@ TEST(FileSignalSource, Instantiate) {
|
|||||||
delete signal_source;
|
delete signal_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FileSignalSource, InstantiateFileNotExists) {
|
TEST(FileSignalSource, InstantiateFileNotExists)
|
||||||
|
{
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
InMemoryConfiguration* config = new InMemoryConfiguration();
|
InMemoryConfiguration* config = new InMemoryConfiguration();
|
||||||
|
|
||||||
config->set_property("Test.samples", "0");
|
config->set_property("Test.samples", "0");
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
#include <gnuradio/gr_sig_source_c.h>
|
#include <gnuradio/gr_sig_source_c.h>
|
||||||
#include <gnuradio/gr_msg_queue.h>
|
#include <gnuradio/gr_msg_queue.h>
|
||||||
#include <gnuradio/gr_null_sink.h>
|
#include <gnuradio/gr_null_sink.h>
|
||||||
|
|
||||||
#include "gnss_block_factory.h"
|
#include "gnss_block_factory.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "in_memory_configuration.h"
|
#include "in_memory_configuration.h"
|
||||||
@@ -45,16 +44,19 @@
|
|||||||
|
|
||||||
DEFINE_string(filter_test_output_filename, "../src/tests/data/fir_filter_test_output.dat", "Dump filename");
|
DEFINE_string(filter_test_output_filename, "../src/tests/data/fir_filter_test_output.dat", "Dump filename");
|
||||||
|
|
||||||
class Fir_Filter_Test: public ::testing::Test {
|
class Fir_Filter_Test: public ::testing::Test
|
||||||
|
{
|
||||||
protected:
|
protected:
|
||||||
Fir_Filter_Test() {
|
Fir_Filter_Test()
|
||||||
|
{
|
||||||
queue = gr_make_msg_queue(0);
|
queue = gr_make_msg_queue(0);
|
||||||
top_block = gr_make_top_block("Fir filter test");
|
top_block = gr_make_top_block("Fir filter test");
|
||||||
config = new InMemoryConfiguration();
|
config = new InMemoryConfiguration();
|
||||||
item_size = sizeof(gr_complex);
|
item_size = sizeof(gr_complex);
|
||||||
|
|
||||||
}
|
}
|
||||||
~Fir_Filter_Test() {
|
~Fir_Filter_Test()
|
||||||
|
{
|
||||||
delete config;
|
delete config;
|
||||||
}
|
}
|
||||||
void init();
|
void init();
|
||||||
@@ -62,11 +64,10 @@ protected:
|
|||||||
gr_top_block_sptr top_block;
|
gr_top_block_sptr top_block;
|
||||||
InMemoryConfiguration* config;
|
InMemoryConfiguration* config;
|
||||||
size_t item_size;
|
size_t item_size;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void Fir_Filter_Test::init(){
|
void Fir_Filter_Test::init()
|
||||||
|
{
|
||||||
config->set_property("InputFilter.number_of_taps", "4");
|
config->set_property("InputFilter.number_of_taps", "4");
|
||||||
config->set_property("InputFilter.number_of_bands", "2");
|
config->set_property("InputFilter.number_of_bands", "2");
|
||||||
|
|
||||||
@@ -85,17 +86,14 @@ void Fir_Filter_Test::init(){
|
|||||||
|
|
||||||
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.dump", "true");
|
||||||
// config->set_property("InputFilter.dump", "true");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(Fir_Filter_Test, Instantiate)
|
TEST_F(Fir_Filter_Test, Instantiate)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
|
|
||||||
FirFilter *filter = new FirFilter(config, "InputFilter", 1, 1, queue);
|
FirFilter *filter = new FirFilter(config, "InputFilter", 1, 1, queue);
|
||||||
|
|
||||||
delete filter;
|
delete filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
#include <gnuradio/gr_msg_queue.h>
|
#include <gnuradio/gr_msg_queue.h>
|
||||||
#include <gnuradio/gr_null_sink.h>
|
#include <gnuradio/gr_null_sink.h>
|
||||||
#include <gnuradio/gr_skiphead.h>
|
#include <gnuradio/gr_skiphead.h>
|
||||||
|
|
||||||
#include "gnss_block_factory.h"
|
#include "gnss_block_factory.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "in_memory_configuration.h"
|
#include "in_memory_configuration.h"
|
||||||
@@ -50,9 +49,11 @@
|
|||||||
|
|
||||||
#include "galileo_e1_dll_pll_veml_tracking.h"
|
#include "galileo_e1_dll_pll_veml_tracking.h"
|
||||||
|
|
||||||
class GalileoE1DllPllVemlTrackingInternalTest: public ::testing::Test {
|
class GalileoE1DllPllVemlTrackingInternalTest: public ::testing::Test
|
||||||
|
{
|
||||||
protected:
|
protected:
|
||||||
GalileoE1DllPllVemlTrackingInternalTest() {
|
GalileoE1DllPllVemlTrackingInternalTest()
|
||||||
|
{
|
||||||
queue = gr_make_msg_queue(0);
|
queue = gr_make_msg_queue(0);
|
||||||
top_block = gr_make_top_block("Tracking test");
|
top_block = gr_make_top_block("Tracking test");
|
||||||
factory = new GNSSBlockFactory();
|
factory = new GNSSBlockFactory();
|
||||||
@@ -62,7 +63,8 @@ protected:
|
|||||||
message = 0;
|
message = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
~GalileoE1DllPllVemlTrackingInternalTest() {
|
~GalileoE1DllPllVemlTrackingInternalTest()
|
||||||
|
{
|
||||||
delete factory;
|
delete factory;
|
||||||
delete config;
|
delete config;
|
||||||
}
|
}
|
||||||
@@ -81,8 +83,9 @@ protected:
|
|||||||
boost::thread ch_thread;
|
boost::thread ch_thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
void GalileoE1DllPllVemlTrackingInternalTest::init(){
|
|
||||||
|
|
||||||
|
void GalileoE1DllPllVemlTrackingInternalTest::init()
|
||||||
|
{
|
||||||
gnss_synchro.Channel_ID=0;
|
gnss_synchro.Channel_ID=0;
|
||||||
gnss_synchro.System = 'E';
|
gnss_synchro.System = 'E';
|
||||||
std::string signal = "1B";
|
std::string signal = "1B";
|
||||||
@@ -106,12 +109,9 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, Instantiate)
|
|||||||
{
|
{
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
GalileoE1DllPllVemlTracking *tracking = new GalileoE1DllPllVemlTracking(config, "Tracking", 1, 1, queue);
|
GalileoE1DllPllVemlTracking *tracking = new GalileoE1DllPllVemlTracking(config, "Tracking", 1, 1, queue);
|
||||||
EXPECT_STREQ("Galileo_E1_DLL_PLL_VEML_Tracking", tracking->implementation().c_str());
|
EXPECT_STREQ("Galileo_E1_DLL_PLL_VEML_Tracking", tracking->implementation().c_str());
|
||||||
|
|
||||||
delete tracking;
|
delete tracking;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun)
|
//TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun)
|
||||||
@@ -155,15 +155,15 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
|||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
long long int begin;
|
long long int begin;
|
||||||
long long int end;
|
long long int end;
|
||||||
// int num_samples = 40000000; // 4 Msps
|
// int num_samples = 40000000; // 4 Msps
|
||||||
// unsigned int skiphead_sps = 24000000; // 4 Msps
|
// unsigned int skiphead_sps = 24000000; // 4 Msps
|
||||||
int num_samples = 80000000; // 8 Msps
|
int num_samples = 80000000; // 8 Msps
|
||||||
unsigned int skiphead_sps = 8000000; // 8 Msps
|
unsigned int skiphead_sps = 8000000; // 8 Msps
|
||||||
init();
|
init();
|
||||||
GalileoE1DllPllVemlTracking *tracking = new GalileoE1DllPllVemlTracking(config, "Tracking", 1, 1, queue);
|
GalileoE1DllPllVemlTracking *tracking = new GalileoE1DllPllVemlTracking(config, "Tracking", 1, 1, queue);
|
||||||
|
|
||||||
// gnss_synchro.Acq_delay_samples=1753; // 4 Msps
|
// gnss_synchro.Acq_delay_samples=1753; // 4 Msps
|
||||||
// gnss_synchro.Acq_doppler_hz=-9500; // 4 Msps
|
// gnss_synchro.Acq_doppler_hz=-9500; // 4 Msps
|
||||||
gnss_synchro.Acq_delay_samples=17256; // 8 Msps
|
gnss_synchro.Acq_delay_samples=17256; // 8 Msps
|
||||||
gnss_synchro.Acq_doppler_hz=-8750; // 8 Msps
|
gnss_synchro.Acq_doppler_hz=-8750; // 8 Msps
|
||||||
gnss_synchro.Acq_samplestamp_samples=0;
|
gnss_synchro.Acq_samplestamp_samples=0;
|
||||||
@@ -180,16 +180,15 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
|||||||
tracking->set_channel_queue(&channel_internal_queue);
|
tracking->set_channel_queue(&channel_internal_queue);
|
||||||
}) << "Failure setting channel_internal_queue."<< std::endl;
|
}) << "Failure setting channel_internal_queue."<< std::endl;
|
||||||
|
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
tracking->connect(top_block);
|
tracking->connect(top_block);
|
||||||
}) << "Failure connecting tracking to the top_block."<< std::endl;
|
}) << "Failure connecting tracking to the top_block."<< std::endl;
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
std::string file = "/media/DATA/Proyectos/Signals/cttc_2012_07_26/cp_cttc_2012_07_26_n6_8Msps.dat";
|
std::string file = "/media/DATA/Proyectos/Signals/cttc_2012_07_26/cp_cttc_2012_07_26_n6_8Msps.dat";
|
||||||
// std::string file = "/media/DATA/Proyectos/Signals/cttc_2012_07_26/cp_cttc_2012_07_26_n4_4Msps.dat";
|
// std::string file = "/media/DATA/Proyectos/Signals/cttc_2012_07_26/cp_cttc_2012_07_26_n4_4Msps.dat";
|
||||||
// std::string file = "/media/DATA/Proyectos/Signals/prueba.dat";
|
// std::string file = "/media/DATA/Proyectos/Signals/prueba.dat";
|
||||||
// std::string file = "../data/resampler.dat";
|
// std::string file = "../data/resampler.dat";
|
||||||
const char * file_name = file.c_str();
|
const char * file_name = file.c_str();
|
||||||
gr_file_source_sptr file_source = gr_make_file_source(sizeof(gr_complex),file_name,false);
|
gr_file_source_sptr file_source = gr_make_file_source(sizeof(gr_complex),file_name,false);
|
||||||
gr_skiphead_sptr skip_head = gr_make_skiphead(sizeof(gr_complex), skiphead_sps);
|
gr_skiphead_sptr skip_head = gr_make_skiphead(sizeof(gr_complex), skiphead_sps);
|
||||||
@@ -215,5 +214,4 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults)
|
|||||||
std::cout << "Tracked " << num_samples << " samples in " << (end-begin) << " microseconds" << std::endl;
|
std::cout << "Tracked " << num_samples << " samples in " << (end-begin) << " microseconds" << std::endl;
|
||||||
|
|
||||||
delete tracking;
|
delete tracking;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
#include <gnuradio/gr_sig_source_c.h>
|
#include <gnuradio/gr_sig_source_c.h>
|
||||||
#include <gnuradio/gr_msg_queue.h>
|
#include <gnuradio/gr_msg_queue.h>
|
||||||
#include <gnuradio/gr_null_sink.h>
|
#include <gnuradio/gr_null_sink.h>
|
||||||
|
|
||||||
#include "gnss_block_factory.h"
|
#include "gnss_block_factory.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "in_memory_configuration.h"
|
#include "in_memory_configuration.h"
|
||||||
@@ -50,9 +49,11 @@
|
|||||||
|
|
||||||
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
||||||
|
|
||||||
class GalileoE1PcpsAmbiguousAcquisitionTest: public ::testing::Test {
|
class GalileoE1PcpsAmbiguousAcquisitionTest: public ::testing::Test
|
||||||
|
{
|
||||||
protected:
|
protected:
|
||||||
GalileoE1PcpsAmbiguousAcquisitionTest() {
|
GalileoE1PcpsAmbiguousAcquisitionTest()
|
||||||
|
{
|
||||||
queue = gr_make_msg_queue(0);
|
queue = gr_make_msg_queue(0);
|
||||||
top_block = gr_make_top_block("Acquisition test");
|
top_block = gr_make_top_block("Acquisition test");
|
||||||
factory = new GNSSBlockFactory();
|
factory = new GNSSBlockFactory();
|
||||||
@@ -62,7 +63,8 @@ protected:
|
|||||||
message = 0;
|
message = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
~GalileoE1PcpsAmbiguousAcquisitionTest() {
|
~GalileoE1PcpsAmbiguousAcquisitionTest()
|
||||||
|
{
|
||||||
delete factory;
|
delete factory;
|
||||||
delete config;
|
delete config;
|
||||||
}
|
}
|
||||||
@@ -84,8 +86,8 @@ protected:
|
|||||||
boost::thread ch_thread;
|
boost::thread ch_thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
void GalileoE1PcpsAmbiguousAcquisitionTest::init(){
|
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 = "1C";
|
||||||
@@ -123,19 +125,15 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::wait_message()
|
|||||||
void GalileoE1PcpsAmbiguousAcquisitionTest::stop_queue()
|
void GalileoE1PcpsAmbiguousAcquisitionTest::stop_queue()
|
||||||
{
|
{
|
||||||
stop = true;
|
stop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, Instantiate)
|
TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, Instantiate)
|
||||||
{
|
{
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
GalileoE1PcpsAmbiguousAcquisition *acquisition = new GalileoE1PcpsAmbiguousAcquisition(config, "Acquisition", 1, 1, queue);
|
GalileoE1PcpsAmbiguousAcquisition *acquisition = new GalileoE1PcpsAmbiguousAcquisition(config, "Acquisition", 1, 1, queue);
|
||||||
|
|
||||||
delete acquisition;
|
delete acquisition;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ConnectAndRun)
|
TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ConnectAndRun)
|
||||||
@@ -245,5 +243,4 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
|
|||||||
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";
|
||||||
|
|
||||||
delete acquisition;
|
delete acquisition;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,8 @@
|
|||||||
#include "gnss_block_factory.h"
|
#include "gnss_block_factory.h"
|
||||||
|
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateFileSignalSource) {
|
TEST(GNSS_Block_Factory_Test, InstantiateFileSignalSource)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("SignalSource.implementation", "File_Signal_Source");
|
configuration->set_property("SignalSource.implementation", "File_Signal_Source");
|
||||||
@@ -65,7 +66,9 @@ TEST(GNSS_Block_Factory_Test, InstantiateFileSignalSource) {
|
|||||||
delete signal_source;
|
delete signal_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateUHDSignalSource) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateUHDSignalSource)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("SignalSource.implementation", "UHD_Signal_Source");
|
configuration->set_property("SignalSource.implementation", "UHD_Signal_Source");
|
||||||
@@ -82,11 +85,11 @@ TEST(GNSS_Block_Factory_Test, InstantiateUHDSignalSource) {
|
|||||||
delete signal_source;
|
delete signal_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateWrongSignalSource) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateWrongSignalSource)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("SignalSource.implementation", "Pepito");
|
configuration->set_property("SignalSource.implementation", "Pepito");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -99,11 +102,10 @@ TEST(GNSS_Block_Factory_Test, InstantiateWrongSignalSource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateSignalConditioner) {
|
TEST(GNSS_Block_Factory_Test, InstantiateSignalConditioner)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("SignalConditioner.implementation", "Signal_Conditioner");
|
configuration->set_property("SignalConditioner.implementation", "Signal_Conditioner");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -117,9 +119,10 @@ TEST(GNSS_Block_Factory_Test, InstantiateSignalConditioner) {
|
|||||||
delete signal_conditioner;
|
delete signal_conditioner;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateFIRFilter) {
|
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
|
||||||
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateFIRFilter)
|
||||||
|
{
|
||||||
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
configuration->set_property("InputFilter.implementation", "Fir_Filter");
|
configuration->set_property("InputFilter.implementation", "Fir_Filter");
|
||||||
@@ -154,9 +157,9 @@ TEST(GNSS_Block_Factory_Test, InstantiateFIRFilter) {
|
|||||||
delete input_filter;
|
delete input_filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateFreqXlatingFIRFilter) {
|
TEST(GNSS_Block_Factory_Test, InstantiateFreqXlatingFIRFilter)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
configuration->set_property("InputFilter.implementation", "Freq_Xlating_Fir_Filter");
|
configuration->set_property("InputFilter.implementation", "Freq_Xlating_Fir_Filter");
|
||||||
@@ -194,11 +197,10 @@ TEST(GNSS_Block_Factory_Test, InstantiateFreqXlatingFIRFilter) {
|
|||||||
delete input_filter;
|
delete input_filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateDirectResampler) {
|
TEST(GNSS_Block_Factory_Test, InstantiateDirectResampler)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Resampler.implementation", "Direct_Resampler");
|
configuration->set_property("Resampler.implementation", "Direct_Resampler");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -212,17 +214,15 @@ TEST(GNSS_Block_Factory_Test, InstantiateDirectResampler) {
|
|||||||
delete resampler;
|
delete resampler;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaPcpsAcquisition) {
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaPcpsAcquisition)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
configuration->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
AcquisitionInterface *acquisition = (AcquisitionInterface*)factory->GetBlock(configuration, "Acquisition", "GPS_L1_CA_PCPS_Acquisition", 1, 1, queue);
|
AcquisitionInterface *acquisition = (AcquisitionInterface*)factory->GetBlock(configuration, "Acquisition", "GPS_L1_CA_PCPS_Acquisition", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("Acquisition", acquisition->role().c_str());
|
EXPECT_STREQ("Acquisition", acquisition->role().c_str());
|
||||||
EXPECT_STREQ("GPS_L1_CA_PCPS_Acquisition", acquisition->implementation().c_str());
|
EXPECT_STREQ("GPS_L1_CA_PCPS_Acquisition", acquisition->implementation().c_str());
|
||||||
|
|
||||||
@@ -231,17 +231,16 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaPcpsAcquisition) {
|
|||||||
delete acquisition;
|
delete acquisition;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGalileoE1PcpsAmbiguousAcquisition) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGalileoE1PcpsAmbiguousAcquisition)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Acquisition.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
configuration->set_property("Acquisition.implementation", "Galileo_E1_PCPS_Ambiguous_Acquisition");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
AcquisitionInterface *acquisition = (AcquisitionInterface*)factory->GetBlock(configuration, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
|
AcquisitionInterface *acquisition = (AcquisitionInterface*)factory->GetBlock(configuration, "Acquisition", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("Acquisition", acquisition->role().c_str());
|
EXPECT_STREQ("Acquisition", acquisition->role().c_str());
|
||||||
EXPECT_STREQ("Galileo_E1_PCPS_Ambiguous_Acquisition", acquisition->implementation().c_str());
|
EXPECT_STREQ("Galileo_E1_PCPS_Ambiguous_Acquisition", acquisition->implementation().c_str());
|
||||||
|
|
||||||
@@ -249,17 +248,17 @@ TEST(GNSS_Block_Factory_Test, InstantiateGalileoE1PcpsAmbiguousAcquisition) {
|
|||||||
delete factory;
|
delete factory;
|
||||||
delete acquisition;
|
delete acquisition;
|
||||||
}
|
}
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaDllFllPllTracking) {
|
|
||||||
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaDllFllPllTracking)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Tracking.implementation", "GPS_L1_CA_DLL_FLL_PLL_Tracking");
|
configuration->set_property("Tracking.implementation", "GPS_L1_CA_DLL_FLL_PLL_Tracking");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "GPS_L1_CA_DLL_FLL_PLL_Tracking", 1, 1, queue);
|
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "GPS_L1_CA_DLL_FLL_PLL_Tracking", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
||||||
EXPECT_STREQ("GPS_L1_CA_DLL_FLL_PLL_Tracking", tracking->implementation().c_str());
|
EXPECT_STREQ("GPS_L1_CA_DLL_FLL_PLL_Tracking", tracking->implementation().c_str());
|
||||||
|
|
||||||
@@ -268,17 +267,16 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaDllFllPllTracking) {
|
|||||||
delete tracking;
|
delete tracking;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaDllPllTracking) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaDllPllTracking)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Tracking.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
configuration->set_property("Tracking.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "GPS_L1_CA_DLL_PLL_Tracking", 1, 1, queue);
|
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "GPS_L1_CA_DLL_PLL_Tracking", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
||||||
EXPECT_STREQ("GPS_L1_CA_DLL_PLL_Tracking", tracking->implementation().c_str());
|
EXPECT_STREQ("GPS_L1_CA_DLL_PLL_Tracking", tracking->implementation().c_str());
|
||||||
|
|
||||||
@@ -287,17 +285,16 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaDllPllTracking) {
|
|||||||
delete tracking;
|
delete tracking;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaTcpConnectorTracking) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaTcpConnectorTracking)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Tracking.implementation", "GPS_L1_CA_TCP_CONNECTOR_Tracking");
|
configuration->set_property("Tracking.implementation", "GPS_L1_CA_TCP_CONNECTOR_Tracking");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "GPS_L1_CA_TCP_CONNECTOR_Tracking", 1, 1, queue);
|
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "GPS_L1_CA_TCP_CONNECTOR_Tracking", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
||||||
EXPECT_STREQ("GPS_L1_CA_TCP_CONNECTOR_Tracking", tracking->implementation().c_str());
|
EXPECT_STREQ("GPS_L1_CA_TCP_CONNECTOR_Tracking", tracking->implementation().c_str());
|
||||||
|
|
||||||
@@ -306,17 +303,16 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaTcpConnectorTracking) {
|
|||||||
delete tracking;
|
delete tracking;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGalileoE1DllPllVemlTracking) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGalileoE1DllPllVemlTracking)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Tracking.implementation", "Galileo_E1_DLL_PLL_VEML_Tracking");
|
configuration->set_property("Tracking.implementation", "Galileo_E1_DLL_PLL_VEML_Tracking");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1, queue);
|
TrackingInterface *tracking = (TrackingInterface*)factory->GetBlock(configuration, "Tracking", "Galileo_E1_DLL_PLL_VEML_Tracking", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
EXPECT_STREQ("Tracking", tracking->role().c_str());
|
||||||
EXPECT_STREQ("Galileo_E1_DLL_PLL_VEML_Tracking", tracking->implementation().c_str());
|
EXPECT_STREQ("Galileo_E1_DLL_PLL_VEML_Tracking", tracking->implementation().c_str());
|
||||||
|
|
||||||
@@ -325,17 +321,16 @@ TEST(GNSS_Block_Factory_Test, InstantiateGalileoE1DllPllVemlTracking) {
|
|||||||
delete tracking;
|
delete tracking;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaTelemetryDecoder) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaTelemetryDecoder)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("TelemetryDecoder.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
configuration->set_property("TelemetryDecoder.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
TelemetryDecoderInterface *telemetry_decoder = (TelemetryDecoderInterface*)factory->GetBlock(configuration, "TelemetryDecoder", "GPS_L1_CA_Telemetry_Decoder", 1, 1, queue);
|
TelemetryDecoderInterface *telemetry_decoder = (TelemetryDecoderInterface*)factory->GetBlock(configuration, "TelemetryDecoder", "GPS_L1_CA_Telemetry_Decoder", 1, 1, queue);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_STREQ("TelemetryDecoder", telemetry_decoder->role().c_str());
|
EXPECT_STREQ("TelemetryDecoder", telemetry_decoder->role().c_str());
|
||||||
EXPECT_STREQ("GPS_L1_CA_Telemetry_Decoder", telemetry_decoder->implementation().c_str());
|
EXPECT_STREQ("GPS_L1_CA_Telemetry_Decoder", telemetry_decoder->implementation().c_str());
|
||||||
|
|
||||||
@@ -344,7 +339,8 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaTelemetryDecoder) {
|
|||||||
delete telemetry_decoder;
|
delete telemetry_decoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateChannels) {
|
TEST(GNSS_Block_Factory_Test, InstantiateChannels)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Channels.count", "2");
|
configuration->set_property("Channels.count", "2");
|
||||||
@@ -368,17 +364,16 @@ TEST(GNSS_Block_Factory_Test, InstantiateChannels) {
|
|||||||
|
|
||||||
delete configuration;
|
delete configuration;
|
||||||
delete factory;
|
delete factory;
|
||||||
for(unsigned int i=0 ; i<channels->size() ; i++)
|
for(unsigned int i=0 ; i<channels->size() ; i++) delete channels->at(i);
|
||||||
delete channels->at(i);
|
|
||||||
channels->clear();
|
channels->clear();
|
||||||
delete channels;
|
delete channels;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateObservables) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateObservables)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Observables.implementation", "Pass_Through");
|
configuration->set_property("Observables.implementation", "Pass_Through");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -392,11 +387,11 @@ TEST(GNSS_Block_Factory_Test, InstantiateObservables) {
|
|||||||
delete observables;
|
delete observables;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaObservables) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaObservables)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Observables.implementation", "GPS_L1_CA_Observables");
|
configuration->set_property("Observables.implementation", "GPS_L1_CA_Observables");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -410,11 +405,11 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaObservables) {
|
|||||||
delete observables;
|
delete observables;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateWrongObservables) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateWrongObservables)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("Observables.implementation", "Pepito");
|
configuration->set_property("Observables.implementation", "Pepito");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -427,11 +422,10 @@ TEST(GNSS_Block_Factory_Test, InstantiateWrongObservables) {
|
|||||||
delete observables;
|
delete observables;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiatePvt) {
|
TEST(GNSS_Block_Factory_Test, InstantiatePvt)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("PVT.implementation", "Pass_Through");
|
configuration->set_property("PVT.implementation", "Pass_Through");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -445,11 +439,11 @@ TEST(GNSS_Block_Factory_Test, InstantiatePvt) {
|
|||||||
delete pvt;
|
delete pvt;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaPvt) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaPvt)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("PVT.implementation", "GPS_L1_CA_PVT");
|
configuration->set_property("PVT.implementation", "GPS_L1_CA_PVT");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -463,11 +457,11 @@ TEST(GNSS_Block_Factory_Test, InstantiateGpsL1CaPvt) {
|
|||||||
delete pvt;
|
delete pvt;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateWrongPvt) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateWrongPvt)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("PVT.implementation", "Pepito");
|
configuration->set_property("PVT.implementation", "Pepito");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -480,11 +474,12 @@ TEST(GNSS_Block_Factory_Test, InstantiateWrongPvt) {
|
|||||||
delete pvt;
|
delete pvt;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateNullSinkOutputFilter) {
|
|
||||||
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateNullSinkOutputFilter)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("OutputFilter.implementation", "Null_Sink_Output_Filter");
|
configuration->set_property("OutputFilter.implementation", "Null_Sink_Output_Filter");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -498,11 +493,11 @@ TEST(GNSS_Block_Factory_Test, InstantiateNullSinkOutputFilter) {
|
|||||||
delete output_filter;
|
delete output_filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateFileOutputFilter) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateFileOutputFilter)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("OutputFilter.implementation", "File_Output_Filter");
|
configuration->set_property("OutputFilter.implementation", "File_Output_Filter");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
@@ -516,11 +511,11 @@ TEST(GNSS_Block_Factory_Test, InstantiateFileOutputFilter) {
|
|||||||
delete output_filter;
|
delete output_filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GNSS_Block_Factory_Test, InstantiateWrongOutputFilter) {
|
|
||||||
|
TEST(GNSS_Block_Factory_Test, InstantiateWrongOutputFilter)
|
||||||
|
{
|
||||||
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
InMemoryConfiguration *configuration = new InMemoryConfiguration();
|
||||||
|
|
||||||
configuration->set_property("OutputFilter.implementation", "Pepito");
|
configuration->set_property("OutputFilter.implementation", "Pepito");
|
||||||
|
|
||||||
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
gr_msg_queue_sptr queue = gr_make_msg_queue(0);
|
||||||
|
|
||||||
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
GNSSBlockFactory *factory = new GNSSBlockFactory();
|
||||||
|
|||||||
@@ -40,18 +40,19 @@
|
|||||||
#include <gnuradio/gr_sig_source_c.h>
|
#include <gnuradio/gr_sig_source_c.h>
|
||||||
#include <gnuradio/gr_msg_queue.h>
|
#include <gnuradio/gr_msg_queue.h>
|
||||||
#include <gnuradio/gr_null_sink.h>
|
#include <gnuradio/gr_null_sink.h>
|
||||||
|
|
||||||
#include "gnss_block_factory.h"
|
#include "gnss_block_factory.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#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 "gps_l1_ca_pcps_acquisition.h"
|
#include "gps_l1_ca_pcps_acquisition.h"
|
||||||
|
|
||||||
class GpsL1CaPcpsAcquisitionTest: public ::testing::Test {
|
|
||||||
|
class GpsL1CaPcpsAcquisitionTest: public ::testing::Test
|
||||||
|
{
|
||||||
protected:
|
protected:
|
||||||
GpsL1CaPcpsAcquisitionTest() {
|
GpsL1CaPcpsAcquisitionTest()
|
||||||
|
{
|
||||||
queue = gr_make_msg_queue(0);
|
queue = gr_make_msg_queue(0);
|
||||||
top_block = gr_make_top_block("Acquisition test");
|
top_block = gr_make_top_block("Acquisition test");
|
||||||
factory = new GNSSBlockFactory();
|
factory = new GNSSBlockFactory();
|
||||||
@@ -61,7 +62,8 @@ protected:
|
|||||||
message = 0;
|
message = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
~GpsL1CaPcpsAcquisitionTest() {
|
~GpsL1CaPcpsAcquisitionTest()
|
||||||
|
{
|
||||||
delete factory;
|
delete factory;
|
||||||
delete config;
|
delete config;
|
||||||
}
|
}
|
||||||
@@ -83,8 +85,9 @@ protected:
|
|||||||
boost::thread ch_thread;
|
boost::thread ch_thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
void GpsL1CaPcpsAcquisitionTest::init(){
|
|
||||||
|
|
||||||
|
void GpsL1CaPcpsAcquisitionTest::init()
|
||||||
|
{
|
||||||
gnss_synchro.Channel_ID = 0;
|
gnss_synchro.Channel_ID = 0;
|
||||||
gnss_synchro.System = 'G';
|
gnss_synchro.System = 'G';
|
||||||
std::string signal = "1C";
|
std::string signal = "1C";
|
||||||
@@ -101,9 +104,9 @@ void GpsL1CaPcpsAcquisitionTest::init(){
|
|||||||
config->set_property("Acquisition.doppler_max", "7200");
|
config->set_property("Acquisition.doppler_max", "7200");
|
||||||
config->set_property("Acquisition.doppler_step", "600");
|
config->set_property("Acquisition.doppler_step", "600");
|
||||||
config->set_property("Acquisition.repeat_satellite", "false");
|
config->set_property("Acquisition.repeat_satellite", "false");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaPcpsAcquisitionTest::start_queue()
|
void GpsL1CaPcpsAcquisitionTest::start_queue()
|
||||||
{
|
{
|
||||||
ch_thread = boost::thread(&GpsL1CaPcpsAcquisitionTest::wait_message, this);
|
ch_thread = boost::thread(&GpsL1CaPcpsAcquisitionTest::wait_message, this);
|
||||||
@@ -119,22 +122,20 @@ void GpsL1CaPcpsAcquisitionTest::wait_message()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaPcpsAcquisitionTest::stop_queue()
|
void GpsL1CaPcpsAcquisitionTest::stop_queue()
|
||||||
{
|
{
|
||||||
stop = true;
|
stop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST_F(GpsL1CaPcpsAcquisitionTest, Instantiate)
|
TEST_F(GpsL1CaPcpsAcquisitionTest, Instantiate)
|
||||||
{
|
{
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
GpsL1CaPcpsAcquisition *acquisition = new GpsL1CaPcpsAcquisition(config, "Acquisition", 1, 1, queue);
|
GpsL1CaPcpsAcquisition *acquisition = new GpsL1CaPcpsAcquisition(config, "Acquisition", 1, 1, queue);
|
||||||
|
|
||||||
delete acquisition;
|
delete acquisition;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun)
|
TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun)
|
||||||
|
|||||||
Reference in New Issue
Block a user