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:
commit
3479c9d674
@ -76,6 +76,7 @@ endif(ENABLE_PACKAGING)
|
||||
|
||||
# Testing
|
||||
option(ENABLE_UNIT_TESTING "Build unit tests" ON)
|
||||
option(ENABLE_UNIT_TESTING_MINIMAL "Build a minimal set of unit tests" OFF)
|
||||
option(ENABLE_UNIT_TESTING_EXTRA "Download external files and build extra unit tests" OFF)
|
||||
option(ENABLE_SYSTEM_TESTING "Build system tests" OFF)
|
||||
option(ENABLE_SYSTEM_TESTING_EXTRA "Download external tools and build extra system tests" OFF)
|
||||
|
@ -171,6 +171,10 @@ if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15" )
|
||||
add_definitions( -DGR_GREATER_38=1 )
|
||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15" )
|
||||
|
||||
if(ENABLE_UNIT_TESTING_MINIMAL)
|
||||
add_definitions(-DUNIT_TESTING_MINIMAL=1)
|
||||
endif(ENABLE_UNIT_TESTING_MINIMAL)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Optional generator
|
||||
|
@ -69,6 +69,21 @@ using google::LogMessage;
|
||||
|
||||
DECLARE_string(log_dir);
|
||||
|
||||
#if UNIT_TESTING_MINIMAL
|
||||
|
||||
#include "unit-tests/arithmetic/matio_test.cc"
|
||||
#if EXTRA_TESTS
|
||||
#include "unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc"
|
||||
#include "unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc"
|
||||
#if ENABLE_FPGA
|
||||
#include "unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc"
|
||||
#endif
|
||||
#include "unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc"
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#include "unit-tests/arithmetic/complex_carrier_test.cc"
|
||||
#include "unit-tests/arithmetic/conjugate_test.cc"
|
||||
#include "unit-tests/arithmetic/magnitude_squared_test.cc"
|
||||
@ -163,6 +178,7 @@ DECLARE_string(log_dir);
|
||||
#include "unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc"
|
||||
#endif
|
||||
|
||||
#endif // UNIT_TESTING_MINIMAL
|
||||
|
||||
// For GPS NAVIGATION (L1)
|
||||
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
||||
|
@ -37,6 +37,10 @@
|
||||
#include "glonass_l2_ca_pcps_acquisition.h"
|
||||
#include "gps_l2_m_pcps_acquisition.h"
|
||||
#include "gps_l5i_pcps_acquisition.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "file_configuration.h"
|
||||
#include "gnss_sdr_valve.h"
|
||||
#include "acquisition_dump_reader.h"
|
||||
#include "display.h"
|
||||
#include "gnuplot_i.h"
|
||||
#include "signal_generator_flags.h"
|
||||
@ -45,6 +49,8 @@
|
||||
#include "true_observables_reader.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <gnuradio/blocks/skiphead.h>
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
set(SIGNAL_PROCESSING_TESTING_LIB_SOURCES
|
||||
acquisition_dump_reader.cc
|
||||
acquisition_msg_rx.cc
|
||||
tracking_dump_reader.cc
|
||||
tlm_dump_reader.cc
|
||||
observables_dump_reader.cc
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*!
|
||||
* \file acquisition_msg_rx.cc
|
||||
* \brief This is a helper class to catch the asynchronous messages
|
||||
* emitted by an acquisition block.
|
||||
* \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.cat
|
||||
*
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "acquisition_msg_rx.h"
|
||||
#include <cstdint>
|
||||
#include <boost/bind.hpp>
|
||||
#include <gflags/gflags.h>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
Acquisition_msg_rx_sptr Acquisition_msg_rx_make()
|
||||
{
|
||||
return Acquisition_msg_rx_sptr(new Acquisition_msg_rx());
|
||||
}
|
||||
|
||||
|
||||
void Acquisition_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
rx_message = message;
|
||||
top_block->stop(); // stop the flowgraph
|
||||
}
|
||||
catch (boost::bad_any_cast& e)
|
||||
{
|
||||
LOG(WARNING) << "msg_handler_acquisition Bad cast!\n";
|
||||
rx_message = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Acquisition_msg_rx::Acquisition_msg_rx() : gr::block("Acquisition_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_in(pmt::mp("events"));
|
||||
this->set_msg_handler(pmt::mp("events"), boost::bind(&Acquisition_msg_rx::msg_handler_events, this, _1));
|
||||
rx_message = 0;
|
||||
}
|
||||
|
||||
|
||||
Acquisition_msg_rx::~Acquisition_msg_rx() {}
|
@ -0,0 +1,62 @@
|
||||
/*!
|
||||
* \file acquisition_msg_rx.h
|
||||
* \brief This is a helper class to catch the asynchronous messages
|
||||
* emitted by an acquisition block.
|
||||
* \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.cat
|
||||
*
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_ACQUISITION_MSG_RX_H
|
||||
#define GNSS_SDR_ACQUISITION_MSG_RX_H
|
||||
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
#include <pmt/pmt.h>
|
||||
|
||||
// ######## GNURADIO ACQUISITION BLOCK MESSAGE RECEVER #########
|
||||
class Acquisition_msg_rx;
|
||||
|
||||
typedef boost::shared_ptr<Acquisition_msg_rx> Acquisition_msg_rx_sptr;
|
||||
|
||||
Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
|
||||
|
||||
|
||||
class Acquisition_msg_rx : public gr::block
|
||||
{
|
||||
private:
|
||||
friend Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
|
||||
void msg_handler_events(pmt::pmt_t msg);
|
||||
Acquisition_msg_rx();
|
||||
|
||||
public:
|
||||
int rx_message;
|
||||
gr::top_block_sptr top_block;
|
||||
~Acquisition_msg_rx(); //!< Default destructor
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -49,6 +49,15 @@
|
||||
#include "gnss_satellite.h"
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "acquisition_msg_rx.h"
|
||||
#include "gps_l1_ca_pcps_acquisition.h"
|
||||
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
||||
#include "galileo_e5a_pcps_acquisition.h"
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf.h"
|
||||
#include "glonass_l1_ca_pcps_acquisition.h"
|
||||
#include "glonass_l2_ca_pcps_acquisition.h"
|
||||
#include "gps_l2_m_pcps_acquisition.h"
|
||||
#include "gps_l5i_pcps_acquisition.h"
|
||||
#include "tracking_interface.h"
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
@ -30,24 +30,14 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <chrono>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <armadillo>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/blocks/skiphead.h>
|
||||
#include <gnuradio/blocks/head.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_block_factory.h"
|
||||
#include "tracking_interface.h"
|
||||
#include "gps_l2_m_pcps_acquisition.h"
|
||||
#include "gps_l1_ca_pcps_acquisition.h"
|
||||
#include "gps_l1_ca_pcps_acquisition_fine_doppler.h"
|
||||
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf.h"
|
||||
#include "galileo_e5a_pcps_acquisition.h"
|
||||
#include "gps_l5i_pcps_acquisition.h"
|
||||
@ -58,61 +48,21 @@
|
||||
#include "gnuplot_i.h"
|
||||
#include "test_flags.h"
|
||||
#include "tracking_tests_flags.h"
|
||||
#include "acquisition_msg_rx.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/blocks/skiphead.h>
|
||||
#include <gnuradio/blocks/head.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <armadillo>
|
||||
|
||||
|
||||
// ######## GNURADIO ACQUISITION BLOCK MESSAGE RECEVER #########
|
||||
class Acquisition_msg_rx;
|
||||
|
||||
typedef boost::shared_ptr<Acquisition_msg_rx> Acquisition_msg_rx_sptr;
|
||||
|
||||
Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
|
||||
|
||||
|
||||
class Acquisition_msg_rx : public gr::block
|
||||
{
|
||||
private:
|
||||
friend Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
|
||||
void msg_handler_events(pmt::pmt_t msg);
|
||||
Acquisition_msg_rx();
|
||||
|
||||
public:
|
||||
int rx_message;
|
||||
gr::top_block_sptr top_block;
|
||||
~Acquisition_msg_rx(); //!< Default destructor
|
||||
};
|
||||
|
||||
|
||||
Acquisition_msg_rx_sptr Acquisition_msg_rx_make()
|
||||
{
|
||||
return Acquisition_msg_rx_sptr(new Acquisition_msg_rx());
|
||||
}
|
||||
|
||||
|
||||
void Acquisition_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
rx_message = message;
|
||||
top_block->stop(); //stop the flowgraph
|
||||
}
|
||||
catch (boost::bad_any_cast& e)
|
||||
{
|
||||
LOG(WARNING) << "msg_handler_acquisition Bad cast!\n";
|
||||
rx_message = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Acquisition_msg_rx::Acquisition_msg_rx() : gr::block("Acquisition_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_in(pmt::mp("events"));
|
||||
this->set_msg_handler(pmt::mp("events"), boost::bind(&Acquisition_msg_rx::msg_handler_events, this, _1));
|
||||
rx_message = 0;
|
||||
}
|
||||
|
||||
|
||||
Acquisition_msg_rx::~Acquisition_msg_rx() {}
|
||||
// ######## GNURADIO TRACKING BLOCK MESSAGE RECEVER #########
|
||||
class TrackingPullInTest_msg_rx;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user