From af69cba8e17611607ea9209d9d39e8caa44a62d9 Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Wed, 14 Feb 2018 10:28:31 +0100 Subject: [PATCH 01/43] Solve Log warnings when GPS PRN 32 is visible --- src/core/system_parameters/rtcm.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/system_parameters/rtcm.cc b/src/core/system_parameters/rtcm.cc index ee5204b97..32c8fec5b 100644 --- a/src/core/system_parameters/rtcm.cc +++ b/src/core/system_parameters/rtcm.cc @@ -3630,9 +3630,9 @@ int Rtcm::set_DF008(short int smoothing_interval) int Rtcm::set_DF009(const Gnss_Synchro & gnss_synchro) { unsigned int prn_ = gnss_synchro.PRN; - if(prn_ > 31) + if(prn_ > 32) { - LOG(WARNING) << "GPS satellite ID must be between 0 and 31, but PRN " << prn_ << " was found"; + LOG(WARNING) << "GPS satellite ID must be between 1 and 32, but PRN " << prn_ << " was found"; } DF009 = std::bitset<6>(prn_); return 0; @@ -3642,9 +3642,9 @@ int Rtcm::set_DF009(const Gnss_Synchro & gnss_synchro) int Rtcm::set_DF009(const Gps_Ephemeris & gps_eph) { unsigned int prn_ = gps_eph.i_satellite_PRN; - if(prn_ > 31) + if(prn_ > 32) { - LOG(WARNING) << "GPS satellite ID must be between 0 and 31, but PRN " << prn_ << " was found"; + LOG(WARNING) << "GPS satellite ID must be between 1 and 32, but PRN " << prn_ << " was found"; } DF009 = std::bitset<6>(prn_); return 0; From 2b8ab9dcee7c1c6702410d371565d4cd5c2e8b32 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 12:23:55 +0100 Subject: [PATCH 02/43] Group all flags in a single file This makes easier to document and to add new ones. Shortened version of common files have been added: -c for -config_file -s for -signal_source --- src/algorithms/PVT/libs/CMakeLists.txt | 5 +- src/algorithms/PVT/libs/ls_pvt.cc | 1 - src/algorithms/PVT/libs/nmea_printer.cc | 20 +------- src/algorithms/PVT/libs/pvt_solution.cc | 2 - src/algorithms/PVT/libs/rinex_printer.cc | 4 +- src/algorithms/PVT/libs/rtcm_printer.cc | 1 - src/algorithms/libs/CMakeLists.txt | 9 +++- src/algorithms/libs/gnss_sdr_flags.cc | 43 ++++++++++++++++ src/algorithms/libs/gnss_sdr_flags.h | 51 +++++++++++++++++++ .../adapters/file_signal_source.cc | 11 ++-- .../adapters/gn3s_signal_source.cc | 1 - .../adapters/nsr_file_signal_source.cc | 10 ++-- .../adapters/spir_file_signal_source.cc | 10 ++-- .../two_bit_cpx_file_signal_source.cc | 5 +- .../two_bit_packed_file_signal_source.cc | 8 +-- src/core/receiver/control_thread.cc | 10 +++- src/main/CMakeLists.txt | 2 + src/main/main.cc | 8 +-- src/utils/front-end-cal/CMakeLists.txt | 3 -- src/utils/front-end-cal/front_end_cal.cc | 1 - 20 files changed, 143 insertions(+), 62 deletions(-) create mode 100644 src/algorithms/libs/gnss_sdr_flags.cc create mode 100644 src/algorithms/libs/gnss_sdr_flags.h diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index 5e30040d5..96aace272 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -36,24 +36,25 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/receiver ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib ${Boost_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} ) + file(GLOB PVT_LIB_HEADERS "*.h") list(SORT PVT_LIB_HEADERS) add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS}) source_group(Headers FILES ${PVT_LIB_HEADERS}) add_dependencies(pvt_lib rtklib_lib armadillo-${armadillo_RELEASE} glog-${glog_RELEASE}) - target_link_libraries( pvt_lib rtklib_lib + gnss_sdr_flags ${Boost_LIBRARIES} - ${GFlags_LIBS} ${GLOG_LIBRARIES} ${ARMADILLO_LIBRARIES} ${BLAS} diff --git a/src/algorithms/PVT/libs/ls_pvt.cc b/src/algorithms/PVT/libs/ls_pvt.cc index b8ec551e8..91620e8ce 100644 --- a/src/algorithms/PVT/libs/ls_pvt.cc +++ b/src/algorithms/PVT/libs/ls_pvt.cc @@ -33,7 +33,6 @@ #include #include #include "GPS_L1_CA.h" -#include #include diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index b7d55d67f..5398af18b 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -38,13 +38,10 @@ #include #include #include -#include - using google::LogMessage; -//DEFINE_string(NMEA_version, "2.1", "Specifies the NMEA version (2.1)"); Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::string nmea_dump_devname) { @@ -72,8 +69,6 @@ Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::s } - - Nmea_Printer::~Nmea_Printer() { if (nmea_file_descriptor.is_open()) @@ -84,8 +79,6 @@ Nmea_Printer::~Nmea_Printer() } - - int Nmea_Printer::init_serial (std::string serial_device) { /*! @@ -123,7 +116,6 @@ int Nmea_Printer::init_serial (std::string serial_device) } - void Nmea_Printer::close_serial () { if (nmea_dev_descriptor != -1) @@ -200,7 +192,6 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr& pvt_data } - char Nmea_Printer::checkSum(std::string sentence) { char check = 0; @@ -214,7 +205,6 @@ char Nmea_Printer::checkSum(std::string sentence) } - std::string Nmea_Printer::latitude_to_hm(double lat) { bool north; @@ -253,7 +243,6 @@ std::string Nmea_Printer::latitude_to_hm(double lat) } - std::string Nmea_Printer::longitude_to_hm(double longitude) { bool east; @@ -291,7 +280,6 @@ std::string Nmea_Printer::longitude_to_hm(double longitude) } - std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time) { //UTC Time: hhmmss.sss @@ -336,7 +324,6 @@ std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_ } - std::string Nmea_Printer::get_GPRMC() { // Sample -> $GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598,*10 @@ -438,7 +425,6 @@ std::string Nmea_Printer::get_GPRMC() } - std::string Nmea_Printer::get_GPGSA() { //$GPGSA,A,3,07,02,26,27,09,04,15, , , , , ,1.8,1.0,1.5*33 @@ -523,8 +509,6 @@ std::string Nmea_Printer::get_GPGSA() } - - std::string Nmea_Printer::get_GPGSV() { // GSV-GNSS Satellites in View @@ -613,9 +597,6 @@ std::string Nmea_Printer::get_GPGSV() } - - - std::string Nmea_Printer::get_GPGGA() { //boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time(); @@ -727,3 +708,4 @@ std::string Nmea_Printer::get_GPGGA() return sentence_str.str(); //$GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A } + diff --git a/src/algorithms/PVT/libs/pvt_solution.cc b/src/algorithms/PVT/libs/pvt_solution.cc index 8b9842411..5e53dc9d0 100644 --- a/src/algorithms/PVT/libs/pvt_solution.cc +++ b/src/algorithms/PVT/libs/pvt_solution.cc @@ -32,13 +32,11 @@ #include "pvt_solution.h" #include #include "GPS_L1_CA.h" -#include #include using google::LogMessage; -DEFINE_bool(tropo, true, "Apply tropospheric correction"); Pvt_Solution::Pvt_Solution() { diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index d3ca165ac..b2dfa2a68 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -42,14 +42,12 @@ #include #include #include -#include #include +#include "gnss_sdr_flags.h" using google::LogMessage; -DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); - Rinex_Printer::Rinex_Printer(int conf_version) { diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index 9bd55b6c1..3d6a1e56b 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -37,7 +37,6 @@ #include // for O_RDWR #include // for tcgetattr #include -#include #include using google::LogMessage; diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt index 6ce1d3987..798741a3c 100644 --- a/src/algorithms/libs/CMakeLists.txt +++ b/src/algorithms/libs/CMakeLists.txt @@ -39,7 +39,6 @@ set(GNSS_SPLIBS_SOURCES conjugate_ic.cc ) - if(OPENCL_FOUND) set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES} fft_execute.cc # Needs OpenCL @@ -71,7 +70,10 @@ if(OPENCL_FOUND) endif(OS_IS_MACOSX) endif(OPENCL_FOUND) +add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}") + file(GLOB GNSS_SPLIBS_HEADERS "*.h") +list(REMOVE_ITEM GNSS_SPLIBS_HEADERS gnss_sdr_flags.h) list(SORT GNSS_SPLIBS_HEADERS) add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS}) source_group(Headers FILES ${GNSS_SPLIBS_HEADERS}) @@ -79,6 +81,7 @@ source_group(Headers FILES ${GNSS_SPLIBS_HEADERS}) target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES} ${ORC_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES} + ${GFlags_LIBS} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES} @@ -89,3 +92,7 @@ target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES} if(NOT VOLK_GNSSSDR_FOUND) add_dependencies(gnss_sp_libs volk_gnsssdr_module) endif(NOT VOLK_GNSSSDR_FOUND) + +add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h) +source_group(Headers FILES gnss_sdr_flags.h) +target_link_libraries(gnss_sdr_flags ${GFlags_LIBS}) \ No newline at end of file diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc new file mode 100644 index 000000000..3601e4c3f --- /dev/null +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -0,0 +1,43 @@ +/*! + * \file gnss_sdr_flags.cc + * \brief Helper file for gnss-sdr commandline flags + * \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.es + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-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 . + * + * ------------------------------------------------------------------------- + */ + + +#include + + +DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)"); + +DEFINE_string(s, "-", + "If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)"); + +DEFINE_string(signal_source, "-", + "If defined, path to the file containing the signal samples (overrides the configuration file)"); + +DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h new file mode 100644 index 000000000..7297d79b1 --- /dev/null +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -0,0 +1,51 @@ +/*! + * \file gnss_sdr_flags.h + * \brief Helper file for gnss-sdr commandline flags + * \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.es + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-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 . + * + * ------------------------------------------------------------------------- + */ + +#ifndef GNSS_SDR_FLAGS_H_ +#define GNSS_SDR_FLAGS_H_ + + +#include + + +DECLARE_string(c); // #include #include -#include #include -#include "gnss_sdr_valve.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" + + using google::LogMessage; -DEFINE_string(signal_source, "-", - "If defined, path to the file containing the signal samples (overrides the configuration file)"); - - FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue) : @@ -64,6 +62,7 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, // override value with commandline flag, if present if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source; + if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s; item_type_ = configuration->property(role + ".item_type", default_item_type); repeat_ = configuration->property(role + ".repeat", false); diff --git a/src/algorithms/signal_source/adapters/gn3s_signal_source.cc b/src/algorithms/signal_source/adapters/gn3s_signal_source.cc index f3f7aa8cb..17ac8513c 100644 --- a/src/algorithms/signal_source/adapters/gn3s_signal_source.cc +++ b/src/algorithms/signal_source/adapters/gn3s_signal_source.cc @@ -31,7 +31,6 @@ #include "gn3s_signal_source.h" #include #include -#include #include #include #include "configuration_interface.h" diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc index d721d4c4a..00d374d55 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc @@ -35,17 +35,14 @@ #include #include #include -#include #include -#include "gnss_sdr_valve.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" using google::LogMessage; -DEFINE_string(nsr_signal_source, "-", - "If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)"); - NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams, @@ -61,7 +58,8 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration, filename_ = configuration->property(role + ".filename", default_filename); // override value with commandline flag, if present - if (FLAGS_nsr_signal_source.compare("-") != 0) filename_= FLAGS_nsr_signal_source; + if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source; + if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s; item_type_ = configuration->property(role + ".item_type", default_item_type); repeat_ = configuration->property(role + ".repeat", false); diff --git a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc index e2e461376..3446406bb 100644 --- a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc @@ -34,17 +34,14 @@ #include #include #include -#include #include -#include "gnss_sdr_valve.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" using google::LogMessage; -DEFINE_string(spir_signal_source, "-", - "If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)"); - SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams, @@ -60,7 +57,8 @@ SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration filename_ = configuration->property(role + ".filename", default_filename); // override value with commandline flag, if present - if (FLAGS_spir_signal_source.compare("-") != 0) filename_= FLAGS_spir_signal_source; + if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source; + if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s; item_type_ = configuration->property(role + ".item_type", default_item_type); repeat_ = configuration->property(role + ".repeat", false); diff --git a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc index a797edfa4..4aa79fb12 100644 --- a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc @@ -34,8 +34,8 @@ #include #include #include -#include #include +#include "gnss_sdr_flags.h" #include "gnss_sdr_valve.h" #include "configuration_interface.h" @@ -57,7 +57,8 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con filename_ = configuration->property(role + ".filename", default_filename); // override value with commandline flag, if present - //if (FLAGS_nsr_signal_source.compare("-") != 0) filename_= FLAGS_nsr_signal_source; + if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source; + if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s; item_type_ = configuration->property(role + ".item_type", default_item_type); repeat_ = configuration->property(role + ".repeat", false); diff --git a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc index d4550d4fe..3e0712c8a 100644 --- a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc @@ -35,11 +35,12 @@ #include #include #include -#include #include +#include +#include "gnss_sdr_flags.h" #include "gnss_sdr_valve.h" #include "configuration_interface.h" -#include + using google::LogMessage; @@ -61,7 +62,8 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac filename_ = configuration->property(role + ".filename", default_filename); // override value with commandline flag, if present - //if (FLAGS_nsr_signal_source.compare("-") != 0) filename_= FLAGS_nsr_signal_source; + if (FLAGS_signal_source.compare("-") != 0) filename_= FLAGS_signal_source; + if (FLAGS_s.compare("-") != 0) filename_= FLAGS_s; item_type_ = configuration->property(role + ".item_type", default_item_type); big_endian_items_ = configuration->property(role + ".big_endian_items", true); diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 73b05651c..72b91e956 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -57,6 +57,7 @@ #include "concurrent_queue.h" #include "concurrent_map.h" #include "gnss_flowgraph.h" +#include "gnss_sdr_flags.h" #include "file_configuration.h" #include "control_message_factory.h" @@ -66,11 +67,18 @@ extern concurrent_queue global_gps_acq_assist_queue; using google::LogMessage; DEFINE_string(config_file, std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf"), - "File containing the configuration parameters"); + "Path to the configuration file"); ControlThread::ControlThread() { + if(!FLAGS_c.compare("-")) + { configuration_ = std::make_shared(FLAGS_config_file); + } + else + { + configuration_ = std::make_shared(FLAGS_c); + } delete_configuration_ = false; init(); } diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index e1c2870cb..cbacdafff 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -57,6 +57,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/libs/supl ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl + ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS} @@ -95,6 +96,7 @@ target_link_libraries(gnss-sdr ${MAC_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNSS_SDR_OPTIONAL_LIBS} gnss_sp_libs + gnss_sdr_flags gnss_rx ) diff --git a/src/main/main.cc b/src/main/main.cc index ede009fb9..af45ab3a7 100644 --- a/src/main/main.cc +++ b/src/main/main.cc @@ -8,7 +8,7 @@ * * ------------------------------------------------------------------------- * -* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors) +* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -30,6 +30,7 @@ * * ------------------------------------------------------------------------- */ + #ifndef GNSS_SDR_VERSION #define GNSS_SDR_VERSION "0.0.9" #endif @@ -44,11 +45,11 @@ #include #include #include -#include #include #include "control_thread.h" #include "concurrent_queue.h" #include "concurrent_map.h" +#include "gnss_sdr_flags.h" #if CUDA_GPU_ACCEL // For the CUDA runtime routines (prefixed with "cuda_") @@ -58,7 +59,6 @@ using google::LogMessage; -DECLARE_string(log_dir); /* * Concurrent queues that communicates the Telemetry Decoder @@ -74,7 +74,7 @@ int main(int argc, char** argv) const std::string intro_help( std::string("\nGNSS-SDR is an Open Source GNSS Software Defined Receiver\n") + - "Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)\n" + "Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)\n" + "This program comes with ABSOLUTELY NO WARRANTY;\n" + diff --git a/src/utils/front-end-cal/CMakeLists.txt b/src/utils/front-end-cal/CMakeLists.txt index ce1457bd3..0402cfa45 100644 --- a/src/utils/front-end-cal/CMakeLists.txt +++ b/src/utils/front-end-cal/CMakeLists.txt @@ -31,7 +31,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/libs/supl ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl - ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks ${GLOG_INCLUDE_DIRS} @@ -62,7 +61,6 @@ target_link_libraries(front_end_cal_lib ${MAC_LIBRARIES} rx_core_lib gnss_rx channel_fsm - gnss_sp_libs ) add_dependencies(front_end_cal_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE}) @@ -90,7 +88,6 @@ target_link_libraries(front-end-cal ${MAC_LIBRARIES} ${GNSS_SDR_OPTIONAL_LIBS} rx_core_lib gnss_rx - gnss_sp_libs front_end_cal_lib ) diff --git a/src/utils/front-end-cal/front_end_cal.cc b/src/utils/front-end-cal/front_end_cal.cc index 233abc45a..506054363 100644 --- a/src/utils/front-end-cal/front_end_cal.cc +++ b/src/utils/front-end-cal/front_end_cal.cc @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include From fa51afa923071abed4f86847770a13d3b6c33c9f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 13:55:04 +0100 Subject: [PATCH 03/43] Set tracking parameters as commandline flags --- src/algorithms/libs/gnss_sdr_flags.cc | 9 + src/algorithms/libs/gnss_sdr_flags.h | 18 +- .../tracking/gnuradio_blocks/CMakeLists.txt | 2 +- .../galileo_e1_dll_pll_veml_tracking_cc.cc | 15 +- .../galileo_e1_tcp_connector_tracking_cc.cc | 22 +- .../galileo_e5a_dll_pll_tracking_cc.cc | 29 +- ...glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc | 24 +- ...glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc | 24 +- .../glonass_l1_ca_dll_pll_tracking_cc.cc | 421 +++++++++--------- .../gps_l1_ca_dll_pll_c_aid_tracking_cc.cc | 15 +- ...ps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc | 22 +- .../gps_l1_ca_dll_pll_c_aid_tracking_sc.cc | 24 +- .../gps_l1_ca_dll_pll_tracking_cc.cc | 15 +- .../gps_l1_ca_dll_pll_tracking_gpu_cc.cc | 24 +- .../gps_l1_ca_tcp_connector_tracking_cc.cc | 22 +- .../gps_l2_m_dll_pll_tracking_cc.cc | 15 +- .../gps_l5i_dll_pll_tracking_cc.cc | 15 +- src/core/system_parameters/GPS_L1_CA.h | 5 - src/core/system_parameters/GPS_L2C.h | 5 +- src/core/system_parameters/GPS_L5.h | 20 +- src/core/system_parameters/Galileo_E1.h | 4 - src/core/system_parameters/Galileo_E5a.h | 5 - 22 files changed, 350 insertions(+), 405 deletions(-) diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index 3601e4c3f..b5f50f724 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -40,4 +40,13 @@ DEFINE_string(s, "-", DEFINE_string(signal_source, "-", "If defined, path to the file containing the signal samples (overrides the configuration file)"); +DEFINE_uint32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); + +DEFINE_uint32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); + +DEFINE_uint32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); + +DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); + DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); + diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h index 7297d79b1..216831b75 100644 --- a/src/algorithms/libs/gnss_sdr_flags.h +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -35,16 +35,22 @@ #include -DECLARE_string(c); // 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > GALILEO_E1_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc index 995941285..d970da3a8 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc @@ -52,16 +52,10 @@ #include "GPS_L1_CA.h" #include "Galileo_E1.h" #include "control_message_factory.h" +#include "gnss_sdr_flags.h" #include "tcp_communication.h" #include "tcp_packet_data.h" -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 20 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 using google::LogMessage; @@ -177,11 +171,11 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["E"] = std::string("Galileo"); d_acquisition_gnss_synchro = 0; @@ -378,7 +372,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr //d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt; @@ -389,13 +383,13 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, Galileo_E1_B_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, Galileo_E1_B_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -403,7 +397,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attr { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc index 139097148..53a1c4666 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc @@ -49,6 +49,7 @@ #include "Galileo_E5a.h" #include "Galileo_E1.h" #include "control_message_factory.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -150,7 +151,7 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc( multicorrelator_cpu_Q.init(2 * d_vector_length, d_n_correlator_taps); // correlator I single output for data (scalar) - d_Single_Prompt_data=static_cast(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_Single_Prompt_data = static_cast(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment())); *d_Single_Prompt_data = gr_complex(0,0); multicorrelator_cpu_I.init(2 * d_vector_length, 1); // single correlator for data channel @@ -176,11 +177,11 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[GALILEO_E5A_CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = GALILEO_E5A_CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; d_acquisition_gnss_synchro = 0; d_channel = 0; @@ -347,8 +348,8 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() } } // 2. Transform buffer to 1 and -1 - int in_corr[GALILEO_E5A_CN0_ESTIMATION_SAMPLES]; - for (unsigned int i = 0; i < GALILEO_E5A_CN0_ESTIMATION_SAMPLES; i++) + int in_corr[FLAGS_cn0_samples]; + for (unsigned int i = 0; i < FLAGS_cn0_samples; i++) { if (d_Prompt_buffer[i].real() >0) { @@ -365,7 +366,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() for (unsigned int i = 0; i < Galileo_E5a_Q_SECONDARY_CODE_LENGTH; i++) { out_corr = 0; - for (unsigned int j = 0; j < GALILEO_E5A_CN0_ESTIMATION_SAMPLES; j++) + for (unsigned int j = 0; j < FLAGS_cn0_samples; j++) { //reverse replica sign since i*i=-1 (conjugated complex) out_corr += in_corr[j] * -sec_code_signed[(j + i) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH]; @@ -376,10 +377,10 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() d_secondary_delay = i; } } - if (current_best_ == GALILEO_E5A_CN0_ESTIMATION_SAMPLES) // all bits correlate + if (current_best_ == FLAGS_cn0_samples) // all bits correlate { d_secondary_lock = true; - d_secondary_delay = (d_secondary_delay + GALILEO_E5A_CN0_ESTIMATION_SAMPLES - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; + d_secondary_delay = (d_secondary_delay + FLAGS_cn0_samples - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; } } @@ -560,7 +561,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < GALILEO_E5A_CN0_ESTIMATION_SAMPLES-1) + if (d_cn0_estimation_counter < FLAGS_cn0_samples-1) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_Prompt; @@ -587,7 +588,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute { //std::cout << "Secondary code delay couldn't be resolved." << std::endl; d_carrier_lock_fail_counter++; - if (d_carrier_lock_fail_counter > GALILEO_E5A_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; @@ -600,11 +601,11 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute else // Secondary lock achieved, monitor carrier lock. { // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GALILEO_E5A_CN0_ESTIMATION_SAMPLES, d_fs_in,d_current_ti_ms * Galileo_E5a_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in,d_current_ti_ms * Galileo_E5a_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GALILEO_E5A_CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GALILEO_E5A_MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -612,7 +613,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; - if (d_carrier_lock_fail_counter > GALILEO_E5A_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc index 107334df5..4067f5cb6 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -52,18 +52,10 @@ #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GLONASS_L1_CA.h" +#include "gnss_sdr_flags.h" #include "control_message_factory.h" -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 10 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 - - using google::LogMessage; glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr @@ -185,11 +177,11 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["R"] = std::string("Glonass"); @@ -759,7 +751,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; // prompt @@ -769,11 +761,11 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -781,7 +773,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc index 7cf86026f..b379b0630 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -53,18 +53,10 @@ #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GLONASS_L1_CA.h" +#include "gnss_sdr_flags.h" #include "control_message_factory.h" -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 10 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 - - using google::LogMessage; glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr @@ -187,11 +179,11 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["R"] = std::string("Glonass"); @@ -752,7 +744,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast(d_correlator_outs_16sc[1].real()), static_cast(d_correlator_outs_16sc[1].imag()) ); // prompt @@ -762,11 +754,11 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -774,7 +766,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc index c2b22a832..13d16ee46 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc @@ -50,15 +50,10 @@ #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GLONASS_L1_CA.h" +#include "gnss_sdr_flags.h" #include "control_message_factory.h" -#define CN0_ESTIMATION_SAMPLES 10 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 - - using google::LogMessage; glonass_l1_ca_dll_pll_tracking_cc_sptr @@ -82,9 +77,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required) { if (noutput_items != 0) - { - ninput_items_required[0] = static_cast(d_vector_length) * 2; //set the required available samples in each call - } + { + ninput_items_required[0] = static_cast(d_vector_length) * 2; //set the required available samples in each call + } } @@ -129,9 +124,9 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc( d_n_correlator_taps = 3; // Early, Prompt, and Late d_correlator_outs = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_gnsssdr_get_alignment())); for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs[n] = gr_complex(0,0); - } + { + d_correlator_outs[n] = gr_complex(0,0); + } d_local_code_shift_chips = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(float), volk_gnsssdr_get_alignment())); // Set TAPs delay values [chips] d_local_code_shift_chips[0] = - d_early_late_spc_chips; @@ -158,11 +153,11 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["R"] = std::string("Glonass"); @@ -222,9 +217,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking() double corrected_acq_phase_samples, delay_correction_samples; corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast(d_fs_in)), T_prn_true_samples); if (corrected_acq_phase_samples < 0) - { - corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples; - } + { + corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples; + } delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples; d_acq_code_phase_samples = corrected_acq_phase_samples; @@ -243,9 +238,9 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking() multicorrelator_cpu.set_local_code_and_taps(static_cast(GLONASS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips); for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs[n] = gr_complex(0,0); - } + { + d_correlator_outs[n] = gr_complex(0,0); + } d_carrier_lock_fail_counter = 0; d_rem_code_phase_samples = 0; @@ -536,205 +531,205 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribu Gnss_Synchro current_synchro_data = Gnss_Synchro(); if (d_enable_tracking == true) - { - // Fill the acquisition data - current_synchro_data = *d_acquisition_gnss_synchro; - // Receiver signal alignment - if (d_pull_in == true) { - int samples_offset; - double acq_trk_shif_correction_samples; - int acq_to_trk_delay_samples; - acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp; - acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast(acq_to_trk_delay_samples), static_cast(d_current_prn_length_samples)); - samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples); - current_synchro_data.Tracking_sample_counter = d_sample_counter + samples_offset; - d_sample_counter = d_sample_counter + samples_offset; // count for the processed samples - d_pull_in = false; - // take into account the carrier cycles accumulated in the pull in signal alignment - d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * samples_offset; + // Fill the acquisition data + current_synchro_data = *d_acquisition_gnss_synchro; + // Receiver signal alignment + if (d_pull_in == true) + { + int samples_offset; + double acq_trk_shif_correction_samples; + int acq_to_trk_delay_samples; + acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp; + acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast(acq_to_trk_delay_samples), static_cast(d_current_prn_length_samples)); + samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples); + current_synchro_data.Tracking_sample_counter = d_sample_counter + samples_offset; + d_sample_counter = d_sample_counter + samples_offset; // count for the processed samples + d_pull_in = false; + // take into account the carrier cycles accumulated in the pull in signal alignment + d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * samples_offset; + current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; + current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; + current_synchro_data.fs = d_fs_in; + current_synchro_data.correlation_length_ms = 1; + *out[0] = current_synchro_data; + consume_each(samples_offset); // shift input to perform alignment with local replica + return 1; + } + + // ################# CARRIER WIPEOFF AND CORRELATORS ############################## + // perform carrier wipe-off and compute Early, Prompt and Late correlation + multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, in); + multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad, + d_carrier_phase_step_rad, + d_rem_code_phase_chips, + d_code_phase_step_chips, + d_current_prn_length_samples); + + // ################## PLL ########################################################## + // PLL discriminator + // Update PLL discriminator [rads/Ti -> Secs/Ti] + carr_error_hz = pll_cloop_two_quadrant_atan(d_correlator_outs[1]) / GLONASS_TWO_PI; // prompt output + // Carrier discriminator filter + carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz); + // New carrier Doppler frequency estimation + d_carrier_frequency_hz += carr_error_filt_hz; + d_carrier_doppler_hz += carr_error_filt_hz; + d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch); + + // ################## DLL ########################################################## + // DLL discriminator + code_error_chips = dll_nc_e_minus_l_normalized(d_correlator_outs[0], d_correlator_outs[2]); // [chips/Ti] //early and late + // Code discriminator filter + code_error_filt_chips = d_code_loop_filter.get_code_nco(code_error_chips); // [chips/second] + double T_chip_seconds = 1.0 / static_cast(d_code_freq_chips); + double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS; + double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips*T_chip_seconds); //[seconds] + //double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds] + + // ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT ####################### + // keep alignment parameters for the next input buffer + // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation + //double T_chip_seconds = 1.0 / static_cast(d_code_freq_chips); + //double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS; + double T_prn_samples = T_prn_seconds * static_cast(d_fs_in); + double K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast(d_fs_in); + d_current_prn_length_samples = round(K_blk_samples); // round to a discrete number of samples + + //################### PLL COMMANDS ################################################# + // carrier phase step (NCO phase increment per sample) [rads/sample] + d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in); + d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast(d_fs_in); + // remnant carrier phase to prevent overflow in the code NCO + d_rem_carr_phase_rad = d_rem_carr_phase_rad + d_carrier_phase_step_rad * d_current_prn_length_samples; + d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GLONASS_TWO_PI); + // carrier phase accumulator + d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * d_current_prn_length_samples; + + //################### DLL COMMANDS ################################################# + // code phase step (Code resampler phase increment per sample) [chips/sample] + d_code_phase_step_chips = d_code_freq_chips / static_cast(d_fs_in); + // remnant code phase [chips] + d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; // rounding error < 1 sample + d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); + + // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### + if (d_cn0_estimation_counter < FLAGS_cn0_samples) + { + // fill buffer with prompt correlator output values + d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt + d_cn0_estimation_counter++; + } + else + { + d_cn0_estimation_counter = 0; + // Code lock indicator + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); + // Carrier lock indicator + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); + // Loss of lock detection + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) + { + d_carrier_lock_fail_counter++; + } + else + { + if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; + } + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) + { + std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; + LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; + this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock + d_carrier_lock_fail_counter = 0; + d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine + } + } + // ########### Output the tracking data to navigation and PVT ########## + current_synchro_data.Prompt_I = static_cast((d_correlator_outs[1]).real()); + current_synchro_data.Prompt_Q = static_cast((d_correlator_outs[1]).imag()); + current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; + current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; - current_synchro_data.fs = d_fs_in; + current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; + current_synchro_data.Flag_valid_symbol_output = true; current_synchro_data.correlation_length_ms = 1; - *out[0] = current_synchro_data; - consume_each(samples_offset); // shift input to perform alignment with local replica - return 1; } - - // ################# CARRIER WIPEOFF AND CORRELATORS ############################## - // perform carrier wipe-off and compute Early, Prompt and Late correlation - multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, in); - multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(d_rem_carr_phase_rad, - d_carrier_phase_step_rad, - d_rem_code_phase_chips, - d_code_phase_step_chips, - d_current_prn_length_samples); - - // ################## PLL ########################################################## - // PLL discriminator - // Update PLL discriminator [rads/Ti -> Secs/Ti] - carr_error_hz = pll_cloop_two_quadrant_atan(d_correlator_outs[1]) / GLONASS_TWO_PI; // prompt output - // Carrier discriminator filter - carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz); - // New carrier Doppler frequency estimation - d_carrier_frequency_hz += carr_error_filt_hz; - d_carrier_doppler_hz += carr_error_filt_hz; - d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GLONASS_L1_CA_CODE_RATE_HZ) / d_glonass_freq_ch); - - // ################## DLL ########################################################## - // DLL discriminator - code_error_chips = dll_nc_e_minus_l_normalized(d_correlator_outs[0], d_correlator_outs[2]); // [chips/Ti] //early and late - // Code discriminator filter - code_error_filt_chips = d_code_loop_filter.get_code_nco(code_error_chips); // [chips/second] - double T_chip_seconds = 1.0 / static_cast(d_code_freq_chips); - double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS; - double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips*T_chip_seconds); //[seconds] - //double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds] - - // ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT ####################### - // keep alignment parameters for the next input buffer - // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation - //double T_chip_seconds = 1.0 / static_cast(d_code_freq_chips); - //double T_prn_seconds = T_chip_seconds * GLONASS_L1_CA_CODE_LENGTH_CHIPS; - double T_prn_samples = T_prn_seconds * static_cast(d_fs_in); - double K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast(d_fs_in); - d_current_prn_length_samples = round(K_blk_samples); // round to a discrete number of samples - - //################### PLL COMMANDS ################################################# - // carrier phase step (NCO phase increment per sample) [rads/sample] - d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in); - d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast(d_fs_in); - // remnant carrier phase to prevent overflow in the code NCO - d_rem_carr_phase_rad = d_rem_carr_phase_rad + d_carrier_phase_step_rad * d_current_prn_length_samples; - d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GLONASS_TWO_PI); - // carrier phase accumulator - d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * d_current_prn_length_samples; - - //################### DLL COMMANDS ################################################# - // code phase step (Code resampler phase increment per sample) [chips/sample] - d_code_phase_step_chips = d_code_freq_chips / static_cast(d_fs_in); - // remnant code phase [chips] - d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; // rounding error < 1 sample - d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); - - // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) - { - // fill buffer with prompt correlator output values - d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt - d_cn0_estimation_counter++; - } - else - { - d_cn0_estimation_counter = 0; - // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GLONASS_L1_CA_CODE_LENGTH_CHIPS); - // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); - // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) - { - d_carrier_lock_fail_counter++; - } - else - { - if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; - } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) - { - std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; - LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; - this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock - d_carrier_lock_fail_counter = 0; - d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine - } - } - // ########### Output the tracking data to navigation and PVT ########## - current_synchro_data.Prompt_I = static_cast((d_correlator_outs[1]).real()); - current_synchro_data.Prompt_Q = static_cast((d_correlator_outs[1]).imag()); - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; - current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; - current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; - current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; - current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; - current_synchro_data.Flag_valid_symbol_output = true; - current_synchro_data.correlation_length_ms = 1; - } else - { - for (int n = 0; n < d_n_correlator_taps; n++) { - d_correlator_outs[n] = gr_complex(0,0); - } + for (int n = 0; n < d_n_correlator_taps; n++) + { + d_correlator_outs[n] = gr_complex(0,0); + } - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; - current_synchro_data.System = {'R'}; - current_synchro_data.correlation_length_ms = 1; - } + current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; + current_synchro_data.System = {'R'}; + current_synchro_data.correlation_length_ms = 1; + } //assign the GNURadio block output data current_synchro_data.fs = d_fs_in; *out[0] = current_synchro_data; if(d_dump) - { - // MULTIPLEXED FILE RECORDING - Record results to file - float prompt_I; - float prompt_Q; - float tmp_E, tmp_P, tmp_L; - double tmp_double; - unsigned long int tmp_long; - prompt_I = d_correlator_outs[1].real(); - prompt_Q = d_correlator_outs[1].imag(); - tmp_E = std::abs(d_correlator_outs[0]); - tmp_P = std::abs(d_correlator_outs[1]); - tmp_L = std::abs(d_correlator_outs[2]); - try { - // EPR - d_dump_file.write(reinterpret_cast(&tmp_E), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_P), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_L), sizeof(float)); - // PROMPT I and Q (to analyze navigation symbols) - d_dump_file.write(reinterpret_cast(&prompt_I), sizeof(float)); - d_dump_file.write(reinterpret_cast(&prompt_Q), sizeof(float)); - // PRN start sample stamp - tmp_long = d_sample_counter + d_current_prn_length_samples; - d_dump_file.write(reinterpret_cast(&tmp_long), sizeof(unsigned long int)); - // accumulated carrier phase - d_dump_file.write(reinterpret_cast(&d_acc_carrier_phase_rad), sizeof(double)); + // MULTIPLEXED FILE RECORDING - Record results to file + float prompt_I; + float prompt_Q; + float tmp_E, tmp_P, tmp_L; + double tmp_double; + unsigned long int tmp_long; + prompt_I = d_correlator_outs[1].real(); + prompt_Q = d_correlator_outs[1].imag(); + tmp_E = std::abs(d_correlator_outs[0]); + tmp_P = std::abs(d_correlator_outs[1]); + tmp_L = std::abs(d_correlator_outs[2]); + try + { + // EPR + d_dump_file.write(reinterpret_cast(&tmp_E), sizeof(float)); + d_dump_file.write(reinterpret_cast(&tmp_P), sizeof(float)); + d_dump_file.write(reinterpret_cast(&tmp_L), sizeof(float)); + // PROMPT I and Q (to analyze navigation symbols) + d_dump_file.write(reinterpret_cast(&prompt_I), sizeof(float)); + d_dump_file.write(reinterpret_cast(&prompt_Q), sizeof(float)); + // PRN start sample stamp + tmp_long = d_sample_counter + d_current_prn_length_samples; + d_dump_file.write(reinterpret_cast(&tmp_long), sizeof(unsigned long int)); + // accumulated carrier phase + d_dump_file.write(reinterpret_cast(&d_acc_carrier_phase_rad), sizeof(double)); - // carrier and code frequency - d_dump_file.write(reinterpret_cast(&d_carrier_frequency_hz), sizeof(double)); - d_dump_file.write(reinterpret_cast(&d_code_freq_chips), sizeof(double)); + // carrier and code frequency + d_dump_file.write(reinterpret_cast(&d_carrier_frequency_hz), sizeof(double)); + d_dump_file.write(reinterpret_cast(&d_code_freq_chips), sizeof(double)); - // PLL commands - d_dump_file.write(reinterpret_cast(&carr_error_hz), sizeof(double)); - d_dump_file.write(reinterpret_cast(&carr_error_filt_hz), sizeof(double)); + // PLL commands + d_dump_file.write(reinterpret_cast(&carr_error_hz), sizeof(double)); + d_dump_file.write(reinterpret_cast(&carr_error_filt_hz), sizeof(double)); - // DLL commands - d_dump_file.write(reinterpret_cast(&code_error_chips), sizeof(double)); - d_dump_file.write(reinterpret_cast(&code_error_filt_chips), sizeof(double)); + // DLL commands + d_dump_file.write(reinterpret_cast(&code_error_chips), sizeof(double)); + d_dump_file.write(reinterpret_cast(&code_error_filt_chips), sizeof(double)); - // CN0 and carrier lock test - d_dump_file.write(reinterpret_cast(&d_CN0_SNV_dB_Hz), sizeof(double)); - d_dump_file.write(reinterpret_cast(&d_carrier_lock_test), sizeof(double)); + // CN0 and carrier lock test + d_dump_file.write(reinterpret_cast(&d_CN0_SNV_dB_Hz), sizeof(double)); + d_dump_file.write(reinterpret_cast(&d_carrier_lock_test), sizeof(double)); - // AUX vars (for debug purposes) - tmp_double = d_rem_code_phase_samples; - d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); - tmp_double = static_cast(d_sample_counter); - d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); + // AUX vars (for debug purposes) + tmp_double = d_rem_code_phase_samples; + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); + tmp_double = static_cast(d_sample_counter); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); - // PRN - unsigned int prn_ = d_acquisition_gnss_synchro->PRN; - d_dump_file.write(reinterpret_cast(&prn_), sizeof(unsigned int)); + // PRN + unsigned int prn_ = d_acquisition_gnss_synchro->PRN; + d_dump_file.write(reinterpret_cast(&prn_), sizeof(unsigned int)); + } + catch (const std::ifstream::failure &e) + { + LOG(WARNING) << "Exception writing trk dump file " << e.what(); + } } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "Exception writing trk dump file " << e.what(); - } - } consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates d_sample_counter += d_current_prn_length_samples; // count for the processed samples @@ -749,23 +744,23 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::set_channel(unsigned int channel) LOG(INFO) << "Tracking Channel set to " << d_channel; // ############# ENABLE DATA FILE LOG ################# if (d_dump == true) - { - if (d_dump_file.is_open() == false) { - try - { - d_dump_filename.append(boost::lexical_cast(d_channel)); - d_dump_filename.append(".dat"); - d_dump_file.exceptions (std::ifstream::failbit | std::ifstream::badbit); - d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); - LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what(); - } + if (d_dump_file.is_open() == false) + { + try + { + d_dump_filename.append(boost::lexical_cast(d_channel)); + d_dump_filename.append(".dat"); + d_dump_file.exceptions (std::ifstream::failbit | std::ifstream::badbit); + d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); + LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str(); + } + catch (const std::ifstream::failure &e) + { + LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what(); + } + } } - } } diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc index 72bdc2639..97176b088 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -43,6 +43,7 @@ #include "gps_sdr_signal_processing.h" #include "tracking_discriminators.h" #include "lock_detectors.h" +#include "gnss_sdr_flags.h" #include "GPS_L1_CA.h" #include "control_message_factory.h" @@ -168,11 +169,11 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[GPS_L1_CA_CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = GPS_L1_CA_CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); systemName["S"] = std::string("SBAS"); @@ -731,7 +732,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < GPS_L1_CA_CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; // prompt @@ -741,11 +742,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L1_CA_MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -753,7 +754,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc index 464ef6493..1391d1c44 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc @@ -46,15 +46,9 @@ #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GPS_L1_CA.h" +#include "gnss_sdr_flags.h" #include "control_message_factory.h" -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 20 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 using google::LogMessage; @@ -168,11 +162,11 @@ gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_ // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); systemName["S"] = std::string("SBAS"); @@ -553,7 +547,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work( d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast(d_correlator_outs_16sc[1].real()), @@ -564,11 +558,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work( { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -579,7 +573,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work( d_carrier_lock_fail_counter--; } } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc index 2d7aa4102..cd2890bab 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -45,18 +45,10 @@ #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GPS_L1_CA.h" +#include "gnss_sdr_flags.h" #include "control_message_factory.h" -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 20 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 - - using google::LogMessage; gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr @@ -179,11 +171,11 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); systemName["S"] = std::string("SBAS"); @@ -744,7 +736,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast(d_correlator_outs_16sc[1].real()), static_cast(d_correlator_outs_16sc[1].imag()) ); // prompt @@ -754,11 +746,11 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -766,7 +758,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attri { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc index 3bc3d0f9f..979d378d6 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc @@ -47,6 +47,7 @@ #include "gps_sdr_signal_processing.h" #include "tracking_discriminators.h" #include "lock_detectors.h" +#include "gnss_sdr_flags.h" #include "GPS_L1_CA.h" #include "control_message_factory.h" @@ -150,11 +151,11 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[GPS_L1_CA_CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = GPS_L1_CA_CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); systemName["S"] = std::string("SBAS"); @@ -609,7 +610,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__ d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < GPS_L1_CA_CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt @@ -619,11 +620,11 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__ { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L1_CA_CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L1_CA_MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -631,7 +632,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__ { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc index b79479d68..265d46d72 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc @@ -41,19 +41,11 @@ #include "lock_detectors.h" #include "GPS_L1_CA.h" #include "control_message_factory.h" +#include "gnss_sdr_flags.h" // includes #include -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 20 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 - - using google::LogMessage; gps_l1_ca_dll_pll_tracking_gpu_cc_sptr @@ -155,11 +147,11 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); systemName["S"] = std::string("SBAS"); @@ -413,7 +405,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt @@ -423,11 +415,11 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -435,7 +427,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribu { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc index 219aaff76..33c51ee48 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc @@ -49,16 +49,10 @@ #include "lock_detectors.h" #include "GPS_L1_CA.h" #include "control_message_factory.h" +#include "gnss_sdr_flags.h" #include "tcp_communication.h" #include "tcp_packet_data.h" -/*! - * \todo Include in definition header file - */ -#define CN0_ESTIMATION_SAMPLES 20 -#define MINIMUM_VALID_CN0 25 -#define MAXIMUM_LOCK_FAIL_COUNTER 50 -#define CARRIER_LOCK_THRESHOLD 0.85 using google::LogMessage; @@ -165,11 +159,11 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); systemName["R"] = std::string("GLONASS"); @@ -419,7 +413,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri * \todo Improve the lock detection algorithm! */ // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt; @@ -428,11 +422,11 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri else { d_cn0_estimation_counter = 0; - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // ###### TRACKING UNLOCK NOTIFICATION ##### - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -440,7 +434,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attri { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc index 2a28283f4..30834c337 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc @@ -49,6 +49,7 @@ #include "lock_detectors.h" #include "GPS_L2C.h" #include "control_message_factory.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -150,11 +151,11 @@ gps_l2_m_dll_pll_tracking_cc::gps_l2_m_dll_pll_tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[GPS_L2M_CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = GPS_L2M_CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); @@ -603,7 +604,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__( d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < GPS_L2M_CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; @@ -613,11 +614,11 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__( { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L2M_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L2_M_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L2_M_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L2M_CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L2M_MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -625,7 +626,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__( { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > GPS_L2M_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc index c7205f6bf..6010c0d3f 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc @@ -49,6 +49,7 @@ #include "lock_detectors.h" #include "GPS_L5.h" #include "control_message_factory.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -150,11 +151,11 @@ gps_l5i_dll_pll_tracking_cc::gps_l5i_dll_pll_tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[GPS_L5_CN0_ESTIMATION_SAMPLES]; + d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = GPS_L5_CARRIER_LOCK_THRESHOLD; + d_carrier_lock_threshold = FLAGS_carrier_lock_th; systemName["G"] = std::string("GPS"); @@ -603,7 +604,7 @@ int gps_l5i_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(( d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < GPS_L5_CN0_ESTIMATION_SAMPLES) + if (d_cn0_estimation_counter < FLAGS_cn0_samples) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; @@ -613,11 +614,11 @@ int gps_l5i_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(( { d_cn0_estimation_counter = 0; // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, GPS_L5_CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L5i_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in, GPS_L5i_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, GPS_L5_CN0_ESTIMATION_SAMPLES); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < GPS_L5_MINIMUM_VALID_CN0) + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { d_carrier_lock_fail_counter++; } @@ -625,7 +626,7 @@ int gps_l5i_dll_pll_tracking_cc::general_work (int noutput_items __attribute__(( { if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; } - if (d_carrier_lock_fail_counter > GPS_L5_MAXIMUM_LOCK_FAIL_COUNTER) + if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) { std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; diff --git a/src/core/system_parameters/GPS_L1_CA.h b/src/core/system_parameters/GPS_L1_CA.h index a2976fe46..319d918e1 100644 --- a/src/core/system_parameters/GPS_L1_CA.h +++ b/src/core/system_parameters/GPS_L1_CA.h @@ -37,11 +37,6 @@ #include "MATH_CONSTANTS.h" #include "gnss_frequencies.h" -#define GPS_L1_CA_CN0_ESTIMATION_SAMPLES 20 -#define GPS_L1_CA_MINIMUM_VALID_CN0 25 -#define GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER 50 -#define GPS_L1_CA_CARRIER_LOCK_THRESHOLD 0.85 - // Physical constants const double GPS_C_m_s = SPEED_OF_LIGHT; //!< The speed of light, [m/s] const double GPS_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] diff --git a/src/core/system_parameters/GPS_L2C.h b/src/core/system_parameters/GPS_L2C.h index 584d1761d..3e269ecf5 100644 --- a/src/core/system_parameters/GPS_L2C.h +++ b/src/core/system_parameters/GPS_L2C.h @@ -40,10 +40,7 @@ #include "GPS_CNAV.h" -#define GPS_L2M_CN0_ESTIMATION_SAMPLES 10 -#define GPS_L2M_MINIMUM_VALID_CN0 25 -#define GPS_L2M_MAXIMUM_LOCK_FAIL_COUNTER 50 -#define GPS_L2M_CARRIER_LOCK_THRESHOLD 0.75 + // Physical constants diff --git a/src/core/system_parameters/GPS_L5.h b/src/core/system_parameters/GPS_L5.h index 31e5f5f98..702e3ebd6 100644 --- a/src/core/system_parameters/GPS_L5.h +++ b/src/core/system_parameters/GPS_L5.h @@ -37,23 +37,19 @@ #include "gnss_frequencies.h" #include "GPS_CNAV.h" -#define GPS_L5_CN0_ESTIMATION_SAMPLES 10 -#define GPS_L5_MINIMUM_VALID_CN0 25 -#define GPS_L5_MAXIMUM_LOCK_FAIL_COUNTER 50 -#define GPS_L5_CARRIER_LOCK_THRESHOLD 0.75 // Physical constants -const double GPS_L5_C_m_s = 299792458.0; //!< The speed of light, [m/s] -const double GPS_L5_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] -const double GPS_L5_PI = 3.1415926535898; //!< Pi as defined in IS-GPS-200E -const double GPS_L5_TWO_PI = 6.283185307179586; //!< 2Pi as defined in IS-GPS-200E -const double GPS_L5_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Earth rotation rate, [rad/s] -const double GPS_L5_GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2] -const double GPS_L5_F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)] +const double GPS_L5_C_m_s = 299792458.0; //!< The speed of light, [m/s] +const double GPS_L5_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] +const double GPS_L5_PI = 3.1415926535898; //!< Pi as defined in IS-GPS-200E +const double GPS_L5_TWO_PI = 6.283185307179586; //!< 2Pi as defined in IS-GPS-200E +const double GPS_L5_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Earth rotation rate, [rad/s] +const double GPS_L5_GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2] +const double GPS_L5_F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)] // carrier and code frequencies -const double GPS_L5_FREQ_HZ = FREQ5; //!< L5 [Hz] +const double GPS_L5_FREQ_HZ = FREQ5; //!< L5 [Hz] const double GPS_L5i_CODE_RATE_HZ = 10.23e6; //!< GPS L5i code rate [chips/s] const int GPS_L5i_CODE_LENGTH_CHIPS = 10230; //!< GPS L5i code length [chips] diff --git a/src/core/system_parameters/Galileo_E1.h b/src/core/system_parameters/Galileo_E1.h index a2b3215dd..24794a244 100644 --- a/src/core/system_parameters/Galileo_E1.h +++ b/src/core/system_parameters/Galileo_E1.h @@ -39,10 +39,6 @@ #include "MATH_CONSTANTS.h" #include "gnss_frequencies.h" -#define GALILEO_E1_CN0_ESTIMATION_SAMPLES 20 -#define GALILEO_E1_MINIMUM_VALID_CN0 25 -#define GALILEO_E1_MAXIMUM_LOCK_FAIL_COUNTER 50 -#define GALILEO_E1_CARRIER_LOCK_THRESHOLD 0.85 // Physical constants const double GALILEO_PI = 3.1415926535898; //!< Pi as defined in GALILEO ICD diff --git a/src/core/system_parameters/Galileo_E5a.h b/src/core/system_parameters/Galileo_E5a.h index bf96cc62f..2a2f5a816 100644 --- a/src/core/system_parameters/Galileo_E5a.h +++ b/src/core/system_parameters/Galileo_E5a.h @@ -37,11 +37,6 @@ #include "MATH_CONSTANTS.h" #include "gnss_frequencies.h" -#define GALILEO_E5A_CN0_ESTIMATION_SAMPLES 20 -#define GALILEO_E5A_MINIMUM_VALID_CN0 25 -#define GALILEO_E5A_MAXIMUM_LOCK_FAIL_COUNTER 50 -#define GALILEO_E5A_CARRIER_LOCK_THRESHOLD 0.85 - // Carrier and code frequencies const double Galileo_E5a_FREQ_HZ = FREQ5; //!< Galileo E5a carrier frequency [Hz] From 22654d6c1a6c98bb83f44a216acebd65d71de707 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 18:37:38 +0100 Subject: [PATCH 04/43] Add -doppler_max commandline flag --- src/algorithms/acquisition/adapters/CMakeLists.txt | 2 +- .../adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc | 2 ++ .../adapters/galileo_e1_pcps_ambiguous_acquisition.cc | 2 ++ .../adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc | 2 ++ .../galileo_e1_pcps_quicksync_ambiguous_acquisition.cc | 2 ++ .../adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc | 2 ++ .../adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc | 2 ++ .../acquisition/adapters/galileo_e5a_pcps_acquisition.cc | 2 ++ .../acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc | 2 ++ .../acquisition/adapters/gps_l1_ca_pcps_acquisition.cc | 2 ++ .../adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc | 4 +++- .../acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc | 2 ++ .../adapters/gps_l1_ca_pcps_assisted_acquisition.cc | 5 ++++- .../adapters/gps_l1_ca_pcps_opencl_acquisition.cc | 3 +++ .../adapters/gps_l1_ca_pcps_quicksync_acquisition.cc | 3 ++- .../acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc | 2 ++ .../acquisition/adapters/gps_l2_m_pcps_acquisition.cc | 2 ++ .../acquisition/adapters/gps_l5i_pcps_acquisition.cc | 2 ++ src/algorithms/libs/gnss_sdr_flags.cc | 2 ++ src/algorithms/libs/gnss_sdr_flags.h | 3 +++ 20 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/algorithms/acquisition/adapters/CMakeLists.txt b/src/algorithms/acquisition/adapters/CMakeLists.txt index b011ee636..9dde86c6a 100644 --- a/src/algorithms/acquisition/adapters/CMakeLists.txt +++ b/src/algorithms/acquisition/adapters/CMakeLists.txt @@ -63,5 +63,5 @@ file(GLOB ACQ_ADAPTER_HEADERS "*.h") list(SORT ACQ_ADAPTER_HEADERS) add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS}) source_group(Headers FILES ${ACQ_ADAPTER_HEADERS}) -target_link_libraries(acq_adapters gnss_sp_libs acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) +target_link_libraries(acq_adapters gnss_sp_libs gnss_sdr_flags acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc index ab2fa05e9..178ccade0 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc @@ -36,6 +36,7 @@ #include "galileo_e1_signal_processing.h" #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -58,6 +59,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); if (sampled_ms_ % 4 != 0) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 20501e909..17ef914e0 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -36,6 +36,7 @@ #include "galileo_e1_signal_processing.h" #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -58,6 +59,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( dump_ = configuration_->property(role + ".dump", false); blocking_ = configuration_->property(role + ".blocking", true); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); if (sampled_ms_ % 4 != 0) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc index dd1d5537e..62f71a076 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc @@ -36,6 +36,7 @@ #include "galileo_e1_signal_processing.h" #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -57,6 +58,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); if (sampled_ms_ % 4 != 0) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc index 53da3ac60..f42c41719 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc @@ -36,6 +36,7 @@ #include "galileo_e1_signal_processing.h" #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -58,6 +59,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 8); /*--- Find number of samples per spreading code (4 ms) -----------------*/ diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc index 1b91b4058..18d5dc1ff 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc @@ -36,6 +36,7 @@ #include "galileo_e1_signal_processing.h" #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -58,6 +59,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); if (sampled_ms_ % 4 != 0) diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc index afc50d17c..1046a1d22 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc @@ -42,6 +42,7 @@ #include "galileo_e5_signal_processing.h" #include "Galileo_E5a.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -63,6 +64,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; CAF_window_hz_ = configuration_->property(role + ".CAF_window_hz",0); Zero_padding = configuration_->property(role + ".Zero_padding",0); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index 59ef7fc08..d3df351e5 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -36,6 +36,7 @@ #include "galileo_e5_signal_processing.h" #include "Galileo_E5a.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -58,6 +59,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con if(acq_iq_) { acq_pilot_ = false; } dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); max_dwells_ = configuration_->property(role + ".max_dwells", 1); dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc index 24e24726f..5ce79503c 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc @@ -37,6 +37,7 @@ #include "glonass_l1_signal_processing.h" #include "GLONASS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -60,6 +61,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( dump_ = configuration_->property(role + ".dump", false); blocking_ = configuration_->property(role + ".blocking", true); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index 3f4137b23..c1f62ace7 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -39,6 +39,7 @@ #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -61,6 +62,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( dump_ = configuration_->property(role + ".dump", false); blocking_ = configuration_->property(role + ".blocking", true); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc index 5328cb343..89c837d13 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc @@ -37,6 +37,7 @@ #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -57,7 +58,8 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( dump_ = configuration->property(role + ".dump", false); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); doppler_max_ = configuration->property(role + ".doppler_max", 5000); - doppler_min_ = configuration->property(role + ".doppler_min", -5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; + doppler_min_ = configuration->property(role + ".doppler_min", - doppler_max_); sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); max_dwells_= configuration->property(role + ".max_dwells", 1); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc index e1bb219c7..4b373edb3 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc @@ -37,6 +37,7 @@ #include #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -71,6 +72,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( ifreq = configuration_->property(role + ".if", 0); dump = configuration_->property(role + ".dump", false); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1); // note : the FPGA is implemented according to bit transition flag = 0. Setting bit transition flag to 1 has no effect. diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc index f4a0e8190..6c054ef73 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc @@ -37,6 +37,8 @@ #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" + using google::LogMessage; @@ -56,7 +58,8 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( if_ = configuration->property(role + ".if", 0); dump_ = configuration->property(role + ".dump", false); doppler_max_ = configuration->property(role + ".doppler_max", 5000); - doppler_min_ = configuration->property(role + ".doppler_min", -5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; + doppler_min_ = configuration->property(role + ".doppler_min", -doppler_max_); sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); max_dwells_= configuration->property(role + ".max_dwells", 1); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc index e9add0e8b..00e388f07 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc @@ -35,6 +35,8 @@ #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" + using google::LogMessage; @@ -57,6 +59,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); bit_transition_flag_ = configuration_->property("Acquisition.bit_transition_flag", false); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc index 47e1ce498..e794a4e37 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc @@ -36,7 +36,7 @@ #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" - +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -58,6 +58,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); //--- Find number of samples per spreading code ------------------------- diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc index b71041c6a..d8d1349a3 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc @@ -35,6 +35,7 @@ #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -57,6 +58,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( if_ = configuration_->property(role + ".if", 0); dump_ = configuration_->property(role + ".dump", false); doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); tong_init_val_ = configuration->property(role + ".tong_init_val", 1); diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index ae43ea8cd..595f64d82 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -37,6 +37,7 @@ #include "gps_l2c_signal.h" #include "GPS_L2C.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -61,6 +62,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( dump_ = configuration_->property(role + ".dump", false); blocking_ = configuration_->property(role + ".blocking", true); doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 89f37f57f..9c0d8ef51 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -37,6 +37,7 @@ #include "gps_l5_signal.h" #include "GPS_L5.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -60,6 +61,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( dump_ = configuration_->property(role + ".dump", false); blocking_ = configuration_->property(role + ".blocking", true); doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0 ) doppler_max_ = FLAGS_doppler_max; bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index b5f50f724..fdffbd161 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -40,6 +40,8 @@ DEFINE_string(s, "-", DEFINE_string(signal_source, "-", "If defined, path to the file containing the signal samples (overrides the configuration file)"); +DEFINE_uint32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)"); + DEFINE_uint32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); DEFINE_uint32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h index 216831b75..87e19e7f7 100644 --- a/src/algorithms/libs/gnss_sdr_flags.h +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -44,6 +44,9 @@ DECLARE_string(log_dir); // Date: Sun, 18 Feb 2018 19:28:21 +0100 Subject: [PATCH 05/43] Add -dll_bw_hz and -pll_bw_hz commandline flags API of Galileo_E5a_DLL_PLL_Tracking has been changed for consistency with other blocks --- conf/gnss-sdr_Galileo_E5a.conf | 12 +++------ conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf | 6 ++--- src/algorithms/libs/gnss_sdr_flags.cc | 3 +++ src/algorithms/libs/gnss_sdr_flags.h | 2 ++ .../tracking/adapters/CMakeLists.txt | 2 +- .../galileo_e1_dll_pll_veml_tracking.cc | 3 +++ .../galileo_e1_tcp_connector_tracking.cc | 3 +++ .../adapters/galileo_e5a_dll_pll_tracking.cc | 19 ++++++++------ .../glonass_l1_ca_dll_pll_c_aid_tracking.cc | 3 +++ .../glonass_l1_ca_dll_pll_tracking.cc | 3 +++ .../gps_l1_ca_dll_pll_c_aid_tracking.cc | 3 +++ .../gps_l1_ca_dll_pll_c_aid_tracking_fpga.cc | 4 +++ .../adapters/gps_l1_ca_dll_pll_tracking.cc | 3 +++ .../gps_l1_ca_dll_pll_tracking_gpu.cc | 3 +++ .../adapters/gps_l2_m_dll_pll_tracking.cc | 3 +++ .../adapters/gps_l5i_dll_pll_tracking.cc | 3 +++ .../galileo_e5a_dll_pll_tracking_cc.cc | 26 +++++++++---------- .../galileo_e5a_dll_pll_tracking_cc.h | 16 ++++++------ .../tracking/galileo_e5a_tracking_test.cc | 8 +++--- 19 files changed, 80 insertions(+), 45 deletions(-) diff --git a/conf/gnss-sdr_Galileo_E5a.conf b/conf/gnss-sdr_Galileo_E5a.conf index d2ac70fba..702942f55 100644 --- a/conf/gnss-sdr_Galileo_E5a.conf +++ b/conf/gnss-sdr_Galileo_E5a.conf @@ -224,19 +224,15 @@ Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking Tracking_5X.item_type=gr_complex ;#sampling_frequency: Signal Intermediate Frequency in [Hz] Tracking_5X.if=0 -;#pll_bw_hz_init: **Only for E5a** PLL loop filter bandwidth during initialization [Hz] -Tracking_5X.pll_bw_hz_init=20.0; -;#dll_bw_hz_init: **Only for E5a** DLL loop filter bandwidth during initialization [Hz] -Tracking_5X.dll_bw_hz_init=20.0; ;#dll_ti_ms: **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] ;Tracking_5X.ti_ms=3; Tracking_5X.ti_ms=1; -;#pll_bw_hz: PLL loop filter bandwidth [Hz] -;Tracking.pll_bw_hz=5.0; +;#pll_bw_hz: PLL loop filter bandwidth during initialization [Hz] Tracking_5X.pll_bw_hz=20.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] -;Tracking.dll_bw_hz=2.0; +;#dll_bw_hz: DLL loop filter bandwidth during initialization [Hz] Tracking_5X.dll_bw_hz=20.0; +Tracking_5X.pll_bw_narrow_hz=2.0; +Tracking_5X.dll_bw_narrow_hz=5.0; ;#order: PLL/DLL loop filter order [2] or [3] Tracking_5X.order=2; ;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] diff --git a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf index ba75ebdcd..661920ca0 100644 --- a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf +++ b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf @@ -118,11 +118,11 @@ Acquisition_5X.dump_filename=./acq_dump.dat Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking Tracking_5X.item_type=gr_complex Tracking_5X.if=0 -Tracking_5X.pll_bw_hz_init=20.0; **Only for E5a** PLL loop filter bandwidth during initialization [Hz] -Tracking_5X.dll_bw_hz_init=20.0; **Only for E5a** DLL loop filter bandwidth during initialization [Hz] -Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] Tracking_5X.pll_bw_hz=20.0; Tracking_5X.dll_bw_hz=20.0; +Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] +Tracking_5X.pll_bw_narrow_hz=20.0; +Tracking_5X.dll_bw_narrow_hz=20.0; Tracking_5X.order=2; Tracking_5X.early_late_space_chips=0.5; Tracking_5X.dump=false diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index fdffbd161..b503c845f 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -52,3 +52,6 @@ DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); +DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)"); + +DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)"); diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h index 87e19e7f7..563ffc5de 100644 --- a/src/algorithms/libs/gnss_sdr_flags.h +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -52,6 +52,8 @@ DECLARE_uint32(cn0_samples); // #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -71,7 +72,9 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 0.5); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 2.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 0.25); int extend_correlation_symbols; diff --git a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc index 7dd56092a..97e933416 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc @@ -39,6 +39,7 @@ #include #include "Galileo_E1.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -68,7 +69,9 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15); very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6); port_ch0 = configuration->property(role + ".port_ch0", 2060); diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc index 63ea93389..6ede1ca91 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc @@ -40,6 +40,7 @@ #include #include "Galileo_E5a.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -60,8 +61,8 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( std::string default_item_type = "gr_complex"; float pll_bw_hz; float dll_bw_hz; - float pll_bw_init_hz; - float dll_bw_init_hz; + float pll_bw_narrow_hz; + float dll_bw_narrow_hz; int ti_ms; float early_late_space_chips; item_type = configuration->property(role + ".item_type", default_item_type); @@ -70,10 +71,12 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); - pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0); - dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); - pll_bw_init_hz = configuration->property(role + ".pll_bw_init_hz", 20.0); - dll_bw_init_hz = configuration->property(role + ".dll_bw_init_hz", 20.0); + pll_bw_hz = configuration->property(role + ".pll_bw_hz", 20.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); + dll_bw_hz = configuration->property(role + ".dll_bw_hz", 20.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); + pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 5.0); + dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); ti_ms = configuration->property(role + ".ti_ms", 3); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); @@ -94,8 +97,8 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( dump_filename, pll_bw_hz, dll_bw_hz, - pll_bw_init_hz, - dll_bw_init_hz, + pll_bw_narrow_hz, + dll_bw_narrow_hz, ti_ms, early_late_space_chips); } diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc index 2322626e8..5c76267ce 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc @@ -41,6 +41,7 @@ #include #include "GLONASS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -70,7 +71,9 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); int extend_correlation_ms; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc index 7035a1411..6f824144d 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc @@ -40,6 +40,7 @@ #include #include "GLONASS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -67,7 +68,9 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc index 74c00539f..ae01c924e 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc @@ -40,6 +40,7 @@ #include #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -69,7 +70,9 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); int extend_correlation_ms; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking_fpga.cc index 7e0e01a9b..36d53d086 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking_fpga.cc @@ -40,6 +40,8 @@ #include #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" + using google::LogMessage; @@ -70,7 +72,9 @@ GpsL1CaDllPllCAidTrackingFpga::GpsL1CaDllPllCAidTrackingFpga( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); int extend_correlation_ms; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc index 67e086aa1..3c810ed3d 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc @@ -40,6 +40,7 @@ #include #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -67,7 +68,9 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_gpu.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_gpu.cc index 81822a5f5..ebf768537 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_gpu.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_gpu.cc @@ -39,6 +39,7 @@ #include #include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -67,7 +68,9 @@ GpsL1CaDllPllTrackingGPU::GpsL1CaDllPllTrackingGPU( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; dump_filename = configuration->property(role + ".dump_filename", diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc index 83bab16eb..c3e84030a 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc @@ -39,6 +39,7 @@ #include #include "GPS_L2C.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -66,7 +67,9 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; dump_filename = configuration->property(role + ".dump_filename", diff --git a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc index be96227d8..0869c39b7 100644 --- a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc @@ -39,6 +39,7 @@ #include #include "GPS_L5.h" #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -66,7 +67,9 @@ GpsL5iDllPllTracking::GpsL5iDllPllTracking( f_if = configuration->property(role + ".if", 0); dump = configuration->property(role + ".dump", false); pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if(FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if(FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; dump_filename = configuration->property(role + ".dump_filename", diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc index 53a1c4666..35b810048 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc @@ -63,13 +63,13 @@ galileo_e5a_dll_pll_make_tracking_cc( std::string dump_filename, float pll_bw_hz, float dll_bw_hz, - float pll_bw_init_hz, - float dll_bw_init_hz, + float pll_bw_narrow_hz, + float dll_bw_narrow_hz, int ti_ms, float early_late_space_chips) { return galileo_e5a_dll_pll_tracking_cc_sptr(new Galileo_E5a_Dll_Pll_Tracking_cc(if_freq, - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_init_hz, dll_bw_init_hz, ti_ms, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, ti_ms, early_late_space_chips)); } @@ -91,8 +91,8 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc( std::string dump_filename, float pll_bw_hz, float dll_bw_hz, - float pll_bw_init_hz, - float dll_bw_init_hz, + float pll_bw_narrow_hz, + float dll_bw_narrow_hz, int ti_ms, float early_late_space_chips) : gr::block("Galileo_E5a_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)), @@ -114,12 +114,12 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc( d_ti_ms = ti_ms; d_dll_bw_hz = dll_bw_hz; d_pll_bw_hz = pll_bw_hz; - d_dll_bw_init_hz = dll_bw_init_hz; - d_pll_bw_init_hz = pll_bw_init_hz; + d_dll_bw_narrow_hz = dll_bw_narrow_hz; + d_pll_bw_narrow_hz = pll_bw_narrow_hz; // Initialize tracking ========================================== - d_code_loop_filter.set_DLL_BW(d_dll_bw_init_hz); - d_carrier_loop_filter.set_PLL_BW(d_pll_bw_init_hz); + d_code_loop_filter.set_DLL_BW(d_dll_bw_hz); + d_carrier_loop_filter.set_PLL_BW(d_pll_bw_hz); //--- DLL variables -------------------------------------------------------- d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) @@ -214,7 +214,7 @@ Galileo_E5a_Dll_Pll_Tracking_cc::~Galileo_E5a_Dll_Pll_Tracking_cc() } catch(const std::exception & ex) { - LOG(WARNING)<<"Exception in destructor "<set_property("Tracking_5X.dump_filename", "../data/e5a_tracking_ch_"); config->set_property("Tracking_5X.early_late_space_chips", "0.5"); config->set_property("Tracking_5X.order", "2"); - config->set_property("Tracking_5X.pll_bw_hz_init","20.0"); - config->set_property("Tracking_5X.pll_bw_hz", "5"); - config->set_property("Tracking_5X.dll_bw_hz_init","2.0"); - config->set_property("Tracking_5X.dll_bw_hz", "2"); + config->set_property("Tracking_5X.pll_bw_hz","20.0"); + config->set_property("Tracking_5X.dll_bw_hz", "5.0"); + config->set_property("Tracking_5X.pll_bw_narrow_hz","2.0"); + config->set_property("Tracking_5X.pll_bw_narrow_hz", "2.0"); config->set_property("Tracking_5X.ti_ms", "1"); } From b03720bb6050a44026598c4bd83618542018d1e0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 19:45:21 +0100 Subject: [PATCH 06/43] Fix typo --- src/algorithms/libs/gnss_sdr_flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h index 563ffc5de..e7282386e 100644 --- a/src/algorithms/libs/gnss_sdr_flags.h +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -53,7 +53,7 @@ DECLARE_uint32(cn0_min); // Date: Sun, 18 Feb 2018 19:47:09 +0100 Subject: [PATCH 07/43] Document new flags --- docs/manpage/gnss-sdr-manpage | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/manpage/gnss-sdr-manpage b/docs/manpage/gnss-sdr-manpage index 668b6bf3d..f7a9c17f6 100644 --- a/docs/manpage/gnss-sdr-manpage +++ b/docs/manpage/gnss-sdr-manpage @@ -18,6 +18,20 @@ .TP \fB\-log_dir=\fR\fI\fR If defined, overrides the default directory where logs are saved. .TP +\fB\-doppler_max=\fR\fIdoppler\fR If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file), +.TP +\fB\-cn0_samples=\fR\fIsamples\fR Number of correlator outputs used for CN0 estimation. +.TP +\fB\-cn0_min=\fR\fIcn0_min\fR Minimum valid CN0 (in dB-Hz). +.TP +\fB\-max_lock_fail=\fR\fImax_lock_fail\fR Number number of lock failures before dropping satellite. +.TP +\fB\-carrier_lock_th=\fR\fIcarrier_lock_th\fR Carrier lock threshold (in rad). +.TP +\fB\-dll_bw_hz=\fR\fIdll_bw_hz\fR If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file). +.TP +\fB\-pll_bw_hz=\fR\fIpll_bw_hz\fR If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file). +.TP \fB\-RINEX_version=\fI\fR Specifies the RINEX version (2.11 or 3.02). Default: "3.02". .TP \fB\-version\fR Print program version and exit. From f3a3e7d63e7c9f95ef4a5daeb73ab0c016ce8243 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 20:50:16 +0100 Subject: [PATCH 08/43] Make it backward compatible with gflags 2.0, shipped by Debian Jessie --- src/algorithms/libs/gnss_sdr_flags.cc | 18 ++++++++++++++---- src/algorithms/libs/gnss_sdr_flags.h | 9 ++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index b503c845f..074d4a437 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -30,6 +30,15 @@ #include +#include + +static bool ValidateDopplerMax(const char* flagname, gflags::int32 value) +{ + if (value >= 0.0 && value < 1000000.0) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)"); @@ -40,13 +49,14 @@ DEFINE_string(s, "-", DEFINE_string(signal_source, "-", "If defined, path to the file containing the signal samples (overrides the configuration file)"); -DEFINE_uint32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)"); +DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)"); +DEFINE_validator(doppler_max, &ValidateDopplerMax); -DEFINE_uint32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); +DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); -DEFINE_uint32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); +DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); -DEFINE_uint32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); +DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h index e7282386e..6d36ac087 100644 --- a/src/algorithms/libs/gnss_sdr_flags.h +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -34,7 +34,6 @@ #include - DECLARE_string(c); // Date: Sun, 18 Feb 2018 21:16:15 +0100 Subject: [PATCH 09/43] Fix warnings --- .../galileo_e5a_dll_pll_tracking_cc.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc index 35b810048..7b2d1ecee 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc @@ -177,7 +177,7 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc( // CN0 estimation and lock detector buffers d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; + d_Prompt_buffer = new gr_complex[static_cast(FLAGS_cn0_samples)]; d_carrier_lock_test = 1; d_CN0_SNV_dB_Hz = 0; d_carrier_lock_fail_counter = 0; @@ -348,8 +348,8 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() } } // 2. Transform buffer to 1 and -1 - int in_corr[FLAGS_cn0_samples]; - for (unsigned int i = 0; i < FLAGS_cn0_samples; i++) + int in_corr[static_cast(FLAGS_cn0_samples)]; + for (unsigned int i = 0; i < static_cast(FLAGS_cn0_samples); i++) { if (d_Prompt_buffer[i].real() >0) { @@ -366,7 +366,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() for (unsigned int i = 0; i < Galileo_E5a_Q_SECONDARY_CODE_LENGTH; i++) { out_corr = 0; - for (unsigned int j = 0; j < FLAGS_cn0_samples; j++) + for (unsigned int j = 0; j < static_cast(FLAGS_cn0_samples); j++) { //reverse replica sign since i*i=-1 (conjugated complex) out_corr += in_corr[j] * -sec_code_signed[(j + i) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH]; @@ -377,10 +377,10 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() d_secondary_delay = i; } } - if (current_best_ == FLAGS_cn0_samples) // all bits correlate + if (current_best_ == static_cast(FLAGS_cn0_samples)) // all bits correlate { d_secondary_lock = true; - d_secondary_delay = (d_secondary_delay + FLAGS_cn0_samples - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; + d_secondary_delay = (d_secondary_delay + static_cast(FLAGS_cn0_samples) - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; } } @@ -561,7 +561,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < FLAGS_cn0_samples-1) + if (d_cn0_estimation_counter < static_cast(FLAGS_cn0_samples)-1) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_Prompt; @@ -601,9 +601,9 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute else // Secondary lock achieved, monitor carrier lock. { // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, d_fs_in,d_current_ti_ms * Galileo_E5a_CODE_LENGTH_CHIPS); + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, static_cast(FLAGS_cn0_samples), d_fs_in,d_current_ti_ms * Galileo_E5a_CODE_LENGTH_CHIPS); // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, static_cast(FLAGS_cn0_samples)); // Loss of lock detection if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) { From 166e0bdc0aba74e0332e07cbf9b593742dcc434a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 21:19:35 +0100 Subject: [PATCH 10/43] Fix warnimgs --- .../gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc index 7b2d1ecee..8504824f9 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc @@ -377,7 +377,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary() d_secondary_delay = i; } } - if (current_best_ == static_cast(FLAGS_cn0_samples)) // all bits correlate + if (current_best_ == FLAGS_cn0_samples) // all bits correlate { d_secondary_lock = true; d_secondary_delay = (d_secondary_delay + static_cast(FLAGS_cn0_samples) - 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; @@ -561,7 +561,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < static_cast(FLAGS_cn0_samples)-1) + if (d_cn0_estimation_counter < FLAGS_cn0_samples - 1) { // fill buffer with prompt correlator output values d_Prompt_buffer[d_cn0_estimation_counter] = d_Prompt; From e18ea91fd1066f7c4738b629c917c80d2fce67b2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 21:58:23 +0100 Subject: [PATCH 11/43] Add flag validators --- src/algorithms/libs/gnss_sdr_flags.cc | 60 ++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index 074d4a437..0591a6476 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -30,11 +30,61 @@ #include +#include #include -static bool ValidateDopplerMax(const char* flagname, gflags::int32 value) + +static bool ValidateDopplerMax(const char* flagname, int32_t value) { - if (value >= 0.0 && value < 1000000.0) // value is ok + if (value >= 0 && value < 1000000) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + +static bool ValidateCn0Samples(const char* flagname, int32_t value) +{ + if (value > 0 && value < 10000) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + +static bool ValidateCn0Min(const char* flagname, int32_t value) +{ + if (value > 0 && value < 100) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + +static bool ValidateMaxLockFail(const char* flagname, int32_t value) +{ + if (value > 0 && value < 10000) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + +static bool ValidateCarrierLockTh(const char* flagname, double value) +{ + if (value > 0.0 && value < 1.508) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + +static bool ValidateDllBw(const char* flagname, double value) +{ + if (value >= 0.0 && value < 10000.0) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + +static bool ValidatePllBw(const char* flagname, double value) +{ + if (value >= 0.0 && value < 10000.0) // value is ok return true; std::cout << "Invalid value for " << flagname << ": " << value << std::endl; return false; @@ -53,15 +103,21 @@ DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search gr DEFINE_validator(doppler_max, &ValidateDopplerMax); DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); +DEFINE_validator(cn0_samples, &ValidateCn0Samples); DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); +DEFINE_validator(cn0_min, &ValidateCn0Min); DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); +DEFINE_validator(max_lock_fail, &ValidateMaxLockFail); DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); +DEFINE_validator(carrier_lock_th, &ValidateCarrierLockTh); DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)"); +DEFINE_validator(dll_bw_hz, &ValidateDllBw); DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)"); +DEFINE_validator(pll_bw_hz, &ValidatePllBw); From ee18aee92a52b25de2f67c005637cb74f06acdbb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 22:48:47 +0100 Subject: [PATCH 12/43] Fix for gflags 2.0 --- cmake/Modules/FindGFlags.cmake | 6 ++- src/algorithms/libs/CMakeLists.txt | 4 ++ src/algorithms/libs/gnss_sdr_flags.cc | 53 +++++++++++++++------------ 3 files changed, 39 insertions(+), 24 deletions(-) diff --git a/cmake/Modules/FindGFlags.cmake b/cmake/Modules/FindGFlags.cmake index 1aff218f5..804c908b2 100644 --- a/cmake/Modules/FindGFlags.cmake +++ b/cmake/Modules/FindGFlags.cmake @@ -74,7 +74,11 @@ IF(GFlags_ROOT_DIR) SET(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR}) FIND_LIBRARY(GFlags_lib gflags ${GFlags_LIBRARY_DIRS}) - + if(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h) + set(GFLAGS_GREATER_20 TRUE) + else(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h) + set(GFLAGS_GREATER_20 FALSE) + endif(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h) # set up include and link directory include_directories(${GFlags_INCLUDE_DIRS}) link_directories(${GFlags_LIBRARY_DIRS}) diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt index 798741a3c..ef0471f16 100644 --- a/src/algorithms/libs/CMakeLists.txt +++ b/src/algorithms/libs/CMakeLists.txt @@ -93,6 +93,10 @@ if(NOT VOLK_GNSSSDR_FOUND) add_dependencies(gnss_sp_libs volk_gnsssdr_module) endif(NOT VOLK_GNSSSDR_FOUND) +if(${GFLAGS_GREATER_20}) + add_definitions(-DGFLAGS_GREATER_2_0=1) +endif(${GFLAGS_GREATER_20}) + add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h) source_group(Headers FILES gnss_sdr_flags.h) target_link_libraries(gnss_sdr_flags ${GFlags_LIBS}) \ No newline at end of file diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index 0591a6476..ea3d0dfbd 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -33,6 +33,32 @@ #include #include +DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)"); + +DEFINE_string(s, "-", + "If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)"); + +DEFINE_string(signal_source, "-", + "If defined, path to the file containing the signal samples (overrides the configuration file)"); + +DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)"); + +DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); + +DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); + +DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); + +DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); + +DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); + +DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)"); + +DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)"); + + +#if GFLAGS_GREATER_2_0 static bool ValidateDopplerMax(const char* flagname, int32_t value) { @@ -91,33 +117,14 @@ static bool ValidatePllBw(const char* flagname, double value) } -DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)"); - -DEFINE_string(s, "-", - "If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)"); - -DEFINE_string(signal_source, "-", - "If defined, path to the file containing the signal samples (overrides the configuration file)"); - -DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)"); DEFINE_validator(doppler_max, &ValidateDopplerMax); - -DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); DEFINE_validator(cn0_samples, &ValidateCn0Samples); - -DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); DEFINE_validator(cn0_min, &ValidateCn0Min); - -DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); DEFINE_validator(max_lock_fail, &ValidateMaxLockFail); - -DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); DEFINE_validator(carrier_lock_th, &ValidateCarrierLockTh); - -DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); - -DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)"); DEFINE_validator(dll_bw_hz, &ValidateDllBw); - -DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)"); DEFINE_validator(pll_bw_hz, &ValidatePllBw); + + +#endif + From 4c408f5239198123c4b63271f7848c3ee010b384 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 23 Feb 2018 17:57:53 +0100 Subject: [PATCH 13/43] Fix building in ArchLinux --- src/algorithms/acquisition/adapters/CMakeLists.txt | 1 + src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/algorithms/acquisition/adapters/CMakeLists.txt b/src/algorithms/acquisition/adapters/CMakeLists.txt index 9dde86c6a..bf0c1428d 100644 --- a/src/algorithms/acquisition/adapters/CMakeLists.txt +++ b/src/algorithms/acquisition/adapters/CMakeLists.txt @@ -54,6 +54,7 @@ include_directories( ${Boost_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} + ${ARMADILLO_INCLUDE_DIRS} ${GNURADIO_RUNTIME_INCLUDE_DIRS} ${GNURADIO_BLOCKS_INCLUDE_DIRS} ${VOLK_GNSSSDR_INCLUDE_DIRS} diff --git a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt index 0d5d1d907..ca02bb952 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt @@ -45,6 +45,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} + ${ARMADILLO_INCLUDE_DIRS} ${GNURADIO_RUNTIME_INCLUDE_DIRS} ${VOLK_GNSSSDR_INCLUDE_DIRS} ${MATIO_INCLUDE_DIRS} @@ -54,7 +55,7 @@ include_directories( if(OPENCL_FOUND) include_directories( ${OPENCL_INCLUDE_DIRS} ) if(OS_IS_MACOSX) - set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL") + set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL") else(OS_IS_MACOSX) set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES}) endif(OS_IS_MACOSX) @@ -64,13 +65,13 @@ file(GLOB ACQ_GR_BLOCKS_HEADERS "*.h") list(SORT ACQ_GR_BLOCKS_HEADERS) add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS}) source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS}) -#target_link_libraries(acq_gr_blocks gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} -#target_link_libraries(acq_gr_blocks acquisition_lib gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${OPT_LIBRARIES} ${OPT_ACQUISITION_LIBRARIES}) + if(ENABLE_FPGA) target_link_libraries(acq_gr_blocks acquisition_lib gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${OPT_LIBRARIES} ${OPT_ACQUISITION_LIBRARIES}) else(ENABLE_FPGA) target_link_libraries(acq_gr_blocks gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${OPT_LIBRARIES} ${OPT_ACQUISITION_LIBRARIES} ${MATIO_LIBRARIES}) endif(ENABLE_FPGA) + if(NOT VOLK_GNSSSDR_FOUND) add_dependencies(acq_gr_blocks volk_gnsssdr_module) endif(NOT VOLK_GNSSSDR_FOUND) From 8518b44da5acee29bfe2e49d0e47c45af18764fe Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 23 Feb 2018 22:16:20 +0100 Subject: [PATCH 14/43] Fix detection of aclocal in CentOS 7 --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28435b368..2ea704f62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -822,9 +822,9 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c # Ensure that aclocal and libtool are present if(OS_IS_LINUX) if(EXISTS "/usr/bin/libtoolize") - if(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + if(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") # Everything ok, we can move on - else(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + else(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") message(" aclocal has not been found.") message(" You can try to install it by typing:") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") @@ -835,7 +835,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c message(" sudo apt-get install automake") endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "aclocal is required to build glog from source") - endif(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + endif(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") else(EXISTS "/usr/bin/libtoolize") message(" libtool has not been found.") message(" You can try to install it by typing:") From b26e63e753d1bb29f7e42b288458e48a8e255baf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 23 Feb 2018 23:44:57 +0100 Subject: [PATCH 15/43] Add acquisition tests to make check --- src/tests/CMakeLists.txt | 57 ++++++++++--------- ...ileo_e1_pcps_ambiguous_acquisition_test.cc | 1 + ...ong_ambiguous_acquisition_gsoc2013_test.cc | 2 +- .../gps_l1_ca_pcps_acquisition_test.cc | 2 + 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index e63c01736..9aa8f0388 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -700,31 +700,40 @@ else(NOT ${GTEST_DIR_LOCAL}) add_dependencies(gnuradio_block_test gtest) endif(NOT ${GTEST_DIR_LOCAL}) -# add_executable(acq_test ${EXCLUDE} -# ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc -# ${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_acquisition_test.cc -# ${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc -# ) -# target_link_libraries(acq_test ${Boost_LIBRARIES} -# ${GFlags_LIBS} -# ${GLOG_LIBRARIES} -# ${GTEST_LIBRARIES} -# ${GNURADIO_RUNTIME_LIBRARIES} -# ${GNURADIO_BLOCKS_LIBRARIES} -# ${GNURADIO_FILTER_LIBRARIES} -# ${GNURADIO_ANALOG_LIBRARIES} -# gnss_sp_libs -# gnss_rx -# gnss_system_parameters -# signal_generator_blocks -# ${VOLK_GNSSSDR_LIBRARIES} -# ) -# add_test(acq_test acq_test) +add_executable(acq_test + ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc + ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc + ) +target_link_libraries(acq_test ${Boost_LIBRARIES} + ${GFlags_LIBS} + ${GLOG_LIBRARIES} + ${GTEST_LIBRARIES} + ${GNURADIO_RUNTIME_LIBRARIES} + ${GNURADIO_BLOCKS_LIBRARIES} + ${GNURADIO_FILTER_LIBRARIES} + ${GNURADIO_ANALOG_LIBRARIES} + gnss_sp_libs + gnss_rx + gnss_system_parameters + signal_generator_blocks + signal_processing_testing_lib + ${VOLK_GNSSSDR_LIBRARIES} + ) +add_test(acq_test acq_test) +if(NOT ${GTEST_DIR_LOCAL}) + add_dependencies(acq_test acq_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) +else(NOT ${GTEST_DIR_LOCAL}) + add_dependencies(acq_test acq_test gtest) +endif(NOT ${GTEST_DIR_LOCAL}) + + add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc + ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc ) + target_link_libraries(trk_test ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES} @@ -747,9 +756,5 @@ else(NOT ${GTEST_DIR_LOCAL}) endif(NOT ${GTEST_DIR_LOCAL}) -if(${ENABLE_PACKAGING}) - add_dependencies(check gnuradio_block_test trk_test) -else(${ENABLE_PACKAGING}) - add_dependencies(check control_thread_test flowgraph_test gnss_block_test - gnuradio_block_test trk_test) -endif(${ENABLE_PACKAGING}) +add_dependencies(check control_thread_test flowgraph_test gnss_block_test + gnuradio_block_test acq_test trk_test) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc index e0b146fd6..4502358d2 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc index fa1d5dc60..4ce6722c5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc @@ -457,7 +457,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ConnectAndRun) start = std::chrono::system_clock::now(); top_block->run(); // Start threads and wait end = std::chrono::system_clock::now(); - std::chrono::duration elapsed_seconds = end - start; + elapsed_seconds = end - start; }) << "Failure running the top_block."; std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index a432cec1a..1ddd637a7 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,7 @@ #include "gnss_sdr_valve.h" #include "gnss_synchro.h" #include "gnuplot_i.h" +#include "GPS_L1_CA.h" #include "test_flags.h" #include "acquisition_dump_reader.h" #include "gps_l1_ca_pcps_acquisition.h" From 59e49a5eba3d02a1e6109d7ab37f32975c4e077c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 23 Feb 2018 23:46:16 +0100 Subject: [PATCH 16/43] Fix configuration and building when matio is not present --- CMakeLists.txt | 26 +++++++++++++++++++ .../libs/CMakeLists.txt | 3 +++ 2 files changed, 29 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ea704f62..3123aa9d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1098,6 +1098,32 @@ if(NOT MATIO_FOUND) find_package(ZLIB) if(ZLIB_FOUND) get_filename_component(ZLIB_BASE_DIR ${ZLIB_INCLUDE_DIRS} DIRECTORY) + if(OS_IS_LINUX) + if(NOT EXISTS "/usr/bin/libtoolize") + message(" libtool has not been found.") + message(" You can try to install it by typing:") + if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo yum groupinstall 'Development Tools'") + elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") + message(" sudo zypper install libtoool") + else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo apt-get install libtool") + endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(FATAL_ERROR "libtool is required to build matio from source") + endif(NOT EXISTS "/usr/bin/libtoolize") + if(NOT EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + message(" aclocal has not been found.") + message(" You can try to install it by typing:") + if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo yum groupinstall 'Development Tools'") + elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") + message(" sudo zypper install automake") + else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo apt-get install automake") + endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(FATAL_ERROR "aclocal is required to build matio from source") + endif(NOT EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + endif(OS_IS_LINUX) find_package(HDF5) if(HDF5_FOUND) list(GET HDF5_LIBRARIES 0 HDF5_FIRST_DIR) diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt b/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt index ee71cc113..3f19c0854 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt +++ b/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt @@ -39,3 +39,6 @@ list(SORT 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}) +if(NOT MATIO_FOUND) + add_dependencies(signal_processing_testing_lib matio-${GNSSSDR_MATIO_LOCAL_VERSION}) +endif(NOT MATIO_FOUND) \ No newline at end of file From 6eb03cd94c8cacbdb327090e0be72d5502dae480 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 00:13:35 +0100 Subject: [PATCH 17/43] Add matio_test to make check in order to detect outdated matio library --- src/tests/CMakeLists.txt | 18 +++++++++++++++++- src/tests/unit-tests/arithmetic/matio_test.cc | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 9aa8f0388..ecc45fb8e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -700,6 +700,22 @@ else(NOT ${GTEST_DIR_LOCAL}) add_dependencies(gnuradio_block_test gtest) endif(NOT ${GTEST_DIR_LOCAL}) +add_executable(matio_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc + ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/arithmetic/matio_test.cc ) + +target_link_libraries(matio_test ${Boost_LIBRARIES} + ${GFlags_LIBS} + ${GLOG_LIBRARIES} + ${GTEST_LIBRARIES} + ${MATIO_LIBRARIES} + gnss_system_parameters ) +add_test(matio_test matio_test) +if(NOT ${GTEST_DIR_LOCAL}) + add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) +else(NOT ${GTEST_DIR_LOCAL}) + add_dependencies(matio_test gtest) +endif(NOT ${GTEST_DIR_LOCAL}) + add_executable(acq_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -757,4 +773,4 @@ endif(NOT ${GTEST_DIR_LOCAL}) add_dependencies(check control_thread_test flowgraph_test gnss_block_test - gnuradio_block_test acq_test trk_test) + gnuradio_block_test acq_test trk_test matio_test) diff --git a/src/tests/unit-tests/arithmetic/matio_test.cc b/src/tests/unit-tests/arithmetic/matio_test.cc index 552414d5d..5784a2428 100644 --- a/src/tests/unit-tests/arithmetic/matio_test.cc +++ b/src/tests/unit-tests/arithmetic/matio_test.cc @@ -33,6 +33,7 @@ #include #include #include +#include TEST(MatioTest, WriteAndReadDoubles) { From 702257e678703e46c167d3c126c64a5f198d3c3f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 00:40:31 +0100 Subject: [PATCH 18/43] Fix building if matio was not installed in the system --- src/tests/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index ecc45fb8e..2994eb0c4 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -711,9 +711,17 @@ target_link_libraries(matio_test ${Boost_LIBRARIES} gnss_system_parameters ) add_test(matio_test matio_test) if(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) + if(MATIO_FOUND) + add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) + else(MATIO_FOUND) + add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} matio-${GNSSSDR_MATIO_LOCAL_VERSION}) + endif(MATIO_FOUND) else(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(matio_test gtest) + if(MATIO_FOUND) + add_dependencies(matio_test gtest) + else(MATIO_FOUND) + add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION}) + endif(MATIO_FOUND) endif(NOT ${GTEST_DIR_LOCAL}) add_executable(acq_test From 77c4ea9b250fe09ea0927b4dcbc28b3ca485be1d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 00:53:55 +0100 Subject: [PATCH 19/43] Clean includes --- .../apps/volk_gnsssdr-config-info.cc | 9 +++--- .../apps/volk_gnsssdr_option_helpers.cc | 8 ++++- .../apps/volk_gnsssdr_option_helpers.h | 4 +++ .../volk_gnsssdr/apps/volk_gnsssdr_profile.cc | 31 +++++++++++-------- .../volk_gnsssdr/apps/volk_gnsssdr_profile.h | 6 ++++ .../volk_gnsssdr/lib/qa_utils.cc | 28 ++++++++++++----- .../volk_gnsssdr/lib/qa_utils.h | 17 +++++----- .../volk_gnsssdr/lib/testqa.cc | 21 +++++++------ 8 files changed, 80 insertions(+), 44 deletions(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc index 97a42c8c7..1d76658e4 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc @@ -20,10 +20,11 @@ #include #endif -#include -#include "volk_gnsssdr/volk_gnsssdr.h" -#include -#include "volk_gnsssdr_option_helpers.h" +#include // for volk_gnsssdr_available_machines, volk_gnsssdr_c_compiler ... +#include // for operator<<, endl, cout, ostream +#include // for string +#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_get_alignment, volk_gnsssdr_get_machine +#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t void print_alignment() { diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.cc index 298bb062f..61e085423 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.cc @@ -17,8 +17,14 @@ */ #include "volk_gnsssdr_option_helpers.h" +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // for exception +#include // for operator<<, endl, basic_ostream, cout, ostream +#include // for pair + -#include /* * Option type diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.h index 10bde4586..30cb98210 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_option_helpers.h @@ -19,9 +19,13 @@ #ifndef VOLK_VOLK_OPTION_HELPERS_H #define VOLK_VOLK_OPTION_HELPERS_H +#include +#include +#include #include #include + typedef enum { VOID_CALLBACK, diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc index eff989ef5..bf8a7ec77 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) +/* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * This file is part of GNSS-SDR. * @@ -16,19 +16,24 @@ * along with GNSS-SDR. If not, see . */ -#include "qa_utils.h" -#include "kernel_tests.h" -#include "volk_gnsssdr_option_helpers.h" + +#include // for stat +#include // for size_t +#include // for operator<<, basic_ostream +#include // IWYU pragma: keep +#include // for map, map<>::iterator +#include // for pair +#include // for vector, vector<>::const_... +#include // for create_directories, exists +#include // for path, operator<< +#include // for filesystem +#include // for volk_gnsssdr_get_config_path +#include "kernel_tests.h" // for init_test_list +#include "qa_utils.h" // for volk_gnsssdr_test_results_t +#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t +#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t #include "volk_gnsssdr_profile.h" -#include -#include - -#include -#include -#include -#include -#include namespace fs = boost::filesystem; @@ -222,7 +227,7 @@ void write_results(const std::vector *results, bool const fs::path config_path(path); // Until we can update the config on a kernel by kernel basis // do not overwrite volk_gnsssdr_config when using a regex. - if (not fs::exists(config_path.branch_path())) + if (! fs::exists(config_path.branch_path())) { std::cout << "Creating " << config_path.branch_path() << " ..." << std::endl; fs::create_directories(config_path.branch_path()); diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.h index 4530c6be7..26ff1249b 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.h @@ -27,6 +27,12 @@ * ------------------------------------------------------------------------- */ +#include // for bool +#include // for ofstream +#include // for string +#include // for vector + +class volk_test_results_t; void read_results(std::vector *results); diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc index 3d60c2714..35186fc1b 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) +/* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * This file is part of GNSS-SDR. * @@ -17,13 +17,25 @@ */ #include "qa_utils.h" -#include -#include -#include -#include -#include -#include -#include +#include // for assert +#include // for system_clock, duration,... +#include // for sqrt, fabs, abs +#include // for uint16_t, uint64_t,int16_t, int32_t +#include // for memcpy, memset +#include // for operator<< +#include // for cout, cerr +#include // for numeric_limits +#include // for map +#include // for random_device, default_random_engine, uniform_real_distribution +#include // for vector +#include // for auto_any_base +#include // for lexical_cast +#include // for char_separator +#include // for token_iterator +#include // for tokenizer +#include // for volk_gnsssdr_func_desc_t +#include // for volk_gnsssdr_free, volk_gnsssdr_malloc + float uniform() { std::random_device r; diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h index 8188529b0..b7b16a63d 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) +/* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * This file is part of GNSS-SDR. * @@ -23,13 +23,14 @@ #define _DARWIN_C_SOURCE #endif -#include -#include -#include -#include -#include -#include -#include +#include // for bool, false +#include // for NULL +#include // for map +#include // for string, basic_string +#include // for vector +#include // for volk_gnsssdr_func_desc_t +#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t + /************************************************ * VOLK QA type definitions * diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc index 659b111c4..bc9e526dc 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * This file is part of GNSS-SDR. * @@ -18,15 +18,16 @@ */ -#include "qa_utils.h" -#include "kernel_tests.h" - -#include - -#include -#include -#include -#include +#include // for bool, false, true +#include // for operator<<, basic_ostream, endl, char... +#include // IWYU pragma: keep +#include // for map, map<>::iterator, _Rb_tree_iterator +#include // for string, operator<< +#include // for pair +#include // for vector +#include "kernel_tests.h" // for init_test_list +#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t +#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t void print_qa_xml(std::vector results, unsigned int nfails); From 176e8417844248284588d853f733bd39e8bc0e79 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 00:56:03 +0100 Subject: [PATCH 20/43] Add packages for Fedora and Arch Linux --- README.md | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4f153bd5f..7cd4749aa 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ This section describes how to set up the compilation environment in GNU/Linux or GNU/Linux ---------- - * Tested distributions: Ubuntu 14.04 LTS and [above](http://packages.ubuntu.com/search?keywords=gnss-sdr), Debian 8.0 "jessie" and [above](https://packages.debian.org/search?searchon=names&keywords=gnss-sdr), Linaro 15.03 - * Known to work but not continually tested: Arch Linux, Fedora, and openSUSE + * Tested distributions: Ubuntu 16.04 LTS and above; Debian 8.0 "jessie" and above; Fedora 26 and above; CentOS 7; Arch Linux. * Supported microprocessor architectures: * i386: Intel x86 instruction set (32-bit microprocessors). * amd64: also known as x86-64, the 64-bit version of the x86 instruction set, originally created by AMD and implemented by AMD, Intel, VIA and others. @@ -53,7 +52,11 @@ Before building GNSS-SDR, you need to install all the required dependencies. The ### Alternative 1: Install dependencies using software packages -If you want to start building and running GNSS-SDR as quick and easy as possible, the best option is to install all the required dependencies as binary packages. If you are using Debian 8, Ubuntu 14.10 or above, this can be done by copying and pasting the following line in a terminal: +If you want to start building and running GNSS-SDR as quick and easy as possible, the best option is to install all the required dependencies as binary packages. + +#### Debian / Ubuntu + +If you are using Debian 8, Ubuntu 14.10 or above, this can be done by copying and pasting the following line in a terminal: ~~~~~~ $ sudo apt-get install build-essential cmake git libboost-dev libboost-date-time-dev \ @@ -84,6 +87,32 @@ Once you have installed these packages, you can jump directly to [how to downloa Note for Ubuntu 14.04 LTS "trusty" users: you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires gnuradio-dev >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT ```libuhd-dev```, ```gnuradio-dev``` and ```gr-osmosdr``` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. +#### Fedora + +If you are using Fedora 26 or above: + +~~~~~~ +$ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel \ + boost-date-time boost-system boost-filesystem boost-thread boost-chrono \ + boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr blas-devel \ + lapack-devel matio-devel armadillo-devel gflags-devel glog-devel \ + gnutls-devel openssl-devel python-mako python-six +~~~~~~ + +Once you have installed these packages, you can jump directly to [how to download the source code and build GNSS-SDR](#download-and-build-linux). + +#### Arch Linux + +If you are using Arch Linux (with base-devel group installed): + +~~~~~~ +$ pacman -S cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr \ + blas lapack gflags google-glog gnutls openssl python2-mako python2-six \ + libmatio gtest +~~~~~~ + +Once you have installed these packages, you can jump directly to [how to download the source code and build GNSS-SDR](#download-and-build-linux). + ### Alternative 2: Install dependencies using PyBOMBS This option is adequate if you are interested in development, in working with the most recent versions of software dependencies, want more fine tuning on the installed versions, or simply in building everything from the scratch just for the fun of it. In such cases, we recommend to use [PyBOMBS](http://gnuradio.org/pybombs "Python Build Overlay Managed Bundle System wiki") (Python Build Overlay Managed Bundle System), GNU Radio's meta-package manager tool that installs software from source, or whatever the local package manager is, that automatically does all the work for you. Please take a look at the configuration options and general PyBOMBS usage at https://github.com/gnuradio/pybombs. Here we provide a quick step-by-step tutorial. From 30451e95f33f3aac9b5fd26f58b1f8d5da9d5b53 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 01:15:07 +0100 Subject: [PATCH 21/43] Fix detection of aclocal --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3123aa9d2..10d68db86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1111,7 +1111,9 @@ if(NOT MATIO_FOUND) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "libtool is required to build matio from source") endif(NOT EXISTS "/usr/bin/libtoolize") - if(NOT EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + if(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + message(STATUS "aclocal found") + else(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") message(" aclocal has not been found.") message(" You can try to install it by typing:") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") @@ -1122,7 +1124,7 @@ if(NOT MATIO_FOUND) message(" sudo apt-get install automake") endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "aclocal is required to build matio from source") - endif(NOT EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + endif(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") endif(OS_IS_LINUX) find_package(HDF5) if(HDF5_FOUND) From 995367d7767e30ca82201e45d2229f24fd36423d Mon Sep 17 00:00:00 2001 From: osqzss Date: Sat, 24 Feb 2018 15:19:04 +0900 Subject: [PATCH 22/43] Add bladeRF support --- .../adapters/osmosdr_signal_source.cc | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc b/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc index c3c1da374..d4e314911 100644 --- a/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc +++ b/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc @@ -78,13 +78,13 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration, // 1. Make the driver instance OsmosdrSignalSource::driver_instance(); - // For LimeSDR: Set RX antenna - if (!antenna_.empty()) - { - osmosdr_source_->set_antenna(antenna_, 0); - std::cout << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)) << std::endl ; - LOG(INFO) << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)); - } + // For LimeSDR: Set RX antenna + if (!antenna_.empty()) + { + osmosdr_source_->set_antenna(antenna_, 0); + std::cout << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)) << std::endl ; + LOG(INFO) << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)); + } // 2 set sampling rate osmosdr_source_->set_sample_rate(sample_rate_); @@ -97,7 +97,7 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration, LOG(INFO) << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq()); // TODO: Assign the remnant IF from the PLL tune error - std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) ; + std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) << std::endl; LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) ; // 4. set rx gain @@ -113,9 +113,22 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration, osmosdr_source_->set_gain(gain_, 0); osmosdr_source_->set_if_gain(rf_gain_, 0); osmosdr_source_->set_bb_gain(if_gain_, 0); - std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << std::endl; - LOG(INFO) << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain(); + if (!osmosdr_args_.empty() && (osmosdr_args_.find("bladerf") != std::string::npos)) + { + std::cout << boost::format("Actual LNA Gain: %f dB...") % osmosdr_source_->get_gain("LNA",0) << std::endl; + std::cout << boost::format("Actual VGA1 Gain: %f dB...") % osmosdr_source_->get_gain("VGA1",0) << std::endl; + std::cout << boost::format("Actual VGA2 Gain: %f dB...") % osmosdr_source_->get_gain("VGA2",0) << std::endl; + + } + else + { + std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << std::endl; + LOG(INFO) << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain(); + } } + + // Get actual bandwidth + std::cout << boost::format("Actual Bandwidth: %f [Hz]...") % osmosdr_source_->get_bandwidth(0) << std::endl; } else { From 605de9ad2f5439e036232eb23308558871208158 Mon Sep 17 00:00:00 2001 From: osqzss Date: Sat, 24 Feb 2018 15:32:38 +0900 Subject: [PATCH 23/43] Add bladeRF support --- conf/gnss-sdr_GPS_L1_bladeRF.conf | 110 ++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 conf/gnss-sdr_GPS_L1_bladeRF.conf diff --git a/conf/gnss-sdr_GPS_L1_bladeRF.conf b/conf/gnss-sdr_GPS_L1_bladeRF.conf new file mode 100644 index 000000000..84fe13d8b --- /dev/null +++ b/conf/gnss-sdr_GPS_L1_bladeRF.conf @@ -0,0 +1,110 @@ +[GNSS-SDR] + +;######### GLOBAL OPTIONS ################## +GNSS-SDR.internal_fs_sps=2000000 + +;######### SIGNAL_SOURCE CONFIG ############ +SignalSource.implementation=Osmosdr_Signal_Source +SignalSource.item_type=gr_complex +SignalSource.sampling_frequency=2000000 +SignalSource.freq=1575420000 +;# RF Gain: LNA Gain {0, 3, 6} +SignalSource.gain=6 +;# IF Gain: N/A +SignalSource.rf_gain=40 +;# BB Gain: RX VGA1 + VGA2 [5, 60] +SignalSource.if_gain=48 +SignalSource.AGC_enabled=false +SignalSource.samples=0 +SignalSource.repeat=false +;# Next line enables the bladeRF +SignalSource.osmosdr_args=bladerf=0 +SignalSource.enable_throttle_control=false +SignalSource.dump=false +SignalSource.dump_filename=./signal_source.dat + +;######### SIGNAL_CONDITIONER CONFIG ############ +SignalConditioner.implementation=Signal_Conditioner + +;######### DATA_TYPE_ADAPTER CONFIG ############ +DataTypeAdapter.implementation=Pass_Through + +;######### INPUT_FILTER CONFIG ############ +InputFilter.implementation=Freq_Xlating_Fir_Filter +InputFilter.decimation_factor=1 +InputFilter.input_item_type=gr_complex +InputFilter.output_item_type=gr_complex +InputFilter.taps_item_type=float +InputFilter.number_of_taps=5 +InputFilter.number_of_bands=2 +InputFilter.band1_begin=0.0 +InputFilter.band1_end=0.85 +InputFilter.band2_begin=0.9 +InputFilter.band2_end=1.0 +InputFilter.ampl1_begin=1.0 +InputFilter.ampl1_end=1.0 +InputFilter.ampl2_begin=0.0 +InputFilter.ampl2_end=0.0 +InputFilter.band1_error=1.0 +InputFilter.band2_error=1.0 +InputFilter.filter_type=bandpass +InputFilter.grid_density=16 +InputFilter.dump=false +InputFilter.dump_filename=../data/input_filter.dat + +;######### RESAMPLER CONFIG ############ +Resampler.implementation=Pass_Through + +;######### CHANNELS GLOBAL CONFIG ############ +Channels_1C.count=8 +Channels.in_acquisition=1 +Channel.signal=1C + +;######### ACQUISITION GLOBAL CONFIG ############ +Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler +Acquisition_1C.item_type=gr_complex +Acquisition_1C.if=0 +Acquisition_1C.sampled_ms=1 +Acquisition_1C.threshold=0.015 +Acquisition_1C.doppler_max=10000 +Acquisition_1C.doppler_min=-10000 +Acquisition_1C.doppler_step=500 +Acquisition_1C.max_dwells=15 +Acquisition_1C.dump=false +Acquisition_1C.dump_filename=./acq_dump.dat + +;######### TRACKING GLOBAL CONFIG ############ +Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking +Tracking_1C.item_type=gr_complex +Tracking_1C.if=0 +Tracking_1C.pll_bw_hz=40.0; +Tracking_1C.dll_bw_hz=2.0; +Tracking_1C.order=3; +Tracking_1C.early_late_space_chips=0.5; +Tracking_1C.dump=false +Tracking_1C.dump_filename=./tracking_ch_ + +;######### TELEMETRY DECODER GPS CONFIG ############ +TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder +TelemetryDecoder_1C.dump=false + +;######### OBSERVABLES CONFIG ############ +#Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables +Observables.dump=false +Observables.dump_filename=./observables.dat + +;######### PVT CONFIG ############ +;PVT.implementation=RTKLIB_PVT +PVT.positioning_mode=Single +PVT.output_rate_ms=100 +PVT.display_rate_ms=500 +PVT.iono_model=Broadcast +PVT.trop_model=Saastamoinen +PVT.flag_rtcm_server=false +PVT.flag_rtcm_tty_port=false +PVT.rtcm_dump_devname=/dev/pts/1 +PVT.rtcm_tcp_port=2101 +PVT.rtcm_MT1019_rate_ms=5000 +PVT.rtcm_MT1077_rate_ms=1000 +PVT.rinex_version=2 From 041a634bc5f318818d1b37a63af9d8d418083a64 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 12:02:11 +0100 Subject: [PATCH 24/43] Add CentOS instructions --- README.md | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 7cd4749aa..78d965f6d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This section describes how to set up the compilation environment in GNU/Linux or GNU/Linux ---------- - * Tested distributions: Ubuntu 16.04 LTS and above; Debian 8.0 "jessie" and above; Fedora 26 and above; CentOS 7; Arch Linux. + * Tested distributions: Ubuntu 14.04 LTS and above; Debian 8.0 "jessie" and above; Fedora 26 and above; CentOS 7; Arch Linux. * Supported microprocessor architectures: * i386: Intel x86 instruction set (32-bit microprocessors). * amd64: also known as x86-64, the 64-bit version of the x86 instruction set, originally created by AMD and implemented by AMD, Intel, VIA and others. @@ -68,38 +68,43 @@ $ sudo apt-get install build-essential cmake git libboost-dev libboost-date-time Please note that `googletest` was named `libgtest-dev` in distributions older than Debian 9 Stretch and Ubuntu 17.04 Zesty. -Alternatively, and starting from Ubuntu 16.04 LTS, you can install all the required dependencies by adding the line +Note for Ubuntu 14.04 LTS "trusty" users: you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 cames with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed. -~~~~~~ -deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe -~~~~~~ +Note for Debian 8 "jessie" users: please see the note about `libmatio-dev` above. Install `libtool`, `automake` and `libhdf5-dev` instead. -to your ```/etc/apt/sources.list``` file and doing: - -~~~~~~ -$ sudo apt-get update -$ sudo apt-get build-dep gnss-sdr -~~~~~~ - - -Once you have installed these packages, you can jump directly to [how to download the source code and build GNSS-SDR](#download-and-build-linux). - -Note for Ubuntu 14.04 LTS "trusty" users: you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires gnuradio-dev >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT ```libuhd-dev```, ```gnuradio-dev``` and ```gr-osmosdr``` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. +Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). #### Fedora -If you are using Fedora 26 or above: +If you are using Fedora 26 or above, the required software dependencies can be installed by doing: ~~~~~~ $ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel \ boost-date-time boost-system boost-filesystem boost-thread boost-chrono \ - boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr blas-devel \ - lapack-devel matio-devel armadillo-devel gflags-devel glog-devel \ - gnutls-devel openssl-devel python-mako python-six + boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \ + blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \ + glog-devel gnutls-devel openssl-devel python-mako python-six ~~~~~~ -Once you have installed these packages, you can jump directly to [how to download the source code and build GNSS-SDR](#download-and-build-linux). +Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). + +#### CentOS + +If you are using CentOS 7, you can install the dependencies via Extra Packages for Enterprise Linux ([EPEL](https://fedoraproject.org/wiki/EPEL)): + +~~~~~~ +$ sudo yum install wget +$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +$ sudo rpm -Uvh epel-release-latest-7.noarch.rpm +$ sudo yum install make automake gcc gcc-c++ kernel-devel libtool automake \ + hdf5-devel cmake git boost-devel boost-date-time boost-system \ + boost-filesystem boost-thread boost-chrono boost-serialization \ + log4cpp-devel gnuradio-devel gr-osmosdr-devel blas-devel lapack-devel \ + armadillo-devel gnutls-devel openssl-devel python-mako python-six +~~~~~~ + +Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). #### Arch Linux @@ -111,7 +116,7 @@ $ pacman -S cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr libmatio gtest ~~~~~~ -Once you have installed these packages, you can jump directly to [how to download the source code and build GNSS-SDR](#download-and-build-linux). +Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). ### Alternative 2: Install dependencies using PyBOMBS From 6e93bb88ce09159fc591fe17ee31e4d3a4e9f6e9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 12:11:10 +0100 Subject: [PATCH 25/43] Improve markdown --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 78d965f6d..d2ea4a9c6 100644 --- a/README.md +++ b/README.md @@ -66,11 +66,11 @@ $ sudo apt-get install build-essential cmake git libboost-dev libboost-date-time libgnutls-openssl-dev python-mako python-six libmatio-dev googletest ~~~~~~ -Please note that `googletest` was named `libgtest-dev` in distributions older than Debian 9 Stretch and Ubuntu 17.04 Zesty. +Please note that `googletest` was named `libgtest-dev` in distributions older than Debian 9 "stretch" and Ubuntu 17.04 "zesty". -Note for Ubuntu 14.04 LTS "trusty" users: you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 cames with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed. +**Note for Ubuntu 14.04 LTS "trusty" users:** you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 cames with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed. -Note for Debian 8 "jessie" users: please see the note about `libmatio-dev` above. Install `libtool`, `automake` and `libhdf5-dev` instead. +**Note for Debian 8 "jessie" users:** please see the note about `libmatio-dev` above. Install `libtool`, `automake` and `libhdf5-dev` instead. Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). From c3e8f7de7e3ae9e257ca617bdc94a9cfb26be8f4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 12:13:46 +0100 Subject: [PATCH 26/43] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2ea4a9c6..cfd214cb0 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ $ sudo apt-get install build-essential cmake git libboost-dev libboost-date-time Please note that `googletest` was named `libgtest-dev` in distributions older than Debian 9 "stretch" and Ubuntu 17.04 "zesty". -**Note for Ubuntu 14.04 LTS "trusty" users:** you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 cames with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed. +**Note for Ubuntu 14.04 LTS "trusty" users:** you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 came with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed. **Note for Debian 8 "jessie" users:** please see the note about `libmatio-dev` above. Install `libtool`, `automake` and `libhdf5-dev` instead. From 24e1a8f0ac7cb10cc96fa78e85cb2eb509e15d65 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 18:01:10 +0100 Subject: [PATCH 27/43] Set minimal matio version --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10d68db86..5ed16352b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,6 +317,7 @@ set(GNSSSDR_BOOST_MIN_VERSION "1.45") set(GNSSSDR_PYTHON_MIN_VERSION "2.7") set(GNSSSDR_MAKO_MIN_VERSION "0.4.2") set(GNSSSDR_ARMADILLO_MIN_VERSION "4.200.0") +set(GNSSSDR_MATIO_MIN_VERSION "1.5.3") @@ -1094,7 +1095,7 @@ endif(NOT GNUTLS_OPENSSL_LIBRARY) # Matio - https://github.com/tbeu/matio ######################################################################## find_package(MATIO) -if(NOT MATIO_FOUND) +if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERSION}) find_package(ZLIB) if(ZLIB_FOUND) get_filename_component(ZLIB_BASE_DIR ${ZLIB_INCLUDE_DIRS} DIRECTORY) @@ -1182,7 +1183,7 @@ if(NOT MATIO_FOUND) else(ZLIB_FOUND) message(FATAL_ERROR "*** The zlib library is required to build gnss-sdr") endif(ZLIB_FOUND) -endif(NOT MATIO_FOUND) +endif(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERSION}) From bd6d3fcb28577f9090ac8fc54ceeff04d7b072d1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 18:28:52 +0100 Subject: [PATCH 28/43] More verbose info when Matio is found but it is too old --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ed16352b..1dcd4d375 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1096,6 +1096,11 @@ endif(NOT GNUTLS_OPENSSL_LIBRARY) ######################################################################## find_package(MATIO) if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERSION}) + if(MATIO_FOUND) + message(STATUS " Matio installed version (${MATIO_VERSION_STRING}) is too old (>= ${GNSSSDR_MATIO_MIN_VERSION} is required).") + endif(MATIO_FOUND) + message(STATUS " Matio will be downloaded and built automatically") + message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") find_package(ZLIB) if(ZLIB_FOUND) get_filename_component(ZLIB_BASE_DIR ${ZLIB_INCLUDE_DIRS} DIRECTORY) @@ -1113,7 +1118,7 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS message(FATAL_ERROR "libtool is required to build matio from source") endif(NOT EXISTS "/usr/bin/libtoolize") if(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") - message(STATUS "aclocal found") + message(STATUS "Automake found.") else(EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") message(" aclocal has not been found.") message(" You can try to install it by typing:") From 12f61c6d1932bd9958276ac082323f60d3bf81cf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 19:34:46 +0100 Subject: [PATCH 29/43] Update manpage --- docs/manpage/gnss-sdr-manpage | 43 +++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/docs/manpage/gnss-sdr-manpage b/docs/manpage/gnss-sdr-manpage index f7a9c17f6..6714e6916 100644 --- a/docs/manpage/gnss-sdr-manpage +++ b/docs/manpage/gnss-sdr-manpage @@ -1,10 +1,10 @@ .\" Manpage for gnss\-sdr. .\" Contact carles.fernandez@cttc.es to correct errors or typos. -.TH gnss\-sdr 1 "05 Feb 2017" "0.0.9" "gnss\-sdr man page" +.TH gnss\-sdr 1 "24 Feb 2018" "0.0.9" "gnss\-sdr man page" .SH NAME \fBgnss\-sdr\fR \- GNSS Software Defined Receiver. .SH SYNOPSIS -\fBgnss\-sdr \-config_file=\fR\fI\fR [OPTION]... +\fBgnss\-sdr \-c=\fR\fI\fR [OPTION]... .SH DESCRIPTION \fBgnss\-sdr\fR is a Global Navigation Satellite Systems Software Defined Receiver written in C++. It implements all the signal processing chain, taking as input raw samples coming from the output of an Analog\-to\-Digital Converter, and processing them up to the computation of the Position\-Velocity\-Time solution, including the generation of code and phase measurements. \.TP @@ -12,31 +12,44 @@ .SH OPTIONS \fBgnss\-sdr\fR takes the following options: .TP -\fB\-config_file=\fR\fI\fR Set the configuration file. +\fB\-c=\fR\fI\fR or \fB\-config_file=\fR\fI\fR +Set the configuration file. .TP -\fB\-signal_source=\fR\fI\fR If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file). +\fB\-s=\fR\fI\fR or \fB\-signal_source=\fR\fI\fR +If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file). .TP -\fB\-log_dir=\fR\fI\fR If defined, overrides the default directory where logs are saved. +\fB\-log_dir=\fR\fI\fR +If defined, overrides the default directory where logs are saved. .TP -\fB\-doppler_max=\fR\fIdoppler\fR If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file), +\fB\-doppler_max=\fR\fIdoppler\fR +If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file). .TP -\fB\-cn0_samples=\fR\fIsamples\fR Number of correlator outputs used for CN0 estimation. +\fB\-cn0_samples=\fR\fIsamples\fR +Number of correlator outputs used for CN0 estimation. .TP -\fB\-cn0_min=\fR\fIcn0_min\fR Minimum valid CN0 (in dB-Hz). +\fB\-cn0_min=\fR\fIcn0_min\fR +Minimum valid CN0 (in dB-Hz). .TP -\fB\-max_lock_fail=\fR\fImax_lock_fail\fR Number number of lock failures before dropping satellite. +\fB\-max_lock_fail=\fR\fImax_lock_fail\fR +Number number of lock failures before dropping satellite. .TP -\fB\-carrier_lock_th=\fR\fIcarrier_lock_th\fR Carrier lock threshold (in rad). +\fB\-carrier_lock_th=\fR\fIcarrier_lock_th\fR +Carrier lock threshold (in rad). .TP -\fB\-dll_bw_hz=\fR\fIdll_bw_hz\fR If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file). +\fB\-dll_bw_hz=\fR\fIdll_bw_hz\fR +If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file). .TP -\fB\-pll_bw_hz=\fR\fIpll_bw_hz\fR If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file). +\fB\-pll_bw_hz=\fR\fIpll_bw_hz\fR +If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file). .TP -\fB\-RINEX_version=\fI\fR Specifies the RINEX version (2.11 or 3.02). Default: "3.02". +\fB\-RINEX_version=\fI\fR +Specifies the RINEX version (2.11 or 3.02). Default: "3.02". .TP -\fB\-version\fR Print program version and exit. +\fB\-version\fR +Print program version and exit. .TP -\fB\-help\fR Print all the available commandline flags and exit. +\fB\-help\fR +Print all the available commandline flags and exit. .SH SEE ALSO .BR volk_gnsssdr_profile (1) \.TP From eb0b01d0aa5acd38a7cb178dca83c3293776a7fc Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 01:00:17 +0100 Subject: [PATCH 30/43] Add doppler_step flag --- src/algorithms/channel/adapters/channel.cc | 6 ++-- src/algorithms/libs/gnss_sdr_flags.cc | 33 ++++++++++++++-------- src/algorithms/libs/gnss_sdr_flags.h | 27 +++++++++--------- 3 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/algorithms/channel/adapters/channel.cc b/src/algorithms/channel/adapters/channel.cc index e66074b7a..59c56eeee 100644 --- a/src/algorithms/channel/adapters/channel.cc +++ b/src/algorithms/channel/adapters/channel.cc @@ -33,6 +33,7 @@ #include #include #include "configuration_interface.h" +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -74,8 +75,9 @@ Channel::Channel(ConfigurationInterface *configuration, unsigned int channel, // IMPORTANT: Do not change the order between set_doppler_step and set_threshold - unsigned int doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast(channel_) + ".doppler_step" ,0); - if(doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_+".doppler_step", 500); + unsigned int doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast(channel_) + ".doppler_step", 0); + if(doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500); + if(FLAGS_doppler_step != 0) doppler_step = static_cast(FLAGS_doppler_step); DLOG(INFO) << "Channel "<< channel_ << " Doppler_step = " << doppler_step; acq_->set_doppler_step(doppler_step); diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index ea3d0dfbd..0aa8221b5 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -33,29 +33,31 @@ #include #include -DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)"); +DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)."); DEFINE_string(s, "-", - "If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)"); + "If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)."); DEFINE_string(signal_source, "-", - "If defined, path to the file containing the signal samples (overrides the configuration file)"); + "If defined, path to the file containing the signal samples (overrides the configuration file)."); -DEFINE_int32(doppler_max, 0, "If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file)"); +DEFINE_int32(doppler_max, 0, "If defined, sets the maximum Doppler value in the search grid, in Hz (overrides the configuration file)."); -DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation"); +DEFINE_int32(doppler_step, 0, "If defined, sets the frequency step in the search grid, in Hz (overrides the configuration file)."); -DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)"); +DEFINE_int32(cn0_samples, 20, "Number of correlator outputs used for CN0 estimation."); -DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite"); +DEFINE_int32(cn0_min, 25, "Minimum valid CN0 (in dB-Hz)."); -DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)"); +DEFINE_int32(max_lock_fail, 50, "Number number of lock failures before dropping satellite."); -DEFINE_string(RINEX_version, "3.02", "Specifies the RINEX version (2.11 or 3.02)"); +DEFINE_double(carrier_lock_th, 0.85, "Carrier lock threshold (in rad)."); -DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)"); +DEFINE_string(RINEX_version, "-", "If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file."); -DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)"); +DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file)."); + +DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file)."); #if GFLAGS_GREATER_2_0 @@ -68,6 +70,14 @@ static bool ValidateDopplerMax(const char* flagname, int32_t value) return false; } +static bool ValidateDopplerStep(const char* flagname, int32_t value) +{ + if (value >= 0 && value < 10000) // value is ok + return true; + std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + return false; +} + static bool ValidateCn0Samples(const char* flagname, int32_t value) { if (value > 0 && value < 10000) // value is ok @@ -118,6 +128,7 @@ static bool ValidatePllBw(const char* flagname, double value) DEFINE_validator(doppler_max, &ValidateDopplerMax); +DEFINE_validator(doppler_step, &ValidateDopplerStep); DEFINE_validator(cn0_samples, &ValidateCn0Samples); DEFINE_validator(cn0_min, &ValidateCn0Min); DEFINE_validator(max_lock_fail, &ValidateMaxLockFail); diff --git a/src/algorithms/libs/gnss_sdr_flags.h b/src/algorithms/libs/gnss_sdr_flags.h index 6d36ac087..7ccbdabe5 100644 --- a/src/algorithms/libs/gnss_sdr_flags.h +++ b/src/algorithms/libs/gnss_sdr_flags.h @@ -34,28 +34,29 @@ #include -DECLARE_string(c); // Date: Sun, 25 Feb 2018 01:10:27 +0100 Subject: [PATCH 31/43] Give priority to RINEX_printer flag over configuration file. Fix building. --- src/algorithms/PVT/adapters/CMakeLists.txt | 1 + src/algorithms/PVT/adapters/rtklib_pvt.cc | 25 +++++++++-- src/algorithms/PVT/libs/rinex_printer.cc | 43 +------------------ .../channel/adapters/CMakeLists.txt | 3 +- 4 files changed, 26 insertions(+), 46 deletions(-) diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt index baf58e507..71568cf88 100644 --- a/src/algorithms/PVT/adapters/CMakeLists.txt +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -28,6 +28,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib + ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${ARMADILLO_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index c21303ab3..967109d53 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -36,7 +36,7 @@ #include #include #include "configuration_interface.h" - +#include "gnss_sdr_flags.h" using google::LogMessage; @@ -70,11 +70,30 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, // RINEX version int rinex_version = configuration->property(role + ".rinex_version", 3); - if( (rinex_version < 2) || (rinex_version > 3) ) + if ( FLAGS_RINEX_version.compare("3.01") == 0 ) { - //warn user and set the default rinex_version = 3; } + else if ( FLAGS_RINEX_version.compare("3.02") == 0 ) + { + rinex_version = 3; + } + else if ( FLAGS_RINEX_version.compare("3") == 0 ) + { + rinex_version = 3; + } + else if ( FLAGS_RINEX_version.compare("2.11") == 0 ) + { + rinex_version = 2; + } + else if ( FLAGS_RINEX_version.compare("2.10") == 0 ) + { + rinex_version = 2; + } + else if ( FLAGS_RINEX_version.compare("2") == 0 ) + { + rinex_version = 2; + } // RTCM Printer settings bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false); diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index b2dfa2a68..f1dec9219 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -43,7 +43,6 @@ #include #include #include -#include "gnss_sdr_flags.h" using google::LogMessage; @@ -143,57 +142,17 @@ Rinex_Printer::Rinex_Printer(int conf_version) observationCode["GPS_L1_CA_v2"] = "1"; observationCode["GLONASS_G1_CA_v2"] = "1"; - if ( FLAGS_RINEX_version.compare("3.01") == 0 ) - { - version = 3; - stringVersion = "3.01"; - } - else if ( FLAGS_RINEX_version.compare("3.02") == 0 ) - { - version = 3; - stringVersion = "3.02"; - } - else if ( FLAGS_RINEX_version.compare("3") == 0 ) - { - version = 3; - stringVersion = "3.02"; - } - else if ( FLAGS_RINEX_version.compare("2.11") == 0 ) - { - version = 2; - stringVersion = "2.11"; - } - else if ( FLAGS_RINEX_version.compare("2.10") == 0 ) - { - version = 2; - stringVersion = "2.10"; - } - else if ( FLAGS_RINEX_version.compare("2") == 0 ) + if(conf_version == 2) { version = 2; stringVersion = "2.11"; } else { - LOG(WARNING) << "Unknown RINEX version " << FLAGS_RINEX_version << " (must be 2.11 or 3.02). Using 3.02"; version = 3; stringVersion = "3.02"; } - if(conf_version != 0) - { - if(conf_version == 2) - { - version = 2; - stringVersion = "2.11"; - } - if(conf_version == 3) - { - version = 3; - stringVersion = "3.02"; - } - } - numberTypesObservations = 4; // Number of available types of observable in the system fake_cnav_iode = 1; } diff --git a/src/algorithms/channel/adapters/CMakeLists.txt b/src/algorithms/channel/adapters/CMakeLists.txt index e7c1c8660..b2d74748e 100644 --- a/src/algorithms/channel/adapters/CMakeLists.txt +++ b/src/algorithms/channel/adapters/CMakeLists.txt @@ -24,6 +24,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/receiver ${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} @@ -34,4 +35,4 @@ file(GLOB CHANNEL_ADAPTER_HEADERS "*.h") list(SORT CHANNEL_ADAPTER_HEADERS) add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES} ${CHANNEL_ADAPTER_HEADERS}) source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS}) -target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES}) +target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES} gnss_sdr_flags) From 4561bf9f9caf2a8274ecad26c08495c8d4382d61 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 01:41:18 +0100 Subject: [PATCH 32/43] Update manpage with new -doppler_step flag and add default values. --- docs/manpage/gnss-sdr-manpage | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/manpage/gnss-sdr-manpage b/docs/manpage/gnss-sdr-manpage index 6714e6916..06cf36465 100644 --- a/docs/manpage/gnss-sdr-manpage +++ b/docs/manpage/gnss-sdr-manpage @@ -21,29 +21,32 @@ If defined, path to the file containing the signal samples (overrides the data f \fB\-log_dir=\fR\fI\fR If defined, overrides the default directory where logs are saved. .TP -\fB\-doppler_max=\fR\fIdoppler\fR +\fB\-doppler_max=\fR\fI\fR If defined, maximum Doppler value in the search grid, in Hz (overrides the configuration file). .TP -\fB\-cn0_samples=\fR\fIsamples\fR -Number of correlator outputs used for CN0 estimation. +\fB\-doppler_step=\fR\fI\fR +If defined, sets the frequency step in the search grid, in Hz (overrides the configuration file). .TP -\fB\-cn0_min=\fR\fIcn0_min\fR -Minimum valid CN0 (in dB-Hz). +\fB\-cn0_samples=\fR\fI\fR +Number of correlators outputs (one per integration time) used for CN0 estimation. It defaults to 20 outputs. .TP -\fB\-max_lock_fail=\fR\fImax_lock_fail\fR -Number number of lock failures before dropping satellite. +\fB\-cn0_min=\fR\fI\fR +Minimum valid CN0 (in dB-Hz). It defaults to 25 dB-Hz. .TP -\fB\-carrier_lock_th=\fR\fIcarrier_lock_th\fR -Carrier lock threshold (in rad). +\fB\-max_lock_fail=\fR\fI\fR +Number of lock failures before dropping satellite. It defaults to 50 failures. .TP -\fB\-dll_bw_hz=\fR\fIdll_bw_hz\fR +\fB\-carrier_lock_th=\fR\fI\fR +Carrier lock error threshold (in rad). It defaults to 0.85 rad (48.7 degrees). +.TP +\fB\-dll_bw_hz=\fR\fI\fR If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file). .TP -\fB\-pll_bw_hz=\fR\fIpll_bw_hz\fR +\fB\-pll_bw_hz=\fR\fI\fR If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file). .TP \fB\-RINEX_version=\fI\fR -Specifies the RINEX version (2.11 or 3.02). Default: "3.02". +If defined, specifies the RINEX version (2.11 or 3.02). Default: "3.02". Overrides the configuration file. .TP \fB\-version\fR Print program version and exit. From 9e37e51447b2a202052a10c7ba0d67874423d4c4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 01:48:21 +0100 Subject: [PATCH 33/43] Be more specific on required boost headers --- src/main/main.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/main.cc b/src/main/main.cc index af45ab3a7..493332ec3 100644 --- a/src/main/main.cc +++ b/src/main/main.cc @@ -44,7 +44,9 @@ #include #include #include -#include +#include // for create_directories, exists +#include // for path, operator<< +#include // for filesystem #include #include "control_thread.h" #include "concurrent_queue.h" From 946d3dae9f834a075059d696732de85019841dce Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 13:27:27 +0100 Subject: [PATCH 34/43] Replace memset by std::fill_n. This fix warnings in GCC 8.0.1 (Fedora Rawhide). The warnings were: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct std::complex'; use assignment or value-initialization instead [-Wclass-memaccess] --- .../gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc | 4 ++-- src/tests/unit-tests/arithmetic/conjugate_test.cc | 6 +++--- src/tests/unit-tests/arithmetic/magnitude_squared_test.cc | 4 ++-- src/tests/unit-tests/arithmetic/multiply_test.cc | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index 0aa8f1410..fc36cfa85 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -31,7 +31,7 @@ */ #include "pcps_acquisition_fine_doppler_cc.h" -#include // std::rotate +#include // std::rotate, std::fill_n #include #include #include @@ -331,7 +331,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true); //zero padding the entire vector - memset(fft_operator->get_inbuf(), 0, fft_size_extended * sizeof(gr_complex)); + std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0)); //1. generate local code aligned with the acquisition code phase estimation gr_complex *code_replica = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); diff --git a/src/tests/unit-tests/arithmetic/conjugate_test.cc b/src/tests/unit-tests/arithmetic/conjugate_test.cc index 1b0aaa8cb..9867b5584 100644 --- a/src/tests/unit-tests/arithmetic/conjugate_test.cc +++ b/src/tests/unit-tests/arithmetic/conjugate_test.cc @@ -29,7 +29,7 @@ * ------------------------------------------------------------------------- */ - +#include #include #include #include @@ -44,7 +44,7 @@ TEST(ConjugateTest, StandardCComplexImplementation) { std::complex* input = new std::complex[FLAGS_size_conjugate_test]; std::complex* output = new std::complex[FLAGS_size_conjugate_test]; - memset(input, 0, sizeof(std::complex) * FLAGS_size_conjugate_test); + std::fill_n(input, FLAGS_size_conjugate_test, std::complex(0.0, 0.0)); std::chrono::time_point start, end; start = std::chrono::system_clock::now(); @@ -118,7 +118,7 @@ TEST(ConjugateTest, VolkComplexImplementation) { std::complex* input = static_cast*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex), volk_gnsssdr_get_alignment())); std::complex* output = static_cast*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex), volk_gnsssdr_get_alignment())); - memset(input, 0, sizeof(std::complex) * FLAGS_size_conjugate_test); + std::fill_n(input, FLAGS_size_conjugate_test, std::complex(0.0, 0.0)); std::chrono::time_point start, end; start = std::chrono::system_clock::now(); diff --git a/src/tests/unit-tests/arithmetic/magnitude_squared_test.cc b/src/tests/unit-tests/arithmetic/magnitude_squared_test.cc index 6238b5c75..cefa52e21 100644 --- a/src/tests/unit-tests/arithmetic/magnitude_squared_test.cc +++ b/src/tests/unit-tests/arithmetic/magnitude_squared_test.cc @@ -30,7 +30,7 @@ * ------------------------------------------------------------------------- */ - +#include #include #include #include @@ -115,7 +115,7 @@ TEST(MagnitudeSquaredTest, ArmadilloComplexImplementation) TEST(MagnitudeSquaredTest, VolkComplexImplementation) { std::complex* input = static_cast*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(std::complex), volk_gnsssdr_get_alignment())); - memset(input, 0, sizeof(std::complex) * FLAGS_size_magnitude_test); + std::fill_n(input, FLAGS_size_magnitude_test, std::complex(0.0, 0.0)); float* output = static_cast(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(float), volk_gnsssdr_get_alignment())); std::chrono::time_point start, end; start = std::chrono::system_clock::now(); diff --git a/src/tests/unit-tests/arithmetic/multiply_test.cc b/src/tests/unit-tests/arithmetic/multiply_test.cc index 093bca5f9..809ff8d11 100644 --- a/src/tests/unit-tests/arithmetic/multiply_test.cc +++ b/src/tests/unit-tests/arithmetic/multiply_test.cc @@ -30,7 +30,7 @@ * ------------------------------------------------------------------------- */ - +#include #include #include #include @@ -45,7 +45,7 @@ TEST(MultiplyTest, StandardCDoubleImplementation) { double* input = new double[FLAGS_size_multiply_test]; double* output = new double[FLAGS_size_multiply_test]; - memset(input, 0, sizeof(double) * FLAGS_size_multiply_test); + std::fill_n(input, FLAGS_size_multiply_test, 0.0); std::chrono::time_point start, end; start = std::chrono::system_clock::now(); @@ -98,7 +98,7 @@ TEST(MultiplyTest, StandardCComplexImplementation) { std::complex* input = new std::complex[FLAGS_size_multiply_test]; std::complex* output = new std::complex[FLAGS_size_multiply_test]; - memset(input, 0, sizeof(std::complex) * FLAGS_size_multiply_test); + std::fill_n(input, FLAGS_size_multiply_test, std::complex(0.0, 0.0)); std::chrono::time_point start, end; start = std::chrono::system_clock::now(); @@ -180,7 +180,7 @@ TEST(MultiplyTest, VolkComplexImplementation) { std::complex* input = static_cast*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(std::complex), volk_gnsssdr_get_alignment())); std::complex* output = static_cast*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(std::complex), volk_gnsssdr_get_alignment())); - memset(input, 0, sizeof(std::complex) * FLAGS_size_multiply_test); + std::fill_n(input, FLAGS_size_multiply_test, std::complex(0.0, 0.0)); std::chrono::time_point start, end; start = std::chrono::system_clock::now(); From e17f9268a8af0346c47378f1a9a43ccd6a465f42 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 13:29:01 +0100 Subject: [PATCH 35/43] Fix warning in GCC 8.0.1 (Fedora Rawhide) The warning was: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] --- src/core/libs/supl/supl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/libs/supl/supl.c b/src/core/libs/supl/supl.c index 6a06bb252..021b65327 100644 --- a/src/core/libs/supl/supl.c +++ b/src/core/libs/supl/supl.c @@ -221,7 +221,7 @@ int EXPORT supl_server_connect(supl_ctx_t *ctx, char *server) { SSLeay_add_ssl_algorithms(); // meth = TLSv1_client_method(); - meth = SSLv23_client_method(); + meth = (SSL_METHOD*)SSLv23_client_method(); SSL_load_error_strings(); ctx->ssl_ctx = SSL_CTX_new(meth); if (!ctx->ssl_ctx) return E_SUPL_CONNECT; From 5c77a394d7850fb68d3873c0af0eab682b298438 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 13:34:13 +0100 Subject: [PATCH 36/43] Replace memset by std::fill_n --- .../gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index fc36cfa85..0f80cf3bd 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -366,7 +366,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star int counter = 0; float fftFreqBins[fft_size_extended]; - memset(fftFreqBins, 0, fft_size_extended * sizeof(float)); + std::fill_n(fftFreqBins, fft_size_extended, 0.0); for (int k = 0; k < (fft_size_extended / 2); k++) { From 372790392d310c1112ea86e6eec9a026fe42da94 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 22:10:07 +0100 Subject: [PATCH 37/43] Add info about specification of flags --- docs/manpage/gnss-sdr-manpage | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/manpage/gnss-sdr-manpage b/docs/manpage/gnss-sdr-manpage index 06cf36465..997df725d 100644 --- a/docs/manpage/gnss-sdr-manpage +++ b/docs/manpage/gnss-sdr-manpage @@ -9,11 +9,23 @@ \fBgnss\-sdr\fR is a Global Navigation Satellite Systems Software Defined Receiver written in C++. It implements all the signal processing chain, taking as input raw samples coming from the output of an Analog\-to\-Digital Converter, and processing them up to the computation of the Position\-Velocity\-Time solution, including the generation of code and phase measurements. \.TP \fBgnss\-sdr\fR is able to work with raw data files or, if there is computational power enough, in real time with suitable radio frequency front\-ends. The whole receiver is defined in a single configuration file, and therefore users can define theirs. +\.TP +There is some flexibility in how flags may be specified. The following examples are equivalent: +\.RS 8 +\.TP +gnss\-sdr \-c=/home/user/rx.conf +\.TP +gnss\-sdr \-\-c=/home/user/rx.conf +\.TP +gnss\-sdr \-c /home/user/rx.conf +\.TP +gnss\-sdr \-\-c /home/user/rx.conf +\.RE .SH OPTIONS \fBgnss\-sdr\fR takes the following options: .TP \fB\-c=\fR\fI\fR or \fB\-config_file=\fR\fI\fR -Set the configuration file. +Set the configuration file. This flag is mandatory. .TP \fB\-s=\fR\fI\fR or \fB\-signal_source=\fR\fI\fR If defined, path to the file containing the signal samples (overrides the data file specified in the configuration file). From 24f6003ba08a484536b0ac28bb7b67558c09d572 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 22:49:06 +0100 Subject: [PATCH 38/43] Remove iostream from header files and in redundant places such as in unit tests --- src/algorithms/PVT/libs/hybrid_ls_pvt.h | 1 - src/algorithms/PVT/libs/kml_printer.h | 4 +- src/algorithms/PVT/libs/nmea_printer.h | 1 - src/algorithms/PVT/libs/rinex_printer.h | 1 - src/algorithms/PVT/libs/rtcm_printer.cc | 1 - src/algorithms/PVT/libs/rtcm_printer.h | 1 - src/algorithms/PVT/libs/rtklib_solver.h | 1 - .../gnuradio_blocks/labsat23_source.cc | 1 + .../gnuradio_blocks/labsat23_source.h | 6 +- src/core/libs/gnss_sdr_supl_client.h | 1 - .../glonass_gnav_utc_model.cc | 2 +- .../glonass_gnav_utc_model.h | 1 - src/core/system_parameters/gnss_satellite.cc | 97 ++++++++----------- src/core/system_parameters/gnss_satellite.h | 1 - .../system_parameters/gps_cnav_ephemeris.cc | 8 +- .../system_parameters/gps_cnav_utc_model.cc | 13 +-- .../system_parameters/gps_cnav_utc_model.h | 2 +- .../control-plane/file_configuration_test.cc | 1 - ...8ms_ambiguous_acquisition_gsoc2013_test.cc | 1 - ...cps_ambiguous_acquisition_gsoc2013_test.cc | 1 - ...e1_pcps_ambiguous_acquisition_gsoc_test.cc | 1 - ...ileo_e1_pcps_ambiguous_acquisition_test.cc | 1 - ...wsr_ambiguous_acquisition_gsoc2013_test.cc | 1 - ...ync_ambiguous_acquisition_gsoc2014_test.cc | 1 - ...ong_ambiguous_acquisition_gsoc2013_test.cc | 4 - ...cps_acquisition_gsoc2014_gensource_test.cc | 1 - ...ss_l1_ca_pcps_acquisition_gsoc2017_test.cc | 1 - .../glonass_l1_ca_pcps_acquisition_test.cc | 1 - ...ps_l1_ca_pcps_acquisition_gsoc2013_test.cc | 1 - .../gps_l1_ca_pcps_acquisition_test.cc | 1 - .../gps_l1_ca_pcps_acquisition_test_fpga.cc | 1 - ...a_pcps_opencl_acquisition_gsoc2013_test.cc | 1 - ...cps_quicksync_acquisition_gsoc2014_test.cc | 1 - ..._ca_pcps_tong_acquisition_gsoc2013_test.cc | 1 - .../gps_l2_m_pcps_acquisition_test.cc | 1 - .../filter/fir_filter_test.cc | 3 +- .../filter/notch_filter_lite_test.cc | 3 +- .../filter/notch_filter_test.cc | 3 +- .../filter/pulse_blanking_filter_test.cc | 3 +- .../libs/acquisition_dump_reader.cc | 74 +++++++------- .../libs/observables_dump_reader.cc | 1 + .../libs/observables_dump_reader.h | 1 - .../libs/tlm_dump_reader.cc | 1 + .../libs/tlm_dump_reader.h | 1 - .../libs/tracking_dump_reader.cc | 1 + .../libs/tracking_dump_reader.h | 1 - .../libs/tracking_true_obs_reader.cc | 1 + .../libs/tracking_true_obs_reader.h | 1 - .../libs/true_observables_reader.cc | 1 + .../libs/true_observables_reader.h | 1 - .../observables/hybrid_observables_test.cc | 1 - .../pvt/nmea_printer_test.cc | 1 - .../pvt/rinex_printer_test.cc | 1 - .../pvt/rtcm_printer_test.cc | 22 +---- .../direct_resampler_conditioner_cc_test.cc | 1 - .../resampler/mmse_resampler_test.cc | 1 - .../gps_l1_ca_telemetry_decoder_test.cc | 1 - .../galileo_e1_dll_pll_veml_tracking_test.cc | 1 - .../tracking/galileo_e5a_tracking_test.cc | 1 - ...onass_l1_ca_dll_pll_c_aid_tracking_test.cc | 1 - .../glonass_l1_ca_dll_pll_tracking_test.cc | 1 - .../gps_l1_ca_dll_pll_tracking_test.cc | 1 - .../gps_l1_ca_dll_pll_tracking_test_fpga.cc | 1 - .../gps_l2_m_dll_pll_tracking_test.cc | 1 - 64 files changed, 102 insertions(+), 192 deletions(-) diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.h b/src/algorithms/PVT/libs/hybrid_ls_pvt.h index 1a658793b..4e026b913 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.h +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.h @@ -33,7 +33,6 @@ #define GNSS_SDR_HYBRID_LS_PVT_H_ #include -#include #include #include #include "ls_pvt.h" diff --git a/src/algorithms/PVT/libs/kml_printer.h b/src/algorithms/PVT/libs/kml_printer.h index 7a08a9166..9a0ca8a2f 100644 --- a/src/algorithms/PVT/libs/kml_printer.h +++ b/src/algorithms/PVT/libs/kml_printer.h @@ -33,11 +33,11 @@ #ifndef GNSS_SDR_KML_PRINTER_H_ #define GNSS_SDR_KML_PRINTER_H_ -#include +#include "pvt_solution.h" #include #include #include -#include "pvt_solution.h" + /*! * \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth) diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index 8e594547e..6e83523f6 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -37,7 +37,6 @@ #define GNSS_SDR_NMEA_PRINTER_H_ -#include #include #include #include "pvt_solution.h" diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h index 8f4580208..0aa6abb99 100644 --- a/src/algorithms/PVT/libs/rinex_printer.h +++ b/src/algorithms/PVT/libs/rinex_printer.h @@ -53,7 +53,6 @@ #include #include -#include #include // for stringstream #include // for setprecision #include diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index 3d6a1e56b..c5518dddf 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -32,7 +32,6 @@ */ #include "rtcm_printer.h" -#include #include #include // for O_RDWR #include // for tcgetattr diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h index 21fdaeddf..5c1445713 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.h +++ b/src/algorithms/PVT/libs/rtcm_printer.h @@ -35,7 +35,6 @@ #define GNSS_SDR_RTCM_PRINTER_H_ #include // std::ofstream -#include // std::cout #include // std::shared_ptr #include "rtcm.h" diff --git a/src/algorithms/PVT/libs/rtklib_solver.h b/src/algorithms/PVT/libs/rtklib_solver.h index d8703548e..bed0b9cde 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.h +++ b/src/algorithms/PVT/libs/rtklib_solver.h @@ -55,7 +55,6 @@ #define GNSS_SDR_RTKLIB_SOLVER_H_ #include -#include #include #include #include "rtklib_rtkpos.h" diff --git a/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc b/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc index fe9a9c4f7..03b35b2be 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc +++ b/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc @@ -34,6 +34,7 @@ #include "labsat23_source.h" #include +#include #include diff --git a/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.h b/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.h index ffc1b440b..2444087c1 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.h +++ b/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.h @@ -32,10 +32,10 @@ #define GNSS_SDR_LABSAT23_SOURCE_H #include -#include -#include +#include #include -#include +#include + class labsat23_source; diff --git a/src/core/libs/gnss_sdr_supl_client.h b/src/core/libs/gnss_sdr_supl_client.h index b1b089174..ddb484e8d 100644 --- a/src/core/libs/gnss_sdr_supl_client.h +++ b/src/core/libs/gnss_sdr_supl_client.h @@ -34,7 +34,6 @@ #ifndef GNSS_SDR_SUPL_CLIENT_H_ #define GNSS_SDR_SUPL_CLIENT_H_ -#include #include #include #include diff --git a/src/core/system_parameters/glonass_gnav_utc_model.cc b/src/core/system_parameters/glonass_gnav_utc_model.cc index ec9d5e20e..2dc7fd2b9 100644 --- a/src/core/system_parameters/glonass_gnav_utc_model.cc +++ b/src/core/system_parameters/glonass_gnav_utc_model.cc @@ -31,7 +31,6 @@ */ #include "glonass_gnav_utc_model.h" -#include Glonass_Gnav_Utc_Model::Glonass_Gnav_Utc_Model() { @@ -44,6 +43,7 @@ Glonass_Gnav_Utc_Model::Glonass_Gnav_Utc_Model() d_B2 = 0.0; } + double Glonass_Gnav_Utc_Model::utc_time(double glonass_time_corrected) { double t_utc; diff --git a/src/core/system_parameters/glonass_gnav_utc_model.h b/src/core/system_parameters/glonass_gnav_utc_model.h index 9e84762d6..7d981d44c 100644 --- a/src/core/system_parameters/glonass_gnav_utc_model.h +++ b/src/core/system_parameters/glonass_gnav_utc_model.h @@ -36,7 +36,6 @@ #include "boost/assign.hpp" #include -#include /*! * \brief This class is a storage for the GLONASS GNAV UTC MODEL data as described in GLONASS ICD (Edition 5.1) diff --git a/src/core/system_parameters/gnss_satellite.cc b/src/core/system_parameters/gnss_satellite.cc index 9970455be..629dcb878 100644 --- a/src/core/system_parameters/gnss_satellite.cc +++ b/src/core/system_parameters/gnss_satellite.cc @@ -39,8 +39,6 @@ Gnss_Satellite::Gnss_Satellite() } - - Gnss_Satellite::Gnss_Satellite(const std::string& system_, unsigned int PRN_) { Gnss_Satellite::reset(); @@ -50,15 +48,10 @@ Gnss_Satellite::Gnss_Satellite(const std::string& system_, unsigned int PRN_) } - - Gnss_Satellite::~Gnss_Satellite() {} - - - void Gnss_Satellite::reset() { system_set = {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"}; @@ -74,7 +67,6 @@ void Gnss_Satellite::reset() } - std::ostream& operator<<(std::ostream &out, const Gnss_Satellite &sat) // output { std::string tag(""); @@ -138,23 +130,23 @@ void Gnss_Satellite::set_system(const std::string& system_) void Gnss_Satellite::update_PRN(unsigned int PRN_) { if (system.compare("Glonass") != 0) - { - DLOG(INFO) << "Trying to update PRN for not GLONASS system"; - PRN = 0; - } + { + DLOG(INFO) << "Trying to update PRN for not GLONASS system"; + PRN = 0; + } else - { - if (PRN_ < 1 or PRN_ > 24) - { - DLOG(INFO) << "This PRN is not defined"; - // Adjusting for PRN 26, now used in - PRN = PRN_; - } - else - { - PRN = PRN_; - } - } + { + if (PRN_ < 1 or PRN_ > 24) + { + DLOG(INFO) << "This PRN is not defined"; + // Adjusting for PRN 26, now used in + PRN = PRN_; + } + else + { + PRN = PRN_; + } + } } @@ -179,17 +171,17 @@ void Gnss_Satellite::set_PRN(unsigned int PRN_) } } else if (system.compare("Glonass") == 0) - { - if (PRN_ < 1 or PRN_ > 24) - { - DLOG(INFO) << "This PRN is not defined"; - PRN = 0; - } - else - { - PRN = PRN_; - } - } + { + if (PRN_ < 1 or PRN_ > 24) + { + DLOG(INFO) << "This PRN is not defined"; + PRN = 0; + } + else + { + PRN = PRN_; + } + } else if (system.compare("SBAS") == 0) { if (PRN_ == 122){ PRN = PRN_; } // WAAS Inmarsat 3F4 (AOR-W) @@ -205,15 +197,15 @@ void Gnss_Satellite::set_PRN(unsigned int PRN_) } else if (system.compare("Galileo") == 0) { - if (PRN_ < 1 or PRN_ > 36) - { - DLOG(INFO) << "This PRN is not defined"; - PRN = 0; - } - else - { - PRN = PRN_; - } + if (PRN_ < 1 or PRN_ > 36) + { + DLOG(INFO) << "This PRN is not defined"; + PRN = 0; + } + else + { + PRN = PRN_; + } } else { @@ -241,10 +233,6 @@ unsigned int Gnss_Satellite::get_PRN() const } - - - - std::string Gnss_Satellite::get_system() const { // Get the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"} @@ -253,6 +241,7 @@ std::string Gnss_Satellite::get_system() const return system_; } + std::string Gnss_Satellite::get_system_short() const { // Get the satellite system {"G", "R", "S", "E", "C"} @@ -260,8 +249,6 @@ std::string Gnss_Satellite::get_system_short() const } - - std::string Gnss_Satellite::get_block() const { // Get the satellite block @@ -271,16 +258,14 @@ std::string Gnss_Satellite::get_block() const } - std::string Gnss_Satellite::what_block(const std::string& system_, unsigned int PRN_) { std::string block_ = "Unknown"; if (system_.compare("GPS") == 0) { + // info from https://www.navcen.uscg.gov/?Do=constellationStatus switch ( PRN_ ) { - // info from https://www.navcen.uscg.gov/?Do=constellationStatus - case 1 : block_ = std::string("IIF"); // Plane D break; @@ -382,14 +367,12 @@ std::string Gnss_Satellite::what_block(const std::string& system_, unsigned int } } - if (system_.compare("Glonass") == 0) { - switch ( PRN_ ) - { // Info from http://www.sdcm.ru/smglo/grupglo?version=eng&site=extern // See also http://www.glonass-center.ru/en/GLONASS/ - + switch ( PRN_ ) + { case 1 : block_ = std::string("1"); // Plane 1 rf_link = 1; diff --git a/src/core/system_parameters/gnss_satellite.h b/src/core/system_parameters/gnss_satellite.h index 75ea70ac1..395303479 100644 --- a/src/core/system_parameters/gnss_satellite.h +++ b/src/core/system_parameters/gnss_satellite.h @@ -34,7 +34,6 @@ #include #include -#include #include diff --git a/src/core/system_parameters/gps_cnav_ephemeris.cc b/src/core/system_parameters/gps_cnav_ephemeris.cc index f46cfc310..852462c68 100644 --- a/src/core/system_parameters/gps_cnav_ephemeris.cc +++ b/src/core/system_parameters/gps_cnav_ephemeris.cc @@ -32,7 +32,6 @@ #include "gps_cnav_ephemeris.h" #include -#include Gps_CNAV_Ephemeris::Gps_CNAV_Ephemeris() { @@ -120,8 +119,8 @@ double Gps_CNAV_Ephemeris::sv_clock_drift(double transmitTime) dt = check_t(transmitTime - d_Toc); d_satClkDrift = d_A_f0 + d_A_f1 * dt + d_A_f2 * (dt * dt) + sv_clock_relativistic_term(transmitTime); - //Correct satellite group delay - d_satClkDrift-=d_TGD; + // Correct satellite group delay + d_satClkDrift -= d_TGD; return d_satClkDrift; } @@ -201,7 +200,6 @@ double Gps_CNAV_Ephemeris::satellitePosition(double transmitTime) const double A_REF = 26559710.0; // See IS-GPS-200H, pp. 170 double d_sqrt_A = sqrt(A_REF + d_DELTA_A); - const double GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2] const double OMEGA_DOT_REF = -2.6e-9; // semicircles / s, see IS-GPS-200H pp. 164 const double OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Earth rotation rate, [rad/s] @@ -218,7 +216,7 @@ double Gps_CNAV_Ephemeris::satellitePosition(double transmitTime) // Mean motion difference from computed value - double delta_n_a=d_Delta_n+0.5*d_DELTA_DOT_N*tk; + double delta_n_a = d_Delta_n + 0.5 * d_DELTA_DOT_N * tk; // Corrected mean motion n = n0 + delta_n_a; diff --git a/src/core/system_parameters/gps_cnav_utc_model.cc b/src/core/system_parameters/gps_cnav_utc_model.cc index e4380ba9d..9159935f3 100644 --- a/src/core/system_parameters/gps_cnav_utc_model.cc +++ b/src/core/system_parameters/gps_cnav_utc_model.cc @@ -49,13 +49,8 @@ double Gps_CNAV_Utc_Model::utc_time(double gpstime_corrected, int i_GPS_week) { double t_utc; double t_utc_daytime; - double Delta_t_UTC = d_DeltaT_LS + d_A0 + d_A1 * (gpstime_corrected - d_t_OT + 604800 * static_cast(i_GPS_week - i_WN_T)); + double Delta_t_UTC = d_DeltaT_LS + d_A0 + d_A1 * (gpstime_corrected - d_t_OT + 604800 * static_cast(i_GPS_week - i_WN_T)); - //std::cout<<"d_DeltaT_LS="<(i_GPS_week - i_WN_T)); + /* FOR CNAV: Replace the 20.3.3.5.2.4c with 30.3.3.6.2 UTC and GPS Time as follows */ + double tmp_d = (gpstime_corrected - d_t_OT + 604800 * static_cast(i_GPS_week - i_WN_T)); Delta_t_UTC = d_DeltaT_LSF + d_A0 + d_A1 * tmp_d + d_A2*tmp_d*tmp_d; t_utc_daytime = fmod(gpstime_corrected - Delta_t_UTC, 86400); } diff --git a/src/core/system_parameters/gps_cnav_utc_model.h b/src/core/system_parameters/gps_cnav_utc_model.h index b595a4439..9705945a2 100644 --- a/src/core/system_parameters/gps_cnav_utc_model.h +++ b/src/core/system_parameters/gps_cnav_utc_model.h @@ -34,7 +34,7 @@ #include "boost/assign.hpp" #include -#include + /*! * \brief This class is a storage for the GPS UTC MODEL data as described in in IS-GPS-200H diff --git a/src/tests/unit-tests/control-plane/file_configuration_test.cc b/src/tests/unit-tests/control-plane/file_configuration_test.cc index 173b7f18b..0165cb2a6 100644 --- a/src/tests/unit-tests/control-plane/file_configuration_test.cc +++ b/src/tests/unit-tests/control-plane/file_configuration_test.cc @@ -31,7 +31,6 @@ #include -#include #include "file_configuration.h" diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc index 9d6f79c8e..e405a49f6 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc @@ -31,7 +31,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc index 0f484fdba..51624006d 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc index ae587a1b3..8f69f3c1d 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc @@ -42,7 +42,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc index 4502358d2..4a257bbec 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc index ba4c01e2d..b5b4e2b86 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc index b6cb14a8a..0cb5c50cf 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc index 4ce6722c5..6e526f998 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc @@ -30,11 +30,7 @@ * ------------------------------------------------------------------------- */ - - - #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc index 86f2f85b3..8b9819ae0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc @@ -30,7 +30,6 @@ */ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc index 47e56df36..ff09100a1 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc index 95b73e6e3..b7755482e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc index 6243fb8bf..70f7394e0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index 1ddd637a7..f9de000d1 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -33,7 +33,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc index 985e7d16e..bae5e5735 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc index 1d070e69d..7c73877aa 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc index 02d44029a..761b8b2fa 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc @@ -33,7 +33,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc index cfff6ff70..6ecc2da52 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc @@ -33,7 +33,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc index be5a6cc69..7062f8e17 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc @@ -33,7 +33,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc index 3d5b4a1af..9fa38e4a5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc @@ -30,8 +30,7 @@ #include #include -#include -#include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc b/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc index 13896442c..c01768db2 100644 --- a/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc @@ -30,8 +30,7 @@ #include #include -#include -#include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_test.cc index a6a13dc42..cc180b7fd 100644 --- a/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/filter/notch_filter_test.cc @@ -30,8 +30,7 @@ #include #include -#include -#include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc index 1b09b7367..ec07cf68b 100644 --- a/src/tests/unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc @@ -30,8 +30,7 @@ #include #include -#include -#include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc index 6e9d3e493..7f9b6c888 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc @@ -30,62 +30,62 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include #include "acquisition_dump_reader.h" +#include +#include +#include bool acquisition_dump_reader::read_binary_acq() { mat_t* matfile = Mat_Open(d_dump_filename.c_str(), MAT_ACC_RDONLY); if( matfile == NULL) - { - std::cout << "¡¡¡Unreachable Acquisition dump file!!!" << std::endl; - return false; - } + { + std::cout << "¡¡¡Unreachable Acquisition dump file!!!" << std::endl; + return false; + } matvar_t* var_= Mat_VarRead(matfile, "grid"); if( var_ == NULL) - { - std::cout << "¡¡¡Unreachable grid variable into Acquisition dump file!!!" << std::endl; - Mat_Close(matfile); - return false; - } + { + std::cout << "¡¡¡Unreachable grid variable into Acquisition dump file!!!" << std::endl; + Mat_Close(matfile); + return false; + } if(var_->rank != 2) - { - std::cout << "Invalid Acquisition dump file: rank error" << std::endl; - Mat_VarFree(var_); - Mat_Close(matfile); - return false; - } + { + std::cout << "Invalid Acquisition dump file: rank error" << std::endl; + Mat_VarFree(var_); + Mat_Close(matfile); + return false; + } if((var_->dims[0] != d_samples_per_code) or (var_->dims[1] != d_num_doppler_bins)) - { - std::cout << "Invalid Acquisition dump file: dimension matrix error" << std::endl; - if(var_->dims[0] != d_samples_per_code) std::cout << "Expected " << d_samples_per_code << " samples per code. Obtained " << var_->dims[0] << std::endl; - if(var_->dims[1] != d_num_doppler_bins) std::cout << "Expected " << d_num_doppler_bins << " Doppler bins. Obtained " << var_->dims[1] << std::endl; - Mat_VarFree(var_); - Mat_Close(matfile); - return false; - } + { + std::cout << "Invalid Acquisition dump file: dimension matrix error" << std::endl; + if(var_->dims[0] != d_samples_per_code) std::cout << "Expected " << d_samples_per_code << " samples per code. Obtained " << var_->dims[0] << std::endl; + if(var_->dims[1] != d_num_doppler_bins) std::cout << "Expected " << d_num_doppler_bins << " Doppler bins. Obtained " << var_->dims[1] << std::endl; + Mat_VarFree(var_); + Mat_Close(matfile); + return false; + } if(var_->data_type != MAT_T_SINGLE) - { - std::cout << "Invalid Acquisition dump file: data type error" << std::endl; - Mat_VarFree(var_); - Mat_Close(matfile); - return false; - } + { + std::cout << "Invalid Acquisition dump file: data type error" << std::endl; + Mat_VarFree(var_); + Mat_Close(matfile); + return false; + } std::vector >::iterator it1; std::vector::iterator it2; float* aux = static_cast(var_->data); int k = 0; float normalization_factor = std::pow(d_samples_per_code, 2); for(it1 = mag.begin(); it1 != mag.end(); it1++) - { - for(it2 = it1->begin(); it2 != it1->end(); it2++) { - *it2 = static_cast(std::sqrt(aux[k])) / normalization_factor; - k++; + for(it2 = it1->begin(); it2 != it1->end(); it2++) + { + *it2 = static_cast(std::sqrt(aux[k])) / normalization_factor; + k++; + } } - } Mat_VarFree(var_); Mat_Close(matfile); diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc index 47832b888..d3b8ef1b8 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc @@ -29,6 +29,7 @@ */ #include "observables_dump_reader.h" +#include bool observables_dump_reader::read_binary_obs() { diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h index 205c5cd9b..dc2cc2eb8 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h @@ -31,7 +31,6 @@ #ifndef GNSS_SDR_OBSERVABLES_DUMP_READER_H #define GNSS_SDR_OBSERVABLES_DUMP_READER_H -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc index 0a0993c70..645b82ab5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc @@ -29,6 +29,7 @@ */ #include "tlm_dump_reader.h" +#include bool tlm_dump_reader::read_binary_obs() { diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h index 1ffd3c217..ff0f3d5c1 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h @@ -31,7 +31,6 @@ #ifndef GNSS_SDR_TLM_DUMP_READER_H #define GNSS_SDR_TLM_DUMP_READER_H -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc index 1ff2c67e3..f23048c18 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc @@ -29,6 +29,7 @@ */ #include "tracking_dump_reader.h" +#include bool tracking_dump_reader::read_binary_obs() { diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h index 1c84ed9e3..f30802ba5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h @@ -31,7 +31,6 @@ #ifndef GNSS_SDR_TRACKING_DUMP_READER_H #define GNSS_SDR_TRACKING_DUMP_READER_H -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc index bc407fc20..7aadfc94f 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc @@ -29,6 +29,7 @@ */ #include "tracking_true_obs_reader.h" +#include bool tracking_true_obs_reader::read_binary_obs() { diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h index 08b69f433..4b57df24a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h @@ -31,7 +31,6 @@ #ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H #define GNSS_SDR_TRACKING_TRUE_OBS_READER_H -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc index 8b4bcb07b..afb6626ef 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc @@ -29,6 +29,7 @@ */ #include "true_observables_reader.h" +#include bool true_observables_reader::read_binary_obs() { diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h index 8913cf61d..acdcda139 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h @@ -31,7 +31,6 @@ #ifndef GNSS_SDR_TRUE_OBSERVABLES_READER_H #define GNSS_SDR_TRUE_OBSERVABLES_READER_H -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc index d9b02fdbb..3f5923460 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc index 328b4c998..9ccec49d5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc @@ -30,7 +30,6 @@ #include -#include #include #include #include "nmea_printer.h" diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc index 963ab0186..0652249e0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc @@ -28,7 +28,6 @@ * ------------------------------------------------------------------------- */ -#include #include #include "rinex_printer.h" diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc index 13c28d711..672474b6b 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc @@ -28,13 +28,9 @@ * ------------------------------------------------------------------------- */ -//#include -//#include + #include -//#include -//#include #include "rtcm_printer.h" -//#include "gps_ephemeris.h" TEST(RtcmPrinterTest, Instantiate) @@ -51,22 +47,6 @@ TEST(RtcmPrinterTest, Instantiate) TEST(RtcmPrinterTest, Run) { - // std::string file_name = "./gps_ephemeris_rx.xml"; - // std::map gps_ephemeris_map; - // try - // { - // std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in); - // boost::archive::xml_iarchive xml(ifs); - // gps_ephemeris_map.clear(); - // xml >> boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", gps_ephemeris_map); - // ifs.close(); - // } - // catch (const std::exception& e) - // { - // //LOG(WARNING) << e.what() << "File: " << file_name; - // //std::cout << "File not found" << std::endl; - // } - std::string filename = "test.rtcm"; bool flag_rtcm_tty_port = false; std::string rtcm_dump_devname = "/dev/pts/4"; diff --git a/src/tests/unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc b/src/tests/unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc index 6792608be..f0b3ac238 100644 --- a/src/tests/unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc b/src/tests/unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc index a571d44a7..b2a723991 100644 --- a/src/tests/unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc @@ -30,7 +30,6 @@ */ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc index 3f4587fae..d0982266c 100644 --- a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc index ea9740b90..b9b72729f 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc index 670e44312..887158baa 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc index e845b0d22..00d77a6be 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc index 6625fda4f..69e9ba4c7 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 32d0388cf..ce7c52fb2 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -31,7 +31,6 @@ */ #include -#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc index 43442611f..da2b3eb9c 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc @@ -33,7 +33,6 @@ #include #include -#include #include #include #include // to test the FPGA we have to create a simultaneous task to send the samples using the DMA and stop the test diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc index bc750c062..8a2f31281 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc @@ -32,7 +32,6 @@ #include -#include #include #include #include From 658e677fc3453a39db3d0d46c5d0be3aebd8aeef Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 26 Feb 2018 03:15:53 +0100 Subject: [PATCH 39/43] Reorder includes: local headers first, then 3rd-party library headers, and finally standard headers --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 7 +-- src/algorithms/PVT/adapters/rtklib_pvt.h | 2 +- .../PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 9 ++-- .../PVT/gnuradio_blocks/rtklib_pvt_cc.h | 17 +++---- src/algorithms/PVT/libs/geojson_printer.cc | 5 ++- src/algorithms/PVT/libs/geojson_printer.h | 2 +- src/algorithms/PVT/libs/hybrid_ls_pvt.cc | 2 +- src/algorithms/PVT/libs/hybrid_ls_pvt.h | 6 +-- src/algorithms/PVT/libs/kml_printer.cc | 2 +- src/algorithms/PVT/libs/ls_pvt.cc | 4 +- src/algorithms/PVT/libs/nmea_printer.cc | 4 +- src/algorithms/PVT/libs/nmea_printer.h | 3 +- src/algorithms/PVT/libs/pvt_solution.cc | 2 +- src/algorithms/PVT/libs/pvt_solution.h | 2 +- src/algorithms/PVT/libs/rinex_printer.cc | 10 ++--- src/algorithms/PVT/libs/rinex_printer.h | 12 ++--- src/algorithms/PVT/libs/rtcm_printer.cc | 5 ++- src/algorithms/PVT/libs/rtcm_printer.h | 3 +- src/algorithms/PVT/libs/rtklib_solver.cc | 2 +- src/algorithms/PVT/libs/rtklib_solver.h | 8 ++-- .../galileo_e1_pcps_ambiguous_acquisition.cc | 9 ++-- .../galileo_e1_pcps_ambiguous_acquisition.h | 8 ++-- .../adapters/galileo_e5a_pcps_acquisition.cc | 9 ++-- .../adapters/galileo_e5a_pcps_acquisition.h | 7 +-- .../glonass_l1_ca_pcps_acquisition.cc | 6 +-- .../adapters/glonass_l1_ca_pcps_acquisition.h | 9 ++-- .../adapters/gps_l1_ca_pcps_acquisition.cc | 7 +-- .../adapters/gps_l1_ca_pcps_acquisition.h | 9 ++-- .../adapters/gps_l2_m_pcps_acquisition.cc | 6 +-- .../adapters/gps_l2_m_pcps_acquisition.h | 8 ++-- .../adapters/gps_l5i_pcps_acquisition.cc | 6 +-- .../adapters/gps_l5i_pcps_acquisition.h | 9 ++-- .../gnuradio_blocks/pcps_acquisition.cc | 7 ++- .../gnuradio_blocks/pcps_acquisition.h | 5 +-- .../pcps_acquisition_fine_doppler_cc.cc | 12 ++--- .../pcps_acquisition_fine_doppler_cc.h | 6 +-- .../pcps_quicksync_acquisition_cc.cc | 8 ++-- .../pcps_quicksync_acquisition_cc.h | 10 ++--- .../pcps_tong_acquisition_cc.cc | 6 +-- .../pcps_tong_acquisition_cc.h | 7 +-- src/algorithms/channel/adapters/channel.cc | 5 ++- src/algorithms/channel/adapters/channel.h | 10 ++--- src/algorithms/channel/libs/channel_fsm.cc | 3 +- src/algorithms/channel/libs/channel_fsm.h | 7 +-- .../channel/libs/channel_msg_receiver_cc.h | 2 +- .../conditioner/adapters/signal_conditioner.h | 3 +- .../adapters/byte_to_short.cc | 3 +- .../adapters/byte_to_short.h | 5 +-- .../adapters/ibyte_to_cbyte.cc | 4 +- .../adapters/ibyte_to_cbyte.h | 5 +-- .../adapters/ibyte_to_complex.cc | 2 +- .../adapters/ibyte_to_complex.h | 7 ++- .../adapters/ibyte_to_cshort.cc | 3 +- .../adapters/ibyte_to_cshort.h | 7 ++- .../adapters/ishort_to_complex.cc | 2 +- .../adapters/ishort_to_complex.h | 7 ++- .../adapters/ishort_to_cshort.cc | 2 +- .../adapters/ishort_to_cshort.h | 5 +-- .../adapters/beamformer_filter.cc | 4 +- .../input_filter/adapters/beamformer_filter.h | 4 +- .../input_filter/adapters/fir_filter.cc | 3 +- .../input_filter/adapters/fir_filter.h | 16 +++---- .../adapters/freq_xlating_fir_filter.cc | 2 +- .../adapters/freq_xlating_fir_filter.h | 10 ++--- .../input_filter/adapters/notch_filter.cc | 5 ++- .../input_filter/adapters/notch_filter.h | 7 ++- .../adapters/notch_filter_lite.cc | 6 +-- .../input_filter/adapters/notch_filter_lite.h | 7 ++- .../adapters/pulse_blanking_filter.cc | 8 ++-- .../adapters/pulse_blanking_filter.h | 6 +-- .../gnuradio_blocks/beamformer.cc | 6 +-- .../input_filter/gnuradio_blocks/notch_cc.cc | 5 +-- .../gnuradio_blocks/notch_lite_cc.cc | 6 +-- .../gnuradio_blocks/pulse_blanking_cc.cc | 3 +- .../libs/complex_float_to_complex_byte.cc | 6 +-- .../libs/galileo_e1_signal_processing.cc | 2 +- .../libs/galileo_e5_signal_processing.cc | 2 +- src/algorithms/libs/gnss_sdr_flags.cc | 2 +- src/algorithms/libs/gnss_sdr_valve.cc | 6 +-- src/algorithms/libs/gnss_signal_processing.cc | 2 +- src/algorithms/libs/gps_l2c_signal.cc | 4 +- src/algorithms/libs/gps_l5_signal.cc | 10 ++--- src/algorithms/libs/pass_through.cc | 5 +-- src/algorithms/libs/pass_through.h | 8 ++-- src/algorithms/libs/rtklib/rtklib.h | 6 +-- .../apps/volk_gnsssdr-config-info.cc | 4 +- .../volk_gnsssdr/apps/volk_gnsssdr_profile.cc | 22 +++++----- .../volk_gnsssdr/lib/qa_utils.cc | 14 +++--- .../volk_gnsssdr/lib/qa_utils.h | 4 +- .../volk_gnsssdr/lib/testqa.cc | 6 +-- .../adapters/hybrid_observables.cc | 5 ++- .../observables/adapters/hybrid_observables.h | 5 +-- .../gnuradio_blocks/hybrid_observables_cc.cc | 27 +++++++----- .../gnuradio_blocks/hybrid_observables_cc.h | 4 +- .../adapters/direct_resampler_conditioner.cc | 10 ++--- .../adapters/direct_resampler_conditioner.h | 4 +- .../adapters/mmse_resampler_conditioner.cc | 6 +-- .../adapters/mmse_resampler_conditioner.h | 4 +- .../direct_resampler_conditioner_cb.cc | 2 - .../direct_resampler_conditioner_cc.cc | 3 +- .../direct_resampler_conditioner_cs.cc | 2 - .../adapters/signal_generator.cc | 2 +- .../adapters/signal_generator.h | 9 ++-- .../gnuradio_blocks/signal_generator_c.cc | 7 ++- .../gnuradio_blocks/signal_generator_c.h | 9 ++-- .../adapters/file_signal_source.cc | 10 ++--- .../adapters/file_signal_source.h | 5 +-- .../adapters/flexiband_signal_source.cc | 2 +- .../adapters/flexiband_signal_source.h | 4 +- .../adapters/fmcomms2_signal_source.cc | 5 ++- .../adapters/fmcomms2_signal_source.h | 4 +- .../adapters/gen_signal_source.cc | 3 +- .../adapters/gen_signal_source.h | 6 +-- .../adapters/gn3s_signal_source.cc | 2 +- .../adapters/gn3s_signal_source.h | 4 +- .../adapters/labsat_signal_source.cc | 5 ++- .../adapters/labsat_signal_source.h | 5 +-- .../adapters/nsr_file_signal_source.cc | 8 ++-- .../adapters/nsr_file_signal_source.h | 7 ++- .../adapters/osmosdr_signal_source.cc | 9 ++-- .../adapters/osmosdr_signal_source.h | 6 +-- .../adapters/plutosdr_signal_source.cc | 4 +- .../adapters/plutosdr_signal_source.h | 5 ++- .../adapters/raw_array_signal_source.cc | 4 +- .../adapters/raw_array_signal_source.h | 5 +-- .../adapters/rtl_tcp_signal_source.cc | 7 +-- .../adapters/rtl_tcp_signal_source.h | 9 ++-- .../adapters/spir_file_signal_source.cc | 8 ++-- .../adapters/spir_file_signal_source.h | 7 ++- .../spir_gss6450_file_signal_source.cc | 6 +-- .../spir_gss6450_file_signal_source.h | 10 ++--- .../two_bit_cpx_file_signal_source.cc | 8 ++-- .../adapters/two_bit_cpx_file_signal_source.h | 7 ++- .../two_bit_packed_file_signal_source.cc | 11 +++-- .../two_bit_packed_file_signal_source.h | 7 ++- .../adapters/uhd_signal_source.cc | 11 ++--- .../adapters/uhd_signal_source.h | 7 +-- .../gnuradio_blocks/rtl_tcp_signal_source_c.h | 4 +- .../gnuradio_blocks/unpack_2bit_samples.h | 3 +- .../signal_source/libs/rtl_tcp_dongle_info.cc | 2 +- .../adapters/galileo_e1b_telemetry_decoder.cc | 13 +++--- .../adapters/galileo_e1b_telemetry_decoder.h | 4 +- .../adapters/galileo_e5a_telemetry_decoder.cc | 15 +++---- .../adapters/galileo_e5a_telemetry_decoder.h | 5 +-- .../glonass_l1_ca_telemetry_decoder.cc | 16 +++---- .../glonass_l1_ca_telemetry_decoder.h | 3 +- .../adapters/gps_l1_ca_telemetry_decoder.cc | 16 +++---- .../adapters/gps_l1_ca_telemetry_decoder.h | 5 +-- .../adapters/gps_l2c_telemetry_decoder.cc | 15 +++---- .../adapters/gps_l2c_telemetry_decoder.h | 5 +-- .../adapters/gps_l5_telemetry_decoder.cc | 11 ++--- .../adapters/gps_l5_telemetry_decoder.h | 3 +- .../adapters/sbas_l1_telemetry_decoder.cc | 8 ++-- .../adapters/sbas_l1_telemetry_decoder.h | 4 +- .../galileo_e1b_telemetry_decoder_cc.cc | 8 ++-- .../galileo_e1b_telemetry_decoder_cc.h | 11 +++-- .../galileo_e5a_telemetry_decoder_cc.cc | 6 +-- .../galileo_e5a_telemetry_decoder_cc.h | 10 ++--- .../glonass_l1_ca_telemetry_decoder_cc.h | 11 +++-- .../gps_l1_ca_telemetry_decoder_cc.cc | 4 +- .../gps_l1_ca_telemetry_decoder_cc.h | 10 ++--- .../gps_l2c_telemetry_decoder_cc.cc | 12 ++--- .../gps_l2c_telemetry_decoder_cc.h | 13 +++--- .../gps_l5_telemetry_decoder_cc.cc | 16 ++++--- .../gps_l5_telemetry_decoder_cc.h | 8 ++-- .../sbas_l1_telemetry_decoder_cc.cc | 13 +++--- .../sbas_l1_telemetry_decoder_cc.h | 9 ++-- .../libs/gps_l1_ca_subframe_fsm.cc | 4 +- .../libs/gps_l1_ca_subframe_fsm.h | 3 +- .../telemetry_decoder/libs/viterbi_decoder.cc | 1 - .../galileo_e1_dll_pll_veml_tracking.cc | 4 +- .../galileo_e1_dll_pll_veml_tracking.h | 3 +- .../adapters/galileo_e5a_dll_pll_tracking.cc | 5 +-- .../adapters/galileo_e5a_dll_pll_tracking.h | 3 +- .../glonass_l1_ca_dll_pll_c_aid_tracking.cc | 4 +- .../glonass_l1_ca_dll_pll_c_aid_tracking.h | 3 +- .../glonass_l1_ca_dll_pll_tracking.cc | 4 +- .../adapters/glonass_l1_ca_dll_pll_tracking.h | 3 +- .../gps_l1_ca_dll_pll_c_aid_tracking.cc | 2 +- .../gps_l1_ca_dll_pll_c_aid_tracking.h | 2 +- .../adapters/gps_l1_ca_dll_pll_tracking.cc | 5 +-- .../adapters/gps_l1_ca_dll_pll_tracking.h | 3 +- .../adapters/gps_l2_m_dll_pll_tracking.cc | 4 +- .../adapters/gps_l2_m_dll_pll_tracking.h | 3 +- .../adapters/gps_l5i_dll_pll_tracking.cc | 4 +- .../adapters/gps_l5i_dll_pll_tracking.h | 3 +- .../galileo_e1_dll_pll_veml_tracking_cc.cc | 18 ++++---- .../galileo_e1_dll_pll_veml_tracking_cc.h | 9 ++-- .../galileo_e5a_dll_pll_tracking_cc.cc | 16 +++---- .../galileo_e5a_dll_pll_tracking_cc.h | 8 ++-- ...glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc | 20 ++++----- .../glonass_l1_ca_dll_pll_c_aid_tracking_cc.h | 12 ++--- ...glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc | 22 +++++----- .../glonass_l1_ca_dll_pll_c_aid_tracking_sc.h | 14 +++--- .../glonass_l1_ca_dll_pll_tracking_cc.cc | 18 ++++---- .../glonass_l1_ca_dll_pll_tracking_cc.h | 8 ++-- .../gps_l1_ca_dll_pll_c_aid_tracking_cc.cc | 20 ++++----- .../gps_l1_ca_dll_pll_c_aid_tracking_cc.h | 12 ++--- ...ps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc | 22 +++++----- ...gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h | 14 +++--- .../gps_l1_ca_dll_pll_c_aid_tracking_sc.cc | 22 +++++----- .../gps_l1_ca_dll_pll_c_aid_tracking_sc.h | 14 +++--- .../gps_l1_ca_dll_pll_tracking_cc.cc | 18 ++++---- .../gps_l1_ca_dll_pll_tracking_cc.h | 8 ++-- .../gps_l2_m_dll_pll_tracking_cc.cc | 18 ++++---- .../gps_l2_m_dll_pll_tracking_cc.h | 8 ++-- .../gps_l5i_dll_pll_tracking_cc.cc | 19 ++++---- .../gps_l5i_dll_pll_tracking_cc.h | 8 ++-- .../tracking/libs/cpu_multicorrelator.cc | 3 +- .../libs/cpu_multicorrelator_real_codes.cc | 4 +- src/core/interfaces/gnss_block_interface.h | 3 +- src/core/libs/INIReader.cc | 2 +- src/core/libs/gnss_sdr_supl_client.h | 14 +++--- src/core/libs/string_converter.cc | 2 +- src/core/receiver/concurrent_map.h | 3 +- src/core/receiver/concurrent_queue.h | 2 +- src/core/receiver/control_message_factory.h | 2 +- src/core/receiver/control_thread.cc | 44 +++++++++---------- src/core/receiver/control_thread.h | 8 ++-- src/core/receiver/file_configuration.cc | 7 +-- src/core/receiver/gnss_block_factory.cc | 11 ++--- src/core/receiver/gnss_block_factory.h | 3 +- src/core/receiver/gnss_flowgraph.cc | 14 +++--- src/core/receiver/gnss_flowgraph.h | 11 ++--- src/core/receiver/in_memory_configuration.cc | 3 +- src/core/receiver/in_memory_configuration.h | 3 +- src/core/system_parameters/GLONASS_L1_CA.h | 5 ++- src/core/system_parameters/GPS_CNAV.h | 3 +- src/core/system_parameters/GPS_L1_CA.h | 5 ++- src/core/system_parameters/GPS_L2C.h | 10 ++--- src/core/system_parameters/GPS_L5.h | 4 +- src/core/system_parameters/Galileo_E1.h | 6 +-- src/core/system_parameters/Galileo_E5a.h | 4 +- .../system_parameters/galileo_ephemeris.cc | 2 +- .../system_parameters/galileo_fnav_message.h | 10 ++--- .../galileo_navigation_message.h | 13 +++--- .../glonass_gnav_ephemeris.cc | 2 +- .../glonass_gnav_navigation_message.cc | 2 +- .../glonass_gnav_navigation_message.h | 3 +- .../glonass_gnav_utc_model.h | 2 +- .../system_parameters/gps_cnav_ephemeris.h | 2 +- src/core/system_parameters/gps_cnav_iono.h | 2 +- .../gps_cnav_navigation_message.cc | 1 - .../gps_cnav_navigation_message.h | 9 ++-- .../system_parameters/gps_cnav_utc_model.h | 2 +- src/core/system_parameters/gps_ephemeris.cc | 4 +- src/core/system_parameters/gps_ephemeris.h | 7 ++- src/core/system_parameters/gps_iono.h | 2 +- .../gps_navigation_message.cc | 2 +- .../gps_navigation_message.h | 11 +++-- src/core/system_parameters/gps_ref_location.h | 2 +- src/core/system_parameters/gps_ref_time.h | 2 +- src/core/system_parameters/gps_utc_model.cc | 9 +--- src/core/system_parameters/gps_utc_model.h | 2 +- src/core/system_parameters/rtcm.cc | 14 +++--- src/core/system_parameters/rtcm.h | 16 +++---- src/core/system_parameters/sbas_ephemeris.cc | 1 - src/core/system_parameters/sbas_ephemeris.h | 2 + src/main/main.cc | 15 ++++--- src/tests/common-files/gnuplot_i.h | 3 +- src/tests/single_test_main.cc | 25 +++++------ .../system-tests/obs_gps_l1_system_test.cc | 26 +++++------ src/tests/system-tests/obs_system_test.cc | 30 ++++++------- src/tests/system-tests/position_test.cc | 19 ++++---- src/tests/system-tests/ttff_gps_l1.cc | 22 +++++----- src/tests/test_main.cc | 24 +++++----- 266 files changed, 968 insertions(+), 994 deletions(-) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 967109d53..1ba2bd509 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -30,13 +30,14 @@ #include "rtklib_pvt.h" -#include +#include "configuration_interface.h" +#include "gnss_sdr_flags.h" #include #include #include #include -#include "configuration_interface.h" -#include "gnss_sdr_flags.h" +#include + using google::LogMessage; diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.h b/src/algorithms/PVT/adapters/rtklib_pvt.h index f37515323..f0b4238b4 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.h +++ b/src/algorithms/PVT/adapters/rtklib_pvt.h @@ -33,9 +33,9 @@ #ifndef GNSS_SDR_RTKLIB_PVT_H_ #define GNSS_SDR_RTKLIB_PVT_H_ -#include #include "pvt_interface.h" #include "rtklib_pvt_cc.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 85290da73..b800b0fc3 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -29,17 +29,18 @@ */ #include "rtklib_pvt_cc.h" -#include -#include -#include #include #include #include #include #include +#include #include #include -#include +#include +#include +#include + using google::LogMessage; diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h index 7e71b21a0..635dfb7d7 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h @@ -31,20 +31,21 @@ #ifndef GNSS_SDR_RTKLIB_PVT_CC_H #define GNSS_SDR_RTKLIB_PVT_CC_H -#include -#include -#include -#include -#include -#include -#include -#include + #include "nmea_printer.h" #include "kml_printer.h" #include "geojson_printer.h" #include "rinex_printer.h" #include "rtcm_printer.h" #include "rtklib_solver.h" +#include +#include +#include +#include +#include +#include +#include +#include class rtklib_pvt_cc; diff --git a/src/algorithms/PVT/libs/geojson_printer.cc b/src/algorithms/PVT/libs/geojson_printer.cc index b1062f65f..5820778d4 100644 --- a/src/algorithms/PVT/libs/geojson_printer.cc +++ b/src/algorithms/PVT/libs/geojson_printer.cc @@ -31,10 +31,11 @@ #include "geojson_printer.h" -#include -#include #include #include +#include +#include + GeoJSON_Printer::GeoJSON_Printer() { diff --git a/src/algorithms/PVT/libs/geojson_printer.h b/src/algorithms/PVT/libs/geojson_printer.h index b286e164a..17e080975 100644 --- a/src/algorithms/PVT/libs/geojson_printer.h +++ b/src/algorithms/PVT/libs/geojson_printer.h @@ -33,10 +33,10 @@ #ifndef GNSS_SDR_GEOJSON_PRINTER_H_ #define GNSS_SDR_GEOJSON_PRINTER_H_ +#include "pvt_solution.h" #include #include #include -#include "pvt_solution.h" /*! diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 2deb7c05b..202f01709 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -30,10 +30,10 @@ */ #include "hybrid_ls_pvt.h" -#include #include "Galileo_E1.h" #include "GPS_L1_CA.h" #include "GPS_L2C.h" +#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.h b/src/algorithms/PVT/libs/hybrid_ls_pvt.h index 4e026b913..37fb6e15d 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.h +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.h @@ -32,15 +32,15 @@ #ifndef GNSS_SDR_HYBRID_LS_PVT_H_ #define GNSS_SDR_HYBRID_LS_PVT_H_ -#include -#include -#include #include "ls_pvt.h" #include "galileo_navigation_message.h" #include "gps_navigation_message.h" #include "gps_cnav_navigation_message.h" #include "gnss_synchro.h" #include "rtklib_rtkcmn.h" +#include +#include +#include /*! * \brief This class implements a simple PVT Least Squares solution diff --git a/src/algorithms/PVT/libs/kml_printer.cc b/src/algorithms/PVT/libs/kml_printer.cc index 1db4f6f61..7e6e53ae5 100644 --- a/src/algorithms/PVT/libs/kml_printer.cc +++ b/src/algorithms/PVT/libs/kml_printer.cc @@ -30,9 +30,9 @@ */ #include "kml_printer.h" -#include #include #include +#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/ls_pvt.cc b/src/algorithms/PVT/libs/ls_pvt.cc index 91620e8ce..daef8f3f2 100644 --- a/src/algorithms/PVT/libs/ls_pvt.cc +++ b/src/algorithms/PVT/libs/ls_pvt.cc @@ -30,10 +30,10 @@ */ #include "ls_pvt.h" -#include -#include #include "GPS_L1_CA.h" #include +#include +#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index 5398af18b..f2fcda3e8 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -34,10 +34,10 @@ */ #include "nmea_printer.h" -#include -#include #include #include +#include +#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index 6e83523f6..0e378ca8b 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -36,10 +36,9 @@ #ifndef GNSS_SDR_NMEA_PRINTER_H_ #define GNSS_SDR_NMEA_PRINTER_H_ - +#include "pvt_solution.h" #include #include -#include "pvt_solution.h" /*! diff --git a/src/algorithms/PVT/libs/pvt_solution.cc b/src/algorithms/PVT/libs/pvt_solution.cc index 5e53dc9d0..5872d5ba7 100644 --- a/src/algorithms/PVT/libs/pvt_solution.cc +++ b/src/algorithms/PVT/libs/pvt_solution.cc @@ -30,9 +30,9 @@ */ #include "pvt_solution.h" -#include #include "GPS_L1_CA.h" #include +#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/pvt_solution.h b/src/algorithms/PVT/libs/pvt_solution.h index 0a7cc451d..cf209004e 100644 --- a/src/algorithms/PVT/libs/pvt_solution.h +++ b/src/algorithms/PVT/libs/pvt_solution.h @@ -33,9 +33,9 @@ #define GNSS_SDR_PVT_SOLUTION_H_ +#include #include #include -#include const unsigned int PVT_MAX_CHANNELS = 90; const unsigned int PVT_MAX_PRN = 127; // 126 is SBAS diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index f1dec9219..7d4990a77 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -29,6 +29,11 @@ */ #include "rinex_printer.h" +#include +#include +#include +#include +#include #include // for getlogin_r() #include // for min and max #include // for floor @@ -38,11 +43,6 @@ #include #include #include -#include -#include -#include -#include -#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h index 0aa6abb99..69ffe24e5 100644 --- a/src/algorithms/PVT/libs/rinex_printer.h +++ b/src/algorithms/PVT/libs/rinex_printer.h @@ -51,12 +51,6 @@ #ifndef GNSS_SDR_RINEX_PRINTER_H_ #define GNSS_SDR_RINEX_PRINTER_H_ -#include -#include -#include // for stringstream -#include // for setprecision -#include -#include #include "gps_navigation_message.h" #include "gps_cnav_navigation_message.h" #include "galileo_navigation_message.h" @@ -65,6 +59,12 @@ #include "Galileo_E1.h" #include "GLONASS_L1_CA.h" #include "gnss_synchro.h" +#include +#include +#include +#include // for stringstream +#include // for setprecision +#include class Sbas_Raw_Msg; diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index c5518dddf..4766ad480 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -32,11 +32,12 @@ */ #include "rtcm_printer.h" +#include +#include #include #include // for O_RDWR #include // for tcgetattr -#include -#include + using google::LogMessage; diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h index 5c1445713..8568273bf 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.h +++ b/src/algorithms/PVT/libs/rtcm_printer.h @@ -34,9 +34,10 @@ #ifndef GNSS_SDR_RTCM_PRINTER_H_ #define GNSS_SDR_RTCM_PRINTER_H_ +#include "rtcm.h" #include // std::ofstream #include // std::shared_ptr -#include "rtcm.h" + /*! * \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index 24bd8f163..2067e42f8 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -52,11 +52,11 @@ * -----------------------------------------------------------------------*/ #include "rtklib_solver.h" -#include #include "rtklib_conversions.h" #include "GPS_L1_CA.h" #include "Galileo_E1.h" #include "GLONASS_L1_CA.h" +#include using google::LogMessage; diff --git a/src/algorithms/PVT/libs/rtklib_solver.h b/src/algorithms/PVT/libs/rtklib_solver.h index bed0b9cde..af53b4811 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.h +++ b/src/algorithms/PVT/libs/rtklib_solver.h @@ -54,9 +54,7 @@ #ifndef GNSS_SDR_RTKLIB_SOLVER_H_ #define GNSS_SDR_RTKLIB_SOLVER_H_ -#include -#include -#include + #include "rtklib_rtkpos.h" #include "galileo_navigation_message.h" #include "gps_navigation_message.h" @@ -64,6 +62,10 @@ #include "glonass_gnav_navigation_message.h" #include "gnss_synchro.h" #include "pvt_solution.h" +#include +#include +#include + /*! * \brief This class implements a simple PVT Least Squares solution diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 17ef914e0..c3ada5ef3 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -30,13 +30,14 @@ */ #include "galileo_e1_pcps_ambiguous_acquisition.h" +#include "configuration_interface.h" +#include "galileo_e1_signal_processing.h" +#include "Galileo_E1.h" +#include "gnss_sdr_flags.h" #include #include #include -#include "galileo_e1_signal_processing.h" -#include "Galileo_E1.h" -#include "configuration_interface.h" -#include "gnss_sdr_flags.h" + using google::LogMessage; diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h index c08db5b7c..41ed6e7ca 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h @@ -32,14 +32,14 @@ #ifndef GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_ #define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_ -#include -#include -#include -#include "gnss_synchro.h" #include "acquisition_interface.h" +#include "gnss_synchro.h" #include "pcps_acquisition.h" #include "complex_byte_to_float_x2.h" +#include +#include #include +#include class ConfigurationInterface; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index d3df351e5..1bcb950a8 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -29,14 +29,15 @@ */ #include "galileo_e5a_pcps_acquisition.h" +#include "configuration_interface.h" +#include "galileo_e5_signal_processing.h" +#include "Galileo_E5a.h" +#include "gnss_sdr_flags.h" #include #include #include #include -#include "galileo_e5_signal_processing.h" -#include "Galileo_E5a.h" -#include "configuration_interface.h" -#include "gnss_sdr_flags.h" + using google::LogMessage; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h index bfbc08a95..db6023160 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h @@ -31,11 +31,12 @@ #ifndef GALILEO_E5A_PCPS_ACQUISITION_H_ #define GALILEO_E5A_PCPS_ACQUISITION_H_ -#include -#include -#include "gnss_synchro.h" + #include "acquisition_interface.h" +#include "gnss_synchro.h" #include "pcps_acquisition.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc index 5ce79503c..06dac08ee 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc @@ -32,12 +32,12 @@ */ #include "glonass_l1_ca_pcps_acquisition.h" -#include -#include +#include "configuration_interface.h" #include "glonass_l1_signal_processing.h" #include "GLONASS_L1_CA.h" -#include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h index 874e928b5..9251eb71d 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h @@ -34,14 +34,13 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_ #define GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_ -#include -#include -#include -#include "gnss_synchro.h" #include "acquisition_interface.h" +#include "gnss_synchro.h" #include "pcps_acquisition.h" #include "complex_byte_to_float_x2.h" - +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index c1f62ace7..5010c224c 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -34,12 +34,13 @@ */ #include "gps_l1_ca_pcps_acquisition.h" -#include -#include +#include "configuration_interface.h" #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" -#include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include +#include + using google::LogMessage; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h index 9b692fb6c..104911ff1 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h @@ -36,15 +36,14 @@ #ifndef GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_ #define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_ -#include -#include -#include -#include "gnss_synchro.h" #include "acquisition_interface.h" +#include "gnss_synchro.h" #include "pcps_acquisition.h" #include "complex_byte_to_float_x2.h" +#include +#include #include - +#include class ConfigurationInterface; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index 595f64d82..a8c2bab9e 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -32,12 +32,12 @@ */ #include "gps_l2_m_pcps_acquisition.h" -#include -#include +#include "configuration_interface.h" #include "gps_l2c_signal.h" #include "GPS_L2C.h" -#include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h index cf410b6b3..5fa3e1a0b 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h @@ -34,14 +34,14 @@ #ifndef GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_ #define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_ -#include -#include -#include -#include "gnss_synchro.h" #include "acquisition_interface.h" +#include "gnss_synchro.h" #include "pcps_acquisition.h" #include "complex_byte_to_float_x2.h" +#include +#include #include +#include diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 9c0d8ef51..4d72ad74b 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -32,12 +32,12 @@ */ #include "gps_l5i_pcps_acquisition.h" -#include -#include +#include "configuration_interface.h" #include "gps_l5_signal.h" #include "GPS_L5.h" -#include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h index 1c1891045..977b70c60 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h @@ -34,15 +34,14 @@ #ifndef GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_H_ #define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_H_ -#include -#include -#include -#include "gnss_synchro.h" #include "acquisition_interface.h" +#include "gnss_synchro.h" #include "pcps_acquisition.h" #include "complex_byte_to_float_x2.h" +#include +#include #include - +#include class ConfigurationInterface; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index affd45952..3c261cd07 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -34,14 +34,13 @@ */ #include "pcps_acquisition.h" -#include +#include "GPS_L1_CA.h" // for GPS_TWO_PI +#include "GLONASS_L1_CA.h" // for GLONASS_TWO_PI #include #include #include #include -#include "GPS_L1_CA.h" //GPS_TWO_PI -#include "GLONASS_L1_CA.h" //GLONASS_TWO_PI - +#include using google::LogMessage; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index b9e88c79b..c8ba1ef1b 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -52,13 +52,12 @@ #ifndef GNSS_SDR_PCPS_ACQUISITION_H_ #define GNSS_SDR_PCPS_ACQUISITION_H_ - -#include +#include "gnss_synchro.h" #include #include #include #include -#include "gnss_synchro.h" +#include class pcps_acquisition; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index 0f80cf3bd..12520a89e 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -31,16 +31,16 @@ */ #include "pcps_acquisition_fine_doppler_cc.h" -#include // std::rotate, std::fill_n -#include +#include "gps_sdr_signal_processing.h" +#include "control_message_factory.h" +#include "GPS_L1_CA.h" #include #include #include #include -#include "concurrent_map.h" -#include "gps_sdr_signal_processing.h" -#include "control_message_factory.h" -#include "GPS_L1_CA.h" +#include // std::rotate, std::fill_n +#include + using google::LogMessage; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index cd3d75e5f..f174efdc7 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -48,12 +48,12 @@ #ifndef GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_ #define GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_ -#include -#include +#include "gnss_synchro.h" #include #include #include -#include "gnss_synchro.h" +#include +#include class pcps_acquisition_fine_doppler_cc; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc index cbc541c33..3a6a8c319 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -29,14 +29,14 @@ */ #include "pcps_quicksync_acquisition_cc.h" -#include -#include +#include "control_message_factory.h" +#include "GPS_L1_CA.h" #include #include #include #include -#include "control_message_factory.h" -#include "GPS_L1_CA.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h index 1196e6821..5840e3442 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h @@ -51,15 +51,15 @@ #ifndef GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H_ #define GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H_ +#include "gnss_synchro.h" +#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include "gnss_synchro.h" +#include class pcps_quicksync_acquisition_cc; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc index 676705a23..28e28abf6 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc @@ -49,13 +49,13 @@ */ #include "pcps_tong_acquisition_cc.h" -#include +#include "control_message_factory.h" +#include "GPS_L1_CA.h" // for GPS_TWO_PI #include #include #include #include -#include "control_message_factory.h" -#include "GPS_L1_CA.h" //GPS_TWO_PI +#include using google::LogMessage; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h index 7174f2a88..4afb487fe 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h @@ -51,12 +51,13 @@ #ifndef GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H_ #define GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H_ -#include -#include +#include "gnss_synchro.h" #include #include #include -#include "gnss_synchro.h" +#include +#include + class pcps_tong_acquisition_cc; diff --git a/src/algorithms/channel/adapters/channel.cc b/src/algorithms/channel/adapters/channel.cc index 59c56eeee..5cfb237f6 100644 --- a/src/algorithms/channel/adapters/channel.cc +++ b/src/algorithms/channel/adapters/channel.cc @@ -30,10 +30,11 @@ */ #include "channel.h" -#include -#include #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include +#include + using google::LogMessage; diff --git a/src/algorithms/channel/adapters/channel.h b/src/algorithms/channel/adapters/channel.h index 8740b5ad9..d9ec7b9fe 100644 --- a/src/algorithms/channel/adapters/channel.h +++ b/src/algorithms/channel/adapters/channel.h @@ -35,15 +35,15 @@ #ifndef GNSS_SDR_CHANNEL_H_ #define GNSS_SDR_CHANNEL_H_ -#include -#include -#include -#include -#include #include "channel_interface.h" #include "channel_fsm.h" #include "gnss_synchro.h" #include "channel_msg_receiver_cc.h" +#include +#include +#include +#include +#include class ConfigurationInterface; class AcquisitionInterface; diff --git a/src/algorithms/channel/libs/channel_fsm.cc b/src/algorithms/channel/libs/channel_fsm.cc index b6f23cbeb..4a96029b5 100644 --- a/src/algorithms/channel/libs/channel_fsm.cc +++ b/src/algorithms/channel/libs/channel_fsm.cc @@ -30,8 +30,9 @@ */ #include "channel_fsm.h" -#include #include "control_message_factory.h" +#include + ChannelFsm::ChannelFsm() diff --git a/src/algorithms/channel/libs/channel_fsm.h b/src/algorithms/channel/libs/channel_fsm.h index 23b92c394..37e57a326 100644 --- a/src/algorithms/channel/libs/channel_fsm.h +++ b/src/algorithms/channel/libs/channel_fsm.h @@ -32,12 +32,13 @@ #ifndef GNSS_SDR_CHANNEL_FSM_H #define GNSS_SDR_CHANNEL_FSM_H -#include -#include -#include #include "acquisition_interface.h" #include "tracking_interface.h" #include "telemetry_decoder_interface.h" +#include +#include +#include + /*! * \brief This class implements a State Machine for channel diff --git a/src/algorithms/channel/libs/channel_msg_receiver_cc.h b/src/algorithms/channel/libs/channel_msg_receiver_cc.h index 77a91379a..63997f25f 100644 --- a/src/algorithms/channel/libs/channel_msg_receiver_cc.h +++ b/src/algorithms/channel/libs/channel_msg_receiver_cc.h @@ -31,8 +31,8 @@ #ifndef GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H #define GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H -#include #include "channel_fsm.h" +#include class channel_msg_receiver_cc; diff --git a/src/algorithms/conditioner/adapters/signal_conditioner.h b/src/algorithms/conditioner/adapters/signal_conditioner.h index 815bf7cec..940bba0da 100644 --- a/src/algorithms/conditioner/adapters/signal_conditioner.h +++ b/src/algorithms/conditioner/adapters/signal_conditioner.h @@ -32,9 +32,8 @@ #ifndef GNSS_SDR_SIGNAL_CONDITIONER_H_ #define GNSS_SDR_SIGNAL_CONDITIONER_H_ -#include #include "gnss_block_interface.h" - +#include class ConfigurationInterface; class AcquisitionInterface; diff --git a/src/algorithms/data_type_adapter/adapters/byte_to_short.cc b/src/algorithms/data_type_adapter/adapters/byte_to_short.cc index 75df4f1e3..edce62562 100644 --- a/src/algorithms/data_type_adapter/adapters/byte_to_short.cc +++ b/src/algorithms/data_type_adapter/adapters/byte_to_short.cc @@ -29,8 +29,9 @@ */ #include "byte_to_short.h" -#include #include "configuration_interface.h" +#include + using google::LogMessage; diff --git a/src/algorithms/data_type_adapter/adapters/byte_to_short.h b/src/algorithms/data_type_adapter/adapters/byte_to_short.h index 85870ba43..25420efc3 100644 --- a/src/algorithms/data_type_adapter/adapters/byte_to_short.h +++ b/src/algorithms/data_type_adapter/adapters/byte_to_short.h @@ -31,11 +31,10 @@ #ifndef GNSS_SDR_BYTE_TO_SHORT_H_ #define GNSS_SDR_BYTE_TO_SHORT_H_ -#include +#include "gnss_block_interface.h" #include #include -#include "gnss_block_interface.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc index e91455a23..542632542 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc @@ -30,9 +30,9 @@ */ #include "ibyte_to_cbyte.h" -#include -#include #include "configuration_interface.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h index c40d85286..c3d3866c3 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h @@ -32,12 +32,11 @@ #ifndef GNSS_SDR_IBYTE_TO_CBYTE_H_ #define GNSS_SDR_IBYTE_TO_CBYTE_H_ -#include -#include #include "conjugate_ic.h" #include "gnss_block_interface.h" #include "interleaved_byte_to_complex_byte.h" - +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc index 83b6fd6c5..61023d212 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc @@ -29,8 +29,8 @@ */ #include "ibyte_to_complex.h" -#include #include "configuration_interface.h" +#include using google::LogMessage; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h index 3c379d7ba..47edf5b3d 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h @@ -31,13 +31,12 @@ #ifndef GNSS_SDR_IBYTE_TO_COMPLEX_H_ #define GNSS_SDR_IBYTE_TO_COMPLEX_H_ -#include -#include -#include #include "conjugate_cc.h" #include "gnss_block_interface.h" #include "gnss_synchro.h" - +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc index 59ac82042..35755564f 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc @@ -30,9 +30,10 @@ */ #include "ibyte_to_cshort.h" +#include "configuration_interface.h" #include #include -#include "configuration_interface.h" + using google::LogMessage; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h index 2de7089ac..33c861945 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h @@ -31,12 +31,11 @@ #ifndef GNSS_SDR_IBYTE_TO_CSHORT_H_ #define GNSS_SDR_IBYTE_TO_CSHORT_H_ -#include -#include -#include "gnss_block_interface.h" #include "conjugate_sc.h" #include "interleaved_byte_to_complex_short.h" - +#include "gnss_block_interface.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc index cb9d3c6df..55cc24974 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc @@ -29,8 +29,8 @@ */ #include "ishort_to_complex.h" -#include #include "configuration_interface.h" +#include using google::LogMessage; diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h index 57cf7283e..3319163fb 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h @@ -31,12 +31,11 @@ #ifndef GNSS_SDR_ISHORT_TO_COMPLEX_H_ #define GNSS_SDR_ISHORT_TO_COMPLEX_H_ -#include -#include -#include #include "conjugate_cc.h" #include "gnss_block_interface.h" - +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc index 96a87abe2..740c4baf5 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc @@ -30,9 +30,9 @@ */ #include "ishort_to_cshort.h" +#include "configuration_interface.h" #include #include -#include "configuration_interface.h" using google::LogMessage; diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h index 685373a6a..a996f7fd9 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h @@ -31,12 +31,11 @@ #ifndef GNSS_SDR_ISHORT_TO_CSHORT_H_ #define GNSS_SDR_ISHORT_TO_CSHORT_H_ -#include -#include #include "conjugate_sc.h" #include "gnss_block_interface.h" #include "interleaved_short_to_complex_short.h" - +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/input_filter/adapters/beamformer_filter.cc b/src/algorithms/input_filter/adapters/beamformer_filter.cc index 8b1797f0e..b621310f3 100644 --- a/src/algorithms/input_filter/adapters/beamformer_filter.cc +++ b/src/algorithms/input_filter/adapters/beamformer_filter.cc @@ -29,10 +29,10 @@ */ #include "beamformer_filter.h" -#include -#include #include "beamformer.h" #include "configuration_interface.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/input_filter/adapters/beamformer_filter.h b/src/algorithms/input_filter/adapters/beamformer_filter.h index fce549ebf..1af6a13e5 100644 --- a/src/algorithms/input_filter/adapters/beamformer_filter.h +++ b/src/algorithms/input_filter/adapters/beamformer_filter.h @@ -32,9 +32,9 @@ #ifndef GNSS_SDR_BEAMFORMER_FILTER_H_ #define GNSS_SDR_BEAMFORMER_FILTER_H_ -#include -#include #include "gnss_block_interface.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/input_filter/adapters/fir_filter.cc b/src/algorithms/input_filter/adapters/fir_filter.cc index 8112251b4..3b1b613c1 100644 --- a/src/algorithms/input_filter/adapters/fir_filter.cc +++ b/src/algorithms/input_filter/adapters/fir_filter.cc @@ -30,11 +30,12 @@ */ #include "fir_filter.h" +#include "configuration_interface.h" #include #include #include #include -#include "configuration_interface.h" + using google::LogMessage; diff --git a/src/algorithms/input_filter/adapters/fir_filter.h b/src/algorithms/input_filter/adapters/fir_filter.h index 9a5fdc8a1..0ea7faf39 100644 --- a/src/algorithms/input_filter/adapters/fir_filter.h +++ b/src/algorithms/input_filter/adapters/fir_filter.h @@ -33,9 +33,11 @@ #ifndef GNSS_SDR_FIR_FILTER_H_ #define GNSS_SDR_FIR_FILTER_H_ -#include -#include -#include +#include "gnss_block_interface.h" +#include "complex_byte_to_float_x2.h" +#include "byte_x2_to_complex_byte.h" +#include "short_x2_to_cshort.h" +#include "cshort_to_float_x2.h" #include #include #include @@ -43,11 +45,9 @@ #include #include #include -#include "gnss_block_interface.h" -#include "complex_byte_to_float_x2.h" -#include "byte_x2_to_complex_byte.h" -#include "short_x2_to_cshort.h" -#include "cshort_to_float_x2.h" +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.cc b/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.cc index a62d179f1..dfab552c5 100644 --- a/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.cc +++ b/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.cc @@ -30,13 +30,13 @@ */ #include "freq_xlating_fir_filter.h" +#include "configuration_interface.h" #include #include #include #include #include #include -#include "configuration_interface.h" using google::LogMessage; diff --git a/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.h b/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.h index baaf47c10..c304c3226 100644 --- a/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.h +++ b/src/algorithms/input_filter/adapters/freq_xlating_fir_filter.h @@ -33,8 +33,9 @@ #ifndef GNSS_SDR_FREQ_XLATING_FIR_FILTER_H_ #define GNSS_SDR_FREQ_XLATING_FIR_FILTER_H_ -#include -#include +#include "gnss_block_interface.h" +#include "short_x2_to_cshort.h" +#include "complex_float_to_complex_byte.h" #include #include #include @@ -42,9 +43,8 @@ #include #include #include -#include "gnss_block_interface.h" -#include "short_x2_to_cshort.h" -#include "complex_float_to_complex_byte.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/input_filter/adapters/notch_filter.cc b/src/algorithms/input_filter/adapters/notch_filter.cc index ed13c84d4..ae209f3f2 100644 --- a/src/algorithms/input_filter/adapters/notch_filter.cc +++ b/src/algorithms/input_filter/adapters/notch_filter.cc @@ -30,10 +30,11 @@ */ #include "notch_filter.h" -#include -#include #include "configuration_interface.h" #include "notch_cc.h" +#include +#include + using google::LogMessage; diff --git a/src/algorithms/input_filter/adapters/notch_filter.h b/src/algorithms/input_filter/adapters/notch_filter.h index a8ab2136b..9e2a11f26 100644 --- a/src/algorithms/input_filter/adapters/notch_filter.h +++ b/src/algorithms/input_filter/adapters/notch_filter.h @@ -33,12 +33,11 @@ #ifndef GNSS_SDR_NOTCH_FILTER_H_ #define GNSS_SDR_NOTCH_FILTER_H_ +#include "notch_cc.h" +#include "gnss_block_interface.h" +#include #include #include -#include -#include "gnss_block_interface.h" -#include "notch_cc.h" - class ConfigurationInterface; diff --git a/src/algorithms/input_filter/adapters/notch_filter_lite.cc b/src/algorithms/input_filter/adapters/notch_filter_lite.cc index 4273c65fa..86c11e114 100644 --- a/src/algorithms/input_filter/adapters/notch_filter_lite.cc +++ b/src/algorithms/input_filter/adapters/notch_filter_lite.cc @@ -30,11 +30,11 @@ */ #include "notch_filter_lite.h" -#include -#include -#include #include "configuration_interface.h" #include "notch_lite_cc.h" +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/input_filter/adapters/notch_filter_lite.h b/src/algorithms/input_filter/adapters/notch_filter_lite.h index f9088db52..0333d76c1 100644 --- a/src/algorithms/input_filter/adapters/notch_filter_lite.h +++ b/src/algorithms/input_filter/adapters/notch_filter_lite.h @@ -33,12 +33,11 @@ #ifndef GNSS_SDR_NOTCH_FILTER_LITE_H_ #define GNSS_SDR_NOTCH_FILTER_LITE_H_ -#include -#include -#include #include "gnss_block_interface.h" #include "notch_lite_cc.h" - +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/input_filter/adapters/pulse_blanking_filter.cc b/src/algorithms/input_filter/adapters/pulse_blanking_filter.cc index 07c543a92..5f92ecf94 100644 --- a/src/algorithms/input_filter/adapters/pulse_blanking_filter.cc +++ b/src/algorithms/input_filter/adapters/pulse_blanking_filter.cc @@ -28,13 +28,13 @@ * ------------------------------------------------------------------------- */ +#include "pulse_blanking_filter.h" +#include "configuration_interface.h" #include -#include -#include #include #include -#include "configuration_interface.h" -#include "pulse_blanking_filter.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/input_filter/adapters/pulse_blanking_filter.h b/src/algorithms/input_filter/adapters/pulse_blanking_filter.h index 8c5211c64..fb8f82515 100644 --- a/src/algorithms/input_filter/adapters/pulse_blanking_filter.h +++ b/src/algorithms/input_filter/adapters/pulse_blanking_filter.h @@ -32,11 +32,11 @@ #ifndef GNSS_SDR_PULSE_BLANKING_FILTER_H_ #define GNSS_SDR_PULSE_BLANKING_FILTER_H_ -#include -#include -#include #include "gnss_block_interface.h" #include "pulse_blanking_cc.h" +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/input_filter/gnuradio_blocks/beamformer.cc b/src/algorithms/input_filter/gnuradio_blocks/beamformer.cc index 697d33362..7fa3fc68a 100644 --- a/src/algorithms/input_filter/gnuradio_blocks/beamformer.cc +++ b/src/algorithms/input_filter/gnuradio_blocks/beamformer.cc @@ -30,9 +30,9 @@ #include "beamformer.h" -#include -#include #include +#include + #define GNSS_SDR_BEAMFORMER_CHANNELS 8 @@ -53,7 +53,7 @@ beamformer::beamformer() for (int i = 0; i< GNSS_SDR_BEAMFORMER_CHANNELS; i++) { - weight_vector[i]=gr_complex(1,0); + weight_vector[i] = gr_complex(1,0); } } diff --git a/src/algorithms/input_filter/gnuradio_blocks/notch_cc.cc b/src/algorithms/input_filter/gnuradio_blocks/notch_cc.cc index 03855f454..26dd1f1af 100644 --- a/src/algorithms/input_filter/gnuradio_blocks/notch_cc.cc +++ b/src/algorithms/input_filter/gnuradio_blocks/notch_cc.cc @@ -29,13 +29,12 @@ */ #include "notch_cc.h" -#include -#include #include #include #include #include - +#include +#include using google::LogMessage; diff --git a/src/algorithms/input_filter/gnuradio_blocks/notch_lite_cc.cc b/src/algorithms/input_filter/gnuradio_blocks/notch_lite_cc.cc index 178d0cb6b..091a67a7d 100644 --- a/src/algorithms/input_filter/gnuradio_blocks/notch_lite_cc.cc +++ b/src/algorithms/input_filter/gnuradio_blocks/notch_lite_cc.cc @@ -29,14 +29,12 @@ */ #include "notch_lite_cc.h" - -#include -#include #include #include #include #include - +#include +#include using google::LogMessage; diff --git a/src/algorithms/input_filter/gnuradio_blocks/pulse_blanking_cc.cc b/src/algorithms/input_filter/gnuradio_blocks/pulse_blanking_cc.cc index 41bc815a9..badcd00d9 100644 --- a/src/algorithms/input_filter/gnuradio_blocks/pulse_blanking_cc.cc +++ b/src/algorithms/input_filter/gnuradio_blocks/pulse_blanking_cc.cc @@ -29,12 +29,11 @@ */ #include "pulse_blanking_cc.h" -#include #include #include #include #include - +#include using google::LogMessage; diff --git a/src/algorithms/libs/complex_float_to_complex_byte.cc b/src/algorithms/libs/complex_float_to_complex_byte.cc index a6934d5b9..fc26ead1a 100644 --- a/src/algorithms/libs/complex_float_to_complex_byte.cc +++ b/src/algorithms/libs/complex_float_to_complex_byte.cc @@ -31,9 +31,7 @@ #include "complex_float_to_complex_byte.h" #include -#include -#include "volk_gnsssdr/volk_gnsssdr.h" - +#include complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte() @@ -47,7 +45,7 @@ complex_float_to_complex_byte::complex_float_to_complex_byte() : sync_block("com gr::io_signature::make (1, 1, sizeof(gr_complex)), 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/galileo_e1_signal_processing.cc b/src/algorithms/libs/galileo_e1_signal_processing.cc index 2ea720ec8..49ce4d0f6 100644 --- a/src/algorithms/libs/galileo_e1_signal_processing.cc +++ b/src/algorithms/libs/galileo_e1_signal_processing.cc @@ -31,9 +31,9 @@ */ #include "galileo_e1_signal_processing.h" -#include #include "Galileo_E1.h" #include "gnss_signal_processing.h" +#include void galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn) diff --git a/src/algorithms/libs/galileo_e5_signal_processing.cc b/src/algorithms/libs/galileo_e5_signal_processing.cc index ba2677aae..4f1f116bb 100644 --- a/src/algorithms/libs/galileo_e5_signal_processing.cc +++ b/src/algorithms/libs/galileo_e5_signal_processing.cc @@ -32,9 +32,9 @@ */ #include "galileo_e5_signal_processing.h" -#include #include "Galileo_E5a.h" #include "gnss_signal_processing.h" +#include diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index 0aa8221b5..96ce9a705 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -29,7 +29,7 @@ */ -#include +#include "gnss_sdr_flags.h" #include #include diff --git a/src/algorithms/libs/gnss_sdr_valve.cc b/src/algorithms/libs/gnss_sdr_valve.cc index 971284c88..d56edbbc8 100644 --- a/src/algorithms/libs/gnss_sdr_valve.cc +++ b/src/algorithms/libs/gnss_sdr_valve.cc @@ -31,11 +31,11 @@ */ #include "gnss_sdr_valve.h" -#include // for min -#include // for memcpy -#include #include "control_message_factory.h" #include +#include +#include // for min +#include // for memcpy gnss_sdr_valve::gnss_sdr_valve (size_t sizeof_stream_item, unsigned long long nitems, diff --git a/src/algorithms/libs/gnss_signal_processing.cc b/src/algorithms/libs/gnss_signal_processing.cc index 9666b1d0d..ba624ea9b 100644 --- a/src/algorithms/libs/gnss_signal_processing.cc +++ b/src/algorithms/libs/gnss_signal_processing.cc @@ -32,8 +32,8 @@ */ #include "gnss_signal_processing.h" -#include #include "GPS_L1_CA.h" +#include auto auxCeil2 = [](float x){ return static_cast(static_cast((x)+1)); }; diff --git a/src/algorithms/libs/gps_l2c_signal.cc b/src/algorithms/libs/gps_l2c_signal.cc index 4bd44a994..590c5751c 100644 --- a/src/algorithms/libs/gps_l2c_signal.cc +++ b/src/algorithms/libs/gps_l2c_signal.cc @@ -30,10 +30,10 @@ * ------------------------------------------------------------------------- */ -#include +#include "gps_l2c_signal.h" +#include "GPS_L2C.h" #include #include -#include "GPS_L2C.h" int32_t gps_l2c_m_shift(int32_t x) diff --git a/src/algorithms/libs/gps_l5_signal.cc b/src/algorithms/libs/gps_l5_signal.cc index 5aa15b96c..46b5d9430 100644 --- a/src/algorithms/libs/gps_l5_signal.cc +++ b/src/algorithms/libs/gps_l5_signal.cc @@ -30,12 +30,12 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include "gps_l5_signal.h" #include "GPS_L5.h" +#include +#include +#include +#include std::deque l5i_xa_shift(std::deque xa) diff --git a/src/algorithms/libs/pass_through.cc b/src/algorithms/libs/pass_through.cc index 87f2b1be6..584d06886 100644 --- a/src/algorithms/libs/pass_through.cc +++ b/src/algorithms/libs/pass_through.cc @@ -31,11 +31,10 @@ */ #include "pass_through.h" -#include -#include +#include "configuration_interface.h" #include #include -#include "configuration_interface.h" +#include using google::LogMessage; diff --git a/src/algorithms/libs/pass_through.h b/src/algorithms/libs/pass_through.h index 39d4c5468..105ec9f78 100644 --- a/src/algorithms/libs/pass_through.h +++ b/src/algorithms/libs/pass_through.h @@ -33,13 +33,13 @@ #ifndef GNSS_SDR_PASS_THROUGH_H_ #define GNSS_SDR_PASS_THROUGH_H_ -#include -#include -#include -#include "gnss_block_interface.h" #include "conjugate_cc.h" #include "conjugate_sc.h" #include "conjugate_ic.h" +#include "gnss_block_interface.h" +#include +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/libs/rtklib/rtklib.h b/src/algorithms/libs/rtklib/rtklib.h index 7aa7ddf5f..8d172b171 100644 --- a/src/algorithms/libs/rtklib/rtklib.h +++ b/src/algorithms/libs/rtklib/rtklib.h @@ -53,6 +53,9 @@ #ifndef GNSS_SDR_RTKLIB_H_ #define GNSS_SDR_RTKLIB_H_ +#include "MATH_CONSTANTS.h" +#include "gnss_frequencies.h" +#include "gnss_obs_codes.h" #include #include #include @@ -60,9 +63,6 @@ #include #include #include -#include "MATH_CONSTANTS.h" -#include "gnss_frequencies.h" -#include "gnss_obs_codes.h" /* macros --------------------------------------------------------------------*/ diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc index 1d76658e4..3a2c7c39f 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr-config-info.cc @@ -20,11 +20,11 @@ #include #endif +#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_get_alignment, volk_gnsssdr_get_machine +#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t #include // for volk_gnsssdr_available_machines, volk_gnsssdr_c_compiler ... #include // for operator<<, endl, cout, ostream #include // for string -#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_get_alignment, volk_gnsssdr_get_machine -#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t void print_alignment() { diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc index bf8a7ec77..5b9a1a653 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc @@ -16,23 +16,23 @@ * along with GNSS-SDR. If not, see . */ - +#include "kernel_tests.h" // for init_test_list +#include "qa_utils.h" // for volk_gnsssdr_test_results_t +#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t +#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t +#include "volk_gnsssdr_profile.h" +#include "volk_gnsssdr/volk_gnsssdr_prefs.h" // for volk_gnsssdr_get_config_path +#include // for create_directories, exists +#include // for path, operator<< +#include // for filesystem #include // for stat #include // for size_t #include // for operator<<, basic_ostream #include // IWYU pragma: keep #include // for map, map<>::iterator #include // for pair -#include // for vector, vector<>::const_... -#include // for create_directories, exists -#include // for path, operator<< -#include // for filesystem -#include // for volk_gnsssdr_get_config_path -#include "kernel_tests.h" // for init_test_list -#include "qa_utils.h" // for volk_gnsssdr_test_results_t -#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t -#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t -#include "volk_gnsssdr_profile.h" +#include // for vector, vector<>::const_.. + namespace fs = boost::filesystem; diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc index 35186fc1b..35e60b2f4 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.cc @@ -17,6 +17,13 @@ */ #include "qa_utils.h" +#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t +#include "volk_gnsssdr/volk_gnsssdr_malloc.h" // for volk_gnsssdr_free, volk_gnsssdr_malloc +#include // for auto_any_base +#include // for lexical_cast +#include // for char_separator +#include // for token_iterator +#include // for tokenizer #include // for assert #include // for system_clock, duration,... #include // for sqrt, fabs, abs @@ -28,13 +35,6 @@ #include // for map #include // for random_device, default_random_engine, uniform_real_distribution #include // for vector -#include // for auto_any_base -#include // for lexical_cast -#include // for char_separator -#include // for token_iterator -#include // for tokenizer -#include // for volk_gnsssdr_func_desc_t -#include // for volk_gnsssdr_free, volk_gnsssdr_malloc float uniform() { diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h index b7b16a63d..ad4d7e6b9 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/qa_utils.h @@ -23,13 +23,13 @@ #define _DARWIN_C_SOURCE #endif +#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t +#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t #include // for bool, false #include // for NULL #include // for map #include // for string, basic_string #include // for vector -#include // for volk_gnsssdr_func_desc_t -#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t /************************************************ diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc index bc9e526dc..6e1f0fb61 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/testqa.cc @@ -18,6 +18,9 @@ */ +#include "kernel_tests.h" // for init_test_list +#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t +#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t #include // for bool, false, true #include // for operator<<, basic_ostream, endl, char... #include // IWYU pragma: keep @@ -25,9 +28,6 @@ #include // for string, operator<< #include // for pair #include // for vector -#include "kernel_tests.h" // for init_test_list -#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t -#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t void print_qa_xml(std::vector results, unsigned int nfails); diff --git a/src/algorithms/observables/adapters/hybrid_observables.cc b/src/algorithms/observables/adapters/hybrid_observables.cc index a3a33d38a..62b7c37ae 100644 --- a/src/algorithms/observables/adapters/hybrid_observables.cc +++ b/src/algorithms/observables/adapters/hybrid_observables.cc @@ -32,9 +32,10 @@ #include "hybrid_observables.h" #include "configuration_interface.h" -#include -#include "GPS_L1_CA.h" #include "Galileo_E1.h" +#include "GPS_L1_CA.h" +#include + using google::LogMessage; diff --git a/src/algorithms/observables/adapters/hybrid_observables.h b/src/algorithms/observables/adapters/hybrid_observables.h index d986ebb14..567c7b5ba 100644 --- a/src/algorithms/observables/adapters/hybrid_observables.h +++ b/src/algorithms/observables/adapters/hybrid_observables.h @@ -34,10 +34,9 @@ #ifndef GNSS_SDR_HYBRID_OBSERVABLES_H_ #define GNSS_SDR_HYBRID_OBSERVABLES_H_ -#include -#include "observables_interface.h" #include "hybrid_observables_cc.h" - +#include "observables_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc index 66cd0fce0..658b25bbf 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc @@ -29,20 +29,21 @@ */ #include "hybrid_observables_cc.h" +#include "Galileo_E1.h" +#include "GPS_L1_CA.h" +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include "Galileo_E1.h" -#include "GPS_L1_CA.h" + using google::LogMessage; @@ -506,11 +507,13 @@ int hybrid_observables_cc::general_work (int noutput_items , // two points linear interpolation using adjacent (adj) values: y=y1+(x-x1)*(y2-y1)/(x2-x1) // TOW at the selected receiver time T_rx_s int element_key = gnss_synchro_map_iter->second.Channel_ID; - try{ - adj_obs = adjacent_gnss_synchro_map.at(element_key); - }catch(const std::exception & ex) + try { - continue; + adj_obs = adjacent_gnss_synchro_map.at(element_key); + } + catch(const std::exception & ex) + { + continue; } double adj_T_rx_s = static_cast(adj_obs.Tracking_sample_counter) / channel_fs_hz + adj_obs.Code_phase_samples / channel_fs_hz; diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h index 494f84e75..e97922173 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h @@ -33,10 +33,10 @@ #ifndef GNSS_SDR_HYBRID_OBSERVABLES_CC_H #define GNSS_SDR_HYBRID_OBSERVABLES_CC_H +#include "gnss_synchro.h" +#include #include #include -#include -#include "gnss_synchro.h" class hybrid_observables_cc; diff --git a/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc b/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc index c69eeb43b..5c3071981 100644 --- a/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc +++ b/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc @@ -30,15 +30,15 @@ */ #include "direct_resampler_conditioner.h" -#include -#include -#include -#include -#include #include "direct_resampler_conditioner_cc.h" #include "direct_resampler_conditioner_cs.h" #include "direct_resampler_conditioner_cb.h" #include "configuration_interface.h" +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/resampler/adapters/direct_resampler_conditioner.h b/src/algorithms/resampler/adapters/direct_resampler_conditioner.h index 8a188d506..8ffa4d4b4 100644 --- a/src/algorithms/resampler/adapters/direct_resampler_conditioner.h +++ b/src/algorithms/resampler/adapters/direct_resampler_conditioner.h @@ -33,9 +33,9 @@ #ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_H_ #define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_H_ -#include -#include #include "gnss_block_interface.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc index 340fc5cea..170215618 100644 --- a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc +++ b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc @@ -30,11 +30,11 @@ */ #include "mmse_resampler_conditioner.h" -#include -#include +#include "configuration_interface.h" #include #include -#include "configuration_interface.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h index 57aae1906..c5ce652dc 100644 --- a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h +++ b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h @@ -33,13 +33,13 @@ #ifndef GNSS_SDR_MMSE_RESAMPLER_CONDITIONER_H_ #define GNSS_SDR_MMSE_RESAMPLER_CONDITIONER_H_ -#include +#include "gnss_block_interface.h" #ifdef GR_GREATER_38 #include #else #include #endif -#include "gnss_block_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.cc b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.cc index bfda13b4e..386968791 100644 --- a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.cc +++ b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.cc @@ -33,8 +33,6 @@ #include "direct_resampler_conditioner_cb.h" -#include -#include #include #include diff --git a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.cc b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.cc index 569f3fc14..e05f887d5 100644 --- a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.cc +++ b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.cc @@ -33,11 +33,10 @@ #include "direct_resampler_conditioner_cc.h" -#include -#include #include #include + using google::LogMessage; direct_resampler_conditioner_cc_sptr direct_resampler_make_conditioner_cc( diff --git a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.cc b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.cc index e0e808e0c..e362a1dde 100644 --- a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.cc +++ b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.cc @@ -33,8 +33,6 @@ #include "direct_resampler_conditioner_cs.h" -#include -#include #include #include diff --git a/src/algorithms/signal_generator/adapters/signal_generator.cc b/src/algorithms/signal_generator/adapters/signal_generator.cc index 57e3c0aa0..439e3c3ca 100644 --- a/src/algorithms/signal_generator/adapters/signal_generator.cc +++ b/src/algorithms/signal_generator/adapters/signal_generator.cc @@ -31,12 +31,12 @@ #include "signal_generator.h" -#include #include "configuration_interface.h" #include "Galileo_E1.h" #include "GPS_L1_CA.h" #include "Galileo_E5a.h" #include "GLONASS_L1_CA.h" +#include using google::LogMessage; diff --git a/src/algorithms/signal_generator/adapters/signal_generator.h b/src/algorithms/signal_generator/adapters/signal_generator.h index 97815b393..16104062d 100644 --- a/src/algorithms/signal_generator/adapters/signal_generator.h +++ b/src/algorithms/signal_generator/adapters/signal_generator.h @@ -33,15 +33,14 @@ #ifndef GNSS_SDR_SIGNAL_GENERATOR_H_ #define GNSS_SDR_SIGNAL_GENERATOR_H_ - -#include -#include +#include "gnss_block_interface.h" +#include "signal_generator_c.h" #include #include #include #include -#include "gnss_block_interface.h" -#include "signal_generator_c.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc index 6d84c3084..8bc43795e 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc @@ -29,10 +29,6 @@ */ #include "signal_generator_c.h" -#include -#include -#include -#include #include "gps_sdr_signal_processing.h" #include "glonass_l1_signal_processing.h" #include "galileo_e1_signal_processing.h" @@ -41,6 +37,9 @@ #include "Galileo_E5a.h" #include "GPS_L1_CA.h" #include "GLONASS_L1_CA.h" +#include +#include +#include /* * Create a new instance of signal_generator_c and return diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h index 01357e08c..93a938347 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h @@ -31,13 +31,14 @@ #ifndef GNSS_SDR_SIGNAL_GENERATOR_C_H #define GNSS_SDR_SIGNAL_GENERATOR_C_H -#include -#include -#include +#include "gnss_signal.h" #include #include #include -#include "gnss_signal.h" +#include +#include +#include + class signal_generator_c; diff --git a/src/algorithms/signal_source/adapters/file_signal_source.cc b/src/algorithms/signal_source/adapters/file_signal_source.cc index aa2c18244..f05d5b1bd 100644 --- a/src/algorithms/signal_source/adapters/file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/file_signal_source.cc @@ -31,14 +31,14 @@ */ #include "file_signal_source.h" -#include -#include -#include -#include -#include #include "configuration_interface.h" #include "gnss_sdr_flags.h" #include "gnss_sdr_valve.h" +#include +#include // for std::cerr +#include +#include +#include diff --git a/src/algorithms/signal_source/adapters/file_signal_source.h b/src/algorithms/signal_source/adapters/file_signal_source.h index 85c9104db..850c73e93 100644 --- a/src/algorithms/signal_source/adapters/file_signal_source.h +++ b/src/algorithms/signal_source/adapters/file_signal_source.h @@ -35,14 +35,13 @@ #ifndef GNSS_SDR_FILE_SIGNAL_SOURCE_H_ #define GNSS_SDR_FILE_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include #include #include -#include "gnss_block_interface.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/flexiband_signal_source.cc b/src/algorithms/signal_source/adapters/flexiband_signal_source.cc index e21126506..ee5f7411a 100644 --- a/src/algorithms/signal_source/adapters/flexiband_signal_source.cc +++ b/src/algorithms/signal_source/adapters/flexiband_signal_source.cc @@ -29,11 +29,11 @@ */ #include "flexiband_signal_source.h" +#include "configuration_interface.h" #include #include #include #include -#include "configuration_interface.h" using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/flexiband_signal_source.h b/src/algorithms/signal_source/adapters/flexiband_signal_source.h index 5949f8cb0..b071a5b75 100644 --- a/src/algorithms/signal_source/adapters/flexiband_signal_source.h +++ b/src/algorithms/signal_source/adapters/flexiband_signal_source.h @@ -33,14 +33,14 @@ #ifndef FLEXIBAND_SIGNAL_SOURCE_H_ #define FLEXIBAND_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include #include #include +#include #include -#include "gnss_block_interface.h" class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc index 52916a19e..14c3a1386 100644 --- a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc +++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc @@ -30,11 +30,12 @@ */ #include "fmcomms2_signal_source.h" -#include -#include #include "configuration_interface.h" #include "gnss_sdr_valve.h" #include "GPS_L1_CA.h" +#include +#include + using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h index 78f3ebb58..a359c8cfe 100644 --- a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h +++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h @@ -33,12 +33,12 @@ #ifndef GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H_ #define GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include #include -#include "gnss_block_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/gen_signal_source.cc b/src/algorithms/signal_source/adapters/gen_signal_source.cc index bede41061..f709e419d 100644 --- a/src/algorithms/signal_source/adapters/gen_signal_source.cc +++ b/src/algorithms/signal_source/adapters/gen_signal_source.cc @@ -31,13 +31,12 @@ */ #include "gen_signal_source.h" -#include -#include #include #include #include #include #include +#include using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/gen_signal_source.h b/src/algorithms/signal_source/adapters/gen_signal_source.h index 034155bf0..1fcbc15a7 100644 --- a/src/algorithms/signal_source/adapters/gen_signal_source.h +++ b/src/algorithms/signal_source/adapters/gen_signal_source.h @@ -33,10 +33,10 @@ #ifndef GNSS_SDR_GEN_SIGNAL_SOURCE_H_ #define GNSS_SDR_GEN_SIGNAL_SOURCE_H_ -#include -#include -#include "gnss_block_interface.h" +#include "gnss_block_interface.h" +#include +#include /*! * \brief This class wraps blocks that generates synthesized GNSS signal and diff --git a/src/algorithms/signal_source/adapters/gn3s_signal_source.cc b/src/algorithms/signal_source/adapters/gn3s_signal_source.cc index 17ac8513c..438723ff9 100644 --- a/src/algorithms/signal_source/adapters/gn3s_signal_source.cc +++ b/src/algorithms/signal_source/adapters/gn3s_signal_source.cc @@ -29,11 +29,11 @@ */ #include "gn3s_signal_source.h" +#include "configuration_interface.h" #include #include #include #include -#include "configuration_interface.h" using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/gn3s_signal_source.h b/src/algorithms/signal_source/adapters/gn3s_signal_source.h index b8b61cbdb..146a5aaec 100644 --- a/src/algorithms/signal_source/adapters/gn3s_signal_source.h +++ b/src/algorithms/signal_source/adapters/gn3s_signal_source.h @@ -32,11 +32,11 @@ #ifndef GNSS_SDR_GN3S_SIGNAL_SOURCE_H_ #define GNSS_SDR_GN3S_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include -#include "gnss_block_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/labsat_signal_source.cc b/src/algorithms/signal_source/adapters/labsat_signal_source.cc index ddd0805c2..3a5fb9175 100644 --- a/src/algorithms/signal_source/adapters/labsat_signal_source.cc +++ b/src/algorithms/signal_source/adapters/labsat_signal_source.cc @@ -29,9 +29,10 @@ */ #include "labsat_signal_source.h" -#include -#include "labsat23_source.h" #include "configuration_interface.h" +#include "labsat23_source.h" +#include + using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/labsat_signal_source.h b/src/algorithms/signal_source/adapters/labsat_signal_source.h index 43821e8e8..71942f90b 100644 --- a/src/algorithms/signal_source/adapters/labsat_signal_source.h +++ b/src/algorithms/signal_source/adapters/labsat_signal_source.h @@ -32,12 +32,11 @@ #ifndef GNSS_SDR_LABSAT_SIGNAL_SOURCE_H_ #define GNSS_SDR_LABSAT_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include -#include "gnss_block_interface.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc index 00d374d55..2208d15e7 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc @@ -31,14 +31,14 @@ */ #include "nsr_file_signal_source.h" +#include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" +#include #include #include #include #include -#include -#include "configuration_interface.h" -#include "gnss_sdr_flags.h" -#include "gnss_sdr_valve.h" using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.h b/src/algorithms/signal_source/adapters/nsr_file_signal_source.h index 8ca419c91..7be4ea775 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.h @@ -35,15 +35,14 @@ #ifndef GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H_ #define GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" +#include "unpack_byte_2bit_samples.h" #include #include #include #include #include -#include "gnss_block_interface.h" -#include "unpack_byte_2bit_samples.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc b/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc index d4e314911..4bb665ffa 100644 --- a/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc +++ b/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc @@ -30,13 +30,14 @@ */ #include "osmosdr_signal_source.h" -#include -#include -#include -#include #include "configuration_interface.h" #include "gnss_sdr_valve.h" #include "GPS_L1_CA.h" +#include +#include +#include +#include + using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/osmosdr_signal_source.h b/src/algorithms/signal_source/adapters/osmosdr_signal_source.h index bed05d358..7e69aec81 100644 --- a/src/algorithms/signal_source/adapters/osmosdr_signal_source.h +++ b/src/algorithms/signal_source/adapters/osmosdr_signal_source.h @@ -33,13 +33,13 @@ #ifndef GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H_ #define GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H_ -#include -#include +#include "gnss_block_interface.h" #include #include #include #include -#include "gnss_block_interface.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc index 4e7e37b3e..3f3e6f171 100644 --- a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc +++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc @@ -29,11 +29,11 @@ */ #include "plutosdr_signal_source.h" -#include -#include #include "configuration_interface.h" #include "gnss_sdr_valve.h" #include "GPS_L1_CA.h" +#include +#include using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.h b/src/algorithms/signal_source/adapters/plutosdr_signal_source.h index 56c2334c8..535f50939 100644 --- a/src/algorithms/signal_source/adapters/plutosdr_signal_source.h +++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.h @@ -32,12 +32,13 @@ #ifndef GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H_ #define GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include #include -#include "gnss_block_interface.h" +#include + class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/raw_array_signal_source.cc b/src/algorithms/signal_source/adapters/raw_array_signal_source.cc index d203901e8..ba96b0460 100644 --- a/src/algorithms/signal_source/adapters/raw_array_signal_source.cc +++ b/src/algorithms/signal_source/adapters/raw_array_signal_source.cc @@ -29,11 +29,11 @@ */ #include "raw_array_signal_source.h" +#include "configuration_interface.h" +#include #include #include #include -#include -#include "configuration_interface.h" using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/raw_array_signal_source.h b/src/algorithms/signal_source/adapters/raw_array_signal_source.h index fe813aa8f..eaabd84e2 100644 --- a/src/algorithms/signal_source/adapters/raw_array_signal_source.h +++ b/src/algorithms/signal_source/adapters/raw_array_signal_source.h @@ -32,12 +32,11 @@ #ifndef RAW_ARRAY_SIGNAL_SOURCE_H_ #define RAW_ARRAY_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" #include #include #include -#include "gnss_block_interface.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc index 38da90196..1e2e86c3b 100644 --- a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc +++ b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc @@ -31,12 +31,13 @@ */ #include "rtl_tcp_signal_source.h" -#include -#include -#include #include "configuration_interface.h" #include "gnss_sdr_valve.h" #include "GPS_L1_CA.h" +#include +#include +#include + using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h index 283f84ae9..e8cf81393 100644 --- a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h +++ b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h @@ -32,15 +32,16 @@ #ifndef GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H #define GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H -#include -#include +#include "rtl_tcp_signal_source_c.h" +#include "gnss_block_interface.h" #include #include #include #include #include -#include "rtl_tcp_signal_source_c.h" -#include "gnss_block_interface.h" +#include +#include + class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc index 3446406bb..0293f5805 100644 --- a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc @@ -30,14 +30,14 @@ */ #include "spir_file_signal_source.h" +#include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" +#include #include #include #include #include -#include -#include "configuration_interface.h" -#include "gnss_sdr_flags.h" -#include "gnss_sdr_valve.h" using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/spir_file_signal_source.h b/src/algorithms/signal_source/adapters/spir_file_signal_source.h index f620a40c9..bb73cd013 100644 --- a/src/algorithms/signal_source/adapters/spir_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/spir_file_signal_source.h @@ -32,15 +32,14 @@ #ifndef GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H_ #define GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" +#include "unpack_intspir_1bit_samples.h" #include #include #include #include #include -#include "gnss_block_interface.h" -#include "unpack_intspir_1bit_samples.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc index 75d30b9f5..512ec6678 100644 --- a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc @@ -30,13 +30,13 @@ */ #include "spir_gss6450_file_signal_source.h" +#include "configuration_interface.h" +#include #include #include #include #include -#include -#include -#include "configuration_interface.h" + using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h index 05985b36c..cc07a9747 100644 --- a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h @@ -32,8 +32,9 @@ #ifndef GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H_ #define GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H_ -#include -#include +#include "gnss_block_interface.h" +#include "gnss_sdr_valve.h" +#include "unpack_spir_gss6450_samples.h" #include #include #include @@ -42,9 +43,8 @@ #include #include #include -#include "gnss_block_interface.h" -#include "gnss_sdr_valve.h" -#include "unpack_spir_gss6450_samples.h" +#include +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc index 4aa79fb12..ea5f715c7 100644 --- a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc @@ -30,14 +30,14 @@ */ #include "two_bit_cpx_file_signal_source.h" +#include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" +#include #include #include #include #include -#include -#include "gnss_sdr_flags.h" -#include "gnss_sdr_valve.h" -#include "configuration_interface.h" using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h index 674bb24de..405bd1a68 100644 --- a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h @@ -34,16 +34,15 @@ #ifndef GNSS_SDR_TWO_BIT_CPX_FILE_SIGNAL_SOURCE_H_ #define GNSS_SDR_TWO_BIT_CPX_FILE_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" +#include "unpack_byte_2bit_cpx_samples.h" #include #include #include #include #include #include -#include "gnss_block_interface.h" -#include "unpack_byte_2bit_cpx_samples.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc index 3e0712c8a..829c8941b 100644 --- a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc @@ -31,16 +31,15 @@ */ #include "two_bit_packed_file_signal_source.h" +#include "configuration_interface.h" +#include "gnss_sdr_flags.h" +#include "gnss_sdr_valve.h" +#include +#include #include #include #include #include -#include -#include -#include "gnss_sdr_flags.h" -#include "gnss_sdr_valve.h" -#include "configuration_interface.h" - using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h index 397010311..72af7696a 100644 --- a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h @@ -35,16 +35,15 @@ #ifndef GNSS_SDR_TWO_BIT_PACKED_FILE_SIGNAL_SOURCE_H_ #define GNSS_SDR_TWO_BIT_PACKED_FILE_SIGNAL_SOURCE_H_ -#include +#include "gnss_block_interface.h" +#include "unpack_2bit_samples.h" #include #include #include #include #include #include -#include "gnss_block_interface.h" -#include "unpack_2bit_samples.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/uhd_signal_source.cc b/src/algorithms/signal_source/adapters/uhd_signal_source.cc index 8a3658281..7d4057c8a 100644 --- a/src/algorithms/signal_source/adapters/uhd_signal_source.cc +++ b/src/algorithms/signal_source/adapters/uhd_signal_source.cc @@ -29,14 +29,15 @@ */ #include "uhd_signal_source.h" -#include -#include -#include -#include -#include #include "configuration_interface.h" #include "gnss_sdr_valve.h" #include "GPS_L1_CA.h" +#include +#include +#include +#include +#include + using google::LogMessage; diff --git a/src/algorithms/signal_source/adapters/uhd_signal_source.h b/src/algorithms/signal_source/adapters/uhd_signal_source.h index 94a622218..969a44819 100644 --- a/src/algorithms/signal_source/adapters/uhd_signal_source.h +++ b/src/algorithms/signal_source/adapters/uhd_signal_source.h @@ -31,14 +31,15 @@ #ifndef GNSS_SDR_UHD_SIGNAL_SOURCE_H_ #define GNSS_SDR_UHD_SIGNAL_SOURCE_H_ -#include -#include +#include "gnss_block_interface.h" #include #include #include #include #include -#include "gnss_block_interface.h" +#include +#include + class ConfigurationInterface; diff --git a/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.h b/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.h index d73a40509..7ad2e7827 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.h +++ b/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.h @@ -40,12 +40,12 @@ #include "rtl_tcp_dongle_info.h" #include -#include -#include #include #include #include #include +#include +#include class rtl_tcp_signal_source_c; diff --git a/src/algorithms/signal_source/gnuradio_blocks/unpack_2bit_samples.h b/src/algorithms/signal_source/gnuradio_blocks/unpack_2bit_samples.h index 0e8a73da3..dbb97e583 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/unpack_2bit_samples.h +++ b/src/algorithms/signal_source/gnuradio_blocks/unpack_2bit_samples.h @@ -68,9 +68,8 @@ #ifndef GNSS_SDR_UNPACK_2BIT_SAMPLES_H #define GNSS_SDR_UNPACK_2BIT_SAMPLES_H -#include #include - +#include class unpack_2bit_samples; diff --git a/src/algorithms/signal_source/libs/rtl_tcp_dongle_info.cc b/src/algorithms/signal_source/libs/rtl_tcp_dongle_info.cc index ad736a0cc..1f28b0004 100644 --- a/src/algorithms/signal_source/libs/rtl_tcp_dongle_info.cc +++ b/src/algorithms/signal_source/libs/rtl_tcp_dongle_info.cc @@ -32,8 +32,8 @@ */ #include "rtl_tcp_dongle_info.h" -#include #include +#include using boost::asio::ip::tcp; diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc index 5de974a85..15d52e856 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc @@ -32,14 +32,14 @@ #include "galileo_e1b_telemetry_decoder.h" -#include -#include #include "configuration_interface.h" -#include "concurrent_queue.h" #include "galileo_ephemeris.h" #include "galileo_almanac.h" #include "galileo_iono.h" #include "galileo_utc_model.h" +#include +#include + using google::LogMessage; @@ -47,9 +47,9 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c std::string role, unsigned int in_streams, unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) + role_(role), + in_streams_(in_streams), + out_streams_(out_streams) { std::string default_dump_filename = "./navigation.dat"; DLOG(INFO) << "role " << role; @@ -58,7 +58,6 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c // make telemetry decoder object telemetry_decoder_ = galileo_e1b_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; - channel_ = 0; } diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h index 571fd09b8..6f3d2837c 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h @@ -34,11 +34,11 @@ #ifndef GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_H_ #define GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_H_ -#include + #include "telemetry_decoder_interface.h" #include "galileo_e1b_telemetry_decoder_cc.h" #include "gnss_satellite.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc index 24f72a4ac..8b862e7e3 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc @@ -35,14 +35,14 @@ */ #include "galileo_e5a_telemetry_decoder.h" -#include -#include -#include "concurrent_queue.h" +#include "configuration_interface.h" #include "galileo_ephemeris.h" #include "galileo_almanac.h" #include "galileo_iono.h" #include "galileo_utc_model.h" -#include "configuration_interface.h" +#include +#include + using google::LogMessage; @@ -51,9 +51,9 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* c std::string role, unsigned int in_streams, unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) + role_(role), + in_streams_(in_streams), + out_streams_(out_streams) { std::string default_dump_filename = "./navigation.dat"; DLOG(INFO) << "role " << role; @@ -62,7 +62,6 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* c // make telemetry decoder object telemetry_decoder_ = galileo_e5a_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; - DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")"; channel_ = 0; } diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h index 9b7bb7713..cf2d0aae6 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h @@ -37,10 +37,9 @@ #ifndef GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_ #define GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_ -#include -#include "telemetry_decoder_interface.h" #include "galileo_e5a_telemetry_decoder_cc.h" - +#include "telemetry_decoder_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc index 5e4b5a4bc..0ff8facef 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc @@ -32,13 +32,13 @@ #include "glonass_l1_ca_telemetry_decoder.h" -#include -#include -#include "concurrent_queue.h" +#include "configuration_interface.h" #include "glonass_gnav_ephemeris.h" #include "glonass_gnav_almanac.h" #include "glonass_gnav_utc_model.h" -#include "configuration_interface.h" +#include +#include + using google::LogMessage; @@ -46,9 +46,9 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(ConfigurationInterface* std::string role, unsigned int in_streams, unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) + role_(role), + in_streams_(in_streams), + out_streams_(out_streams) { std::string default_dump_filename = "./navigation.dat"; DLOG(INFO) << "role " << role; @@ -57,8 +57,6 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(ConfigurationInterface* // make telemetry decoder object telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_cc(satellite_, dump_); DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; - - DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")"; channel_ = 0; } diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h index 6eef6e858..a2f413302 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h @@ -34,10 +34,9 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_H_ #define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_H_ -#include #include "telemetry_decoder_interface.h" #include "glonass_l1_ca_telemetry_decoder_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc index 72deeafd6..cb285e9b9 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc @@ -31,14 +31,14 @@ #include "gps_l1_ca_telemetry_decoder.h" -#include -#include -#include "concurrent_queue.h" +#include "configuration_interface.h" #include "gps_ephemeris.h" #include "gps_almanac.h" #include "gps_iono.h" #include "gps_utc_model.h" -#include "configuration_interface.h" +#include +#include + using google::LogMessage; @@ -46,9 +46,9 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu std::string role, unsigned int in_streams, unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) + role_(role), + in_streams_(in_streams), + out_streams_(out_streams) { std::string default_dump_filename = "./navigation.dat"; DLOG(INFO) << "role " << role; @@ -57,8 +57,6 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu // make telemetry decoder object telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; - - DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")"; channel_ = 0; } diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h index fdefb78d5..2d115fc5e 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h @@ -33,10 +33,9 @@ #ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_ #define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_ -#include -#include "telemetry_decoder_interface.h" #include "gps_l1_ca_telemetry_decoder_cc.h" - +#include "telemetry_decoder_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc index 205b34395..d93569211 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc @@ -31,14 +31,13 @@ #include "gps_l2c_telemetry_decoder.h" -#include -#include -#include "concurrent_queue.h" +#include "configuration_interface.h" #include "gps_cnav_ephemeris.h" #include "gps_almanac.h" #include "gps_cnav_iono.h" #include "gps_cnav_utc_model.h" -#include "configuration_interface.h" +#include +#include using google::LogMessage; @@ -47,9 +46,9 @@ GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(ConfigurationInterface* configura std::string role, unsigned int in_streams, unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) + role_(role), + in_streams_(in_streams), + out_streams_(out_streams) { std::string default_dump_filename = "./navigation.dat"; DLOG(INFO) << "role " << role; @@ -58,8 +57,6 @@ GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(ConfigurationInterface* configura // make telemetry decoder object telemetry_decoder_ = gps_l2c_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; - - LOG(INFO) << "global navigation message queue assigned to telemetry_decoder (" << telemetry_decoder_->unique_id() << ")" << "role " << role; channel_ = 0; } diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h index c98d724cf..753478bae 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h @@ -33,10 +33,9 @@ #ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_ #define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_ -#include -#include "telemetry_decoder_interface.h" #include "gps_l2c_telemetry_decoder_cc.h" - +#include "telemetry_decoder_interface.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc index fe4f356f1..8b57e81cf 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc @@ -31,10 +31,9 @@ #include "gps_l5_telemetry_decoder.h" +#include "configuration_interface.h" #include #include -#include "concurrent_queue.h" -#include "configuration_interface.h" using google::LogMessage; @@ -43,9 +42,9 @@ GpsL5TelemetryDecoder::GpsL5TelemetryDecoder(ConfigurationInterface* configurati std::string role, unsigned int in_streams, unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) + role_(role), + in_streams_(in_streams), + out_streams_(out_streams) { std::string default_dump_filename = "./navigation.dat"; DLOG(INFO) << "role " << role; @@ -54,8 +53,6 @@ GpsL5TelemetryDecoder::GpsL5TelemetryDecoder(ConfigurationInterface* configurati // make telemetry decoder object telemetry_decoder_ = gps_l5_make_telemetry_decoder_cc(satellite_, dump_); DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; - - LOG(INFO) << "global navigation message queue assigned to telemetry_decoder (" << telemetry_decoder_->unique_id() << ")" << "role " << role; channel_ = 0; } diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h index 4041e253e..d25405cf3 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h @@ -33,10 +33,11 @@ #ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_H_ #define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_H_ -#include + #include "telemetry_decoder_interface.h" #include "gps_l5_telemetry_decoder_cc.h" #include "gnss_satellite.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc index bf9e45e74..755419bd7 100644 --- a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc @@ -31,12 +31,12 @@ #include "sbas_l1_telemetry_decoder.h" +#include "configuration_interface.h" +#include "sbas_ephemeris.h" +#include "sbas_l1_telemetry_decoder_cc.h" #include #include -#include "concurrent_queue.h" -#include "sbas_ephemeris.h" -#include "configuration_interface.h" -#include "sbas_l1_telemetry_decoder_cc.h" + using google::LogMessage; diff --git a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h index 47325cad7..eae3bf32f 100644 --- a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h @@ -33,10 +33,10 @@ #ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_H_ #define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_H_ -#include + #include "telemetry_decoder_interface.h" #include "sbas_l1_telemetry_decoder_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc index 97c4a9927..34b829252 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc @@ -31,13 +31,13 @@ #include "galileo_e1b_telemetry_decoder_cc.h" -#include +#include "control_message_factory.h" +#include "convolutional.h" +#include "gnss_synchro.h" #include #include #include -#include "control_message_factory.h" -#include "gnss_synchro.h" -#include "convolutional.h" +#include #define CRC_ERROR_LIMIT 6 diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h index 95a618c7a..7e6fb0374 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.h @@ -32,19 +32,18 @@ #ifndef GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_CC_H -#include -#include -#include + #include "Galileo_E1.h" -#include "concurrent_queue.h" -#include "gnss_satellite.h" #include "galileo_navigation_message.h" #include "galileo_ephemeris.h" #include "galileo_almanac.h" #include "galileo_iono.h" #include "galileo_utc_model.h" +#include "gnss_satellite.h" #include "gnss_synchro.h" - +#include +#include +#include class galileo_e1b_telemetry_decoder_cc; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc index 4f76a6d99..6ae735b57 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc @@ -35,13 +35,13 @@ */ #include "galileo_e5a_telemetry_decoder_cc.h" -#include +#include "control_message_factory.h" +#include "convolutional.h" #include #include #include #include -#include "control_message_factory.h" -#include "convolutional.h" +#include #define GALILEO_E5a_CRC_ERROR_LIMIT 6 diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h index 4390b3181..af1d3f15d 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h @@ -37,12 +37,7 @@ #ifndef GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_CC_H_ #define GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_CC_H_ -#include -#include -#include -#include #include "Galileo_E5a.h" -#include "concurrent_queue.h" #include "gnss_satellite.h" #include "galileo_fnav_message.h" #include "galileo_ephemeris.h" @@ -50,6 +45,11 @@ #include "galileo_iono.h" #include "galileo_utc_model.h" #include "gnss_synchro.h" +#include +#include +#include +#include + class galileo_e5a_telemetry_decoder_cc; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h index 8973d7d95..5acf0aa22 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h @@ -33,18 +33,17 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_CC_H -#include -#include -#include + #include "GLONASS_L1_CA.h" -#include "concurrent_queue.h" -#include "gnss_satellite.h" #include "glonass_gnav_navigation_message.h" #include "glonass_gnav_ephemeris.h" #include "glonass_gnav_almanac.h" #include "glonass_gnav_utc_model.h" +#include "gnss_satellite.h" #include "gnss_synchro.h" - +#include +#include +#include class glonass_l1_ca_telemetry_decoder_cc; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc index c47d448e7..92cedda70 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc @@ -30,11 +30,11 @@ */ #include "gps_l1_ca_telemetry_decoder_cc.h" -#include +#include "control_message_factory.h" #include #include #include -#include "control_message_factory.h" + #ifndef _rotl #define _rotl(X,N) ((X << N) ^ (X >> (32-N))) // Used in the parity check algorithm diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h index 49ae8e1d0..28c006adf 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h @@ -31,16 +31,14 @@ #ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_CC_H -#include -#include -#include -#include #include "GPS_L1_CA.h" #include "gps_l1_ca_subframe_fsm.h" -#include "concurrent_queue.h" #include "gnss_satellite.h" #include "gnss_synchro.h" - +#include +#include +#include +#include class gps_l1_ca_telemetry_decoder_cc; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc index 7b1334836..c65db4178 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc @@ -29,14 +29,16 @@ * ------------------------------------------------------------------------- */ + +#include "gps_l2c_telemetry_decoder_cc.h" +#include "gnss_synchro.h" +#include +#include +#include #include #include #include -#include -#include -#include -#include "gnss_synchro.h" -#include "gps_l2c_telemetry_decoder_cc.h" + using google::LogMessage; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h index 240eac538..d5613fd73 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h @@ -31,18 +31,19 @@ #ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_CC_H + +#include "gnss_satellite.h" +#include "gps_cnav_navigation_message.h" +#include "gps_cnav_ephemeris.h" +#include "gps_cnav_iono.h" +#include #include // for copy #include #include #include #include // for pair #include -#include -#include "gnss_satellite.h" -#include "gps_cnav_navigation_message.h" -#include "gps_cnav_ephemeris.h" -#include "gps_cnav_iono.h" -#include "concurrent_queue.h" + extern "C" { #include "cnav_msg.h" diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.cc index 2d604b221..44ebc407b 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.cc @@ -29,16 +29,18 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include + +#include "gps_l5_telemetry_decoder_cc.h" +#include "gnss_synchro.h" +#include "gps_cnav_ephemeris.h" +#include "gps_cnav_iono.h" #include #include #include -#include "gnss_synchro.h" -#include "gps_l5_telemetry_decoder_cc.h" -#include "gps_cnav_ephemeris.h" -#include "gps_cnav_iono.h" +#include +#include +#include + using google::LogMessage; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h index 3d60b95ce..f3452b78f 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h @@ -31,16 +31,16 @@ #ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_CC_H + +#include "gnss_satellite.h" +#include "gps_cnav_navigation_message.h" +#include #include #include #include #include #include #include -#include -#include "gnss_satellite.h" -#include "gps_cnav_navigation_message.h" -#include "concurrent_queue.h" extern "C" { #include "cnav_msg.h" diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc index f06cf16fd..dab50ea9f 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc @@ -28,14 +28,14 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include "sbas_l1_telemetry_decoder_cc.h" #include "control_message_factory.h" #include "gnss_synchro.h" -#include "sbas_l1_telemetry_decoder_cc.h" +#include +#include +#include +#include + using google::LogMessage; @@ -46,7 +46,6 @@ using google::LogMessage; #define LMORE 5 // - sbas_l1_telemetry_decoder_cc_sptr sbas_l1_make_telemetry_decoder_cc(const Gnss_Satellite & satellite, bool dump) { diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h index ee0b2f732..8f31cf4e5 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h @@ -31,16 +31,17 @@ #ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_CC_H #define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_CC_H +#include "gnss_satellite.h" +#include "viterbi_decoder.h" +#include +#include #include // for copy #include #include #include #include // for pair #include -#include -#include -#include "gnss_satellite.h" -#include "viterbi_decoder.h" + class sbas_l1_telemetry_decoder_cc; diff --git a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc b/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc index 68d286822..5a464f6d3 100644 --- a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc +++ b/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc @@ -29,13 +29,13 @@ */ #include "gps_l1_ca_subframe_fsm.h" -#include +#include "gnss_satellite.h" #include #include #include #include #include -#include "gnss_satellite.h" +#include //************ GPS WORD TO SUBFRAME DECODER STATE MACHINE ********** diff --git a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h b/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h index 34e40043f..84a388eda 100644 --- a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h +++ b/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h @@ -32,14 +32,13 @@ #ifndef GNSS_SDR_GPS_L1_CA_SUBFRAME_FSM_H_ #define GNSS_SDR_GPS_L1_CA_SUBFRAME_FSM_H_ -#include -#include "concurrent_queue.h" #include "GPS_L1_CA.h" #include "gps_navigation_message.h" #include "gps_ephemeris.h" #include "gps_iono.h" #include "gps_almanac.h" #include "gps_utc_model.h" +#include namespace sc = boost::statechart; namespace mpl = boost::mpl; diff --git a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc index 1fbcb558b..f7509b1dd 100644 --- a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc +++ b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc @@ -30,7 +30,6 @@ */ #include "viterbi_decoder.h" -#include #include // logging diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc index 5f4248f96..838bd75a8 100755 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc @@ -35,10 +35,10 @@ */ #include "galileo_e1_dll_pll_veml_tracking.h" -#include -#include "Galileo_E1.h" #include "configuration_interface.h" +#include "Galileo_E1.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h index 4b478f666..22c94322f 100755 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h @@ -37,10 +37,9 @@ #ifndef GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H_ #define GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H_ - -#include #include "tracking_interface.h" #include "galileo_e1_dll_pll_veml_tracking_cc.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc index 6ede1ca91..bdafc43a1 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc @@ -37,11 +37,10 @@ */ #include "galileo_e5a_dll_pll_tracking.h" -#include -#include "Galileo_E5a.h" #include "configuration_interface.h" +#include "Galileo_E5a.h" #include "gnss_sdr_flags.h" - +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h index a49aab785..bedab2a21 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h @@ -39,10 +39,9 @@ #ifndef GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H_ #define GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H_ -#include #include "tracking_interface.h" #include "galileo_e5a_dll_pll_tracking_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc index 5c76267ce..0d5a00433 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc @@ -38,10 +38,10 @@ */ #include "glonass_l1_ca_dll_pll_c_aid_tracking.h" -#include -#include "GLONASS_L1_CA.h" #include "configuration_interface.h" +#include "GLONASS_L1_CA.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h index b62729a5f..3d6f390e0 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h @@ -40,11 +40,10 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_H_ #define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_H_ -#include #include "tracking_interface.h" #include "glonass_l1_ca_dll_pll_c_aid_tracking_cc.h" #include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc index 6f824144d..7e2047862 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc @@ -37,10 +37,10 @@ */ #include "glonass_l1_ca_dll_pll_tracking.h" -#include -#include "GLONASS_L1_CA.h" #include "configuration_interface.h" +#include "GLONASS_L1_CA.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h index ba476948a..2268cfaae 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h @@ -39,10 +39,9 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_H_ #define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_H_ -#include #include "tracking_interface.h" #include "glonass_l1_ca_dll_pll_tracking_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc index ae01c924e..38144e43c 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc @@ -37,10 +37,10 @@ #include "gps_l1_ca_dll_pll_c_aid_tracking.h" -#include #include "GPS_L1_CA.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h index d3b01a87c..ac3a1e745 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h @@ -38,10 +38,10 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_ #define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_ -#include #include "tracking_interface.h" #include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h" #include "gps_l1_ca_dll_pll_c_aid_tracking_sc.h" +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc index 3c810ed3d..a9d4d2f3f 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc @@ -37,11 +37,10 @@ #include "gps_l1_ca_dll_pll_tracking.h" -#include -#include "GPS_L1_CA.h" #include "configuration_interface.h" +#include "GPS_L1_CA.h" #include "gnss_sdr_flags.h" - +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h index 495594a1f..c3be7a8d4 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h @@ -38,10 +38,9 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_ #define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_ -#include #include "tracking_interface.h" #include "gps_l1_ca_dll_pll_tracking_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc index c3e84030a..70f6f9410 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc @@ -36,10 +36,10 @@ #include "gps_l2_m_dll_pll_tracking.h" -#include -#include "GPS_L2C.h" #include "configuration_interface.h" +#include "GPS_L2C.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h index 80b214811..b065185ee 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h @@ -38,10 +38,9 @@ #ifndef GNSS_SDR_gps_l2_m_dll_pll_tracking_H_ #define GNSS_SDR_gps_l2_m_dll_pll_tracking_H_ -#include #include "tracking_interface.h" #include "gps_l2_m_dll_pll_tracking_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc index 0869c39b7..bf379716d 100644 --- a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc @@ -36,10 +36,10 @@ #include "gps_l5i_dll_pll_tracking.h" -#include -#include "GPS_L5.h" #include "configuration_interface.h" +#include "GPS_L5.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; diff --git a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.h index 681ddca42..b3be3cdbc 100644 --- a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.h @@ -37,10 +37,9 @@ #ifndef GNSS_SDR_gps_l5i_dll_pll_tracking_H_ #define GNSS_SDR_gps_l5i_dll_pll_tracking_H_ -#include #include "tracking_interface.h" #include "gps_l5i_dll_pll_tracking_cc.h" - +#include class ConfigurationInterface; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc index c39938588..925ac457d 100755 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc @@ -35,21 +35,21 @@ */ #include "galileo_e1_dll_pll_veml_tracking_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "galileo_e1_signal_processing.h" #include "tracking_discriminators.h" #include "lock_detectors.h" #include "Galileo_E1.h" #include "control_message_factory.h" #include "gnss_sdr_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h index f02c51b8e..66be54e89 100755 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h @@ -32,14 +32,15 @@ #ifndef GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_CC_H #define GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_CC_H -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include "cpu_multicorrelator_real_codes.h" +#include +#include +#include +#include + class galileo_e1_dll_pll_veml_tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc index 8504824f9..c91d59a68 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc @@ -35,14 +35,6 @@ */ #include "galileo_e5a_dll_pll_tracking_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include #include "galileo_e5_signal_processing.h" #include "tracking_discriminators.h" #include "lock_detectors.h" @@ -50,6 +42,14 @@ #include "Galileo_E1.h" #include "control_message_factory.h" #include "gnss_sdr_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h index 0894b79ef..2e1fcfed8 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h @@ -37,14 +37,14 @@ #ifndef GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_CC_H_ #define GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_CC_H_ -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include "cpu_multicorrelator.h" +#include +#include +#include +#include class Galileo_E5a_Dll_Pll_Tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc index 4067f5cb6..8b8a707ea 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -37,10 +37,12 @@ */ #include "glonass_l1_ca_dll_pll_c_aid_tracking_cc.h" -#include -#include -#include -#include +#include "glonass_l1_signal_processing.h" +#include "tracking_discriminators.h" +#include "lock_detectors.h" +#include "GLONASS_L1_CA.h" +#include "gnss_sdr_flags.h" +#include "control_message_factory.h" #include #include #include @@ -48,12 +50,10 @@ #include #include #include -#include "glonass_l1_signal_processing.h" -#include "tracking_discriminators.h" -#include "lock_detectors.h" -#include "GLONASS_L1_CA.h" -#include "gnss_sdr_flags.h" -#include "control_message_factory.h" +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h index d928beb29..50b936eff 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h @@ -39,17 +39,17 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H #define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H -#include -#include -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_FLL_PLL_filter.h" //#include "tracking_loop_filter.h" #include "cpu_multicorrelator.h" +#include +#include +#include +#include +#include +#include class glonass_l1_ca_dll_pll_c_aid_tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc index b379b0630..6d0534737 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -37,17 +37,6 @@ */ #include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "gnss_synchro.h" #include "glonass_l1_signal_processing.h" #include "tracking_discriminators.h" @@ -55,6 +44,17 @@ #include "GLONASS_L1_CA.h" #include "gnss_sdr_flags.h" #include "control_message_factory.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h index e9424f9c7..8bc0a1c5e 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h @@ -39,18 +39,18 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H #define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H -#include -#include -#include -#include -#include -#include -#include #include "glonass_l1_signal_processing.h" #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_FLL_PLL_filter.h" #include "cpu_multicorrelator_16sc.h" +#include +#include +#include +#include +#include +#include +#include class glonass_l1_ca_dll_pll_c_aid_tracking_sc; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc index 13d16ee46..0989d3e5c 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc @@ -37,21 +37,21 @@ */ #include "glonass_l1_ca_dll_pll_tracking_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "glonass_l1_signal_processing.h" #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GLONASS_L1_CA.h" #include "gnss_sdr_flags.h" #include "control_message_factory.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h index 641c6f04e..eeec2309c 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h @@ -39,14 +39,14 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H #define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include "cpu_multicorrelator.h" +#include +#include +#include +#include class Glonass_L1_Ca_Dll_Pll_Tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc index 97176b088..b895ee48f 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -29,10 +29,12 @@ */ #include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h" -#include -#include -#include -#include +#include "gps_sdr_signal_processing.h" +#include "tracking_discriminators.h" +#include "lock_detectors.h" +#include "gnss_sdr_flags.h" +#include "GPS_L1_CA.h" +#include "control_message_factory.h" #include #include #include @@ -40,12 +42,10 @@ #include #include #include -#include "gps_sdr_signal_processing.h" -#include "tracking_discriminators.h" -#include "lock_detectors.h" -#include "gnss_sdr_flags.h" -#include "GPS_L1_CA.h" -#include "control_message_factory.h" +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.h index cf6f31b5f..5be897069 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.h @@ -37,17 +37,17 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H #define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H -#include -#include -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_FLL_PLL_filter.h" //#include "tracking_loop_filter.h" #include "cpu_multicorrelator.h" +#include +#include +#include +#include +#include +#include class gps_l1_ca_dll_pll_c_aid_tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc index 1391d1c44..a8e0d0428 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc @@ -30,17 +30,6 @@ */ #include "gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "gnss_synchro.h" #include "gps_sdr_signal_processing.h" #include "tracking_discriminators.h" @@ -48,6 +37,17 @@ #include "GPS_L1_CA.h" #include "gnss_sdr_flags.h" #include "control_message_factory.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h index 9dded8939..d1a3db6d5 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h @@ -38,18 +38,18 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_FPGA_SC_H #define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_FPGA_SC_H -#include -#include -#include -#include -#include -#include -#include #include "gps_sdr_signal_processing.h" #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_FLL_PLL_filter.h" #include "fpga_multicorrelator_8sc.h" +#include +#include +#include +#include +#include +#include +#include class gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc index cd2890bab..e2d57bbf6 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -29,17 +29,6 @@ */ #include "gps_l1_ca_dll_pll_c_aid_tracking_sc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "gnss_synchro.h" #include "gps_sdr_signal_processing.h" #include "tracking_discriminators.h" @@ -47,6 +36,17 @@ #include "GPS_L1_CA.h" #include "gnss_sdr_flags.h" #include "control_message_factory.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.h index cd9753b6d..6a8a9bdf4 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.h @@ -37,18 +37,18 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H #define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H -#include -#include -#include -#include -#include -#include -#include #include "gps_sdr_signal_processing.h" #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_FLL_PLL_filter.h" #include "cpu_multicorrelator_16sc.h" +#include +#include +#include +#include +#include +#include +#include class gps_l1_ca_dll_pll_c_aid_tracking_sc; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc index 979d378d6..cfd4c69bd 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc @@ -35,21 +35,21 @@ */ #include "gps_l1_ca_dll_pll_tracking_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "gps_sdr_signal_processing.h" #include "tracking_discriminators.h" #include "lock_detectors.h" #include "gnss_sdr_flags.h" #include "GPS_L1_CA.h" #include "control_message_factory.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h index 346f7076a..8eca5317f 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h @@ -38,14 +38,14 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_CC_H #define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_CC_H -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include "cpu_multicorrelator_real_codes.h" +#include +#include +#include +#include class Gps_L1_Ca_Dll_Pll_Tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc index 30834c337..bf1f1513b 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc @@ -35,21 +35,21 @@ */ #include "gps_l2_m_dll_pll_tracking_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "gps_l2c_signal.h" #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GPS_L2C.h" #include "control_message_factory.h" #include "gnss_sdr_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h index cf46636e2..3edd12ab4 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h @@ -36,14 +36,14 @@ #ifndef GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_CC_H #define GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_CC_H -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include "cpu_multicorrelator.h" +#include +#include +#include +#include class gps_l2_m_dll_pll_tracking_cc; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc index 6010c0d3f..f0b56afa6 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.cc @@ -35,21 +35,22 @@ */ #include "gps_l5i_dll_pll_tracking_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "gps_l5_signal.h" #include "tracking_discriminators.h" #include "lock_detectors.h" #include "GPS_L5.h" #include "control_message_factory.h" #include "gnss_sdr_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + using google::LogMessage; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.h index 39da5fd1b..388d04c57 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l5i_dll_pll_tracking_cc.h @@ -36,14 +36,14 @@ #ifndef GNSS_SDR_GPS_L5i_DLL_PLL_TRACKING_CC_H #define GNSS_SDR_GPS_L5i_DLL_PLL_TRACKING_CC_H -#include -#include -#include -#include #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include "cpu_multicorrelator.h" +#include +#include +#include +#include class gps_l5i_dll_pll_tracking_cc; diff --git a/src/algorithms/tracking/libs/cpu_multicorrelator.cc b/src/algorithms/tracking/libs/cpu_multicorrelator.cc index 3a76c8440..279dab5aa 100644 --- a/src/algorithms/tracking/libs/cpu_multicorrelator.cc +++ b/src/algorithms/tracking/libs/cpu_multicorrelator.cc @@ -33,9 +33,8 @@ */ #include "cpu_multicorrelator.h" -#include -#include #include +#include cpu_multicorrelator::cpu_multicorrelator() diff --git a/src/algorithms/tracking/libs/cpu_multicorrelator_real_codes.cc b/src/algorithms/tracking/libs/cpu_multicorrelator_real_codes.cc index cc0df391c..42fa8f226 100644 --- a/src/algorithms/tracking/libs/cpu_multicorrelator_real_codes.cc +++ b/src/algorithms/tracking/libs/cpu_multicorrelator_real_codes.cc @@ -34,9 +34,9 @@ */ #include "cpu_multicorrelator_real_codes.h" -#include -#include #include +#include + cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes() diff --git a/src/core/interfaces/gnss_block_interface.h b/src/core/interfaces/gnss_block_interface.h index dd7f1558e..35a5427cc 100644 --- a/src/core/interfaces/gnss_block_interface.h +++ b/src/core/interfaces/gnss_block_interface.h @@ -37,9 +37,10 @@ #ifndef GNSS_SDR_GNSS_BLOCK_INTERFACE_H_ #define GNSS_SDR_GNSS_BLOCK_INTERFACE_H_ +#include #include #include -#include + /*! * \brief This abstract class represents an interface to GNSS blocks. diff --git a/src/core/libs/INIReader.cc b/src/core/libs/INIReader.cc index e5c7e6645..001a249ed 100644 --- a/src/core/libs/INIReader.cc +++ b/src/core/libs/INIReader.cc @@ -46,9 +46,9 @@ */ #include "INIReader.h" +#include "ini.h" #include // for tolower #include // for strol -#include "ini.h" INIReader::INIReader(std::string filename) diff --git a/src/core/libs/gnss_sdr_supl_client.h b/src/core/libs/gnss_sdr_supl_client.h index ddb484e8d..e81b08787 100644 --- a/src/core/libs/gnss_sdr_supl_client.h +++ b/src/core/libs/gnss_sdr_supl_client.h @@ -34,13 +34,6 @@ #ifndef GNSS_SDR_SUPL_CLIENT_H_ #define GNSS_SDR_SUPL_CLIENT_H_ -#include -#include -#include -#include -#include -#include -#include extern "C" { #include "supl.h" } @@ -52,6 +45,13 @@ extern "C" { #include "gps_acq_assist.h" #include "gps_ref_time.h" #include "gps_ref_location.h" +#include +#include +#include +#include +#include +#include +#include /*! * \brief class that implements a C++ interface to external Secure User Location Protocol (SUPL) client library.. diff --git a/src/core/libs/string_converter.cc b/src/core/libs/string_converter.cc index a43f73e63..1b6e38489 100644 --- a/src/core/libs/string_converter.cc +++ b/src/core/libs/string_converter.cc @@ -32,7 +32,7 @@ #include "string_converter.h" #include -#include + StringConverter::StringConverter() {} diff --git a/src/core/receiver/concurrent_map.h b/src/core/receiver/concurrent_map.h index fff578c1e..27ead329d 100644 --- a/src/core/receiver/concurrent_map.h +++ b/src/core/receiver/concurrent_map.h @@ -31,9 +31,10 @@ #ifndef GNSS_SDR_CONCURRENT_MAP_H #define GNSS_SDR_CONCURRENT_MAP_H +#include #include #include -#include + template diff --git a/src/core/receiver/concurrent_queue.h b/src/core/receiver/concurrent_queue.h index 8c700e220..d279c5ad0 100644 --- a/src/core/receiver/concurrent_queue.h +++ b/src/core/receiver/concurrent_queue.h @@ -31,8 +31,8 @@ #ifndef GNSS_SDR_CONCURRENT_QUEUE_H #define GNSS_SDR_CONCURRENT_QUEUE_H -#include #include +#include template diff --git a/src/core/receiver/control_message_factory.h b/src/core/receiver/control_message_factory.h index 9bdd49d32..a7bba38d2 100644 --- a/src/core/receiver/control_message_factory.h +++ b/src/core/receiver/control_message_factory.h @@ -31,9 +31,9 @@ #ifndef GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_ #define GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_ +#include #include #include -#include //! Message described by who sent it and what it says typedef struct ControlMessage_ diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 72b91e956..073807b43 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -33,33 +33,33 @@ */ #include "control_thread.h" +#include "concurrent_queue.h" +#include "concurrent_map.h" +#include "control_message_factory.h" +#include "file_configuration.h" +#include "gnss_flowgraph.h" +#include "gnss_sdr_flags.h" +#include "galileo_ephemeris.h" +#include "galileo_iono.h" +#include "galileo_utc_model.h" +#include "galileo_almanac.h" +#include "gps_ephemeris.h" +#include "gps_iono.h" +#include "gps_utc_model.h" +#include "gps_almanac.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include "gps_ephemeris.h" -#include "gps_iono.h" -#include "gps_utc_model.h" -#include "gps_almanac.h" -#include "galileo_ephemeris.h" -#include "galileo_iono.h" -#include "galileo_utc_model.h" -#include "galileo_almanac.h" -#include "concurrent_queue.h" -#include "concurrent_map.h" -#include "gnss_flowgraph.h" -#include "gnss_sdr_flags.h" -#include "file_configuration.h" -#include "control_message_factory.h" + extern concurrent_map global_gps_acq_assist_map; extern concurrent_queue global_gps_acq_assist_queue; diff --git a/src/core/receiver/control_thread.h b/src/core/receiver/control_thread.h index ea0decec8..f84b2f24d 100644 --- a/src/core/receiver/control_thread.h +++ b/src/core/receiver/control_thread.h @@ -35,12 +35,12 @@ #ifndef GNSS_SDR_CONTROL_THREAD_H_ #define GNSS_SDR_CONTROL_THREAD_H_ -#include -#include -#include -#include #include "control_message_factory.h" #include "gnss_sdr_supl_client.h" +#include +#include +#include +#include class GNSSFlowgraph; class ConfigurationInterface; diff --git a/src/core/receiver/file_configuration.cc b/src/core/receiver/file_configuration.cc index 4285d04f1..1e52e819f 100644 --- a/src/core/receiver/file_configuration.cc +++ b/src/core/receiver/file_configuration.cc @@ -34,11 +34,12 @@ */ #include "file_configuration.h" -#include -#include +#include "in_memory_configuration.h" #include "INIReader.h" #include "string_converter.h" -#include "in_memory_configuration.h" +#include +#include + using google::LogMessage; diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index 02aeffeb0..1ebab2595 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -35,11 +35,6 @@ #include "gnss_block_factory.h" -#include -#include -#include -#include -#include #include "configuration_interface.h" #include "in_memory_configuration.h" #include "gnss_block_interface.h" @@ -145,6 +140,12 @@ #include "gps_l1_ca_dll_pll_tracking_gpu.h" #endif +#include +#include +#include +#include +#include + using google::LogMessage; diff --git a/src/core/receiver/gnss_block_factory.h b/src/core/receiver/gnss_block_factory.h index 4aa852d74..be57433d1 100644 --- a/src/core/receiver/gnss_block_factory.h +++ b/src/core/receiver/gnss_block_factory.h @@ -37,10 +37,11 @@ #ifndef GNSS_SDR_BLOCK_FACTORY_H_ #define GNSS_SDR_BLOCK_FACTORY_H_ +#include #include #include #include -#include + class ConfigurationInterface; class GNSSBlockInterface; diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 1b4438cea..a82ab54c1 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -33,17 +33,17 @@ */ #include "gnss_flowgraph.h" -#include -#include -#include -#include -#include -#include -#include #include "configuration_interface.h" #include "gnss_block_interface.h" #include "channel_interface.h" #include "gnss_block_factory.h" +#include +#include +#include +#include +#include +#include +#include #define GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS 8 diff --git a/src/core/receiver/gnss_flowgraph.h b/src/core/receiver/gnss_flowgraph.h index abb4a6ef5..e3986fd6c 100644 --- a/src/core/receiver/gnss_flowgraph.h +++ b/src/core/receiver/gnss_flowgraph.h @@ -36,16 +36,17 @@ #ifndef GNSS_SDR_GNSS_FLOWGRAPH_H_ #define GNSS_SDR_GNSS_FLOWGRAPH_H_ +#include "GPS_L1_CA.h" +#include "gnss_signal.h" +#include "gnss_sdr_sample_counter.h" +#include +#include #include #include #include #include #include -#include -#include -#include "GPS_L1_CA.h" -#include "gnss_signal.h" -#include "gnss_sdr_sample_counter.h" + class GNSSBlockInterface; class ChannelInterface; diff --git a/src/core/receiver/in_memory_configuration.cc b/src/core/receiver/in_memory_configuration.cc index e1983e617..377d30174 100644 --- a/src/core/receiver/in_memory_configuration.cc +++ b/src/core/receiver/in_memory_configuration.cc @@ -31,9 +31,10 @@ #include "in_memory_configuration.h" +#include "string_converter.h" #include #include -#include "string_converter.h" + InMemoryConfiguration::InMemoryConfiguration() { diff --git a/src/core/receiver/in_memory_configuration.h b/src/core/receiver/in_memory_configuration.h index 22ff97ffe..de6e1913a 100644 --- a/src/core/receiver/in_memory_configuration.h +++ b/src/core/receiver/in_memory_configuration.h @@ -36,10 +36,11 @@ #ifndef GNSS_SDR_IN_MEMORY_CONFIGURATION_H_ #define GNSS_SDR_IN_MEMORY_CONFIGURATION_H_ +#include "configuration_interface.h" #include #include #include -#include "configuration_interface.h" + class StringConverter; diff --git a/src/core/system_parameters/GLONASS_L1_CA.h b/src/core/system_parameters/GLONASS_L1_CA.h index af0bd0227..e2558e114 100644 --- a/src/core/system_parameters/GLONASS_L1_CA.h +++ b/src/core/system_parameters/GLONASS_L1_CA.h @@ -32,11 +32,12 @@ #ifndef GNSS_SDR_GLONASS_L1_CA_H_ #define GNSS_SDR_GLONASS_L1_CA_H_ +#include "gnss_frequencies.h" +#include "MATH_CONSTANTS.h" #include #include #include // std::pair -#include "MATH_CONSTANTS.h" -#include "gnss_frequencies.h" + // Physical constants const double GLONASS_C_m_s = SPEED_OF_LIGHT; //!< The speed of light, [m/s] diff --git a/src/core/system_parameters/GPS_CNAV.h b/src/core/system_parameters/GPS_CNAV.h index d3f953f2b..fc2239ab6 100644 --- a/src/core/system_parameters/GPS_CNAV.h +++ b/src/core/system_parameters/GPS_CNAV.h @@ -32,10 +32,11 @@ #ifndef GNSS_SDR_GPS_CNAV_H_ #define GNSS_SDR_GPS_CNAV_H_ +#include "MATH_CONSTANTS.h" #include #include #include // std::pair -#include "MATH_CONSTANTS.h" + // CNAV GPS NAVIGATION MESSAGE STRUCTURE // NAVIGATION MESSAGE FIELDS POSITIONS (from IS-GPS-200E Appendix III) diff --git a/src/core/system_parameters/GPS_L1_CA.h b/src/core/system_parameters/GPS_L1_CA.h index 319d918e1..ea1c1f9eb 100644 --- a/src/core/system_parameters/GPS_L1_CA.h +++ b/src/core/system_parameters/GPS_L1_CA.h @@ -32,10 +32,11 @@ #ifndef GNSS_SDR_GPS_L1_CA_H_ #define GNSS_SDR_GPS_L1_CA_H_ +#include "gnss_frequencies.h" +#include "MATH_CONSTANTS.h" #include #include // std::pair -#include "MATH_CONSTANTS.h" -#include "gnss_frequencies.h" + // Physical constants const double GPS_C_m_s = SPEED_OF_LIGHT; //!< The speed of light, [m/s] diff --git a/src/core/system_parameters/GPS_L2C.h b/src/core/system_parameters/GPS_L2C.h index 3e269ecf5..625aafe01 100644 --- a/src/core/system_parameters/GPS_L2C.h +++ b/src/core/system_parameters/GPS_L2C.h @@ -32,15 +32,13 @@ #ifndef GNSS_SDR_GPS_L2C_H_ #define GNSS_SDR_GPS_L2C_H_ + +#include "gnss_frequencies.h" +#include "GPS_CNAV.h" +#include "MATH_CONSTANTS.h" #include #include #include // std::pair -#include "MATH_CONSTANTS.h" -#include "gnss_frequencies.h" -#include "GPS_CNAV.h" - - - // Physical constants diff --git a/src/core/system_parameters/GPS_L5.h b/src/core/system_parameters/GPS_L5.h index 702e3ebd6..9c3236124 100644 --- a/src/core/system_parameters/GPS_L5.h +++ b/src/core/system_parameters/GPS_L5.h @@ -32,10 +32,10 @@ #ifndef GNSS_SDR_GPS_L5_H_ #define GNSS_SDR_GPS_L5_H_ -#include -#include "MATH_CONSTANTS.h" #include "gnss_frequencies.h" #include "GPS_CNAV.h" +#include "MATH_CONSTANTS.h" +#include // Physical constants diff --git a/src/core/system_parameters/Galileo_E1.h b/src/core/system_parameters/Galileo_E1.h index 24794a244..33ace50ae 100644 --- a/src/core/system_parameters/Galileo_E1.h +++ b/src/core/system_parameters/Galileo_E1.h @@ -33,11 +33,11 @@ #ifndef GNSS_SDR_GALILEO_E1_H_ #define GNSS_SDR_GALILEO_E1_H_ +#include "gnss_frequencies.h" +#include "MATH_CONSTANTS.h" #include #include #include // std::pair -#include "MATH_CONSTANTS.h" -#include "gnss_frequencies.h" // Physical constants @@ -65,7 +65,7 @@ const double GALILEO_STARTOFFSET_ms = 68.802; //[ms] Initial sign. travel time ( // OBSERVABLE HISTORY DEEP FOR INTERPOLATION -const int GALILEO_E1_HISTORY_DEEP=100; +const int GALILEO_E1_HISTORY_DEEP = 100; // Galileo INAV Telemetry structure diff --git a/src/core/system_parameters/Galileo_E5a.h b/src/core/system_parameters/Galileo_E5a.h index 2a2f5a816..cedd414fb 100644 --- a/src/core/system_parameters/Galileo_E5a.h +++ b/src/core/system_parameters/Galileo_E5a.h @@ -31,11 +31,11 @@ #ifndef GNSS_SDR_GALILEO_E5A_H_ #define GNSS_SDR_GALILEO_E5A_H_ +#include "gnss_frequencies.h" +#include "MATH_CONSTANTS.h" #include #include #include // std::pair -#include "MATH_CONSTANTS.h" -#include "gnss_frequencies.h" // Carrier and code frequencies diff --git a/src/core/system_parameters/galileo_ephemeris.cc b/src/core/system_parameters/galileo_ephemeris.cc index d118bd392..9403e7968 100644 --- a/src/core/system_parameters/galileo_ephemeris.cc +++ b/src/core/system_parameters/galileo_ephemeris.cc @@ -29,8 +29,8 @@ */ #include "galileo_ephemeris.h" -#include #include "Galileo_E1.h" +#include Galileo_Ephemeris::Galileo_Ephemeris() diff --git a/src/core/system_parameters/galileo_fnav_message.h b/src/core/system_parameters/galileo_fnav_message.h index 3f3ba1048..2684782c4 100644 --- a/src/core/system_parameters/galileo_fnav_message.h +++ b/src/core/system_parameters/galileo_fnav_message.h @@ -38,16 +38,16 @@ #define GNSS_SDR_GALILEO_FNAV_MESSAGE_H_ -#include -#include -#include -#include -#include // for boost::uint16_t #include "galileo_ephemeris.h" #include "galileo_iono.h" #include "galileo_almanac.h" #include "galileo_utc_model.h" #include "Galileo_E5a.h" +#include // for boost::uint16_t +#include +#include +#include +#include /*! * \brief This class handles the Galileo F/NAV Data message, as described in the diff --git a/src/core/system_parameters/galileo_navigation_message.h b/src/core/system_parameters/galileo_navigation_message.h index e83b67cf3..d78a37d31 100644 --- a/src/core/system_parameters/galileo_navigation_message.h +++ b/src/core/system_parameters/galileo_navigation_message.h @@ -33,17 +33,18 @@ #ifndef GNSS_SDR_GALILEO_NAVIGATION_MESSAGE_H_ #define GNSS_SDR_GALILEO_NAVIGATION_MESSAGE_H_ -#include -#include -#include -#include -#include -#include // for boost::uint32_t #include "galileo_ephemeris.h" #include "galileo_iono.h" #include "galileo_almanac.h" #include "galileo_utc_model.h" #include "Galileo_E1.h" +#include // for boost::uint32_t +#include +#include +#include +#include +#include + /*! * \brief This class handles the Galileo I/NAV Data message, as described in the diff --git a/src/core/system_parameters/glonass_gnav_ephemeris.cc b/src/core/system_parameters/glonass_gnav_ephemeris.cc index e899db773..8986cf52e 100644 --- a/src/core/system_parameters/glonass_gnav_ephemeris.cc +++ b/src/core/system_parameters/glonass_gnav_ephemeris.cc @@ -31,9 +31,9 @@ */ #include "glonass_gnav_ephemeris.h" -#include #include "GLONASS_L1_CA.h" #include "gnss_satellite.h" +#include Glonass_Gnav_Ephemeris::Glonass_Gnav_Ephemeris() { diff --git a/src/core/system_parameters/glonass_gnav_navigation_message.cc b/src/core/system_parameters/glonass_gnav_navigation_message.cc index 40301ea09..ef58d7f3a 100644 --- a/src/core/system_parameters/glonass_gnav_navigation_message.cc +++ b/src/core/system_parameters/glonass_gnav_navigation_message.cc @@ -31,7 +31,7 @@ */ #include "glonass_gnav_navigation_message.h" -#include +#include "gnss_satellite.h" #include diff --git a/src/core/system_parameters/glonass_gnav_navigation_message.h b/src/core/system_parameters/glonass_gnav_navigation_message.h index 6aef9ad51..dda433983 100644 --- a/src/core/system_parameters/glonass_gnav_navigation_message.h +++ b/src/core/system_parameters/glonass_gnav_navigation_message.h @@ -35,12 +35,11 @@ #define GNSS_SDR_GLONASS_GNAV_NAVIGATION_MESSAGE_H_ -#include #include "GLONASS_L1_CA.h" #include "glonass_gnav_ephemeris.h" #include "glonass_gnav_almanac.h" #include "glonass_gnav_utc_model.h" - +#include /*! diff --git a/src/core/system_parameters/glonass_gnav_utc_model.h b/src/core/system_parameters/glonass_gnav_utc_model.h index 7d981d44c..9712299a9 100644 --- a/src/core/system_parameters/glonass_gnav_utc_model.h +++ b/src/core/system_parameters/glonass_gnav_utc_model.h @@ -34,7 +34,7 @@ #ifndef GNSS_SDR_GLONASS_GNAV_UTC_MODEL_H_ #define GNSS_SDR_GLONASS_GNAV_UTC_MODEL_H_ -#include "boost/assign.hpp" +#include #include /*! diff --git a/src/core/system_parameters/gps_cnav_ephemeris.h b/src/core/system_parameters/gps_cnav_ephemeris.h index b8f304951..a5678d7cd 100644 --- a/src/core/system_parameters/gps_cnav_ephemeris.h +++ b/src/core/system_parameters/gps_cnav_ephemeris.h @@ -33,7 +33,7 @@ #define GNSS_SDR_GPS_CNAV_EPHEMERIS_H_ #include "GPS_CNAV.h" -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/gps_cnav_iono.h b/src/core/system_parameters/gps_cnav_iono.h index 426f199cb..6f7332c0b 100644 --- a/src/core/system_parameters/gps_cnav_iono.h +++ b/src/core/system_parameters/gps_cnav_iono.h @@ -33,7 +33,7 @@ #define GNSS_SDR_GPS_CNAV_IONO_H_ -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/gps_cnav_navigation_message.cc b/src/core/system_parameters/gps_cnav_navigation_message.cc index a78ade0c7..1bdc48360 100644 --- a/src/core/system_parameters/gps_cnav_navigation_message.cc +++ b/src/core/system_parameters/gps_cnav_navigation_message.cc @@ -31,7 +31,6 @@ */ #include "gps_cnav_navigation_message.h" -#include #include "gnss_satellite.h" diff --git a/src/core/system_parameters/gps_cnav_navigation_message.h b/src/core/system_parameters/gps_cnav_navigation_message.h index 3fd1fa913..8439f61a2 100644 --- a/src/core/system_parameters/gps_cnav_navigation_message.h +++ b/src/core/system_parameters/gps_cnav_navigation_message.h @@ -33,15 +33,16 @@ #define GNSS_SDR_GPS_CNAV_NAVIGATION_MESSAGE_H_ +#include "GPS_CNAV.h" +#include "gps_cnav_ephemeris.h" +#include "gps_cnav_iono.h" +#include "gps_cnav_utc_model.h" #include #include #include #include #include -#include "GPS_CNAV.h" -#include "gps_cnav_ephemeris.h" -#include "gps_cnav_iono.h" -#include "gps_cnav_utc_model.h" + //TODO: Create GPS CNAV almanac //#include "gps_almanac.h" diff --git a/src/core/system_parameters/gps_cnav_utc_model.h b/src/core/system_parameters/gps_cnav_utc_model.h index 9705945a2..62e6fd0c0 100644 --- a/src/core/system_parameters/gps_cnav_utc_model.h +++ b/src/core/system_parameters/gps_cnav_utc_model.h @@ -32,7 +32,7 @@ #ifndef GNSS_SDR_GPS_CNAV_UTC_MODEL_H_ #define GNSS_SDR_GPS_CNAV_UTC_MODEL_H_ -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/gps_ephemeris.cc b/src/core/system_parameters/gps_ephemeris.cc index ac09ef955..d876f477e 100644 --- a/src/core/system_parameters/gps_ephemeris.cc +++ b/src/core/system_parameters/gps_ephemeris.cc @@ -31,9 +31,9 @@ */ #include "gps_ephemeris.h" -#include -#include "GPS_L1_CA.h" #include "gnss_satellite.h" +#include "GPS_L1_CA.h" +#include Gps_Ephemeris::Gps_Ephemeris() { diff --git a/src/core/system_parameters/gps_ephemeris.h b/src/core/system_parameters/gps_ephemeris.h index a08f34400..eec5779ce 100644 --- a/src/core/system_parameters/gps_ephemeris.h +++ b/src/core/system_parameters/gps_ephemeris.h @@ -33,12 +33,11 @@ #define GNSS_SDR_GPS_EPHEMERIS_H_ -#include -#include -#include "boost/assign.hpp" +#include #include #include - +#include +#include /*! diff --git a/src/core/system_parameters/gps_iono.h b/src/core/system_parameters/gps_iono.h index a7e59c02b..d13120617 100644 --- a/src/core/system_parameters/gps_iono.h +++ b/src/core/system_parameters/gps_iono.h @@ -33,7 +33,7 @@ #define GNSS_SDR_GPS_IONO_H_ -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/gps_navigation_message.cc b/src/core/system_parameters/gps_navigation_message.cc index 7a13109c1..27a4e26c7 100644 --- a/src/core/system_parameters/gps_navigation_message.cc +++ b/src/core/system_parameters/gps_navigation_message.cc @@ -31,9 +31,9 @@ m * \file gps_navigation_message.cc */ #include "gps_navigation_message.h" +#include "gnss_satellite.h" #include #include -#include void Gps_Navigation_Message::reset() diff --git a/src/core/system_parameters/gps_navigation_message.h b/src/core/system_parameters/gps_navigation_message.h index 53482c905..3f9e2866f 100644 --- a/src/core/system_parameters/gps_navigation_message.h +++ b/src/core/system_parameters/gps_navigation_message.h @@ -33,17 +33,16 @@ #define GNSS_SDR_GPS_NAVIGATION_MESSAGE_H_ -#include -#include -#include -#include -#include #include "GPS_L1_CA.h" #include "gps_ephemeris.h" #include "gps_iono.h" #include "gps_almanac.h" #include "gps_utc_model.h" - +#include +#include +#include +#include +#include /*! diff --git a/src/core/system_parameters/gps_ref_location.h b/src/core/system_parameters/gps_ref_location.h index 1aa734088..9491ccbf9 100644 --- a/src/core/system_parameters/gps_ref_location.h +++ b/src/core/system_parameters/gps_ref_location.h @@ -32,7 +32,7 @@ #ifndef GNSS_SDR_GPS_REF_LOCATION_H_ #define GNSS_SDR_GPS_REF_LOCATION_H_ -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/gps_ref_time.h b/src/core/system_parameters/gps_ref_time.h index fbb246ad3..b65a18edd 100644 --- a/src/core/system_parameters/gps_ref_time.h +++ b/src/core/system_parameters/gps_ref_time.h @@ -32,7 +32,7 @@ #ifndef GNSS_SDR_GPS_REF_TIME_H_ #define GNSS_SDR_GPS_REF_TIME_H_ -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/gps_utc_model.cc b/src/core/system_parameters/gps_utc_model.cc index 59a385c1a..f52428bf4 100644 --- a/src/core/system_parameters/gps_utc_model.cc +++ b/src/core/system_parameters/gps_utc_model.cc @@ -29,9 +29,9 @@ */ #include "gps_utc_model.h" -#include #include + Gps_Utc_Model::Gps_Utc_Model() { valid = false; @@ -51,11 +51,6 @@ double Gps_Utc_Model::utc_time(double gpstime_corrected, int i_GPS_week) double t_utc_daytime; double Delta_t_UTC = d_DeltaT_LS + d_A0 + d_A1 * (gpstime_corrected - d_t_OT + 604800 * static_cast(i_GPS_week - i_WN_T)); - //std::cout<<"d_DeltaT_LS="<(i_GPS_week - i_WN_T)); t_utc_daytime = fmod(gpstime_corrected - Delta_t_UTC, 86400); diff --git a/src/core/system_parameters/gps_utc_model.h b/src/core/system_parameters/gps_utc_model.h index 0d1c48285..1a8938828 100644 --- a/src/core/system_parameters/gps_utc_model.h +++ b/src/core/system_parameters/gps_utc_model.h @@ -32,7 +32,7 @@ #ifndef GNSS_SDR_GPS_UTC_MODEL_H_ #define GNSS_SDR_GPS_UTC_MODEL_H_ -#include "boost/assign.hpp" +#include #include diff --git a/src/core/system_parameters/rtcm.cc b/src/core/system_parameters/rtcm.cc index 32c8fec5b..f87223ae3 100644 --- a/src/core/system_parameters/rtcm.cc +++ b/src/core/system_parameters/rtcm.cc @@ -29,19 +29,19 @@ */ #include "rtcm.h" +#include "Galileo_E1.h" +#include "GPS_L2C.h" +#include // for to_upper_copy +#include +#include +#include +#include #include // for std::reverse #include // std::chrono::seconds #include // for std::fmod #include // for strtol #include // for std::stringstream #include -#include // for to_upper_copy -#include -#include -#include -#include -#include "Galileo_E1.h" -#include "GPS_L2C.h" using google::LogMessage; diff --git a/src/core/system_parameters/rtcm.h b/src/core/system_parameters/rtcm.h index f19b71add..6ec935228 100644 --- a/src/core/system_parameters/rtcm.h +++ b/src/core/system_parameters/rtcm.h @@ -33,6 +33,14 @@ #define GNSS_SDR_RTCM_H_ +#include "concurrent_queue.h" +#include "gnss_synchro.h" +#include "galileo_fnav_message.h" +#include "gps_navigation_message.h" +#include "gps_cnav_navigation_message.h" +#include "glonass_gnav_navigation_message.h" +#include +#include #include #include #include @@ -42,14 +50,6 @@ #include #include #include -#include -#include -#include "concurrent_queue.h" -#include "gnss_synchro.h" -#include "galileo_fnav_message.h" -#include "gps_navigation_message.h" -#include "gps_cnav_navigation_message.h" -#include "glonass_gnav_navigation_message.h" /*! diff --git a/src/core/system_parameters/sbas_ephemeris.cc b/src/core/system_parameters/sbas_ephemeris.cc index 3e3dea64e..b093ea3c7 100644 --- a/src/core/system_parameters/sbas_ephemeris.cc +++ b/src/core/system_parameters/sbas_ephemeris.cc @@ -30,7 +30,6 @@ */ -#include #include "sbas_ephemeris.h" void Sbas_Ephemeris::print(std::ostream &out) diff --git a/src/core/system_parameters/sbas_ephemeris.h b/src/core/system_parameters/sbas_ephemeris.h index a0e9e91c7..62c63b38e 100644 --- a/src/core/system_parameters/sbas_ephemeris.h +++ b/src/core/system_parameters/sbas_ephemeris.h @@ -32,6 +32,8 @@ #ifndef GNSS_SDR_SBAS_EPHEMERIS_H_ #define GNSS_SDR_SBAS_EPHEMERIS_H_ +#include + /*! * \brief This class stores SBAS SV ephemeris data * diff --git a/src/main/main.cc b/src/main/main.cc index 493332ec3..89634a6ec 100644 --- a/src/main/main.cc +++ b/src/main/main.cc @@ -39,19 +39,20 @@ #define GOOGLE_STRIP_LOG 0 #endif -#include -#include -#include +#include "concurrent_map.h" +#include "concurrent_queue.h" +#include "control_thread.h" +#include "gnss_sdr_flags.h" #include #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem #include -#include "control_thread.h" -#include "concurrent_queue.h" -#include "concurrent_map.h" -#include "gnss_sdr_flags.h" +#include +#include +#include + #if CUDA_GPU_ACCEL // For the CUDA runtime routines (prefixed with "cuda_") diff --git a/src/tests/common-files/gnuplot_i.h b/src/tests/common-files/gnuplot_i.h index 73e5f8251..1f4a5cafb 100644 --- a/src/tests/common-files/gnuplot_i.h +++ b/src/tests/common-files/gnuplot_i.h @@ -56,6 +56,7 @@ #include #include #include // for getenv() +#include #include // for std::list @@ -1887,7 +1888,7 @@ bool Gnuplot::get_program_path() // Retrieves a C string containing the value of environment variable PATH path = std::getenv("PATH"); - if (path == NULL) + if (path == NULL || std::char_traits::length(path) > 4096 * sizeof(char)) { throw GnuplotException("Path is not set"); } diff --git a/src/tests/single_test_main.cc b/src/tests/single_test_main.cc index 9877e61f2..fe9b1007b 100644 --- a/src/tests/single_test_main.cc +++ b/src/tests/single_test_main.cc @@ -29,15 +29,6 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "concurrent_queue.h" #include "concurrent_map.h" #include "gps_navigation_message.h" @@ -48,10 +39,18 @@ #include "gps_ref_location.h" #include "gps_ref_time.h" #include "galileo_navigation_message.h" -//#include "sbas_ionospheric_correction.h" -//#include "sbas_telemetry_data.h" -//#include "sbas_ephemeris.h" -//#include "sbas_satellite_correction.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + concurrent_queue global_gps_acq_assist_queue; diff --git a/src/tests/system-tests/obs_gps_l1_system_test.cc b/src/tests/system-tests/obs_gps_l1_system_test.cc index 353c494ae..8594913d6 100644 --- a/src/tests/system-tests/obs_gps_l1_system_test.cc +++ b/src/tests/system-tests/obs_gps_l1_system_test.cc @@ -29,6 +29,19 @@ * ------------------------------------------------------------------------- */ +#include "concurrent_map.h" +#include "concurrent_queue.h" +#include "control_thread.h" +#include "in_memory_configuration.h" +#include "signal_generator_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -38,19 +51,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include "concurrent_map.h" -#include "concurrent_queue.h" -#include "control_thread.h" -#include "in_memory_configuration.h" -#include "signal_generator_flags.h" // For GPS NAVIGATION (L1) diff --git a/src/tests/system-tests/obs_system_test.cc b/src/tests/system-tests/obs_system_test.cc index fad78a813..afef8fcbb 100644 --- a/src/tests/system-tests/obs_system_test.cc +++ b/src/tests/system-tests/obs_system_test.cc @@ -30,6 +30,20 @@ * ------------------------------------------------------------------------- */ +#include "gnuplot_i.h" +#include "test_flags.h" +#include "concurrent_map.h" +#include "concurrent_queue.h" +#include "control_thread.h" +#include "file_configuration.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -40,21 +54,7 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "gnuplot_i.h" -#include "test_flags.h" -#include "concurrent_map.h" -#include "concurrent_queue.h" -#include "control_thread.h" -#include "file_configuration.h" + // For GPS NAVIGATION (L1) concurrent_queue global_gps_acq_assist_queue; diff --git a/src/tests/system-tests/position_test.cc b/src/tests/system-tests/position_test.cc index 0b3cd098d..5b1a9cb4f 100644 --- a/src/tests/system-tests/position_test.cc +++ b/src/tests/system-tests/position_test.cc @@ -29,16 +29,6 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "concurrent_map.h" #include "concurrent_queue.h" #include "control_thread.h" @@ -48,6 +38,15 @@ #include "gnuplot_i.h" #include "test_flags.h" #include "signal_generator_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include DEFINE_string(config_file_ptest, std::string(""), "File containing the configuration parameters for the position test."); diff --git a/src/tests/system-tests/ttff_gps_l1.cc b/src/tests/system-tests/ttff_gps_l1.cc index fb6eabcf1..931e20ea7 100644 --- a/src/tests/system-tests/ttff_gps_l1.cc +++ b/src/tests/system-tests/ttff_gps_l1.cc @@ -30,6 +30,17 @@ * ------------------------------------------------------------------------- */ +#include "concurrent_map.h" +#include "concurrent_queue.h" +#include "control_thread.h" +#include "file_configuration.h" +#include "in_memory_configuration.h" +#include "gnss_flowgraph.h" +#include "gps_acq_assist.h" +#include +#include +#include +#include #include #include #include @@ -41,17 +52,6 @@ #include #include #include -#include -#include -#include -#include -#include "concurrent_map.h" -#include "concurrent_queue.h" -#include "control_thread.h" -#include "file_configuration.h" -#include "in_memory_configuration.h" -#include "gnss_flowgraph.h" -#include "gps_acq_assist.h" DEFINE_int32(fs_in, 4000000, "Sampling rate, in Samples/s"); diff --git a/src/tests/test_main.cc b/src/tests/test_main.cc index 3d012e543..344f0d694 100644 --- a/src/tests/test_main.cc +++ b/src/tests/test_main.cc @@ -29,17 +29,6 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "concurrent_queue.h" #include "concurrent_map.h" #include "control_thread.h" @@ -63,6 +52,19 @@ #include "glonass_gnav_almanac.h" #include "glonass_gnav_utc_model.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + using google::LogMessage; DECLARE_string(log_dir); From 2ca458cea10b2d6c196bc3d8ad7b6fa03297e84f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 26 Feb 2018 21:37:53 +0100 Subject: [PATCH 40/43] Add more flag validators --- src/algorithms/libs/gnss_sdr_flags.cc | 94 +++++++++++++++++++++----- src/core/receiver/CMakeLists.txt | 2 - src/core/receiver/control_thread.cc | 2 - src/utils/front-end-cal/CMakeLists.txt | 2 + src/utils/front-end-cal/main.cc | 50 ++++++-------- 5 files changed, 100 insertions(+), 50 deletions(-) diff --git a/src/algorithms/libs/gnss_sdr_flags.cc b/src/algorithms/libs/gnss_sdr_flags.cc index 96ce9a705..0e8e1cf59 100644 --- a/src/algorithms/libs/gnss_sdr_flags.cc +++ b/src/algorithms/libs/gnss_sdr_flags.cc @@ -30,11 +30,16 @@ #include "gnss_sdr_flags.h" +#include // for exists #include #include +#include DEFINE_string(c, "-", "Path to the configuration file (if set, overrides --config_file)."); +DEFINE_string(config_file, std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf"), + "Path to the configuration file."); + DEFINE_string(s, "-", "If defined, path to the file containing the signal samples (overrides the configuration file and --signal_source)."); @@ -62,71 +67,126 @@ DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, #if GFLAGS_GREATER_2_0 +static bool ValidateC(const char* flagname, const std::string & value) +{ + if (boost::filesystem::exists( value ) or value.compare("-") == 0) // value is ok + return true; + std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; + return false; +} + +static bool ValidateConfigFile(const char* flagname, const std::string & value) +{ + if (boost::filesystem::exists( value ) or value.compare(std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf")) == 0) // value is ok + return true; + std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; + return false; +} + +static bool ValidateS(const char* flagname, const std::string & value) +{ + if (boost::filesystem::exists( value ) or value.compare("-") == 0) // value is ok + return true; + std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; + return false; +} + +static bool ValidateSignalSource(const char* flagname, const std::string & value) +{ + if (boost::filesystem::exists( value ) or value.compare("-") == 0) // value is ok + return true; + std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; + return false; +} + static bool ValidateDopplerMax(const char* flagname, int32_t value) { - if (value >= 0 && value < 1000000) // value is ok + const int32_t max_value = 1000000; + if (value >= 0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidateDopplerStep(const char* flagname, int32_t value) { - if (value >= 0 && value < 10000) // value is ok + const int32_t max_value = 10000; + if (value >= 0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidateCn0Samples(const char* flagname, int32_t value) { - if (value > 0 && value < 10000) // value is ok + const int32_t max_value = 10000; + if (value > 0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " samples." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidateCn0Min(const char* flagname, int32_t value) { - if (value > 0 && value < 100) // value is ok + const int32_t max_value = 100; + if (value > 0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " dB-Hz." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidateMaxLockFail(const char* flagname, int32_t value) { - if (value > 0 && value < 10000) // value is ok + const int32_t max_value = 10000; + if (value > 0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " fails." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidateCarrierLockTh(const char* flagname, double value) { - if (value > 0.0 && value < 1.508) // value is ok + const double max_value = 1.508; + if (value > 0.0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " rad." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidateDllBw(const char* flagname, double value) { - if (value >= 0.0 && value < 10000.0) // value is ok + const double max_value = 10000.0; + if (value >= 0.0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } static bool ValidatePllBw(const char* flagname, double value) { - if (value >= 0.0 && value < 10000.0) // value is ok + const double max_value = 10000.0; + if (value >= 0.0 && value < max_value) // value is ok return true; - std::cout << "Invalid value for " << flagname << ": " << value << std::endl; + std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl; + std::cout << "GNSS-SDR program ended." << std::endl; return false; } - +DEFINE_validator(c, &ValidateC); +DEFINE_validator(config_file, &ValidateConfigFile); +DEFINE_validator(s, &ValidateS); +DEFINE_validator(signal_source, &ValidateSignalSource); DEFINE_validator(doppler_max, &ValidateDopplerMax); DEFINE_validator(doppler_step, &ValidateDopplerStep); DEFINE_validator(cn0_samples, &ValidateCn0Samples); diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt index aa96cb4dd..b87b2bd1a 100644 --- a/src/core/receiver/CMakeLists.txt +++ b/src/core/receiver/CMakeLists.txt @@ -90,8 +90,6 @@ if(ENABLE_FMCOMMS2) set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) endif(ENABLE_FMCOMMS2) -add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}") - if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13" ) add_definitions( -DGR_GREATER_38=1 ) endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13" ) diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 073807b43..04a76b971 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -66,8 +66,6 @@ extern concurrent_queue global_gps_acq_assist_queue; using google::LogMessage; -DEFINE_string(config_file, std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf"), - "Path to the configuration file"); ControlThread::ControlThread() { diff --git a/src/utils/front-end-cal/CMakeLists.txt b/src/utils/front-end-cal/CMakeLists.txt index 0402cfa45..73f1c1f2a 100644 --- a/src/utils/front-end-cal/CMakeLists.txt +++ b/src/utils/front-end-cal/CMakeLists.txt @@ -33,6 +33,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} ${GNURADIO_RUNTIME_INCLUDE_DIRS} @@ -59,6 +60,7 @@ target_link_libraries(front_end_cal_lib ${MAC_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES} ${GNSS_SDR_OPTIONAL_LIBS} rx_core_lib + gnss_sdr_flags gnss_rx channel_fsm ) diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 50af2fdd2..a482e29ce 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -32,26 +32,7 @@ #define FRONT_END_CAL_VERSION "0.0.1" #endif -#include -#include -#include // for ctime -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "front_end_cal.h" #include "concurrent_map.h" #include "concurrent_queue.h" #include "file_configuration.h" @@ -72,21 +53,32 @@ #include "galileo_utc_model.h" #include "sbas_ephemeris.h" #include "gnss_sdr_supl_client.h" +#include "gnss_sdr_flags.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for ctime +#include +#include +#include +#include -#include "front_end_cal.h" - using google::LogMessage; DECLARE_string(log_dir); -std::string s1_(GNSSSDR_INSTALL_DIR); -std::string s2_("/share/gnss-sdr/conf/front-end-cal.conf"); -std::string s3_ = s1_ + s2_; - -DEFINE_string(config_file, s3_, - "Path to the file containing the configuration parameters"); - concurrent_map global_gps_ephemeris_map; concurrent_map global_gps_iono_map; concurrent_map global_gps_utc_model_map; From 9829883253e97c4fe9949ae1bc8175a480438352 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 13:15:46 +0100 Subject: [PATCH 41/43] Add reproducibility files for IEEE Access publication --- .../ieee-access/L2-access18.conf | 154 +++++++++++ .../reproducibility/ieee-access/README.md | 42 +++ .../reproducibility/ieee-access/plot_dump.m | 239 ++++++++++++++++++ 3 files changed, 435 insertions(+) create mode 100644 src/utils/reproducibility/ieee-access/L2-access18.conf create mode 100644 src/utils/reproducibility/ieee-access/README.md create mode 100644 src/utils/reproducibility/ieee-access/plot_dump.m diff --git a/src/utils/reproducibility/ieee-access/L2-access18.conf b/src/utils/reproducibility/ieee-access/L2-access18.conf new file mode 100644 index 000000000..fff74d193 --- /dev/null +++ b/src/utils/reproducibility/ieee-access/L2-access18.conf @@ -0,0 +1,154 @@ + +[GNSS-SDR] + +;######### GLOBAL OPTIONS ################## +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=3000000 + + +;######### SIGNAL_SOURCE CONFIG ############ +;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental) +SignalSource.implementation=File_Signal_Source + +;#filename: path to file with the captured GNSS signal samples to be processed +SignalSource.filename=./data/L125_III1b_210s_L2_3Msps.bin ; <- Available at https://zenodo.org/record/1184601 + +;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. +SignalSource.item_type=ibyte + +;#sampling_frequency: Original Signal sampling frequency in [Hz] +SignalSource.sampling_frequency=3000000 + +;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. +SignalSource.samples=0 + +;#repeat: Repeat the processing file. Disable this option in this version +SignalSource.repeat=false + +;#dump: Dump the Signal source data to a file. Disable this option in this version +SignalSource.dump=false + +;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. +; it helps to not overload the CPU, but the processing time will be longer. +SignalSource.enable_throttle_control=false + + +;######### SIGNAL_CONDITIONER CONFIG ############ + +SignalConditioner.implementation=Signal_Conditioner + +;######### DATA_TYPE_ADAPTER CONFIG ############ + +DataTypeAdapter.implementation=Ibyte_To_Complex + +;######### INPUT_FILTER CONFIG ############ + +InputFilter.implementation=Pass_Through + + +;######### RESAMPLER CONFIG ############ + +Resampler.implementation=Pass_Through +Resampler.item_type=gr_complex + + +;######### CHANNELS GLOBAL CONFIG ############ + +Channels_2S.count=10 + +Channels.in_acquisition=1 + +Channel0.signal=2S +Channel1.signal=2S +Channel2.signal=2S +Channel3.signal=2S +Channel4.signal=2S +Channel5.signal=2S +Channel6.signal=2S +Channel7.signal=2S +Channel8.signal=2S +Channel9.signal=2S + + +;######### ACQUISITION GLOBAL CONFIG ############ + +Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition + +Acquisition_2S.item_type=gr_complex + +Acquisition_2S.doppler_max=4500 + +Acquisition_2S.doppler_step=125 + +Acquisition_2S.use_CFAR_algorithm=false + +Acquisition_2S.threshold=19.5 + +Acquisition_2S.blocking=true + + +;######### TRACKING GLOBAL CONFIG ############ + + +Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking + +Tracking_2S.item_type=gr_complex + +Tracking_2S.pll_bw_hz=4.0; + +Tracking_2S.dll_bw_hz=0.75; + +Tracking_2S.early_late_space_chips=0.5; + +Tracking_2S.dump=true + +Tracking_2S.dump_filename=./data/track_ch_ + +;######### TELEMETRY DECODER CONFIG ############ + +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder + +;######### OBSERVABLES CONFIG ############ + +Observables.implementation=Hybrid_Observables + +;######### PVT CONFIG ############ + +PVT.implementation=RTKLIB_PVT + +PVT.positioning_mode=Single; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic +PVT.iono_model=OFF; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX +PVT.trop_model=OFF; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad + +;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time [ms] +PVT.output_rate_ms=100 + +;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. +PVT.display_rate_ms=500 + +;# KML, GeoJSON, NMEA and RTCM output configuration +;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump. +PVT.dump_filename=./data/PVT + +;#nmea_dump_filename: NMEA log path and filename +PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea + +;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one) +PVT.flag_nmea_tty_port=false + +;#nmea_dump_devname: serial device descriptor for NMEA logging +PVT.nmea_dump_devname=/dev/pts/4 + +PVT.flag_rtcm_server=false + +PVT.rtcm_tcp_port=2101 + +PVT.rtcm_station_id=1234 + +PVT.flag_rtcm_tty_port=false + +PVT.rtcm_dump_devname=/dev/pts/1 + +PVT.dump=true + +PVT.elevation_mask=5 diff --git a/src/utils/reproducibility/ieee-access/README.md b/src/utils/reproducibility/ieee-access/README.md new file mode 100644 index 000000000..3194502c5 --- /dev/null +++ b/src/utils/reproducibility/ieee-access/README.md @@ -0,0 +1,42 @@ +Continuous Reproducibility in GNSS Signal Processing +---------------------------------------------------- + + +This folder contains files required for the reproduction of the experiment proposed in: + +C. Fernández-Prades, J. Vilà-Valls, J. Arribas and A. Ramos, *Continuous Reproducibility in GNSS Signal Processing*, submitted to IEEE Access, Feb. 2018. + +The dataset used in this paper is available at + +The sample format is `ibyte`: Interleaved (I&Q) stream of samples of type signed integer, 8-bit two’s complement number ranging from -128 to 127.  + +The figure appearing in that paper can be automatically generated with the pipeline available at https://gitlab.com/gnss-sdr/gnss-sdr/pipelines + +After the **Build** stage, which compiles the source code in several versions of the most popular GNU/Linux distributions, and the **Test** stage, which executes GNSS-SDR’s QA code, the **Deploy** stage creates and publishes an image of a software container ready to execute the experiment. This container is available by doing: + +``` +$ docker pull carlesfernandez/docker-gnsssdr:access18 +``` + +Then, in the **Experiment** stage, a job installs the image created in the previous step, grabs the data file, executes the experiment and produces a figure with the obtained results. + +The steps to reproduce the experiment in your own machine (with [Docker](https://www.docker.com) already installed and running) are: + +``` +$ docker pull carlesfernandez/docker-gnsssdr:access18 +$ git clone https://github.com/gnss-sdr/gnss-sdr +$ cd gnss-sdr +$ git checkout next +$ mkdir -p exp-access18/data +$ cd ex-access18/data +$ curl https://zenodo.org/record/1184601/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz +$ tar xvfJ L2_signal_samples.tar.xz +$ echo "3a04c1eeb970776bb77f5e3b7eaff2df L2_signal_samples.tar.xz" > data.md5 +$ md5sum -c data.md5 +$ cd .. +$ cp ../src/utils/reproducibility/ieee-access18/L2-access18.conf . +$ cp ../src/utils/reproducibility/ieee-access18/plot_dump.m . +$ cp -r ../src/utils/matlab/libs/geoFunctions . +$ octave --no-gui plot_dump.m +$ epspdf Figure2.eps Figure2.pdf +``` diff --git a/src/utils/reproducibility/ieee-access/plot_dump.m b/src/utils/reproducibility/ieee-access/plot_dump.m new file mode 100644 index 000000000..6bbb388c5 --- /dev/null +++ b/src/utils/reproducibility/ieee-access/plot_dump.m @@ -0,0 +1,239 @@ +% /*! +% * \file plot_dump.m +% * \brief Read GNSS-SDR Tracking dump binary file and plot some internal +% variables +% * \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es +% * ------------------------------------------------------------------------- +% * +% * Copyright (C) 2010-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 . +% * +% * ------------------------------------------------------------------------- +% */ + +clear all; +clc; + +n_channel = 0; +symbol_period = 20e-3; +filename = 'track_ch_'; + +fontsize = 12; + +addpath('./data') % Path to gnss-sdr dump files (Tracking and PVT) +addpath('./geoFunctions') + +load([filename int2str(n_channel) '.mat']); +t = (0 : length(abs_P) - 1) * symbol_period; +hf = figure('visible', 'off'); +set(hf, 'paperorientation', 'landscape'); +subplot(3, 3, [1,3]) +plot(t, abs_E, t, abs_P, t, abs_L) +xlabel('Time [s]','fontname','Times','fontsize', fontsize) +ylabel('Correlation result','fontname','Times','fontsize', fontsize) +legend('Early', 'Prompt', 'Late') +grid on + + +subplot(3, 3, 7) +plot(Prompt_I./1000, Prompt_Q./1000, 'linestyle', 'none', 'marker', '.') +xlabel('I','fontname','Times','fontsize', fontsize) +ylabel('Q','fontname','Times','fontsize', fontsize) +axis equal +grid on + +subplot(3, 3, [4,6]) +plot(t, Prompt_I) +xlabel('Time [s]','fontname','Times','fontsize', fontsize) +ylabel('Navigation data bits','fontname','Times','fontsize', fontsize) +grid on + + +fileID = fopen('data/PVT_ls_pvt.dat', 'r'); +dinfo = dir('data/PVT_ls_pvt.dat'); +filesize = dinfo.bytes; +aux = 1; +while ne(ftell(fileID), filesize) + navsol.RX_time(aux) = fread(fileID, 1, 'double'); + navsol.X(aux) = fread(fileID, 1, 'double'); + navsol.Y(aux) = fread(fileID, 1, 'double'); + navsol.Z(aux) = fread(fileID, 1, 'double'); + navsol.user_clock(aux) = fread(fileID, 1, 'double'); + navsol.lat(aux) = fread(fileID, 1, 'double'); + navsol.long(aux) = fread(fileID, 1, 'double'); + navsol.height(aux) = fread(fileID, 1, 'double'); + aux = aux + 1; +end +fclose(fileID); + + +mean_Latitude=mean(navsol.lat); +mean_Longitude=mean(navsol.long); +mean_h=mean(navsol.height); +utmZone = findUtmZone(mean_Latitude,mean_Longitude); +[ref_X_cart,ref_Y_cart,ref_Z_cart]=geo2cart(dms2mat(deg2dms(mean_Latitude)), dms2mat(deg2dms(mean_Longitude)), mean_h, 5); +[mean_utm_X,mean_utm_Y,mean_utm_Z]=cart2utm(ref_X_cart,ref_Y_cart,ref_Z_cart,utmZone); + + +numPoints=length(navsol.X); +aux=0; +for n=1:numPoints + aux=aux+1; + [E(aux),N(aux),U(aux)]=cart2utm(navsol.X(n), navsol.Y(n), navsol.Z(n), utmZone); +end + +v_2d=[E;N].'; %2D East Nort position vectors +v_3d=[E;N;U].'; %2D East Nort position vectors + + +%% ACCURACY + +% 2D ------------------- + +sigma_E_accuracy=sqrt((1/(numPoints-1))*sum((v_2d(:,1)-mean_utm_X).^2)); +sigma_N_accuracy=sqrt((1/(numPoints-1))*sum((v_2d(:,2)-mean_utm_Y).^2)); + +sigma_ratio_2d_accuracy=sigma_N_accuracy/sigma_E_accuracy + +% if sigma_ratio=1 -> Prob in circle with r=DRMS -> 65% +DRMS_accuracy=sqrt(sigma_E_accuracy^2+sigma_N_accuracy^2) +% if sigma_ratio=1 -> Prob in circle with r=2DRMS -> 95% +TWO_DRMS_accuracy=2*DRMS_accuracy +% if sigma_ratio>0.3 -> Prob in circle with r=CEP -> 50% +CEP_accuracy=0.62*sigma_E_accuracy+0.56*sigma_N_accuracy + +% 3D ------------------- + +sigma_U_accuracy=sqrt((1/(numPoints-1))*sum((v_3d(:,3)-mean_utm_Z).^2)); + +% if sigma_ratio=1 -> Prob in circle with r=DRMS -> 50% +SEP_accuracy=0.51*sqrt(sigma_E_accuracy^2+sigma_N_accuracy^2+sigma_U_accuracy^2) + +% if sigma_ratio=1 -> Prob in circle with r=DRMS -> 61% +MRSE_accuracy=sqrt(sigma_E_accuracy^2+sigma_N_accuracy^2+sigma_U_accuracy^2) +% if sigma_ratio=1 -> Prob in circle with r=2DRMS -> 95% +TWO_MRSE_accuracy=2*MRSE_accuracy + + + +%% PRECISION + +% 2D analysis +% Simulated X,Y measurements +%v1=randn(1000,2); + +% 2D Mean and Variance +mean_2d = [mean(v_2d(:,1)) ; mean(v_2d(:,2))]; +sigma_2d = [sqrt(var(v_2d(:,1))) ; sqrt(var(v_2d(:,2)))]; + +sigma_ratio_2d=sigma_2d(2)/sigma_2d(1) + +% if sigma_ratio=1 -> Prob in circle with r=DRMS -> 65% +DRMS=sqrt(sigma_2d(1)^2+sigma_2d(2)^2) +% if sigma_ratio=1 -> Prob in circle with r=2DRMS -> 95% +TWO_DRMS=2*DRMS +% if sigma_ratio>0.3 -> Prob in circle with r=CEP -> 50% +CEP=0.62*sigma_2d(1)+0.56*sigma_2d(2) + + +% Mean and Variance +mean_3d=[mean(v_3d(:,1)) ; mean(v_3d(:,2)) ; mean(v_3d(:,3))]; +sigma_3d=[sqrt(var(v_3d(:,1))) ; sqrt(var(v_3d(:,2))) ; sqrt(var(v_3d(:,3)))]; + +% absolute mean error +% 2D + +error_2D_vec=[mean_utm_X-mean_2d(1) mean_utm_Y-mean_2d(2)]; +error_2D_m=norm(error_2D_vec) + +error_3D_vec=[mean_utm_X-mean_3d(1) mean_utm_Y-mean_3d(2) mean_utm_Z-mean_3d(3)]; +error_3D_m=norm(error_3D_vec) + +% RMSE 2D + +RMSE_X=sqrt(mean((v_3d(:,1)-mean_utm_X).^2)) +RMSE_Y=sqrt(mean((v_3d(:,2)-mean_utm_Y).^2)) +RMSE_Z=sqrt(mean((v_3d(:,3)-mean_utm_Z).^2)) + + +RMSE_2D=sqrt(mean((v_2d(:,1)-mean_utm_X).^2+(v_2d(:,2)-mean_utm_Y).^2)) + +RMSE_3D=sqrt(mean((v_3d(:,1)-mean_utm_X).^2+(v_3d(:,2)-mean_utm_Y).^2+(v_3d(:,3)-mean_utm_Z).^2)) + +% SCATTER PLOT +subplot(3,3,8) +scatter(v_2d(:,1)-mean_2d(1),v_2d(:,2)-mean_2d(2)); +hold on; + +plot(0,0,'k*'); + + +[x,y,z] = cylinder([TWO_DRMS TWO_DRMS],200); +plot(x(1,:),y(1,:),[0 0.6 0],'Color',[0 0.6 0]); +str = strcat('2DRMS=',num2str(TWO_DRMS), ' m'); +text(cosd(65)*TWO_DRMS,sind(65)*TWO_DRMS,str,'Color',[0 0.6 0]); + + +[x,y,z] = cylinder([CEP CEP],200); + +plot(x(1,:),y(1,:),'r--'); +str = strcat('CEP=',num2str(CEP), ' m'); +text(cosd(80)*CEP,sind(80)*CEP,str,'Color','r'); + +grid on +axis equal; +xlabel('North [m]','fontname','Times','fontsize', fontsize) +ylabel('East [m]','fontname','Times','fontsize', fontsize) + +% 3D analysis +% Simulated X,Y,Z measurements + +% if sigma_ratio=1 -> Prob in circle with r=DRMS -> 50% +SEP=0.51*sqrt(sigma_3d(1)^2+sigma_3d(2)^2+sigma_3d(3)^2) + +% if sigma_ratio=1 -> Prob in circle with r=DRMS -> 61% +MRSE=sqrt(sigma_3d(1)^2+sigma_3d(2)^2+sigma_3d(3)^2) +% if sigma_ratio=1 -> Prob in circle with r=2DRMS -> 95% +TWO_MRSE=2*MRSE + + + +% SCATTER PLOT +subplot(3,3,9) +scatter3(v_3d(:,1)-mean_3d(1),v_3d(:,2)-mean_3d(2), v_3d(:,3)-mean_3d(3)); + +hold on; + +[x,y,z] = sphere(); +hSurface=surf(MRSE*x,MRSE*y,MRSE*z); % sphere centered at origin + +set(hSurface,'facecolor','none','edgecolor',[0 0.6 0],'edgealpha',1,'facealpha',1); + +%axis equal; +xlabel('North [m]','fontname','Times','fontsize', fontsize) +ylabel('East [m]','fontname','Times','fontsize', fontsize) +zlabel('Up [m]','fontname','Times','fontsize', fontsize) +str = strcat('MRSE=',num2str(MRSE), ' m'); +text(cosd(45)*MRSE,sind(45)*MRSE,20,str,'Color',[0 0.6 0]); + +hh=findall(hf,'-property','FontName'); +set(hh,'FontName','Times'); +print(hf, 'Figure2.eps', '-depsc') +close(hf); From ac18e7a49d9b090751103ce7bb9589a48f8e326a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 15:40:43 +0100 Subject: [PATCH 42/43] Fix building in Ubuntu 18.04 --- src/tests/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 2994eb0c4..aac3aa98f 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -605,6 +605,7 @@ if(NOT ${ENABLE_PACKAGING}) target_link_libraries(control_thread_test ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES} + ${GNURADIO_RUNTIME_LIBRARIES} ${GTEST_LIBRARIES} gnss_sp_libs gnss_system_parameters @@ -628,6 +629,7 @@ if(NOT ${ENABLE_PACKAGING}) target_link_libraries(flowgraph_test ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES} + ${GNURADIO_RUNTIME_LIBRARIES} ${GTEST_LIBRARIES} gnss_sp_libs gnss_rx From 2f2a1d8338494a412cfb51093dc2e2c5f4634e4a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Mar 2018 11:01:20 +0100 Subject: [PATCH 43/43] Change folder name --- .../{ieee-access => ieee-access18}/L2-access18.conf | 0 .../reproducibility/{ieee-access => ieee-access18}/README.md | 0 .../reproducibility/{ieee-access => ieee-access18}/plot_dump.m | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename src/utils/reproducibility/{ieee-access => ieee-access18}/L2-access18.conf (100%) rename src/utils/reproducibility/{ieee-access => ieee-access18}/README.md (100%) rename src/utils/reproducibility/{ieee-access => ieee-access18}/plot_dump.m (100%) diff --git a/src/utils/reproducibility/ieee-access/L2-access18.conf b/src/utils/reproducibility/ieee-access18/L2-access18.conf similarity index 100% rename from src/utils/reproducibility/ieee-access/L2-access18.conf rename to src/utils/reproducibility/ieee-access18/L2-access18.conf diff --git a/src/utils/reproducibility/ieee-access/README.md b/src/utils/reproducibility/ieee-access18/README.md similarity index 100% rename from src/utils/reproducibility/ieee-access/README.md rename to src/utils/reproducibility/ieee-access18/README.md diff --git a/src/utils/reproducibility/ieee-access/plot_dump.m b/src/utils/reproducibility/ieee-access18/plot_dump.m similarity index 100% rename from src/utils/reproducibility/ieee-access/plot_dump.m rename to src/utils/reproducibility/ieee-access18/plot_dump.m