mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-26 15:12:51 +00:00
Fix execution of extra tests in some environments
and some code cleaning
This commit is contained in:
parent
0db1ecce32
commit
f8adffe5c2
@ -279,7 +279,7 @@ if(ENABLE_UNIT_TESTING)
|
|||||||
signal_generator_blocks
|
signal_generator_blocks
|
||||||
signal_generator_adapters
|
signal_generator_adapters
|
||||||
pvt_gr_blocks
|
pvt_gr_blocks
|
||||||
signak_processing_testing_lib
|
signal_processing_testing_lib
|
||||||
${VOLK_GNSSSDR_LIBRARIES}
|
${VOLK_GNSSSDR_LIBRARIES}
|
||||||
${GNSS_SDR_TEST_OPTIONAL_LIBS}
|
${GNSS_SDR_TEST_OPTIONAL_LIBS}
|
||||||
)
|
)
|
||||||
|
@ -53,14 +53,6 @@
|
|||||||
#include "signal_generator_flags.h"
|
#include "signal_generator_flags.h"
|
||||||
|
|
||||||
|
|
||||||
DECLARE_string(generator_binary);
|
|
||||||
DECLARE_string(rinex_nav_file);
|
|
||||||
DECLARE_int32(duration);
|
|
||||||
DECLARE_string(static_position);
|
|
||||||
DECLARE_string(dynamic_position);
|
|
||||||
DECLARE_string(filename_rinex_obs);
|
|
||||||
DECLARE_string(filename_raw_data);
|
|
||||||
|
|
||||||
// For GPS NAVIGATION (L1)
|
// For GPS NAVIGATION (L1)
|
||||||
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
||||||
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||||
|
@ -32,6 +32,6 @@ include_directories(
|
|||||||
|
|
||||||
file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
|
file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
|
||||||
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
|
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
|
||||||
add_library(signak_processing_testing_lib ${SIGNAL_PROCESSING_TESTING_LIB_SOURCES} ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
add_library(signal_processing_testing_lib ${SIGNAL_PROCESSING_TESTING_LIB_SOURCES} ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
||||||
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
|
||||||
|
|
||||||
|
@ -28,16 +28,16 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_tlm_dump_reader_H
|
#ifndef GNSS_SDR_TLM_DUMP_READER_H
|
||||||
#define GNSS_SDR_tlm_dump_reader_H
|
#define GNSS_SDR_TLM_DUMP_READER_H
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class tlm_dump_reader {
|
class tlm_dump_reader
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
~tlm_dump_reader();
|
~tlm_dump_reader();
|
||||||
bool read_binary_obs();
|
bool read_binary_obs();
|
||||||
@ -51,10 +51,8 @@ public:
|
|||||||
double d_TOW_at_Preamble;
|
double d_TOW_at_Preamble;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::string d_dump_filename;
|
std::string d_dump_filename;
|
||||||
std::ifstream d_dump_file;
|
std::ifstream d_dump_file;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //GNSS_SDR_tlm_dump_reader_H
|
#endif //GNSS_SDR_TLM_DUMP_READER_H
|
||||||
|
@ -113,7 +113,9 @@ bool tracking_dump_reader::open_obs_file(std::string out_file)
|
|||||||
std::cout << "Problem opening Tracking dump Log file: " << d_dump_filename.c_str() << std::endl;
|
std::cout << "Problem opening Tracking dump Log file: " << d_dump_filename.c_str() << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,16 +28,16 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_tracking_dump_reader_H
|
#ifndef GNSS_SDR_TRACKING_DUMP_READER_H
|
||||||
#define GNSS_SDR_tracking_dump_reader_H
|
#define GNSS_SDR_TRACKING_DUMP_READER_H
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class tracking_dump_reader {
|
class tracking_dump_reader
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
~tracking_dump_reader();
|
~tracking_dump_reader();
|
||||||
bool read_binary_obs();
|
bool read_binary_obs();
|
||||||
@ -80,10 +80,8 @@ public:
|
|||||||
double aux2;
|
double aux2;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::string d_dump_filename;
|
std::string d_dump_filename;
|
||||||
std::ifstream d_dump_file;
|
std::ifstream d_dump_file;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //GNSS_SDR_tracking_dump_reader_H
|
#endif //GNSS_SDR_TRACKING_DUMP_READER_H
|
||||||
|
@ -28,16 +28,16 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_tracking_true_obs_reader_H
|
#ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H
|
||||||
#define GNSS_SDR_tracking_true_obs_reader_H
|
#define GNSS_SDR_TRACKING_TRUE_OBS_READER_H
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class tracking_true_obs_reader {
|
class tracking_true_obs_reader
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
~tracking_true_obs_reader();
|
~tracking_true_obs_reader();
|
||||||
bool read_binary_obs();
|
bool read_binary_obs();
|
||||||
@ -53,10 +53,8 @@ public:
|
|||||||
double tow;
|
double tow;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::string d_dump_filename;
|
std::string d_dump_filename;
|
||||||
std::ifstream d_dump_file;
|
std::ifstream d_dump_file;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //GNSS_SDR_tracking_true_obs_reader_H
|
#endif //GNSS_SDR_RACKING_TRUE_OBS_READER_H
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include <gnuradio/blocks/file_source.h>
|
#include <gnuradio/blocks/file_source.h>
|
||||||
#include <gnuradio/analog/sig_source_waveform.h>
|
#include <gnuradio/analog/sig_source_waveform.h>
|
||||||
#include <gnuradio/analog/sig_source_c.h>
|
#include <gnuradio/analog/sig_source_c.h>
|
||||||
#include <gnuradio/msg_queue.h>
|
|
||||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||||
#include <gnuradio/blocks/null_sink.h>
|
#include <gnuradio/blocks/null_sink.h>
|
||||||
#include <gnuradio/blocks/skiphead.h>
|
#include <gnuradio/blocks/skiphead.h>
|
||||||
@ -64,15 +63,6 @@
|
|||||||
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
|
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
|
||||||
#include "signal_generator_flags.h"
|
#include "signal_generator_flags.h"
|
||||||
|
|
||||||
DECLARE_string(generator_binary);
|
|
||||||
DECLARE_string(rinex_nav_file);
|
|
||||||
DECLARE_int32(duration); // 20
|
|
||||||
DECLARE_int32(fs_gen_hz);
|
|
||||||
DECLARE_string(static_position);
|
|
||||||
DECLARE_string(dynamic_position);
|
|
||||||
DECLARE_string(filename_rinex_obs);
|
|
||||||
DECLARE_string(filename_raw_data);
|
|
||||||
DECLARE_int32(test_satellite_PRN);
|
|
||||||
|
|
||||||
// ######## GNURADIO BLOCK MESSAGE RECEVER FOR TRACKING MESSAGES #########
|
// ######## GNURADIO BLOCK MESSAGE RECEVER FOR TRACKING MESSAGES #########
|
||||||
class GpsL1CADllPllTelemetryDecoderTest_msg_rx;
|
class GpsL1CADllPllTelemetryDecoderTest_msg_rx;
|
||||||
@ -218,7 +208,6 @@ public:
|
|||||||
|
|
||||||
void configure_receiver();
|
void configure_receiver();
|
||||||
|
|
||||||
gr::msg_queue::sptr queue;
|
|
||||||
gr::top_block_sptr top_block;
|
gr::top_block_sptr top_block;
|
||||||
std::shared_ptr<GNSSBlockFactory> factory;
|
std::shared_ptr<GNSSBlockFactory> factory;
|
||||||
std::shared_ptr<InMemoryConfiguration> config;
|
std::shared_ptr<InMemoryConfiguration> config;
|
||||||
@ -329,7 +318,6 @@ void GpsL1CATelemetryDecoderTest::check_results(arma::vec true_time_s,
|
|||||||
|
|
||||||
TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults)
|
TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Configure the signal generator
|
// Configure the signal generator
|
||||||
configure_generator();
|
configure_generator();
|
||||||
|
|
||||||
@ -356,8 +344,6 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults)
|
|||||||
};
|
};
|
||||||
}) << "Failure opening true observables file" << std::endl;
|
}) << "Failure opening true observables file" << std::endl;
|
||||||
|
|
||||||
|
|
||||||
queue = gr::msg_queue::make(0);
|
|
||||||
top_block = gr::make_top_block("Telemetry_Decoder test");
|
top_block = gr::make_top_block("Telemetry_Decoder test");
|
||||||
std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllTracking>(config.get(), "Tracking_1C", 1, 1);
|
std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllTracking>(config.get(), "Tracking_1C", 1, 1);
|
||||||
//std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllCAidTracking>(config.get(), "Tracking_1C", 1, 1);
|
//std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllCAidTracking>(config.get(), "Tracking_1C", 1, 1);
|
||||||
@ -442,7 +428,6 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults)
|
|||||||
epoch_counter++;
|
epoch_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//load the measured values
|
//load the measured values
|
||||||
tlm_dump_reader tlm_dump;
|
tlm_dump_reader tlm_dump;
|
||||||
ASSERT_NO_THROW({
|
ASSERT_NO_THROW({
|
||||||
@ -466,7 +451,6 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults)
|
|||||||
tlm_TOW_at_Preamble(epoch_counter) = tlm_dump.d_TOW_at_Preamble;
|
tlm_TOW_at_Preamble(epoch_counter) = tlm_dump.d_TOW_at_Preamble;
|
||||||
tlm_tow_s(epoch_counter) = tlm_dump.TOW_at_current_symbol;
|
tlm_tow_s(epoch_counter) = tlm_dump.TOW_at_current_symbol;
|
||||||
epoch_counter++;
|
epoch_counter++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Cut measurement initial transitory of the measurements
|
//Cut measurement initial transitory of the measurements
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
* \file gps_l1_ca_dll_pll_tracking_test.cc
|
* \file gps_l1_ca_dll_pll_tracking_test.cc
|
||||||
* \brief This class implements a tracking test for Galileo_E5a_DLL_PLL_Tracking
|
* \brief This class implements a tracking test for Galileo_E5a_DLL_PLL_Tracking
|
||||||
* implementation based on some input parameters.
|
* implementation based on some input parameters.
|
||||||
* \author Javier Arribas, 2015. jarribas(at)cttc.es
|
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2012-2017 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -39,11 +39,11 @@
|
|||||||
#include <gnuradio/blocks/file_source.h>
|
#include <gnuradio/blocks/file_source.h>
|
||||||
#include <gnuradio/analog/sig_source_waveform.h>
|
#include <gnuradio/analog/sig_source_waveform.h>
|
||||||
#include <gnuradio/analog/sig_source_c.h>
|
#include <gnuradio/analog/sig_source_c.h>
|
||||||
#include <gnuradio/msg_queue.h>
|
|
||||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||||
#include <gnuradio/blocks/null_sink.h>
|
#include <gnuradio/blocks/null_sink.h>
|
||||||
#include <gnuradio/blocks/skiphead.h>
|
#include <gnuradio/blocks/skiphead.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "gnss_block_factory.h"
|
#include "gnss_block_factory.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
@ -55,15 +55,6 @@
|
|||||||
#include "tracking_dump_reader.h"
|
#include "tracking_dump_reader.h"
|
||||||
#include "signal_generator_flags.h"
|
#include "signal_generator_flags.h"
|
||||||
|
|
||||||
DECLARE_string(generator_binary);
|
|
||||||
DECLARE_string(rinex_nav_file);
|
|
||||||
DECLARE_int32(duration);
|
|
||||||
DECLARE_int32(fs_gen_hz);
|
|
||||||
DECLARE_string(static_position);
|
|
||||||
DECLARE_string(dynamic_position);
|
|
||||||
DECLARE_string(filename_rinex_obs);
|
|
||||||
DECLARE_string(filename_raw_data);
|
|
||||||
DECLARE_int32(test_satellite_PRN);
|
|
||||||
|
|
||||||
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
||||||
class GpsL1CADllPllTrackingTest_msg_rx;
|
class GpsL1CADllPllTrackingTest_msg_rx;
|
||||||
@ -82,7 +73,6 @@ private:
|
|||||||
public:
|
public:
|
||||||
int rx_message;
|
int rx_message;
|
||||||
~GpsL1CADllPllTrackingTest_msg_rx(); //!< Default destructor
|
~GpsL1CADllPllTrackingTest_msg_rx(); //!< Default destructor
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GpsL1CADllPllTrackingTest_msg_rx_sptr GpsL1CADllPllTrackingTest_msg_rx_make()
|
GpsL1CADllPllTrackingTest_msg_rx_sptr GpsL1CADllPllTrackingTest_msg_rx_make()
|
||||||
@ -163,7 +153,6 @@ public:
|
|||||||
|
|
||||||
void configure_receiver();
|
void configure_receiver();
|
||||||
|
|
||||||
gr::msg_queue::sptr queue;
|
|
||||||
gr::top_block_sptr top_block;
|
gr::top_block_sptr top_block;
|
||||||
std::shared_ptr<GNSSBlockFactory> factory;
|
std::shared_ptr<GNSSBlockFactory> factory;
|
||||||
std::shared_ptr<InMemoryConfiguration> config;
|
std::shared_ptr<InMemoryConfiguration> config;
|
||||||
@ -334,6 +323,7 @@ void GpsL1CADllPllTrackingTest::check_results_codephase(arma::vec true_time_s,
|
|||||||
<< ", stdev=" << sqrt(error_var) << " (max,min)=" << max_error << "," << min_error << " [Chips]" << std::endl;
|
<< ", stdev=" << sqrt(error_var) << " (max,min)=" << max_error << "," << min_error << " [Chips]" << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
||||||
{
|
{
|
||||||
// Configure the signal generator
|
// Configure the signal generator
|
||||||
@ -362,8 +352,6 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
|||||||
};
|
};
|
||||||
}) << "Failure opening true observables file" << std::endl;
|
}) << "Failure opening true observables file" << std::endl;
|
||||||
|
|
||||||
|
|
||||||
queue = gr::msg_queue::make(0);
|
|
||||||
top_block = gr::make_top_block("Tracking test");
|
top_block = gr::make_top_block("Tracking test");
|
||||||
std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllTracking>(config.get(), "Tracking_1C", 1, 1);
|
std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllTracking>(config.get(), "Tracking_1C", 1, 1);
|
||||||
//std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllCAidTracking>(config.get(), "Tracking_1C", 1, 1);
|
//std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL1CaDllPllCAidTracking>(config.get(), "Tracking_1C", 1, 1);
|
||||||
@ -442,7 +430,6 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
|||||||
epoch_counter++;
|
epoch_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//load the measured values
|
//load the measured values
|
||||||
tracking_dump_reader trk_dump;
|
tracking_dump_reader trk_dump;
|
||||||
ASSERT_NO_THROW({
|
ASSERT_NO_THROW({
|
||||||
@ -460,7 +447,6 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
|||||||
arma::vec trk_Doppler_Hz = arma::zeros(nepoch, 1);
|
arma::vec trk_Doppler_Hz = arma::zeros(nepoch, 1);
|
||||||
arma::vec trk_prn_delay_chips = arma::zeros(nepoch, 1);
|
arma::vec trk_prn_delay_chips = arma::zeros(nepoch, 1);
|
||||||
|
|
||||||
|
|
||||||
epoch_counter = 0;
|
epoch_counter = 0;
|
||||||
while(trk_dump.read_binary_obs())
|
while(trk_dump.read_binary_obs())
|
||||||
{
|
{
|
||||||
@ -474,12 +460,9 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults)
|
|||||||
|
|
||||||
trk_prn_delay_chips(epoch_counter) = delay_chips;
|
trk_prn_delay_chips(epoch_counter) = delay_chips;
|
||||||
epoch_counter++;
|
epoch_counter++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Align initial measurements and cut the tracking pull-in transitory
|
//Align initial measurements and cut the tracking pull-in transitory
|
||||||
|
|
||||||
double pull_in_offset_s = 1.0;
|
double pull_in_offset_s = 1.0;
|
||||||
arma::uvec initial_meas_point = arma::find(trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first");
|
arma::uvec initial_meas_point = arma::find(trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user