From 225742c5e9c248d3a571ec28e98cbc451c59f403 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 11 Mar 2019 21:41:33 +0100 Subject: [PATCH 01/15] Update matio version to build if not found to 1.5.14 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7d4acac8..e26aa7688 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -412,7 +412,7 @@ set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.200.x") set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1") set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master") set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6") -set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.13") +set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.14") set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.9") if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7 From b4d7716d1980d53b6156c845ec93367ad1888dc7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 14 Mar 2019 19:16:51 +0100 Subject: [PATCH 02/15] Insert blank lines for doc readability --- src/algorithms/PVT/libs/rtcm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/algorithms/PVT/libs/rtcm.h b/src/algorithms/PVT/libs/rtcm.h index 28ef66e71..6fd3129b8 100644 --- a/src/algorithms/PVT/libs/rtcm.h +++ b/src/algorithms/PVT/libs/rtcm.h @@ -58,7 +58,7 @@ /*! - * \brief This class implements the generation and reading of some Message Types + * \brief This class implements the generation and reading of some Message Types * defined in the RTCM 3.2 Standard, plus some utilities to handle messages. * * Generation of the following Message Types: @@ -144,6 +144,7 @@ public: * \return string with message contents */ std::string print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map& observables, uint16_t station_id); + /*! * \brief Prints Extended L1-Only GLONASS RTK Observables * \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases. @@ -154,6 +155,7 @@ public: * \return string with message contents */ std::string print_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map& observables, uint16_t station_id); + /*! * \brief Prints L1&L2 GLONASS RTK Observables * \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred @@ -164,6 +166,7 @@ public: * \return string with message contents */ std::string print_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map& observables, uint16_t station_id); + /*! * \brief Prints Extended L1&L2 GLONASS RTK Observables * \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found. @@ -335,6 +338,7 @@ public: uint32_t lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //!< Returns the time period in which GPS L1 signals have been continually tracked. uint32_t lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //!< Returns the time period in which GPS L2 signals have been continually tracked. uint32_t lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //!< Returns the time period in which Galileo signals have been continually tracked. + /*! * \brief Locks time period in which GLONASS signals have been continually tracked. * \note Code added as part of GSoC 2017 program From 3a399629ee757af6fd59acd4dd1ad364613962de Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Fri, 15 Mar 2019 12:59:32 +0100 Subject: [PATCH 03/15] Bug fix in MATLAB tracking dump reader --- src/utils/matlab/libs/dll_pll_veml_read_tracking_dump.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/matlab/libs/dll_pll_veml_read_tracking_dump.m b/src/utils/matlab/libs/dll_pll_veml_read_tracking_dump.m index 698a1b5df..8f5ef94ce 100644 --- a/src/utils/matlab/libs/dll_pll_veml_read_tracking_dump.m +++ b/src/utils/matlab/libs/dll_pll_veml_read_tracking_dump.m @@ -88,7 +88,11 @@ else v7 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes); bytes_shift = bytes_shift + float_size_bytes; fseek(f,bytes_shift,'bof'); % move to next interleaved float - v8 = fread (f, count, 'long', skip_bytes_each_read - unsigned_long_int_size_bytes); + if unsigned_long_int_size_bytes==8 + v8 = fread (f, count, 'uint64', skip_bytes_each_read - unsigned_long_int_size_bytes); + else + v8 = fread (f, count, 'uint32', skip_bytes_each_read - unsigned_long_int_size_bytes); + end bytes_shift = bytes_shift + unsigned_long_int_size_bytes; fseek(f,bytes_shift,'bof'); % move to next float v9 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes); From c0d2bc241463a66d1f2aa8f47b9c2ee4ada73c52 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Fri, 15 Mar 2019 13:05:20 +0100 Subject: [PATCH 04/15] Critical bug fix affecting Galileo E1 telemetry decoder if PLL is locked at 180 degrees --- .../gnuradio_blocks/galileo_telemetry_decoder_gs.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc index c311342f1..f2a938114 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc @@ -522,6 +522,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( // try to decode frame DLOG(INFO) << "Starting page decoder for Galileo satellite " << this->d_satellite; d_preamble_index = d_sample_counter; // record the preamble sample stamp + d_CRC_error_counter = 0; d_stat = 2; } else @@ -555,7 +556,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( { for (uint32_t i = 0; i < d_frame_length_symbols; i++) { - d_page_part_symbols[i] = d_symbol_history.at(i + d_samples_per_preamble); // because last symbol of the preamble is just received now! + d_page_part_symbols[i] = -d_symbol_history.at(i + d_samples_per_preamble); // because last symbol of the preamble is just received now! } } decode_INAV_word(d_page_part_symbols, d_frame_length_symbols); From b6141fb3b22397b2ecaa5aa8de2f613eef037fe1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 15 Mar 2019 13:31:18 +0100 Subject: [PATCH 05/15] Add show_local_time_zone parameter for PVT PVT.show_local_time_zone=true shows local time in terminal --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 3 ++ .../PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 54 +++++++++++++++---- .../PVT/gnuradio_blocks/rtklib_pvt_gs.h | 4 ++ src/algorithms/PVT/libs/pvt_conf.cc | 2 + src/algorithms/PVT/libs/pvt_conf.h | 2 + 5 files changed, 56 insertions(+), 9 deletions(-) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 7a6ae02ce..ca19c2006 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -714,6 +714,9 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, pvt_output_parameters.udp_addresses = configuration->property(role + ".monitor_client_addresses", std::string("127.0.0.1")); pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234); + // Show time in local zone + pvt_output_parameters.show_local_time_zone = configuration->property(role + ".show_local_time_zone", false); + // make PVT object pvt_ = rtklib_make_pvt_gs(in_streams_, pvt_output_parameters, rtk); DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index da71df27f..b60f863c8 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -76,7 +76,10 @@ #include // for sort, unique #include // for exception #include // for ofstream +#include // for put_time, setprecision #include // for operator<< +#include // for locale +#include // for ostringstream #include // for length_error #include // for IPC_CREAT #include // for msgctl @@ -364,6 +367,18 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, d_pvt_solver = std::make_shared(static_cast(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk); d_pvt_solver->set_averaging_depth(1); start = std::chrono::system_clock::now(); + + // Display time in local time zone + time_t when = std::time(nullptr); + auto const tm = *std::localtime(&when); + std::ostringstream os; + os << std::put_time(&tm, "%z"); + d_utc_diff = os.str(); + // d_utc_diff is in ISO 8601 format: "+HHMM" or "-HHMM" + int h = std::stoi(d_utc_diff.substr(0, 3), nullptr, 10); + int m = std::stoi(d_utc_diff[0] + d_utc_diff.substr(3), nullptr, 10); + d_utc_diff_time = boost::posix_time::hours(h) + boost::posix_time::minutes(m); + d_show_local_time_zone = conf_.show_local_time_zone; } @@ -1464,8 +1479,16 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item if (first_fix == true) { - std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_pvt_solver->get_position_UTC_time()) - << " UTC is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude() + if (d_show_local_time_zone) + { + boost::posix_time::ptime time_first_solution = d_pvt_solver->get_position_UTC_time() + d_utc_diff_time; + std::cout << "First position fix at " << time_first_solution << " (UTC " + d_utc_diff.substr(0, 3) + ":" + d_utc_diff.substr(3, 2) + ")"; + } + else + { + std::cout << "First position fix at " << d_pvt_solver->get_position_UTC_time() << " UTC"; + } + std::cout << " is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude() << " [deg], Height= " << d_pvt_solver->get_height() << " [m]" << std::endl; ttff_msgbuf ttff; ttff.mtype = 1; @@ -3287,18 +3310,31 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item // DEBUG MESSAGE: Display position in console output if (d_pvt_solver->is_valid_position() and flag_display_pvt) { + boost::posix_time::ptime time_solution; + std::string UTC_solution_str; + if (d_show_local_time_zone) + { + time_solution = d_pvt_solver->get_position_UTC_time() + d_utc_diff_time; + UTC_solution_str = " (UTC " + d_utc_diff.substr(0, 3) + ":" + d_utc_diff.substr(3, 2) + ")"; + } + else + { + time_solution = d_pvt_solver->get_position_UTC_time(); + UTC_solution_str = " UTC"; + } std::streamsize ss = std::cout.precision(); // save current precision std::cout.setf(std::ios::fixed, std::ios::floatfield); auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z"); std::cout.imbue(std::locale(std::cout.getloc(), facet)); + std::cout + << TEXT_BOLD_GREEN + << "Position at " << time_solution << UTC_solution_str + << " using " << d_pvt_solver->get_num_valid_observations() + << std::fixed << std::setprecision(9) + << " observations is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude() + << std::fixed << std::setprecision(3) + << " [deg], Height = " << d_pvt_solver->get_height() << " [m]" << TEXT_RESET << std::endl; - std::cout << TEXT_BOLD_GREEN - << "Position at " << d_pvt_solver->get_position_UTC_time() - << " UTC using " << d_pvt_solver->get_num_valid_observations() - << std::fixed << std::setprecision(9) - << " observations is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude() - << std::fixed << std::setprecision(3) - << " [deg], Height = " << d_pvt_solver->get_height() << " [m]" << TEXT_RESET << std::endl; std::cout << std::setprecision(ss); DLOG(INFO) << "RX clock offset: " << d_pvt_solver->get_time_offset_s() << "[s]"; diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h index 4e3df2672..e892f7ee3 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h @@ -162,6 +162,10 @@ private: std::unique_ptr udp_sink_ptr; std::vector split_string(const std::string& s, char delim) const; + bool d_show_local_time_zone; + std::string d_utc_diff; + boost::posix_time::time_duration d_utc_diff_time; + public: ~rtklib_pvt_gs(); //!< Default destructor diff --git a/src/algorithms/PVT/libs/pvt_conf.cc b/src/algorithms/PVT/libs/pvt_conf.cc index 6a1e1023c..bd74b4900 100644 --- a/src/algorithms/PVT/libs/pvt_conf.cc +++ b/src/algorithms/PVT/libs/pvt_conf.cc @@ -70,4 +70,6 @@ Pvt_Conf::Pvt_Conf() monitor_enabled = false; udp_port = 0; + + show_local_time_zone = false; } diff --git a/src/algorithms/PVT/libs/pvt_conf.h b/src/algorithms/PVT/libs/pvt_conf.h index 484961cb2..f22eb8fe2 100644 --- a/src/algorithms/PVT/libs/pvt_conf.h +++ b/src/algorithms/PVT/libs/pvt_conf.h @@ -83,6 +83,8 @@ public: std::string udp_addresses; int udp_port; + bool show_local_time_zone; + Pvt_Conf(); }; From 7c78db4550b699fdcb5483614da42787a691375b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 16 Mar 2019 12:47:36 +0100 Subject: [PATCH 06/15] Handle the situation when UTC info is not available --- .../PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 43 ++++++++++++++----- .../PVT/gnuradio_blocks/rtklib_pvt_gs.h | 2 +- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index b60f863c8..09e49a576 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -364,21 +364,42 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, throw std::exception(); } - d_pvt_solver = std::make_shared(static_cast(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk); - d_pvt_solver->set_averaging_depth(1); - start = std::chrono::system_clock::now(); - // Display time in local time zone + d_show_local_time_zone = conf_.show_local_time_zone; time_t when = std::time(nullptr); auto const tm = *std::localtime(&when); std::ostringstream os; os << std::put_time(&tm, "%z"); - d_utc_diff = os.str(); - // d_utc_diff is in ISO 8601 format: "+HHMM" or "-HHMM" - int h = std::stoi(d_utc_diff.substr(0, 3), nullptr, 10); - int m = std::stoi(d_utc_diff[0] + d_utc_diff.substr(3), nullptr, 10); + std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM" + if (utc_diff_str.empty()) + { + utc_diff_str = "+0000"; + } + int h = std::stoi(utc_diff_str.substr(0, 3), nullptr, 10); + int m = std::stoi(utc_diff_str[0] + utc_diff_str.substr(3), nullptr, 10); d_utc_diff_time = boost::posix_time::hours(h) + boost::posix_time::minutes(m); - d_show_local_time_zone = conf_.show_local_time_zone; + std::ostringstream os2; + os2 << std::put_time(&tm, "%Z"); + std::string time_zone_abrv = os2.str(); + if (time_zone_abrv.empty()) + { + if (utc_diff_str == "+0000") + { + d_local_time_str = " UTC"; + } + else + { + d_local_time_str = " (UTC " + utc_diff_str.substr(0, 3) + ":" + utc_diff_str.substr(3, 2) + ")"; + } + } + else + { + d_local_time_str = std::string(" ") + time_zone_abrv + " (UTC " + utc_diff_str.substr(0, 3) + ":" + utc_diff_str.substr(3, 2) + ")"; + } + + d_pvt_solver = std::make_shared(static_cast(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk); + d_pvt_solver->set_averaging_depth(1); + start = std::chrono::system_clock::now(); } @@ -1482,7 +1503,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item if (d_show_local_time_zone) { boost::posix_time::ptime time_first_solution = d_pvt_solver->get_position_UTC_time() + d_utc_diff_time; - std::cout << "First position fix at " << time_first_solution << " (UTC " + d_utc_diff.substr(0, 3) + ":" + d_utc_diff.substr(3, 2) + ")"; + std::cout << "First position fix at " << time_first_solution << d_local_time_str; } else { @@ -3315,7 +3336,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item if (d_show_local_time_zone) { time_solution = d_pvt_solver->get_position_UTC_time() + d_utc_diff_time; - UTC_solution_str = " (UTC " + d_utc_diff.substr(0, 3) + ":" + d_utc_diff.substr(3, 2) + ")"; + UTC_solution_str = d_local_time_str; } else { diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h index e892f7ee3..9744426d1 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h @@ -163,7 +163,7 @@ private: std::vector split_string(const std::string& s, char delim) const; bool d_show_local_time_zone; - std::string d_utc_diff; + std::string d_local_time_str; boost::posix_time::time_duration d_utc_diff_time; public: From 2abf9164fd2b03952ccea7b82998f01454031b5a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 16 Mar 2019 13:42:59 +0100 Subject: [PATCH 07/15] Update changelog --- docs/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog b/docs/changelog index 42942beff..549c049c3 100644 --- a/docs/changelog +++ b/docs/changelog @@ -3,6 +3,7 @@ ### Improvements in Availability - Fixed bug that caused a random deadlock in the Observables block, preventing the computation of PVT fixes. +- Fixed bug in Galileo INAV message decoding when PLL is locked at 180 degrees, which prevented from correct navigation message decoding in some situations. ### Improvements in Efficiency @@ -42,6 +43,7 @@ - The receiver now admits FPGA off-loading, allowing for real time operation at high sampling rates and higher number of signals and channels. - Fixed program termination (avoiding hangs and segfaults in some platforms/configurations). - CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory. +- New parameter PVT.show_local_time_zone displays time in the local time zone. Subject to the proper system configuration of the machine running the software receiver. - Improved information provided to the user in case of failure. From ba73da0081df35a4182f13c2dfb51cd197757bb0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 16 Mar 2019 13:44:53 +0100 Subject: [PATCH 08/15] Clean includes --- src/algorithms/libs/rtklib/rtklib_rtkcmn.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc index 35c7b3939..83935ef39 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc @@ -51,7 +51,6 @@ *----------------------------------------------------------------------------*/ #include "rtklib_rtkcmn.h" -//#include #include #include #include From 4c718643195216c1e56d0db4ab6bf13584a24086 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 16 Mar 2019 20:30:38 +0100 Subject: [PATCH 09/15] Fix for gcc < 5.0 --- src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt | 12 ++++++++++++ src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt index 936f4c05f..69dd5c022 100644 --- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -58,6 +58,18 @@ if(Boost_VERSION LESS 105800) target_compile_definitions(pvt_gr_blocks PRIVATE -DOLD_BOOST=1) endif() +# Check if we have std::put_time (Workaround for gcc < 5.0) +include(CheckCXXSourceCompiles) +check_cxx_source_compiles(" + #include + int main() + { std::put_time(nullptr, \"\"); }" + HAS_PUT_TIME +) +if(${HAS_PUT_TIME}) + target_compile_definitions(pvt_gr_blocks PRIVATE -DHAS_PUT_TIME=1) +endif() + set_property(TARGET pvt_gr_blocks APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $ diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 09e49a576..22915cca5 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -369,7 +369,9 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, time_t when = std::time(nullptr); auto const tm = *std::localtime(&when); std::ostringstream os; +#ifdef HAS_PUT_TIME os << std::put_time(&tm, "%z"); +#endif std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM" if (utc_diff_str.empty()) { @@ -379,7 +381,9 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, int m = std::stoi(utc_diff_str[0] + utc_diff_str.substr(3), nullptr, 10); d_utc_diff_time = boost::posix_time::hours(h) + boost::posix_time::minutes(m); std::ostringstream os2; +#ifdef HAS_PUT_TIME os2 << std::put_time(&tm, "%Z"); +#endif std::string time_zone_abrv = os2.str(); if (time_zone_abrv.empty()) { From 8e7b641fa324ef8445932f5d49270620934fb36f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 17 Mar 2019 01:24:26 +0100 Subject: [PATCH 10/15] Add .pydevproject file, created by Eclipse PyDev, to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a128f1558..96a025531 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ thirdparty/ cmake-build-debug/ /install .DS_Store +.pydevproject From e6931eb86d2854cc47fac0e3db492dcecf827ec3 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 17 Mar 2019 02:26:34 +0100 Subject: [PATCH 11/15] Add header, minor cleaning --- src/algorithms/libs/rtklib/rtklib.h | 7 +-- src/algorithms/libs/rtklib/rtklib_ionex.cc | 2 +- src/algorithms/libs/rtklib/rtklib_rtkcmn.h | 2 +- src/algorithms/libs/rtklib/rtklib_rtksvr.cc | 52 +++++++++++++++++++++ 4 files changed, 55 insertions(+), 8 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib.h b/src/algorithms/libs/rtklib/rtklib.h index f4305a75a..1b8cd9cbe 100644 --- a/src/algorithms/libs/rtklib/rtklib.h +++ b/src/algorithms/libs/rtklib/rtklib.h @@ -193,12 +193,7 @@ const int NSATGLO = 0; const int NSYSGLO = 0; #endif -/* -const int MINPRNGLO = 1; //!< min satellite slot number of GLONASS -const int MAXPRNGLO = 27; //!< max satellite slot number of GLONASS -const int NSATGLO = (MAXPRNGLO - MINPRNGLO + 1); //!< number of GLONASS satellites -const int NSYSGLO = 1; -*/ + const int MINPRNGAL = 1; //!< min satellite PRN number of Galileo const int MAXPRNGAL = 36; //!< max satellite PRN number of Galileo const int NSATGAL = (MAXPRNGAL - MINPRNGAL + 1); //!< number of Galileo satellites diff --git a/src/algorithms/libs/rtklib/rtklib_ionex.cc b/src/algorithms/libs/rtklib/rtklib_ionex.cc index 8ba2bb950..8b8d39ade 100644 --- a/src/algorithms/libs/rtklib/rtklib_ionex.cc +++ b/src/algorithms/libs/rtklib/rtklib_ionex.cc @@ -1,5 +1,5 @@ /*! - * \file rtklib_ionex.h + * \file rtklib_ionex.cc * \brief ionex functions * \authors
    *
  • 2007-2013, T. Takasu diff --git a/src/algorithms/libs/rtklib/rtklib_rtkcmn.h b/src/algorithms/libs/rtklib/rtklib_rtkcmn.h index 8fbde5a88..8f98bfeb0 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkcmn.h +++ b/src/algorithms/libs/rtklib/rtklib_rtkcmn.h @@ -79,7 +79,7 @@ #define GNSS_SDR_RTKLIB_RTKCMN_H_ #include "rtklib.h" -//#include + /* coordinate rotation matrix ------------------------------------------------*/ #define Rx(t, X) \ diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 8b2e00833..2943c8be2 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -1,3 +1,55 @@ +/*! + * \file rtklib_rtksvr.cc + * \brief rtk server functions + * \authors
      + *
    • 2007-2013, T. Takasu + *
    • 2017, Javier Arribas + *
    • 2017, Carles Fernandez + *
    + * + * This is a derived work from RTKLIB http://www.rtklib.com/ + * The original source code at https://github.com/tomojitakasu/RTKLIB is + * released under the BSD 2-clause license with an additional exclusive clause + * that does not apply here. This additional clause is reproduced below: + * + * " The software package includes some companion executive binaries or shared + * libraries necessary to execute APs on Windows. These licenses succeed to the + * original ones of these software. " + * + * Neither the executive binaries nor the shared libraries are required by, used + * or included in GNSS-SDR. + * + * ------------------------------------------------------------------------- + * Copyright (C) 2007-2013, T. Takasu + * Copyright (C) 2017, Javier Arribas + * Copyright (C) 2017, Carles Fernandez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + *----------------------------------------------------------------------------*/ #include "rtklib_rtksvr.h" #include "rtklib_preceph.h" From 99c616e9028097d9895e306dc4ec79c3aef9cb7b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 17 Mar 2019 10:27:30 +0100 Subject: [PATCH 12/15] Use lowercase for test name --- src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt index 69dd5c022..37f5de8fe 100644 --- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -64,9 +64,9 @@ check_cxx_source_compiles(" #include int main() { std::put_time(nullptr, \"\"); }" - HAS_PUT_TIME + has_put_time ) -if(${HAS_PUT_TIME}) +if(${has_put_time}) target_compile_definitions(pvt_gr_blocks PRIVATE -DHAS_PUT_TIME=1) endif() From d6e2750fac80b2928788886ff91e86f78c3bb415 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 17 Mar 2019 10:31:17 +0100 Subject: [PATCH 13/15] Document option --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e26aa7688..f9a035feb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ add_feature_info(ENABLE_FPGA ENABLE_FPGA "Enables building of processing blocks # Building and packaging options option(ENABLE_GENERIC_ARCH "Builds a portable binary" OFF) +add_feature_info(ENABLE_GENERIC_ARCH ENABLE_GENERIC_ARCH "When disabled, flags such as '-march=native' are passed to the compiler.") option(ENABLE_PACKAGING "Enable software packaging" OFF) add_feature_info(ENABLE_PACKAGING ENABLE_PACKAGING "Enables software packaging.") From 5e5e76bb248c8a4f6f3a02f6e22a77feb57ba610 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 17 Mar 2019 13:53:31 +0100 Subject: [PATCH 14/15] Uniformize header guard names --- src/algorithms/telemetry_decoder/libs/libswiftcnav/bits.h | 6 +++--- .../telemetry_decoder/libs/libswiftcnav/cnav_msg.h | 6 +++--- src/algorithms/telemetry_decoder/libs/libswiftcnav/edc.h | 6 +++--- src/algorithms/telemetry_decoder/libs/libswiftcnav/fec.h | 4 ++-- .../telemetry_decoder/libs/libswiftcnav/swift_common.h | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/algorithms/telemetry_decoder/libs/libswiftcnav/bits.h b/src/algorithms/telemetry_decoder/libs/libswiftcnav/bits.h index 11f5e512e..9bedf6167 100644 --- a/src/algorithms/telemetry_decoder/libs/libswiftcnav/bits.h +++ b/src/algorithms/telemetry_decoder/libs/libswiftcnav/bits.h @@ -29,8 +29,8 @@ * along with this program. If not, see . */ -#ifndef LIBSWIFTNAV_BITS_H -#define LIBSWIFTNAV_BITS_H +#ifndef GNSS_SDR_BITS_H_ +#define GNSS_SDR_BITS_H_ #include "swift_common.h" @@ -47,4 +47,4 @@ uint8_t count_bits_u32(uint32_t v, uint8_t bv); uint8_t count_bits_u16(uint16_t v, uint8_t bv); uint8_t count_bits_u8(uint8_t v, uint8_t bv); -#endif /* LIBSWIFTNAV_BITS_H */ +#endif /* GNSS_SDR_BITS_H_ */ diff --git a/src/algorithms/telemetry_decoder/libs/libswiftcnav/cnav_msg.h b/src/algorithms/telemetry_decoder/libs/libswiftcnav/cnav_msg.h index 9e4bdd65f..39d412230 100644 --- a/src/algorithms/telemetry_decoder/libs/libswiftcnav/cnav_msg.h +++ b/src/algorithms/telemetry_decoder/libs/libswiftcnav/cnav_msg.h @@ -30,8 +30,8 @@ */ -#ifndef LIBSWIFTNAV_CNAV_MSG_H -#define LIBSWIFTNAV_CNAV_MSG_H +#ifndef GNSS_SDR_CNAV_MSG_H_ +#define GNSS_SDR_CNAV_MSG_H_ #include "fec.h" #include "swift_common.h" @@ -117,4 +117,4 @@ bool cnav_msg_decoder_add_symbol(cnav_msg_decoder_t *dec, /** \} */ /** \} */ -#endif /* LIBSWIFTNAV_CNAV_MSG_H */ +#endif /* GNSS_SDR_CNAV_MSG_H_ */ diff --git a/src/algorithms/telemetry_decoder/libs/libswiftcnav/edc.h b/src/algorithms/telemetry_decoder/libs/libswiftcnav/edc.h index 03a4022a7..55e27fa1e 100644 --- a/src/algorithms/telemetry_decoder/libs/libswiftcnav/edc.h +++ b/src/algorithms/telemetry_decoder/libs/libswiftcnav/edc.h @@ -30,12 +30,12 @@ */ -#ifndef LIBSWIFTNAV_EDC_H -#define LIBSWIFTNAV_EDC_H +#ifndef GNSS_SDR_EDC_H_ +#define GNSS_SDR_EDC_H_ #include "swift_common.h" uint32_t crc24q(const uint8_t *buf, uint32_t len, uint32_t crc); uint32_t crc24q_bits(uint32_t crc, const uint8_t *buf, uint32_t n_bits, bool invert); -#endif /* LIBSWIFTNAV_EDC_H */ +#endif /* GNSS_SDR_EDC_H_ */ diff --git a/src/algorithms/telemetry_decoder/libs/libswiftcnav/fec.h b/src/algorithms/telemetry_decoder/libs/libswiftcnav/fec.h index f00e88e68..8a594ecc9 100644 --- a/src/algorithms/telemetry_decoder/libs/libswiftcnav/fec.h +++ b/src/algorithms/telemetry_decoder/libs/libswiftcnav/fec.h @@ -29,8 +29,8 @@ */ -#ifndef LIBSWIFTNAV_FEC_H_ -#define LIBSWIFTNAV_FEC_H_ +#ifndef GNSS_SDR_FEC_H_ +#define GNSS_SDR_FEC_H_ /* r=1/2 k=7 convolutional encoder polynomials * The NASA-DSN convention is to use V27POLYA inverted, then V27POLYB diff --git a/src/algorithms/telemetry_decoder/libs/libswiftcnav/swift_common.h b/src/algorithms/telemetry_decoder/libs/libswiftcnav/swift_common.h index 3b83f3034..f98fa538f 100644 --- a/src/algorithms/telemetry_decoder/libs/libswiftcnav/swift_common.h +++ b/src/algorithms/telemetry_decoder/libs/libswiftcnav/swift_common.h @@ -32,8 +32,8 @@ */ -#ifndef LIBSWIFTNAV_COMMON_H -#define LIBSWIFTNAV_COMMON_H +#ifndef GNSS_SDR_SWIFT_COMMON_H_ +#define GNSS_SDR_SWIFT_COMMON_H_ /** \defgroup common Common definitions * Common definitions used throughout the library. @@ -50,4 +50,4 @@ /** \} */ -#endif /* LIBSWIFTNAV_COMMON_H */ +#endif /* GNSS_SDR_SWIFT_COMMON_H_ */ From b409f1c15efdd3c80fde680f4b5b966a1c18467b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 17 Mar 2019 14:07:42 +0100 Subject: [PATCH 15/15] Fix copyright year --- src/core/system_parameters/Beidou_B1I.h | 2 +- src/core/system_parameters/beidou_dnav_navigation_message.cc | 2 +- src/core/system_parameters/beidou_dnav_navigation_message.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/system_parameters/Beidou_B1I.h b/src/core/system_parameters/Beidou_B1I.h index bf2066ce7..312a9a0a2 100644 --- a/src/core/system_parameters/Beidou_B1I.h +++ b/src/core/system_parameters/Beidou_B1I.h @@ -5,7 +5,7 @@ * \author Damian Miralles, 2018. dmiralles2009@gmail.com * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver diff --git a/src/core/system_parameters/beidou_dnav_navigation_message.cc b/src/core/system_parameters/beidou_dnav_navigation_message.cc index 40cabe10a..6ff21b7d3 100644 --- a/src/core/system_parameters/beidou_dnav_navigation_message.cc +++ b/src/core/system_parameters/beidou_dnav_navigation_message.cc @@ -7,7 +7,7 @@ * \author Damian Miralles, 2018. dmiralles2009@gmail.com * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver diff --git a/src/core/system_parameters/beidou_dnav_navigation_message.h b/src/core/system_parameters/beidou_dnav_navigation_message.h index f2ca11e39..64bac3506 100644 --- a/src/core/system_parameters/beidou_dnav_navigation_message.h +++ b/src/core/system_parameters/beidou_dnav_navigation_message.h @@ -6,7 +6,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver