From 16c0d5a2c8b19c3d1318472ab00d84f6e1099aa1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 07:23:43 +0100 Subject: [PATCH 01/12] Small fix --- src/algorithms/libs/rtklib/rtklib_rtksvr.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 0c2aabedf..23d1c188a 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -357,7 +357,7 @@ void decodefile(rtksvr_t *svr, int index) sbsigp_t sbsigp0[MAXNIGP] = {{{0, 0.0}, 0, 0, 0, 0.0 }}; sbsion_t sbsion0[MAXBAND+1] = {{0, 0, {*sbsigp0} }}; dgps_t dgps0[MAXSAT] = { {{0, 0.0}, 0.0, 0.0, 0, 0.0 }}; - ssr_t ssr0[MAXSAT] = {{ {{0, 0.0}}, {0.0}, {0}, 0, 0, 0, 0, {0.0}, {0.0}, {0.0}, 0.0, {0.0}, {0.0}, {0.0}, 0.0, 0.0, '0' }}; + ssr_t ssr0[MAXSAT] = {{ {{0, 0.0}}, {0.0}, {0}, 0, 0, 0, 0, {0.0}, {0.0}, {0.0}, 0.0, {0.0}, {0.0}, {0.0}, 0.0, 0.0, {'0'} }}; lexeph_t lexeph0[MAXSAT] = {{ {0,0.0}, {0,0.0}, 0, 0, 0, {0.0}, {0.0}, {0.0}, {0.0}, 0.0, 0.0, 0.0, {0.0} }}; stec_t stec0[MAXSTA] = {{ {0,0.0}, 0, 0.0, 0.0, {0.0}, 0}}; trop_t trop0[MAXSTA] = {{ {0, 0.0}, {0.0}, {0.0}}}; @@ -365,8 +365,8 @@ void decodefile(rtksvr_t *svr, int index) nav_t nav = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, (erpd_t *){0}}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, - {0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0},{0.0}}, {{0.0},{0.0}}, {{0.0},{0.0},{0.0}}, - {0.0}, {0.0}, '0', {*pcvt0}, sbssat0, {*sbsion0}, {*dgps0}, {*ssr0}, {*lexeph0}, + {0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0},{0.0}}, {{0.0},{0.0}}, {{0.0}, {0.0}, {0.0}}, + {0.0}, {0.0}, {'0'}, {*pcvt0}, sbssat0, {*sbsion0}, {*dgps0}, {*ssr0}, {*lexeph0}, {{0,0.0}, 0.0, {0.0}, {{0.0},{0.0}} }, pppcorr0} ; char file[1024]; From 3ad5a99d0ab5413ebdee86f987a1074c27d5d7fb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 07:24:23 +0100 Subject: [PATCH 02/12] Use const iterators instead of iterators --- .../gnuradio_blocks/hybrid_observables_cc.cc | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc index 45cc3a3fc..9bc7f7e00 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc @@ -179,12 +179,11 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused { channel_history_ok = false; } - } if (channel_history_ok == true) { - std::map::iterator gnss_synchro_map_iter; - std::deque::iterator gnss_synchro_deque_iter; + std::map::const_iterator gnss_synchro_map_iter; + std::deque::const_iterator gnss_synchro_deque_iter; // 1. If the RX time is not set, set the Rx time if (T_rx_s == 0) @@ -196,8 +195,8 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused gnss_synchro_map.insert(std::pair(d_gnss_synchro_history_queue[i].front().Channel_ID, d_gnss_synchro_history_queue[i].front())); } - gnss_synchro_map_iter = min_element(gnss_synchro_map.begin(), - gnss_synchro_map.end(), + gnss_synchro_map_iter = min_element(gnss_synchro_map.cbegin(), + gnss_synchro_map.cend(), Hybrid_pairCompare_gnss_synchro_sample_counter); T_rx_s = static_cast(gnss_synchro_map_iter->second.Tracking_sample_counter) / static_cast(gnss_synchro_map_iter->second.fs); T_rx_s = floor(T_rx_s * 1000.0) / 1000.0; // truncate to ms @@ -210,11 +209,11 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused // shift channels history to match the reference TOW for (unsigned int i = 0; i < d_nchannels; i++) { - gnss_synchro_deque_iter = std::lower_bound(d_gnss_synchro_history_queue[i].begin(), - d_gnss_synchro_history_queue[i].end(), + gnss_synchro_deque_iter = std::lower_bound(d_gnss_synchro_history_queue[i].cbegin(), + d_gnss_synchro_history_queue[i].cend(), T_rx_s, Hybrid_valueCompare_gnss_synchro_receiver_time); - if (gnss_synchro_deque_iter != d_gnss_synchro_history_queue[i].end()) + if (gnss_synchro_deque_iter != d_gnss_synchro_history_queue[i].cend()) { if (gnss_synchro_deque_iter->Flag_valid_word == true) { @@ -226,10 +225,10 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused { // record the word structure in a map for pseudorange computation // save the previous observable - int distance = std::distance(d_gnss_synchro_history_queue[i].begin(), gnss_synchro_deque_iter); + int distance = std::distance(d_gnss_synchro_history_queue[i].cbegin(), gnss_synchro_deque_iter); if (distance > 0) { - if (d_gnss_synchro_history_queue[i].at(distance-1).Flag_valid_word) + if (d_gnss_synchro_history_queue[i].at(distance - 1).Flag_valid_word) { double T_rx_channel_prev = static_cast(d_gnss_synchro_history_queue[i].at(distance - 1).Tracking_sample_counter) / static_cast(gnss_synchro_deque_iter->fs); double delta_T_rx_s_prev = T_rx_channel_prev - T_rx_s; @@ -268,8 +267,8 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused * common RX time algorithm */ // what is the most recent symbol TOW in the current set? -> this will be the reference symbol - gnss_synchro_map_iter = max_element(realigned_gnss_synchro_map.begin(), - realigned_gnss_synchro_map.end(), + gnss_synchro_map_iter = max_element(realigned_gnss_synchro_map.cbegin(), + realigned_gnss_synchro_map.cend(), Hybrid_pairCompare_gnss_synchro_d_TOW); double ref_fs_hz = static_cast(gnss_synchro_map_iter->second.fs); @@ -292,7 +291,7 @@ int hybrid_observables_cc::general_work (int noutput_items __attribute__((unused double channel_T_rx_s; double channel_fs_hz; double channel_TOW_s; - for(gnss_synchro_map_iter = realigned_gnss_synchro_map.begin(); gnss_synchro_map_iter != realigned_gnss_synchro_map.end(); gnss_synchro_map_iter++) + for(gnss_synchro_map_iter = realigned_gnss_synchro_map.cbegin(); gnss_synchro_map_iter != realigned_gnss_synchro_map.cend(); gnss_synchro_map_iter++) { channel_fs_hz = static_cast(gnss_synchro_map_iter->second.fs); channel_TOW_s = gnss_synchro_map_iter->second.TOW_at_current_symbol_s; From ffde1309b9f3267236a21e7e77209f3a23d71683 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 11:23:41 +0100 Subject: [PATCH 03/12] Fix compilation error --- src/algorithms/libs/rtklib/rtklib_rtksvr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 23d1c188a..9026c5db2 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -357,7 +357,7 @@ void decodefile(rtksvr_t *svr, int index) sbsigp_t sbsigp0[MAXNIGP] = {{{0, 0.0}, 0, 0, 0, 0.0 }}; sbsion_t sbsion0[MAXBAND+1] = {{0, 0, {*sbsigp0} }}; dgps_t dgps0[MAXSAT] = { {{0, 0.0}, 0.0, 0.0, 0, 0.0 }}; - ssr_t ssr0[MAXSAT] = {{ {{0, 0.0}}, {0.0}, {0}, 0, 0, 0, 0, {0.0}, {0.0}, {0.0}, 0.0, {0.0}, {0.0}, {0.0}, 0.0, 0.0, {'0'} }}; + ssr_t ssr0[MAXSAT] = {{ {{0, 0.0}}, {0.0}, {0}, 0, 0, 0, 0, {0.0}, {0.0}, {0.0}, 0.0, {0.0}, {0.0}, {0.0}, 0.0, 0.0, '0' }}; lexeph_t lexeph0[MAXSAT] = {{ {0,0.0}, {0,0.0}, 0, 0, 0, {0.0}, {0.0}, {0.0}, {0.0}, 0.0, 0.0, 0.0, {0.0} }}; stec_t stec0[MAXSTA] = {{ {0,0.0}, 0, 0.0, 0.0, {0.0}, 0}}; trop_t trop0[MAXSTA] = {{ {0, 0.0}, {0.0}, {0.0}}}; From e7143f932a5950346924fdb754b499b99f4cb9cc Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Tue, 31 Oct 2017 12:36:35 +0100 Subject: [PATCH 04/12] Add includes for gnuradio-iio in block factory --- src/core/receiver/CMakeLists.txt | 102 ++++++++++++++++--------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt index ae6908495..623a0dc39 100644 --- a/src/core/receiver/CMakeLists.txt +++ b/src/core/receiver/CMakeLists.txt @@ -41,6 +41,58 @@ if(ENABLE_FPGA) endif(ENABLE_FPGA) +if(Boost_VERSION LESS 105000) + add_definitions(-DOLD_BOOST=1) +endif(Boost_VERSION LESS 105000) + +if(OPENSSL_FOUND) + add_definitions( -DUSE_OPENSSL_FALLBACK=1 ) +endif(OPENSSL_FOUND) + +if(ENABLE_GN3S) + add_definitions(-DGN3S_DRIVER=1) +endif(ENABLE_GN3S) + +if(ENABLE_ARRAY) + add_definitions(-DRAW_ARRAY_DRIVER=1) +endif(ENABLE_ARRAY) + +if(ENABLE_FLEXIBAND) + add_definitions(-DFLEXIBAND_DRIVER=1) +endif(ENABLE_FLEXIBAND) + +if(ENABLE_OSMOSDR) + if(GROSMOSDR_FOUND) + add_definitions(-DOSMOSDR_DRIVER=1) + endif(GROSMOSDR_FOUND) +endif(ENABLE_OSMOSDR) + +if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) + add_definitions(-DUHD_DRIVER=1) +endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) + +#Enable OpenCL if found in the system +if(OPENCL_FOUND) + message(STATUS "Adding processing blocks implemented using OpenCL" ) + add_definitions(-DOPENCL_BLOCKS=1) +else(OPENCL_FOUND) + add_definitions(-DOPENCL_BLOCKS=0) +endif(OPENCL_FOUND) + +#enable SDR Hardware based on fmcomms2 +if(ENABLE_PLUTOSDR) + add_definitions(-DPLUTOSDR_DRIVER=1) + set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) +endif(ENABLE_PLUTOSDR) + +if(ENABLE_FMCOMMS2) + add_definitions(-DFMCOMMS2_DRIVER=1) + set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) +endif(ENABLE_FMCOMMS2) + +add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}") + + include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/core/system_parameters @@ -86,56 +138,6 @@ include_directories( ${VOLK_GNSSSDR_INCLUDE_DIRS} ) -if(Boost_VERSION LESS 105000) - add_definitions(-DOLD_BOOST=1) -endif(Boost_VERSION LESS 105000) - -if(OPENSSL_FOUND) - add_definitions( -DUSE_OPENSSL_FALLBACK=1 ) -endif(OPENSSL_FOUND) - -if(ENABLE_GN3S) - add_definitions(-DGN3S_DRIVER=1) -endif(ENABLE_GN3S) - -if(ENABLE_ARRAY) - add_definitions(-DRAW_ARRAY_DRIVER=1) -endif(ENABLE_ARRAY) - -if(ENABLE_FLEXIBAND) - add_definitions(-DFLEXIBAND_DRIVER=1) -endif(ENABLE_FLEXIBAND) - -if(ENABLE_OSMOSDR) - if(GROSMOSDR_FOUND) - add_definitions(-DOSMOSDR_DRIVER=1) - endif(GROSMOSDR_FOUND) -endif(ENABLE_OSMOSDR) - -if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) - add_definitions(-DUHD_DRIVER=1) -endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd) - -#Enable OpenCL if found in the system -if(OPENCL_FOUND) - message(STATUS "Adding processing blocks implemented using OpenCL" ) - add_definitions(-DOPENCL_BLOCKS=1) -else(OPENCL_FOUND) - add_definitions(-DOPENCL_BLOCKS=0) -endif(OPENCL_FOUND) - -#enable SDR Hardware based on fmcomms2 -if(ENABLE_PLUTOSDR) - add_definitions(-DPLUTOSDR_DRIVER=1) -endif(ENABLE_PLUTOSDR) - -if(ENABLE_FMCOMMS2) - add_definitions(-DFMCOMMS2_DRIVER=1) - add_definitions(-DPLUTOSDR_DRIVER=1) -endif(ENABLE_FMCOMMS2) - -add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}") - file(GLOB GNSS_RECEIVER_HEADERS "*.h") list(SORT GNSS_RECEIVER_HEADERS) file(GLOB GNSS_RECEIVER_INTERFACE_HEADERS "../interfaces/*.h") From 0054f1c5f8e9c7dde703bb5e2ce828d960adf464 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 12:45:09 +0100 Subject: [PATCH 05/12] Fix compilation --- cmake/Modules/Findiio.cmake | 32 +++++++++++++++++++ .../signal_source/adapters/CMakeLists.txt | 2 +- .../adapters/plutosdr_signal_source.cc | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 cmake/Modules/Findiio.cmake diff --git a/cmake/Modules/Findiio.cmake b/cmake/Modules/Findiio.cmake new file mode 100644 index 000000000..1daf4d12e --- /dev/null +++ b/cmake/Modules/Findiio.cmake @@ -0,0 +1,32 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_IIO gnuradio-iio) + +FIND_PATH( + IIO_INCLUDE_DIRS + NAMES iio/api.h + HINTS $ENV{IIO_DIR}/include + ${PC_IIO_INCLUDEDIR} + PATHS ${CMAKE_INSTALL_PREFIX}/include + /usr/local/include + /usr/include + ${CMAKE_INSTALL_PREFIX}/include/gnuradio + /usr/local/include/gnuradio + /usr/include/gnuradio +) + +FIND_LIBRARY( + IIO_LIBRARIES + NAMES gnuradio-iio + HINTS $ENV{IIO_DIR}/lib + ${PC_IIO_LIBDIR} + PATHS ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_INSTALL_PREFIX}/lib64 + /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(IIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS) +MARK_AS_ADVANCED(IIO_LIBRARIES IIO_INCLUDE_DIRS) diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index 009f56433..822b483d4 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -47,7 +47,7 @@ if(ENABLE_FMCOMMS2) else(NOT IIO_FOUND) set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) - set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc plutosdr_signal_source.cc) + set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc) endif(NOT IIO_FOUND) endif(ENABLE_FMCOMMS2) diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc index 64d59a113..d0926dc56 100644 --- a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc +++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc @@ -51,7 +51,7 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration std::string default_dump_file = "./data/signal_source.dat"; uri_ = configuration->property(role + ".device_address", std::string("192.168.2.1")); freq_ = configuration->property(role + ".freq", GPS_L1_FREQ_HZ); - sample_rate_ configuration->property(role + ".sampling_frequency", 3000000); + sample_rate_ = configuration->property(role + ".sampling_frequency", 3000000); bandwidth_ = configuration->property(role + ".bandwidth", 2000000); buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000); decimation_ = configuration->property(role + ".decimation", 1); From 462de44be4c6b5cedb7138527f1d994e1d3eb958 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 13:05:15 +0100 Subject: [PATCH 06/12] Fix compilation --- cmake/Modules/Findiio.cmake | 5 +---- .../signal_source/adapters/fmcomms2_signal_source.h | 4 ++-- .../signal_source/adapters/plutosdr_signal_source.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cmake/Modules/Findiio.cmake b/cmake/Modules/Findiio.cmake index 1daf4d12e..817e9f9f7 100644 --- a/cmake/Modules/Findiio.cmake +++ b/cmake/Modules/Findiio.cmake @@ -3,15 +3,12 @@ PKG_CHECK_MODULES(PC_IIO gnuradio-iio) FIND_PATH( IIO_INCLUDE_DIRS - NAMES iio/api.h + NAMES gnuradio/iio/api.h HINTS $ENV{IIO_DIR}/include ${PC_IIO_INCLUDEDIR} PATHS ${CMAKE_INSTALL_PREFIX}/include /usr/local/include /usr/include - ${CMAKE_INSTALL_PREFIX}/include/gnuradio - /usr/local/include/gnuradio - /usr/include/gnuradio ) FIND_LIBRARY( diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h index 0672770f5..35c1e2541 100644 --- a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h +++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.h @@ -1,6 +1,6 @@ /*! * \file fmcomms2_signal_source.h - * \brief Interface to use SDR hardware based in FMCOMMS2 driver from analog + * \brief Interface to use SDR hardware based in FMCOMMS2 driver from analog * devices, for example FMCOMMS4 and ADALM-PLUTO (PlutoSdr) * \author Rodrigo Muñoz, 2017. rmunozl(at)inacap.cl * @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "gnss_block_interface.h" class ConfigurationInterface; diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.h b/src/algorithms/signal_source/adapters/plutosdr_signal_source.h index 79a310089..9bbdb4511 100644 --- a/src/algorithms/signal_source/adapters/plutosdr_signal_source.h +++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include "gnss_block_interface.h" class ConfigurationInterface; From c70f7b504add41674b8566828cd96f33a3cf5f6a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 15:40:14 +0100 Subject: [PATCH 07/12] Fix RINEX version --- CMakeLists.txt | 2 +- src/algorithms/PVT/libs/rinex_printer.cc | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30d4f6eaf..042f386db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Tele option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) -option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware" OFF) +option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) # Performance analysis tools option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF) diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index 4631270d2..7de3391c9 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -182,8 +182,15 @@ Rinex_Printer::Rinex_Printer(int conf_version) if(conf_version != 0) { if(conf_version == 2) - version = 2; - stringVersion = "2.11"; + { + 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 From 647a27a1924c39ef59518589ac2843c7703d9c9a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 16:02:18 +0100 Subject: [PATCH 08/12] Avoid possible duplication of linked libraries Add installation pointers for gnuradio-iio --- .../signal_source/adapters/CMakeLists.txt | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index 822b483d4..870d6537b 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -21,34 +21,40 @@ list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS) # Optional drivers +if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) + find_package(iio REQUIRED) + if(NOT IIO_FOUND) + message(STATUS "gnuradio-iio not found, its installation is required.") + message(STATUS "Please build and install the following projects:") + message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") + message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") + message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio") + message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled") + endif(NOT IIO_FOUND) + set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) + set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) +endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) + if(ENABLE_PLUTOSDR) ############################################## # ADALM-PLUTO (Analog Devices Inc.) ############################################## - find_package(iio REQUIRED) - if(NOT IIO_FOUND) - message("gnuradio-iio not found, installation is required") - message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled") - else(NOT IIO_FOUND) - set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) - set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) + if(IIO_FOUND) + #set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) + #set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc) - endif(NOT IIO_FOUND) + endif(IIO_FOUND) endif(ENABLE_PLUTOSDR) if(ENABLE_FMCOMMS2) ############################################### # FMCOMMS2 based SDR Hardware ############################################### - find_package(iio REQUIRED) - if(NOT IIO_FOUND) - message("gnuradio-iio not found, installation is required") - message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled") - else(NOT IIO_FOUND) - set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) - set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) + if(IIO_FOUND) + #set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) + #set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc) - endif(NOT IIO_FOUND) + endif(IIO_FOUND) endif(ENABLE_FMCOMMS2) if(ENABLE_GN3S) @@ -134,7 +140,7 @@ set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc gen_signal_source.cc nsr_file_signal_source.cc spir_file_signal_source.cc - rtl_tcp_signal_source.cc + rtl_tcp_signal_source.cc ${OPT_DRIVER_SOURCES} ) From afb3aa14f62050bfcd215fc145d3a094198c85dd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 31 Oct 2017 16:03:41 +0100 Subject: [PATCH 09/12] Remove commented lines --- src/algorithms/signal_source/adapters/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index 870d6537b..bac9aee3d 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -35,28 +35,27 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) + if(ENABLE_PLUTOSDR) ############################################## # ADALM-PLUTO (Analog Devices Inc.) ############################################## if(IIO_FOUND) - #set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) - #set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc) endif(IIO_FOUND) endif(ENABLE_PLUTOSDR) + if(ENABLE_FMCOMMS2) ############################################### # FMCOMMS2 based SDR Hardware ############################################### if(IIO_FOUND) - #set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) - #set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc) endif(IIO_FOUND) endif(ENABLE_FMCOMMS2) + if(ENABLE_GN3S) ############################################## # GN3S (USB dongle) From a9be24420e619f79d4bd96abcfd53b44acc77fd3 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 1 Nov 2017 20:49:10 +0100 Subject: [PATCH 10/12] Fix typo --- .../signal_source/adapters/fmcomms2_signal_source.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc index 26640d840..ce2c14a89 100644 --- a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc +++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc @@ -78,7 +78,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration std::cout << "LO frequency : " << freq_ << "Hz" << std::endl; std::cout << "sample rate: " << sample_rate_ << "Hz" << std::endl; - if(item_type_.compare("gr_complex")==0) + if(item_type_.compare("gr_complex") == 0) { fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make( uri_.c_str(), freq_, sample_rate_, @@ -92,7 +92,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration } else { - LOG(FATAL) << "Exception: item type " << item_type_ << " not suported!"; + LOG(FATAL) << "Exception: item type " << item_type_ << " not supported!"; } if (samples_ != 0) From 36200183d204edb2b8481b4a34cdbc012279a98a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 1 Nov 2017 20:50:20 +0100 Subject: [PATCH 11/12] Simplify installation instructions for gr-iio --- README.md | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6935a4067..ca3ae78e3 100644 --- a/README.md +++ b/README.md @@ -373,51 +373,38 @@ $ sudo make install Install the [libiio](https://github.com/analogdevicesinc/libiio.git) (>=v0.11), [libad9361](https://github.com/analogdevicesinc/libad9361-iio.git) (>=v0.1-1) libraries and [gr-iio](https://github.com/analogdevicesinc/gr-iio.git) (>=v0.2) gnuradio block. For example in Ubuntu 16.04 follow these instructions (based on https://github.com/blurbdust/blurbdust.github.io): ~~~~~~ +$ sudo apt-get install libxml2-dev bison flex $ git clone https://github.com/analogdevicesinc/libiio.git $ cd libiio $ mkdir build $ cd build $ cmake .. -$ make -$ sudo make install -$ sudo ldconfig +$ make && sudo make install && sudo ldconfig +$ cd ../.. $ git clone https://github.com/analogdevicesinc/libad9361-iio.git $ cd libad9361-iio $ mkdir build $ cd build $ cmake .. -$ make -$ sudo make install -$ sudo ldconfig +$ make && sudo make install && sudo ldconfig +$ cd ../.. $ git clone https://github.com/analogdevicesinc/gr-iio.git $ cd gr-iio -$ mv include/gnuradio/iio include/iio -$ rm -r include/gnuradio -$ sed -i 's/gnuradio\/iio/iio/g' CMakeLists.txt -$ sed -i 's/gnuradio\/iio/iio/g' swig/* -$ sed -i 's/gnuradio\/iio/iio/g' include/iio/* -$ sed -i 's/gnuradio\/iio/iio/g' lib/* -$ sed -i 's/gnuradio\/iio/iio/g' python/iio/* -$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_pluto_sink.xml -$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_pluto_source.xml -$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_fmcomms2_sink.xml -$ sed -i 's/from\ gnuradio\ import\ iio/import\ iio/g' grc/iio_fmcomms2_source.xml $ mkdir build $ cd build -$ cmake .. -$ make -$ sudo make install -$ sudo ldconfig +$ cmake -DCMAKE_INSTALL_PREFIX=/usr .. +$ make && sudo make install && sudo ldconfig +$ cd ../.. ~~~~~~ -Then configure the gnss-sdr to build the `Fmcomms2_Signal_Source` and `Plutosdr_Signal_Source`: +Then configure the gnss-sdr to build the `Fmcomms2_Signal_Source` implementation: ~~~~~~ $ cmake -DENABLE_FMCOMMS2=ON ../ $ make $ sudo make install ~~~~~~ -or configure only `Plutosdr_Signal_Source`: +or configure it to build `Plutosdr_Signal_Source`: ~~~~~~ $ cmake -DENABLE_PLUTOSDR=ON ../ $ make From e636bba59a58a8e6648fc425953dfc3f8cc0cd39 Mon Sep 17 00:00:00 2001 From: Damian Miralles Date: Wed, 1 Nov 2017 21:05:40 -0600 Subject: [PATCH 12/12] position fix: First GLONASS position fix First GLONASS L1 C/A position fix using GNSS-SDR. Fixes bug in toe reporting for GLONASS and cleans up the code a bit. Small bug with RINEX file still present but achievement deserves its own commit. --- conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf | 2 +- .../libs/rtklib/rtklib_conversions.cc | 2 +- .../glonass_l1_ca_telemetry_decoder_cc.cc | 2 +- .../glonass_gnav_ephemeris.cc | 1 + .../glonass_gnav_navigation_message.cc | 87 +------------------ .../glonass_gnav_navigation_message.h | 57 ++++++------ 6 files changed, 34 insertions(+), 117 deletions(-) diff --git a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf index 4f5abda49..353ce620a 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf @@ -67,7 +67,7 @@ Observables.dump_filename=/archive/glo_observables.dat ;######### PVT CONFIG ############ PVT.implementation=RTKLIB_PVT -PVT.positioning_mode=PPP_Static +PVT.positioning_mode=Single PVT.output_rate_ms=100 PVT.display_rate_ms=500 PVT.trop_model=Saastamoinen diff --git a/src/algorithms/libs/rtklib/rtklib_conversions.cc b/src/algorithms/libs/rtklib/rtklib_conversions.cc index 8f267454c..4fca8081c 100644 --- a/src/algorithms/libs/rtklib/rtklib_conversions.cc +++ b/src/algorithms/libs/rtklib/rtklib_conversions.cc @@ -91,7 +91,7 @@ geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Glon rtklib_sat.age = static_cast(glonass_gnav_eph.d_Delta_tau_n); /* delay between L1 and L2 (s) */ // Time expressed in GPS Time but using RTKLib format - glonass_gnav_eph.glot_to_gpst(glonass_gnav_eph.d_tod, gnav_clock_model.d_tau_c, gnav_clock_model.d_tau_gps, &week, &sec); + glonass_gnav_eph.glot_to_gpst(glonass_gnav_eph.d_t_b, gnav_clock_model.d_tau_c, gnav_clock_model.d_tau_gps, &week, &sec); adj_week = adjgpsweek(static_cast(week)); rtklib_sat.toe = gpst2time(adj_week, sec); diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc index 34e72231b..166d6df17 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc @@ -355,7 +355,7 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attrib if (this->d_flag_preamble == true and d_nav.flag_TOW_new == true) //update TOW at the preamble instant { - d_TOW_at_current_symbol = floor((d_nav.gnav_ephemeris.d_TOW - GLONASS_GNAV_PREAMBLE_DURATION_S)*1000)/1000; + d_TOW_at_current_symbol = floor((d_nav.gnav_ephemeris.d_TOW-GLONASS_GNAV_PREAMBLE_DURATION_S)*1000)/1000; d_nav.flag_TOW_new = false; } diff --git a/src/core/system_parameters/glonass_gnav_ephemeris.cc b/src/core/system_parameters/glonass_gnav_ephemeris.cc index b1c9d2632..278cd5053 100644 --- a/src/core/system_parameters/glonass_gnav_ephemeris.cc +++ b/src/core/system_parameters/glonass_gnav_ephemeris.cc @@ -140,6 +140,7 @@ void Glonass_Gnav_Ephemeris::glot_to_gpst(double tod_offset, double glot2utc_cor sec_of_day = static_cast((glonass_time.time_of_day()).total_seconds()); total_sec = days*86400 + sec_of_day; + // GLONASST already includes leap second addition or deletion for (i = 0; GLONASS_LEAP_SECONDS[i][0]>0; i++) { if (d_yr >= GLONASS_LEAP_SECONDS[i][0]) diff --git a/src/core/system_parameters/glonass_gnav_navigation_message.cc b/src/core/system_parameters/glonass_gnav_navigation_message.cc index d87f49f8d..102b57dfb 100644 --- a/src/core/system_parameters/glonass_gnav_navigation_message.cc +++ b/src/core/system_parameters/glonass_gnav_navigation_message.cc @@ -315,78 +315,6 @@ unsigned int Glonass_Gnav_Navigation_Message::get_frame_number(unsigned int sate return frame_ID; } -double Glonass_Gnav_Navigation_Message::get_WN() -{ - double WN = 0.0; - double days = 0.0; - double total_sec = 0.0; - int i = 0; - - boost::gregorian::date gps_epoch { 1980, 1, 6 }; - // Map to UTC - boost::gregorian::date glo_date(gnav_ephemeris.d_yr, 1, 1); - boost::gregorian::days d2(gnav_ephemeris.d_N_T-1); - glo_date = glo_date + d2; - - - boost::posix_time::time_duration t(-6, 0, 0); - boost::posix_time::ptime glo_time(glo_date, t); - boost::gregorian::date utc_date = glo_time.date(); - - days = static_cast((utc_date - gps_epoch).days()); - total_sec = days*86400; - - for (i = 0; GLONASS_LEAP_SECONDS[i][0]>0; i++) - { - if (GLONASS_LEAP_SECONDS[i][0] == gnav_ephemeris.d_yr) - { - // We add the leap second when going from utc to gpst - total_sec += GLONASS_LEAP_SECONDS[i][6]; - } - } - - - WN = floor(total_sec/604800); - - return WN; -} - - -double Glonass_Gnav_Navigation_Message::get_TOW() -{ - double TOD = 0.0; - double TOW = 0.0; - double dayofweek = 0.0; - double utcsu2utc = 3*3600; - double glot2utcsu = 3*3600; - int i = 0; - - // tk is relative to UTC(SU) + 3.00 hrs, so we need to convert to utc and add corrections - // tk plus 10 sec is the true tod since get_TOW is called when in str5 - TOD = (gnav_ephemeris.d_t_k + 10) - glot2utcsu - utcsu2utc;// + gnav_utc_model.d_tau_c + gnav_utc_model.d_tau_gps; - - - boost::gregorian::date glo_date(gnav_ephemeris.d_yr, 1, 1); - boost::gregorian::days d2(gnav_ephemeris.d_N_T); - glo_date = glo_date + d2; - - dayofweek = static_cast(glo_date.day_of_week()); - TOW = TOD + dayofweek*86400; - - for (i = 0; GLONASS_LEAP_SECONDS[i][0]>0; i++) - { - if (gnav_ephemeris.d_yr >= GLONASS_LEAP_SECONDS[i][0]) - { - // We add the leap second when going from utc to gpst - TOW += fabs(GLONASS_LEAP_SECONDS[i][6]); - } - } - // Compute the arithmetic modules to wrap around range - TOW = TOW - 604800*floor(TOW/604800); - - return TOW; -} - int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string) { @@ -426,7 +354,7 @@ int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string) { gnav_ephemeris.d_B_n = static_cast(read_navigation_unsigned(string_bits, B_N)); gnav_ephemeris.d_P_2 = static_cast(read_navigation_bool(string_bits, P2)); - gnav_ephemeris.d_t_b = static_cast(read_navigation_unsigned(string_bits, T_B)) * gnav_ephemeris.d_P_1 * 60; + gnav_ephemeris.d_t_b = static_cast(read_navigation_unsigned(string_bits, T_B)) * 15 * 60; gnav_ephemeris.d_VYn = static_cast(read_navigation_signed(string_bits, Y_N_DOT)) * TWO_N20; gnav_ephemeris.d_AYn = static_cast(read_navigation_signed(string_bits, Y_N_DOT_DOT)) * TWO_N30; gnav_ephemeris.d_Yn = static_cast(read_navigation_signed(string_bits, Y_N)) * TWO_N11; @@ -759,15 +687,6 @@ int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string) } -double Glonass_Gnav_Navigation_Message::utc_time(const double glonass_time_corrected) const -{ - double t_utc; - - t_utc = glonass_time_corrected + 3*3600 + gnav_utc_model.d_tau_c; - return t_utc; -} - - Glonass_Gnav_Ephemeris Glonass_Gnav_Navigation_Message::get_ephemeris() { return gnav_ephemeris; @@ -814,9 +733,9 @@ bool Glonass_Gnav_Navigation_Message::have_new_ephemeris() //Check if we have a bool Glonass_Gnav_Navigation_Message::have_new_utc_model() // Check if we have a new utc data set stored in the galileo navigation class { - if (flag_utc_model_valid == true) + if (flag_utc_model_str_5 == true) { - flag_utc_model_valid = false; // clear the flag + flag_utc_model_str_5 = false; // clear the flag return true; } else diff --git a/src/core/system_parameters/glonass_gnav_navigation_message.h b/src/core/system_parameters/glonass_gnav_navigation_message.h index 062d99693..159a212f2 100644 --- a/src/core/system_parameters/glonass_gnav_navigation_message.h +++ b/src/core/system_parameters/glonass_gnav_navigation_message.h @@ -65,7 +65,6 @@ public: unsigned int d_string_ID; bool flag_update_slot_number; - // satellite identification info int i_channel_ID; unsigned int i_satellite_PRN; @@ -102,17 +101,25 @@ public: bool flag_TOW_set; //!< Flag indicating when the TOW has been set bool flag_TOW_new; //!< Flag indicating when a new TOW has been computed - // Clock terms - double d_satClkCorr; // Satellite clock error - double d_dtr; // Relativistic clock correction term - double d_satClkDrift; // Satellite clock drift + double d_satClkCorr; //!< Satellite clock error + double d_dtr; //!< Relativistic clock correction term + double d_satClkDrift; //!< Satellite clock drift - // Data update parameters - double d_previous_tb; - double d_previous_Na[GLONASS_L1_CA_NBR_SATS]; + double d_previous_tb; //!< Previous iode for the Glonass_Gnav_Ephemeris object. Used to determine when new data arrives + double d_previous_Na[GLONASS_L1_CA_NBR_SATS]; //!< Previous time for almanac of the Glonass_Gnav_Almanac object + + /*! + * \brief Compute CRC for GLONASS GNAV strings + * \param bits Bits of the string message where to compute CRC + */ bool CRC_test(std::bitset bits); + /*! + * \brief Computes the frame number being decoded given the satellite slot number + * \param satellite_slot_number [in] Satellite slot number identifier + * \returns Frame number being decoded, 0 if operation was not successful. + */ unsigned int get_frame_number(unsigned int satellite_slot_number); /*! @@ -130,45 +137,35 @@ public: */ Glonass_Gnav_Utc_Model get_utc_model(); - /* - * \brief Returns a Galileo_Almanac object filled with the latest navigation data received + /*! + * \brief Returns a Glonass_Gnav_Almanac object filled with the latest navigation data received + * \param satellite_slot_number Slot number identifier for the satellite + * \returns Returns the Glonass_Gnav_Almanac object for the input slot number */ Glonass_Gnav_Almanac get_almanac(unsigned int satellite_slot_number); - /* - * \brief Returns true if new Ephemeris has arrived. The flag is set to false when the function is executed + /*! + * \brief Returns true if a new Glonass_Gnav_Ephemeris object has arrived. */ bool have_new_ephemeris(); - /* - * \brief Returns true if new UTC model has arrived. The flag is set to false when the function is executed + /*! + * \brief Returns true if new Glonass_Gnav_Utc_Model object has arrived */ bool have_new_utc_model(); - /* - * \brief Returns true if new UTC model has arrived. The flag is set to false when the function is executed + /*! + * \brief Returns true if new Glonass_Gnav_Almanac object has arrived. */ bool have_new_almanac(); /*! * \brief Decodes the GLONASS GNAV string + * \param frame_string [in] is the string message within the parsed frame + * \returns Returns the ID of the decoded string */ int string_decoder(std::string frame_string); - /*! - * \brief Gets the time of week in GPS Time - * \details This converts from GLONASS Time to GPS Time of Week based on the - * start of frame - */ - double get_TOW(); - - double get_WN(); - - /*! - * \brief Computes the Coordinated Universal Time (UTC) and returns it in [s] - */ - double utc_time(const double glonasstime_corrected) const; - /*! * Default constructor */