diff --git a/CMakeLists.txt b/CMakeLists.txt index 68c5ddb0c..563adfc03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,6 @@ set(OS_IS_LINUX "") if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(OperatingSystem "Linux") set(OS_IS_LINUX TRUE) - add_definitions( -DDISPLAY_COLORS=1 ) if(ARCH_64BITS) set(ARCH_ "(64 bits)") else(ARCH_64BITS) @@ -318,7 +317,7 @@ set(GNSSSDR_GNURADIO_MIN_VERSION "3.7.3") 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_ARMADILLO_MIN_VERSION "5.300.0") set(GNSSSDR_MATIO_MIN_VERSION "1.5.3") diff --git a/src/algorithms/libs/gnss_sdr_sample_counter.cc b/src/algorithms/libs/gnss_sdr_sample_counter.cc index 197e5725a..bfe53f6af 100644 --- a/src/algorithms/libs/gnss_sdr_sample_counter.cc +++ b/src/algorithms/libs/gnss_sdr_sample_counter.cc @@ -1,12 +1,12 @@ /*! * \file gnss_sdr_sample_counter.cc * \brief Simple block to report the current receiver time based on the output of the tracking or telemetry blocks - * \author Javier Arribas 2017. jarribas(at)cttc.es + * \author Javier Arribas 2018. jarribas(at)cttc.es * * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (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 @@ -32,11 +32,14 @@ #include "gnss_sdr_sample_counter.h" #include "gnss_synchro.h" #include +#include +#include +#include -gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs) : gr::sync_decimator("sample_counter", - gr::io_signature::make(1, 1, sizeof(gr_complex)), - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), - static_cast(floor(_fs * 0.001))) +gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs, size_t _size) : gr::sync_decimator("sample_counter", + gr::io_signature::make(1, 1, _size), + gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), + static_cast(std::floor(_fs * 0.001))) { message_port_register_out(pmt::mp("sample_counter")); set_max_noutput_items(1); @@ -45,17 +48,17 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs) : gr::sync_decimato current_m = 0; current_h = 0; current_days = 0; - report_interval_ms = 1000; //default reporting 1 second - flag_enable_send_msg = false; //enable it for reporting time with asynchronous message + report_interval_ms = 1000; // default reporting 1 second + flag_enable_send_msg = false; // enable it for reporting time with asynchronous message flag_m = false; flag_h = false; flag_days = false; } -gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs) +gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, size_t _size) { - gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs)); + gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs, _size)); return sample_counter_; } @@ -90,21 +93,35 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)), if (flag_days) { - std::cout << "Current receiver time: " << current_days << " [days] " << current_h << " [h] " << current_m << " [min] " << current_s << " [s]" << std::endl; - } - else if (flag_h) - { - std::cout << "Current receiver time: " << current_h << " [h] " << current_m << " [min] " << current_s << " [s]" << std::endl; - } - else if (flag_m) - { - std::cout << "Current receiver time: " << current_m << " [min] " << current_s << " [s]" << std::endl; + std::string day; + if (current_days == 1) + { + day = " day "; + } + else + { + day = " days "; + } + std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s" << std::endl; } else { - std::cout << "Current receiver time: " << current_s << " [s]" << std::endl; + if (flag_h) + { + std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s" << std::endl; + } + else + { + if (flag_m) + { + std::cout << "Current receiver time: " << current_m << " min " << current_s << " s" << std::endl; + } + else + { + std::cout << "Current receiver time: " << current_s << " s" << std::endl; + } + } } - if (flag_enable_send_msg) { message_port_pub(pmt::mp("receiver_time"), pmt::from_double(static_cast(current_T_rx_ms) / 1000.0)); diff --git a/src/algorithms/libs/gnss_sdr_sample_counter.h b/src/algorithms/libs/gnss_sdr_sample_counter.h index 74a525eb4..761894855 100644 --- a/src/algorithms/libs/gnss_sdr_sample_counter.h +++ b/src/algorithms/libs/gnss_sdr_sample_counter.h @@ -1,12 +1,12 @@ /*! * \file gnss_sdr_sample_counter.h * \brief Simple block to report the current receiver time based on the output of the tracking or telemetry blocks - * \author Javier Arribas 2017. jarribas(at)cttc.es + * \author Javier Arribas 2018. jarribas(at)cttc.es * * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (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 @@ -39,25 +39,25 @@ class gnss_sdr_sample_counter; typedef boost::shared_ptr gnss_sdr_sample_counter_sptr; -gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs); +gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, size_t _size); class gnss_sdr_sample_counter : public gr::sync_decimator { private: - gnss_sdr_sample_counter(double _fs); - long long int current_T_rx_ms; // Receiver time in ms since the beggining of the run + gnss_sdr_sample_counter(double _fs, size_t _size); + long long int current_T_rx_ms; // Receiver time in ms since the beginning of the run unsigned int current_s; // Receiver time in seconds, modulo 60 bool flag_m; // True if the receiver has been running for at least 1 minute unsigned int current_m; // Receiver time in minutes, modulo 60 bool flag_h; // True if the receiver has been running for at least 1 hour unsigned int current_h; // Receiver time in hours, modulo 24 bool flag_days; // True if the receiver has been running for at least 1 day - unsigned int current_days; // Receiver time in days since the beggining of the run + unsigned int current_days; // Receiver time in days since the beginning of the run int report_interval_ms; bool flag_enable_send_msg; public: - friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs); + friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, size_t _size); int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/algorithms/libs/pass_through.h b/src/algorithms/libs/pass_through.h index 1a9538ae4..f1d8c5f72 100644 --- a/src/algorithms/libs/pass_through.h +++ b/src/algorithms/libs/pass_through.h @@ -88,7 +88,6 @@ private: std::string role_; unsigned int in_streams_; unsigned int out_streams_; - //gr_kludge_copy_sptr kludge_copy_; gr::blocks::copy::sptr kludge_copy_; size_t item_size_; conjugate_cc_sptr conjugate_cc_; diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc index 81daa31ca..6e95da824 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc @@ -1,6 +1,6 @@ /*! * \file hybrid_observables_cc.cc - * \brief Implementation of the pseudorange computation block + * \brief Implementation of the observables computation block * \author Javier Arribas 2017. jarribas(at)cttc.es * \author Antonio Ramos 2018. antonio.ramos(at)cttc.es * @@ -30,6 +30,7 @@ */ #include "hybrid_observables_cc.h" +#include "display.h" #include "GPS_L1_CA.h" #include #include @@ -39,7 +40,6 @@ #include #include #include -#include "display.h" using google::LogMessage; @@ -51,9 +51,12 @@ hybrid_observables_cc_sptr hybrid_make_observables_cc(unsigned int nchannels_in, } -hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, std::string dump_filename) : gr::block("hybrid_observables_cc", - gr::io_signature::make(nchannels_in, nchannels_in, sizeof(Gnss_Synchro)), - gr::io_signature::make(nchannels_out, nchannels_out, sizeof(Gnss_Synchro))) +hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels_in, + unsigned int nchannels_out, + bool dump, + std::string dump_filename) : gr::block("hybrid_observables_cc", + gr::io_signature::make(nchannels_in, nchannels_in, sizeof(Gnss_Synchro)), + gr::io_signature::make(nchannels_out, nchannels_out, sizeof(Gnss_Synchro))) { d_dump = dump; d_nchannels = nchannels_out; @@ -298,6 +301,7 @@ int hybrid_observables_cc::save_matfile() return 0; } + bool hybrid_observables_cc::interpolate_data(Gnss_Synchro &out, std::deque &data, const double &ti) { if ((ti < data.front().RX_time) or (ti > data.back().RX_time)) @@ -334,6 +338,7 @@ bool hybrid_observables_cc::interpolate_data(Gnss_Synchro &out, std::deque &data) { while (data.size() > 0) @@ -372,6 +378,7 @@ void hybrid_observables_cc::clean_history(std::deque &data) } } + void hybrid_observables_cc::correct_TOW_and_compute_prange(std::vector &data) { std::vector::iterator it; diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h index cf5f775d4..aedba43ab 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.h @@ -36,11 +36,11 @@ #include "gnss_synchro.h" #include +#include #include #include -#include //std::vector +#include #include -#include class hybrid_observables_cc; @@ -57,9 +57,9 @@ class hybrid_observables_cc : public gr::block { public: ~hybrid_observables_cc(); - int general_work(int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - void forecast(int noutput_items, gr_vector_int &ninput_items_required); + int general_work(int noutput_items, gr_vector_int& ninput_items, + gr_vector_const_void_star& input_items, gr_vector_void_star& output_items); + void forecast(int noutput_items, gr_vector_int& ninput_items_required); private: friend hybrid_observables_cc_sptr @@ -82,7 +82,6 @@ private: unsigned int d_num_valid_channels; std::string d_dump_filename; std::ofstream d_dump_file; - }; #endif 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 f846fad0a..012cc62ad 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc @@ -82,7 +82,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; } std::string default_dump_filename = "./track_ch"; - std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); int vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### 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 6f4535fe2..f2253197a 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc @@ -75,7 +75,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6); port_ch0 = configuration->property(role + ".port_ch0", 2060); std::string default_dump_filename = "./track_ch"; - dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### 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 816710efc..5a61f2007 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc @@ -66,7 +66,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( int ti_ms = configuration->property(role + ".ti_ms", 3); float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; - std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); int vector_length = std::round(fs_in / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS)); int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15); 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 481be8080..960fd928c 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 @@ -80,8 +80,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( 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! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### 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 cf082d8b6..493097f27 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 @@ -72,7 +72,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( 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! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc index 59f0dedb0..2e284bab8 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc @@ -78,8 +78,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( 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! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc index 12cd75953..3b029aae3 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc @@ -70,7 +70,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( 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! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### 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 87c4a26c7..1b0b9b93b 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 @@ -79,8 +79,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( 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! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### 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 6674422c6..66e82aca9 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 @@ -65,7 +65,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5); std::string default_dump_filename = "./track_ch"; - std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); int vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1); if (symbols_extended_correlator < 1) 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 181e07317..7a881edca 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 @@ -72,8 +72,7 @@ GpsL1CaDllPllTrackingGPU::GpsL1CaDllPllTrackingGPU( 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! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc index 3502ec617..aab34cf76 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc @@ -67,7 +67,7 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking( early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); port_ch0 = configuration->property(role + ".port_ch0", 2060); std::string default_dump_filename = "./track_ch"; - dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); //################# MAKE TRACKING GNURadio object ################### 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 4180f161f..563316bf5 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 @@ -63,7 +63,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( unified_ = configuration->property(role + ".unified", false); float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; - std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); int vector_length = std::round(static_cast(fs_in) / (static_cast(GPS_L2_M_CODE_RATE_HZ) / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS))); int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1); if (symbols_extended_correlator != 1) 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 aa1885fd2..d28255416 100644 --- a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc @@ -65,7 +65,7 @@ GpsL5iDllPllTracking::GpsL5iDllPllTracking( float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 0.25); float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); std::string default_dump_filename = "./track_ch"; - std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! + std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); int vector_length = std::round(static_cast(fs_in) / (static_cast(GPS_L5i_CODE_RATE_HZ) / static_cast(GPS_L5i_CODE_LENGTH_CHIPS))); int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15); 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 e028893ca..a7c0062a2 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 @@ -267,8 +267,8 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { // process vars - float carr_error_filt_hz; - float code_error_filt_chips; + float carr_error_filt_hz = 0.0; + float code_error_filt_chips = 0.0; tcp_packet_data tcp_data; // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder 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 f4fe4c018..cd4c86652 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 @@ -297,10 +297,9 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { // process vars - float carr_error; - float carr_nco; - float code_error; - float code_nco; + float carr_error = 0.0; + float code_error = 0.0; + float code_nco = 0.0; tcp_packet_data tcp_data; // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index a1fa6855f..eec75d2f0 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -61,8 +61,6 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr configurati GNSSFlowgraph::~GNSSFlowgraph() {} - - void GNSSFlowgraph::start() { if (running_) @@ -249,25 +247,25 @@ void GNSSFlowgraph::connect() //connect the signal source to sample counter //connect the sample counter to Observables try - { - double fs = static_cast(configuration_->property("GNSS-SDR.internal_fs_sps", 0)); - if(fs == 0.0) { - LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file"; - std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl; - throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration")); + double fs = static_cast(configuration_->property("GNSS-SDR.internal_fs_sps", 0)); + if (fs == 0.0) + { + LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file"; + std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl; + throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration")); + } + ch_out_sample_counter = gnss_sdr_make_sample_counter(fs, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0)); + top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0); + top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse + } + catch (const std::exception& e) + { + LOG(WARNING) << "Can't connect sample counter"; + LOG(ERROR) << e.what(); + top_block_->disconnect_all(); + return; } - ch_out_sample_counter = gnss_sdr_make_sample_counter(fs); - top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0); - top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse - } - catch (const std::exception & e) - { - LOG(WARNING) << "Can't connect sample counter"; - LOG(ERROR) << e.what(); - top_block_->disconnect_all(); - return; - } // Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID) diff --git a/src/core/system_parameters/display.h b/src/core/system_parameters/display.h index b6c3c05b8..362e66f6f 100644 --- a/src/core/system_parameters/display.h +++ b/src/core/system_parameters/display.h @@ -31,47 +31,52 @@ #ifndef GNSS_SDR_DISPLAY_H_ #define GNSS_SDR_DISPLAY_H_ -#include +#include + +#ifndef NO_DISPLAY_COLORS +#define DISPLAY_COLORS 1 +#endif + #ifdef DISPLAY_COLORS -const std::string TEXT_RESET = "\033[0m"; -const std::string TEXT_BLACK = "\033[30m"; -const std::string TEXT_RED = "\033[31m"; -const std::string TEXT_GREEN = "\033[32m"; -const std::string TEXT_YELLOW = "\033[33m"; -const std::string TEXT_BLUE = "\033[34m"; -const std::string TEXT_MAGENTA = "\033[35m"; -const std::string TEXT_CYAN = "\033[36m"; -const std::string TEXT_WHITE = "\033[37m"; -const std::string TEXT_BOLD_BLACK = "\033[1m\033[30m"; -const std::string TEXT_BOLD_RED = "\033[1m\033[31m"; -const std::string TEXT_BOLD_GREEN = "\033[1m\033[32m"; -const std::string TEXT_BOLD_YELLOW = "\033[1m\033[33m"; -const std::string TEXT_BOLD_BLUE = "\033[1m\033[34m"; +const std::string TEXT_RESET = "\033[0m"; +const std::string TEXT_BLACK = "\033[30m"; +const std::string TEXT_RED = "\033[31m"; +const std::string TEXT_GREEN = "\033[32m"; +const std::string TEXT_YELLOW = "\033[33m"; +const std::string TEXT_BLUE = "\033[34m"; +const std::string TEXT_MAGENTA = "\033[35m"; +const std::string TEXT_CYAN = "\033[36m"; +const std::string TEXT_WHITE = "\033[37m"; +const std::string TEXT_BOLD_BLACK = "\033[1m\033[30m"; +const std::string TEXT_BOLD_RED = "\033[1m\033[31m"; +const std::string TEXT_BOLD_GREEN = "\033[1m\033[32m"; +const std::string TEXT_BOLD_YELLOW = "\033[1m\033[33m"; +const std::string TEXT_BOLD_BLUE = "\033[1m\033[34m"; const std::string TEXT_BOLD_MAGENTA = "\033[1m\033[35m"; -const std::string TEXT_BOLD_CYAN = "\033[1m\033[36m"; -const std::string TEXT_BOLD_WHITE = "\033[1m\033[37m"; +const std::string TEXT_BOLD_CYAN = "\033[1m\033[36m"; +const std::string TEXT_BOLD_WHITE = "\033[1m\033[37m"; #else -const std::string TEXT_RESET = ""; -const std::string TEXT_BLACK = ""; -const std::string TEXT_RED = ""; -const std::string TEXT_GREEN = ""; -const std::string TEXT_YELLOW = ""; -const std::string TEXT_BLUE = ""; -const std::string TEXT_MAGENTA = ""; -const std::string TEXT_CYAN = ""; -const std::string TEXT_WHITE = ""; -const std::string TEXT_BOLD_BLACK = ""; -const std::string TEXT_BOLD_RED = ""; -const std::string TEXT_BOLD_GREEN = ""; -const std::string TEXT_BOLD_YELLOW = ""; -const std::string TEXT_BOLD_BLUE = ""; +const std::string TEXT_RESET = ""; +const std::string TEXT_BLACK = ""; +const std::string TEXT_RED = ""; +const std::string TEXT_GREEN = ""; +const std::string TEXT_YELLOW = ""; +const std::string TEXT_BLUE = ""; +const std::string TEXT_MAGENTA = ""; +const std::string TEXT_CYAN = ""; +const std::string TEXT_WHITE = ""; +const std::string TEXT_BOLD_BLACK = ""; +const std::string TEXT_BOLD_RED = ""; +const std::string TEXT_BOLD_GREEN = ""; +const std::string TEXT_BOLD_YELLOW = ""; +const std::string TEXT_BOLD_BLUE = ""; const std::string TEXT_BOLD_MAGENTA = ""; -const std::string TEXT_BOLD_CYAN = ""; -const std::string TEXT_BOLD_WHITE = ""; +const std::string TEXT_BOLD_CYAN = ""; +const std::string TEXT_BOLD_WHITE = ""; #endif /* DISPLAY_COLORS */ #endif /* GNSS_SDR_DISPLAY_H_ */ diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 82f4e97d9..c43b47a07 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -351,9 +351,6 @@ include_directories( # Unit testing ################################################################################ if(ENABLE_UNIT_TESTING) - if( ${ARMADILLO_VERSION_STRING} STRGREATER "5.300") # make sure interp1 is present - add_definitions(-DMODERN_ARMADILLO) - endif( ${ARMADILLO_VERSION_STRING} STRGREATER "5.300") add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc) target_link_libraries(run_tests ${CLANG_FLAGS} diff --git a/src/tests/test_main.cc b/src/tests/test_main.cc index ed4f0f4ea..0a9a9d2b0 100644 --- a/src/tests/test_main.cc +++ b/src/tests/test_main.cc @@ -146,12 +146,10 @@ DECLARE_string(log_dir); #include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc" #include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc" #include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc" -#if MODERN_ARMADILLO #include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc" #include "unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc" #include "unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc" #endif -#endif #include "unit-tests/system-parameters/glonass_gnav_ephemeris_test.cc" #include "unit-tests/system-parameters/glonass_gnav_nav_message_test.cc" 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 5b5c9ff12..14e8bb760 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 @@ -567,7 +567,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make(); gr::blocks::null_sink::sptr sink_ch0 = gr::blocks::null_sink::make(sizeof(Gnss_Synchro)); gr::blocks::null_sink::sptr sink_ch1 = gr::blocks::null_sink::make(sizeof(Gnss_Synchro)); - gnss_sdr_sample_counter_sptr samp_counter = gnss_sdr_make_sample_counter(static_cast(baseband_sampling_freq)); + gnss_sdr_sample_counter_sptr samp_counter = gnss_sdr_make_sample_counter(static_cast(baseband_sampling_freq), sizeof(gr_complex)); top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); top_block->connect(gr_interleaved_char_to_complex, 0, samp_counter, 0); diff --git a/src/utils/matlab/libs/geoFunctions/deg2dms.m b/src/utils/matlab/libs/geoFunctions/deg2dms.m index 1f925894d..948e885db 100644 --- a/src/utils/matlab/libs/geoFunctions/deg2dms.m +++ b/src/utils/matlab/libs/geoFunctions/deg2dms.m @@ -9,7 +9,7 @@ function dmsOutput = deg2dms(deg) %%% Save the sign for later processing neg_arg = false; if deg < 0 - % Only positive numbers should be used while spliting into deg/min/sec + % Only positive numbers should be used while splitting into deg/min/sec deg = -deg; neg_arg = true; end diff --git a/src/utils/matlab/libs/geoFunctions/dms2mat.m b/src/utils/matlab/libs/geoFunctions/dms2mat.m index a5c449673..6cafb2488 100644 --- a/src/utils/matlab/libs/geoFunctions/dms2mat.m +++ b/src/utils/matlab/libs/geoFunctions/dms2mat.m @@ -84,7 +84,7 @@ msign = signvec .* (d==0 & m~=0); ssign = signvec .* (d==0 & m==0 & s~=0); % In the application of signs below, the comparison with 0 is used so that -% the sign vector contains only +1 and -1. Any zero occurances causes +% the sign vector contains only +1 and -1. Any zero occurrences causes % data to be lost when the sign has been applied to a higher component % of d:m:s. Use fix function to eliminate potential round-off errors. diff --git a/src/utils/matlab/libs/plotNavigation.m b/src/utils/matlab/libs/plotNavigation.m index 9e27fc4d2..08460c702 100644 --- a/src/utils/matlab/libs/plotNavigation.m +++ b/src/utils/matlab/libs/plotNavigation.m @@ -47,7 +47,7 @@ function plotNavigation(navSolutions, settings,plot_skyplot) if (~isempty(navSolutions)) %% If reference position is not provided, then set reference position - %% to the average postion + %% to the average position if isnan(settings.truePosition.E) || isnan(settings.truePosition.N) ... || isnan(settings.truePosition.U)