diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index d04fa0cb5..879dd9cba 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -26,6 +26,7 @@ set(PVT_LIB_SOURCES rinex_printer.cc nmea_printer.cc rtcm_printer.cc + rtcm.cc geojson_printer.cc rtklib_solver.cc pvt_conf.cc @@ -41,6 +42,7 @@ set(PVT_LIB_HEADERS rinex_printer.h nmea_printer.h rtcm_printer.h + rtcm.h geojson_printer.h rtklib_solver.h pvt_conf.h @@ -59,10 +61,10 @@ target_link_libraries(pvt_libs PUBLIC Armadillo::armadillo Boost::date_time - algorithms_libs algorithms_libs_rtklib core_system_parameters PRIVATE + algorithms_libs Boost::filesystem Boost::system Gflags::gflags @@ -72,13 +74,20 @@ target_link_libraries(pvt_libs target_include_directories(pvt_libs PUBLIC - ${CMAKE_SOURCE_DIR}/src/algorithms/libs - ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib ${CMAKE_SOURCE_DIR}/src/core/receiver ) target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}") +if(OS_IS_MACOSX) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang + target_compile_definitions(pvt_libs + PUBLIC + -DBOOST_ASIO_HAS_STD_STRING_VIEW + ) + endif() +endif() + if(ENABLE_CLANG_TIDY) if(CLANG_TIDY_EXE) set_target_properties(pvt_libs diff --git a/src/algorithms/libs/rtcm.cc b/src/algorithms/PVT/libs/rtcm.cc similarity index 99% rename from src/algorithms/libs/rtcm.cc rename to src/algorithms/PVT/libs/rtcm.cc index 6e3b858c0..177ea25f6 100644 --- a/src/algorithms/libs/rtcm.cc +++ b/src/algorithms/PVT/libs/rtcm.cc @@ -40,7 +40,6 @@ #include // for std::fmod #include // for strtol #include // for std::stringstream -#include Rtcm::Rtcm(uint16_t port) diff --git a/src/algorithms/libs/rtcm.h b/src/algorithms/PVT/libs/rtcm.h similarity index 99% rename from src/algorithms/libs/rtcm.h rename to src/algorithms/PVT/libs/rtcm.h index 9196a0968..6fd9208af 100644 --- a/src/algorithms/libs/rtcm.h +++ b/src/algorithms/PVT/libs/rtcm.h @@ -43,7 +43,9 @@ #include #include #include +#include // for size_t #include +#include // for memcpy #include #include #include diff --git a/src/algorithms/channel/adapters/CMakeLists.txt b/src/algorithms/channel/adapters/CMakeLists.txt index 7bf49e73d..7f439ce56 100644 --- a/src/algorithms/channel/adapters/CMakeLists.txt +++ b/src/algorithms/channel/adapters/CMakeLists.txt @@ -30,6 +30,7 @@ target_link_libraries(channel_adapters PUBLIC Gnuradio::runtime channel_libs + core_system_parameters PRIVATE Gflags::gflags Glog::glog diff --git a/src/algorithms/channel/adapters/channel.cc b/src/algorithms/channel/adapters/channel.cc index 976a957e8..a6f0bba1c 100644 --- a/src/algorithms/channel/adapters/channel.cc +++ b/src/algorithms/channel/adapters/channel.cc @@ -31,12 +31,13 @@ #include "channel.h" #include "acquisition_interface.h" +#include "channel_fsm.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" #include "telemetry_decoder_interface.h" #include "tracking_interface.h" #include -#include +#include // for memcpy #include @@ -204,8 +205,7 @@ void Channel::stop_channel() LOG(WARNING) << "Invalid channel event"; return; } - DLOG(INFO) - << "Channel stop_channel()"; + DLOG(INFO) << "Channel stop_channel()"; } diff --git a/src/algorithms/channel/adapters/channel.h b/src/algorithms/channel/adapters/channel.h index ce554784a..81030fd51 100644 --- a/src/algorithms/channel/adapters/channel.h +++ b/src/algorithms/channel/adapters/channel.h @@ -35,7 +35,6 @@ #ifndef GNSS_SDR_CHANNEL_H_ #define GNSS_SDR_CHANNEL_H_ -#include "channel_fsm.h" #include "channel_interface.h" #include "channel_msg_receiver_cc.h" #include "gnss_signal.h" @@ -52,6 +51,7 @@ class ConfigurationInterface; class AcquisitionInterface; class TrackingInterface; class TelemetryDecoderInterface; +class ChannelFsm; /*! * \brief This class represents a GNSS channel. It wraps an AcquisitionInterface, diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt index 78878897b..4e2a1962b 100644 --- a/src/algorithms/libs/CMakeLists.txt +++ b/src/algorithms/libs/CMakeLists.txt @@ -40,7 +40,6 @@ set(GNSS_SPLIBS_SOURCES conjugate_ic.cc gnss_sdr_create_directory.cc geofunctions.cc - rtcm.cc ) set(GNSS_SPLIBS_HEADERS @@ -66,7 +65,6 @@ set(GNSS_SPLIBS_HEADERS gnss_sdr_create_directory.h gnss_circular_deque.h geofunctions.h - rtcm.h ) if(ENABLE_FPGA) @@ -114,20 +112,18 @@ target_link_libraries(algorithms_libs Gflags::gflags Gnuradio::runtime Gnuradio::blocks - Volk::volk ${ORC_LIBRARIES} - Volkgnsssdr::volkgnsssdr - core_system_parameters ${OPT_LIBRARIES} PRIVATE + core_system_parameters + Volk::volk ${ORC_LIBRARIES} + Volkgnsssdr::volkgnsssdr Boost::filesystem - Gflags::gflags Glog::glog ) target_include_directories(algorithms_libs PUBLIC ${CMAKE_SOURCE_DIR}/src/core/interfaces - ${CMAKE_SOURCE_DIR}/src/core/receiver ) target_compile_definitions(algorithms_libs @@ -139,15 +135,6 @@ set_property(TARGET algorithms_libs $ ) -if(OS_IS_MACOSX) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang - target_compile_definitions(algorithms_libs - PUBLIC - -DBOOST_ASIO_HAS_STD_STRING_VIEW - ) - endif() -endif() - if(ENABLE_CLANG_TIDY) if(CLANG_TIDY_EXE) set_target_properties(algorithms_libs diff --git a/src/algorithms/libs/byte_x2_to_complex_byte.cc b/src/algorithms/libs/byte_x2_to_complex_byte.cc index a3a78c067..f14474959 100644 --- a/src/algorithms/libs/byte_x2_to_complex_byte.cc +++ b/src/algorithms/libs/byte_x2_to_complex_byte.cc @@ -31,7 +31,10 @@ #include "byte_x2_to_complex_byte.h" #include -#include +#include +#include // for max +#include // for complex +#include // for int8_t byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte() @@ -44,7 +47,7 @@ byte_x2_to_complex_byte::byte_x2_to_complex_byte() : sync_block("byte_x2_to_comp gr::io_signature::make(2, 2, sizeof(int8_t)), // int8_t, defined in stdint.h and included in volk.h (signed char) gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex { - const int alignment_multiple = volk_get_alignment() / sizeof(lv_8sc_t); + const int alignment_multiple = volk_gnsssdr_get_alignment() / sizeof(lv_8sc_t); set_alignment(std::max(1, alignment_multiple)); } diff --git a/src/algorithms/libs/byte_x2_to_complex_byte.h b/src/algorithms/libs/byte_x2_to_complex_byte.h index 05db6cb2d..d0a4e5dd2 100644 --- a/src/algorithms/libs/byte_x2_to_complex_byte.h +++ b/src/algorithms/libs/byte_x2_to_complex_byte.h @@ -34,6 +34,7 @@ #include #include +#include // for gr_vector_const_void_star class byte_x2_to_complex_byte; @@ -49,10 +50,9 @@ class byte_x2_to_complex_byte : public gr::sync_block { private: friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte(); - -public: byte_x2_to_complex_byte(); +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/complex_byte_to_float_x2.cc b/src/algorithms/libs/complex_byte_to_float_x2.cc index 04f4a54b2..1126ad014 100644 --- a/src/algorithms/libs/complex_byte_to_float_x2.cc +++ b/src/algorithms/libs/complex_byte_to_float_x2.cc @@ -32,6 +32,7 @@ #include "complex_byte_to_float_x2.h" #include #include +#include // for max complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2() diff --git a/src/algorithms/libs/complex_byte_to_float_x2.h b/src/algorithms/libs/complex_byte_to_float_x2.h index 170cd6033..f13859633 100644 --- a/src/algorithms/libs/complex_byte_to_float_x2.h +++ b/src/algorithms/libs/complex_byte_to_float_x2.h @@ -34,6 +34,7 @@ #include #include +#include // for gr_vector_const_void_star class complex_byte_to_float_x2; @@ -49,10 +50,9 @@ class complex_byte_to_float_x2 : public gr::sync_block { private: friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2(); - -public: complex_byte_to_float_x2(); - + +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/complex_float_to_complex_byte.cc b/src/algorithms/libs/complex_float_to_complex_byte.cc index d7106bedd..f4b9e44c0 100644 --- a/src/algorithms/libs/complex_float_to_complex_byte.cc +++ b/src/algorithms/libs/complex_float_to_complex_byte.cc @@ -32,7 +32,7 @@ #include "complex_float_to_complex_byte.h" #include #include - +#include // for max complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte() { diff --git a/src/algorithms/libs/complex_float_to_complex_byte.h b/src/algorithms/libs/complex_float_to_complex_byte.h index f8368543e..2e74ae11a 100644 --- a/src/algorithms/libs/complex_float_to_complex_byte.h +++ b/src/algorithms/libs/complex_float_to_complex_byte.h @@ -33,6 +33,8 @@ #include #include +#include // for gr_vector_const_void_star + class complex_float_to_complex_byte; @@ -47,10 +49,9 @@ class complex_float_to_complex_byte : public gr::sync_block { private: friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte(); - -public: complex_float_to_complex_byte(); - + +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/conjugate_cc.cc b/src/algorithms/libs/conjugate_cc.cc index 67077ba23..c3080ffa5 100644 --- a/src/algorithms/libs/conjugate_cc.cc +++ b/src/algorithms/libs/conjugate_cc.cc @@ -31,6 +31,7 @@ #include "conjugate_cc.h" #include #include +#include // for max conjugate_cc_sptr make_conjugate_cc() diff --git a/src/algorithms/libs/conjugate_cc.h b/src/algorithms/libs/conjugate_cc.h index 56a3ece78..6ceb32f6f 100644 --- a/src/algorithms/libs/conjugate_cc.h +++ b/src/algorithms/libs/conjugate_cc.h @@ -33,6 +33,7 @@ #include #include +#include // for gr_vector_const_void_star class conjugate_cc; @@ -48,10 +49,9 @@ class conjugate_cc : public gr::sync_block { private: friend conjugate_cc_sptr make_conjugate_cc(); - -public: conjugate_cc(); - + +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/conjugate_ic.cc b/src/algorithms/libs/conjugate_ic.cc index d3d00932e..2f2c6a81e 100644 --- a/src/algorithms/libs/conjugate_ic.cc +++ b/src/algorithms/libs/conjugate_ic.cc @@ -31,6 +31,7 @@ #include "conjugate_ic.h" #include #include +#include // for max conjugate_ic_sptr make_conjugate_ic() diff --git a/src/algorithms/libs/conjugate_ic.h b/src/algorithms/libs/conjugate_ic.h index 4acc7af3a..2ffaf9e4c 100644 --- a/src/algorithms/libs/conjugate_ic.h +++ b/src/algorithms/libs/conjugate_ic.h @@ -33,6 +33,7 @@ #include #include +#include // for gr_vector_const_void_star class conjugate_ic; @@ -48,10 +49,9 @@ class conjugate_ic : public gr::sync_block { private: friend conjugate_ic_sptr make_conjugate_ic(); - -public: conjugate_ic(); +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/conjugate_sc.cc b/src/algorithms/libs/conjugate_sc.cc index e23f1c1a4..e32c39c45 100644 --- a/src/algorithms/libs/conjugate_sc.cc +++ b/src/algorithms/libs/conjugate_sc.cc @@ -31,7 +31,7 @@ #include "conjugate_sc.h" #include #include - +#include // for max conjugate_sc_sptr make_conjugate_sc() { diff --git a/src/algorithms/libs/conjugate_sc.h b/src/algorithms/libs/conjugate_sc.h index a26b39ad7..7f1935d5c 100644 --- a/src/algorithms/libs/conjugate_sc.h +++ b/src/algorithms/libs/conjugate_sc.h @@ -33,6 +33,7 @@ #include #include +#include // for gr_vector_const_void_star class conjugate_sc; @@ -48,10 +49,9 @@ class conjugate_sc : public gr::sync_block { private: friend conjugate_sc_sptr make_conjugate_sc(); - -public: conjugate_sc(); - + +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/cshort_to_float_x2.cc b/src/algorithms/libs/cshort_to_float_x2.cc index cfde3f79c..a3e8a8a21 100644 --- a/src/algorithms/libs/cshort_to_float_x2.cc +++ b/src/algorithms/libs/cshort_to_float_x2.cc @@ -32,6 +32,7 @@ #include "cshort_to_float_x2.h" #include #include +#include // for max cshort_to_float_x2_sptr make_cshort_to_float_x2() diff --git a/src/algorithms/libs/cshort_to_float_x2.h b/src/algorithms/libs/cshort_to_float_x2.h index 87a5d89a7..74c3ab356 100644 --- a/src/algorithms/libs/cshort_to_float_x2.h +++ b/src/algorithms/libs/cshort_to_float_x2.h @@ -34,6 +34,7 @@ #include #include +#include // for gr_vector_const_void_star class cshort_to_float_x2; @@ -49,10 +50,9 @@ class cshort_to_float_x2 : public gr::sync_block { private: friend cshort_to_float_x2_sptr make_cshort_to_float_x2(); - -public: cshort_to_float_x2(); +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/pass_through.cc b/src/algorithms/libs/pass_through.cc index a64ecba18..1a517a96b 100644 --- a/src/algorithms/libs/pass_through.cc +++ b/src/algorithms/libs/pass_through.cc @@ -35,8 +35,10 @@ #include #include #include +#include // for int8_t #include // for operator<< + Pass_Through::Pass_Through(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), diff --git a/src/algorithms/libs/short_x2_to_cshort.cc b/src/algorithms/libs/short_x2_to_cshort.cc index 90ce99a7e..4561c7a46 100644 --- a/src/algorithms/libs/short_x2_to_cshort.cc +++ b/src/algorithms/libs/short_x2_to_cshort.cc @@ -31,8 +31,9 @@ #include "short_x2_to_cshort.h" #include -#include - +#include +#include // for max +#include // for complex short_x2_to_cshort_sptr make_short_x2_to_cshort() { @@ -44,7 +45,7 @@ short_x2_to_cshort::short_x2_to_cshort() : sync_block("short_x2_to_cshort", gr::io_signature::make(2, 2, sizeof(int16_t)), gr::io_signature::make(1, 1, sizeof(lv_16sc_t))) { - const int alignment_multiple = volk_get_alignment() / sizeof(lv_16sc_t); + const int alignment_multiple = volk_gnsssdr_get_alignment() / sizeof(lv_16sc_t); set_alignment(std::max(1, alignment_multiple)); } @@ -61,7 +62,6 @@ int short_x2_to_cshort::work(int noutput_items, int16_t imag_part; for (int number = 0; number < noutput_items; number++) { - // lv_cmake(r, i) defined at volk/volk_complex.h real_part = *in0++; imag_part = *in1++; *out++ = lv_cmake(real_part, imag_part); diff --git a/src/algorithms/libs/short_x2_to_cshort.h b/src/algorithms/libs/short_x2_to_cshort.h index 1591c5412..eb1c24a06 100644 --- a/src/algorithms/libs/short_x2_to_cshort.h +++ b/src/algorithms/libs/short_x2_to_cshort.h @@ -34,6 +34,7 @@ #include #include +#include // for gr_vector_const_void_star class short_x2_to_cshort; @@ -48,10 +49,9 @@ class short_x2_to_cshort : public gr::sync_block { private: friend short_x2_to_cshort_sptr make_short_x2_to_cshort(); - -public: short_x2_to_cshort(); +public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);