1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-16 05:00:35 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga

This commit is contained in:
Marc Majoral 2018-11-05 18:29:35 +01:00
commit 41faa311f7
218 changed files with 8581 additions and 2661 deletions

View File

@ -227,8 +227,14 @@ endif(NOT LINUX_DISTRIBUTION)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(OperatingSystem "Mac OS X") set(OperatingSystem "Mac OS X")
set(OS_IS_MACOSX TRUE) set(OS_IS_MACOSX TRUE)
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION)
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
if(${DARWIN_VERSION} MATCHES "18")
set(MACOS_MOJAVE TRUE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
message(STATUS "Configuring GNSS-SDR v${VERSION} to be built on macOS Mojave 10.14")
endif(${DARWIN_VERSION} MATCHES "18")
if(${DARWIN_VERSION} MATCHES "17") if(${DARWIN_VERSION} MATCHES "17")
set(MACOS_HIGH_SIERRA TRUE) set(MACOS_HIGH_SIERRA TRUE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
@ -345,7 +351,7 @@ set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.200.x")
set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1") set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1")
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master") set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6") set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.12") set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.13")

View File

@ -64,10 +64,10 @@ $ sudo apt-get install build-essential cmake git libboost-dev libboost-date-time
libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev \ libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev \
libboost-serialization-dev liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr \ libboost-serialization-dev liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr \
libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \ libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
libgnutls-openssl-dev libpcap-dev python-mako python-six libmatio-dev googletest libgnutls-openssl-dev libpcap-dev python-mako python-six libmatio-dev libgtest-dev
~~~~~~ ~~~~~~
Please note that `googletest` was named `libgtest-dev` in distributions older than Debian 9 "stretch" and Ubuntu 17.04 "zesty". Please note that the required files from `libgtest-dev` were moved to `googletest` in Debian 9 "stretch" and Ubuntu 18.04 "bionic", and moved back again to `libgtest-dev` in Debian 10 "buster" and Ubuntu 18.10 "cosmic".
**Note for Ubuntu 14.04 LTS "trusty" users:** you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 came with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed. **Note for Ubuntu 14.04 LTS "trusty" users:** you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 came with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed.
@ -516,10 +516,7 @@ More details can be found in our tutorial about [GNSS-SDR configuration options
<a name="macosx">macOS and Mac OS X</a> <a name="macosx">macOS and Mac OS X</a>
--------- ---------
GNSS-SDR can be built on MacOS or Mac OS X, starting from 10.9 (Mavericks) and including 10.14 (Mojave). If you still have not installed [Xcode](https://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
### macOS 10.13 (High Sierra) and 10.12 (Sierra), Mac OS X 10.11 (El Capitan), 10.10 (Yosemite) and 10.9 (Mavericks).
If you still have not installed [Xcode](https://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
~~~~~~ ~~~~~~
$ xcode-select --install $ xcode-select --install
@ -558,7 +555,7 @@ You also might need to activate a Python installation. The list of installed ver
$ port select list python $ port select list python
~~~~~~ ~~~~~~
and you can activate a certain version (2.7 works well) by typing: and you can activate a certain version by typing:
~~~~~~ ~~~~~~
$ sudo port select --set python python27 $ sudo port select --set python python27

View File

@ -24,10 +24,10 @@ string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files}) foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}") message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program( execute_process(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" COMMAND @CMAKE_COMMAND@ -E remove \"$ENV{DESTDIR}${file}\"
OUTPUT_VARIABLE rm_out OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval RESULT_VARIABLE rm_retval
) )
if(NOT "${rm_retval}" STREQUAL 0) if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")

View File

@ -39,7 +39,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=217 GNSS-SDR.SUPL_MCC=217
GNSS-SDR.SUPL_MNS=7 GNSS-SDR.SUPL_MNC=7
GNSS-SDR.SUPL_LAC=861 GNSS-SDR.SUPL_LAC=861
GNSS-SDR.SUPL_CI=40184 GNSS-SDR.SUPL_CI=40184

View File

@ -23,7 +23,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -24,7 +24,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -23,7 +23,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -21,7 +21,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -25,7 +25,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -25,7 +25,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -24,7 +24,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -24,7 +24,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5_1C GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -24,7 +24,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -23,7 +23,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -23,7 +23,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.internal_fs_sps=32000000
;GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com ;GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
;GNSS-SDR.SUPL_gps_acquisition_port=7275 ;GNSS-SDR.SUPL_gps_acquisition_port=7275
;GNSS-SDR.SUPL_MCC=244 ;GNSS-SDR.SUPL_MCC=244
;GNSS-SDR.SUPL_MNS=5 ;GNSS-SDR.SUPL_MNC=5
;GNSS-SDR.SUPL_LAC=0x59e2 ;GNSS-SDR.SUPL_LAC=0x59e2
;GNSS-SDR.SUPL_CI=0x31b0 ;GNSS-SDR.SUPL_CI=0x31b0

View File

@ -21,7 +21,7 @@ GNSS-SDR.internal_fs_sps=50000000
;GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com ;GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
;GNSS-SDR.SUPL_gps_acquisition_port=7275 ;GNSS-SDR.SUPL_gps_acquisition_port=7275
;GNSS-SDR.SUPL_MCC=244 ;GNSS-SDR.SUPL_MCC=244
;GNSS-SDR.SUPL_MNS=5 ;GNSS-SDR.SUPL_MNC=5
;GNSS-SDR.SUPL_LAC=0x59e2 ;GNSS-SDR.SUPL_LAC=0x59e2
;GNSS-SDR.SUPL_CI=0x31b0 ;GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -21,7 +21,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_1C_ephemeris_port=7275
GNSS-SDR.SUPL_1C_acquisition_server=supl.google.com GNSS-SDR.SUPL_1C_acquisition_server=supl.google.com
GNSS-SDR.SUPL_1C_acquisition_port=7275 GNSS-SDR.SUPL_1C_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -22,7 +22,7 @@ GNSS-SDR.SUPL_gps_ephemeris_port=7275
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
GNSS-SDR.SUPL_gps_acquisition_port=7275 GNSS-SDR.SUPL_gps_acquisition_port=7275
GNSS-SDR.SUPL_MCC=244 GNSS-SDR.SUPL_MCC=244
GNSS-SDR.SUPL_MNS=5 GNSS-SDR.SUPL_MNC=5
GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_LAC=0x59e2
GNSS-SDR.SUPL_CI=0x31b0 GNSS-SDR.SUPL_CI=0x31b0

View File

@ -0,0 +1,34 @@
# XML Schemas for Assisted GNSS-SDR
GNSS-SDR can read assistance data from [Extensible Markup Language (XML)](https://www.w3.org/XML/) files for faster [Time-To-First-Fix](https://gnss-sdr.org/design-forces/availability/#time-to-first-fix-ttff), and can store navigation data decoded from GNSS signals in the same format. This folder provides XML Schemas which describe those XML files structure.
[XSD (XML Schema Definition)](https://www.w3.org/XML/Schema) is a World Wide Web Consortium (W3C) recommendation that specifies how to formally describe the elements in an XML document.
GPS L1 C/A
----------
- [ephemeris_map.xsd](./ephemeris_map.xsd) - GPS NAV message ephemeris parameters.
- [iono_model.xsd](./iono_model.xsd) - GPS NAV message ionospheric model parameters.
- [utc_model.xsd](./utc_model.xsd) - GPS NAV message UTC model parameters.
- [gps_almanac_map.xsd](./gps_almanac_map.xsd) - GPS NAV message almanac.
GPS L2C and L5
--------------
- [cnav_ephemeris_map.xsd](./cnav_ephemeris_map.xsd) - GPS CNAV message ephemeris parameters.
Galileo
-------
- [gal_ephemeris_map.xsd](./gal_ephemeris_map.xsd) - Galileo ephemeris parameters.
- [gal_iono_model.xsd](./gal_iono_model.xsd) - Galileo ionospheric model parameters.
- [gal_utc_model.xsd](./gal_utc_model.xsd) - Galileo UTC model parameters.
- [gal_almanac_map.xsd](./gal_almanac_map.xsd) - Galileo almanac.
-------
Please check https://gnss-sdr.org/docs/sp-blocks/global-parameters/ for more information about the usage of XML files in GNSS-SDR.

View File

@ -0,0 +1,72 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_cnav_ephemeris_map">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="count"/>
<xs:element type="xs:byte" name="item_version"/>
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="first"/>
<xs:element name="second">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="d_TOW"/>
<xs:element type="xs:float" name="d_Crs"/>
<xs:element type="xs:float" name="d_M_0"/>
<xs:element type="xs:float" name="d_Cuc"/>
<xs:element type="xs:float" name="d_e_eccentricity"/>
<xs:element type="xs:float" name="d_Cus"/>
<xs:element type="xs:float" name="d_Toe1"/>
<xs:element type="xs:float" name="d_Toe2"/>
<xs:element type="xs:float" name="d_Toc"/>
<xs:element type="xs:float" name="d_Cic"/>
<xs:element type="xs:float" name="d_OMEGA0"/>
<xs:element type="xs:float" name="d_Cis"/>
<xs:element type="xs:float" name="d_i_0"/>
<xs:element type="xs:float" name="d_Crc"/>
<xs:element type="xs:float" name="d_OMEGA"/>
<xs:element type="xs:float" name="d_IDOT"/>
<xs:element type="xs:short" name="i_GPS_week"/>
<xs:element type="xs:float" name="d_TGD"/>
<xs:element type="xs:float" name="d_ISCL1"/>
<xs:element type="xs:float" name="d_ISCL2"/>
<xs:element type="xs:float" name="d_ISCL5I"/>
<xs:element type="xs:float" name="d_ISCL5Q"/>
<xs:element type="xs:float" name="d_DELTA_A"/>
<xs:element type="xs:float" name="d_A_DOT"/>
<xs:element type="xs:float" name="d_DELTA_OMEGA_DOT"/>
<xs:element type="xs:float" name="d_A_f0"/>
<xs:element type="xs:float" name="d_A_f1"/>
<xs:element type="xs:float" name="d_A_f2"/>
<xs:element type="xs:byte" name="b_integrity_status_flag"/>
<xs:element type="xs:byte" name="b_alert_flag"/>
<xs:element type="xs:byte" name="b_antispoofing_flag"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,78 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_ephemeris_map">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="count"/>
<xs:element type="xs:byte" name="item_version"/>
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="first"/>
<xs:element name="second">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="d_TOW"/>
<xs:element type="xs:float" name="d_IODE_SF2"/>
<xs:element type="xs:float" name="d_IODE_SF3"/>
<xs:element type="xs:float" name="d_Crs"/>
<xs:element type="xs:float" name="d_Delta_n"/>
<xs:element type="xs:float" name="d_M_0"/>
<xs:element type="xs:float" name="d_Cuc"/>
<xs:element type="xs:float" name="d_e_eccentricity"/>
<xs:element type="xs:float" name="d_Cus"/>
<xs:element type="xs:float" name="d_sqrt_A"/>
<xs:element type="xs:float" name="d_Toe"/>
<xs:element type="xs:float" name="d_Toc"/>
<xs:element type="xs:float" name="d_Cic"/>
<xs:element type="xs:float" name="d_OMEGA0"/>
<xs:element type="xs:float" name="d_Cis"/>
<xs:element type="xs:float" name="d_i_0"/>
<xs:element type="xs:float" name="d_Crc"/>
<xs:element type="xs:float" name="d_OMEGA"/>
<xs:element type="xs:float" name="d_OMEGA_DOT"/>
<xs:element type="xs:float" name="d_IDOT"/>
<xs:element type="xs:byte" name="i_code_on_L2"/>
<xs:element type="xs:short" name="i_GPS_week"/>
<xs:element type="xs:byte" name="b_L2_P_data_flag"/>
<xs:element type="xs:byte" name="i_SV_accuracy"/>
<xs:element type="xs:byte" name="i_SV_health"/>
<xs:element type="xs:float" name="d_TGD"/>
<xs:element type="xs:float" name="d_IODC"/>
<xs:element type="xs:short" name="i_AODO"/>
<xs:element type="xs:byte" name="b_fit_interval_flag"/>
<xs:element type="xs:float" name="d_spare1"/>
<xs:element type="xs:float" name="d_spare2"/>
<xs:element type="xs:float" name="d_A_f0"/>
<xs:element type="xs:float" name="d_A_f1"/>
<xs:element type="xs:float" name="d_A_f2"/>
<xs:element type="xs:byte" name="b_integrity_status_flag"/>
<xs:element type="xs:byte" name="b_alert_flag"/>
<xs:element type="xs:byte" name="b_antispoofing_flag"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,56 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_gal_almanac_map">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="count"/>
<xs:element type="xs:byte" name="item_version"/>
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="first"/>
<xs:element name="second">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="d_Toa"/>
<xs:element type="xs:float" name="d_WNa"/>
<xs:element type="xs:float" name="d_IODa"/>
<xs:element type="xs:float" name="d_Delta_i"/>
<xs:element type="xs:float" name="d_M_0"/>
<xs:element type="xs:float" name="d_e_eccentricity"/>
<xs:element type="xs:float" name="d_Delta_sqrt_A"/>
<xs:element type="xs:float" name="d_OMEGA0"/>
<xs:element type="xs:float" name="d_OMEGA"/>
<xs:element type="xs:float" name="d_OMEGA_DOT"/>
<xs:element type="xs:float" name="d_A_f0"/>
<xs:element type="xs:float" name="d_A_f1"/>
<xs:element type="xs:float" name="E5b_HS"/>
<xs:element type="xs:float" name="E1B_HS"/>
<xs:element type="xs:float" name="E5a_HS"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,60 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_gal_ephemeris_map">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="count"/>
<xs:element type="xs:byte" name="item_version"/>
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="first"/>
<xs:element name="second">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="M0_1"/>
<xs:element type="xs:float" name="e_1"/>
<xs:element type="xs:float" name="A_1"/>
<xs:element type="xs:float" name="OMEGA_0_2"/>
<xs:element type="xs:float" name="i_0_2"/>
<xs:element type="xs:float" name="omega_2"/>
<xs:element type="xs:float" name="OMEGA_dot_3"/>
<xs:element type="xs:float" name="iDot_2"/>
<xs:element type="xs:float" name="C_uc_3"/>
<xs:element type="xs:float" name="C_us_3"/>
<xs:element type="xs:float" name="C_rc_3"/>
<xs:element type="xs:float" name="C_rs_3"/>
<xs:element type="xs:float" name="C_ic_4"/>
<xs:element type="xs:float" name="C_is_4"/>
<xs:element type="xs:float" name="t0e_1"/>
<xs:element type="xs:float" name="t0c_4"/>
<xs:element type="xs:float" name="af0_4"/>
<xs:element type="xs:float" name="af1_4"/>
<xs:element type="xs:float" name="af2_4"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,29 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_gal_iono_model">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:float" name="ai0_5"/>
<xs:element type="xs:float" name="ai1_5"/>
<xs:element type="xs:float" name="ai2_5"/>
<xs:element type="xs:byte" name="Region1_flag_5"/>
<xs:element type="xs:byte" name="Region2_flag_5"/>
<xs:element type="xs:byte" name="Region3_flag_5"/>
<xs:element type="xs:byte" name="Region4_flag_5"/>
<xs:element type="xs:byte" name="Region5_flag_5"/>
<xs:element type="xs:float" name="TOW_5"/>
<xs:element type="xs:float" name="WN_5"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,28 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_gal_utc_model">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:float" name="A0_6"/>
<xs:element type="xs:float" name="A1_6"/>
<xs:element type="xs:float" name="Delta_tLS_6"/>
<xs:element type="xs:float" name="t0t_6"/>
<xs:element type="xs:float" name="WNot_6"/>
<xs:element type="xs:float" name="WN_LSF_6"/>
<xs:element type="xs:float" name="DN_6"/>
<xs:element type="xs:float" name="Delta_tLSF_6"/>
<xs:element type="xs:byte" name="flag_utc_model"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,54 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_gps_almanac_map">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="count"/>
<xs:element type="xs:byte" name="item_version"/>
<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="first"/>
<xs:element name="second">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="d_Delta_i"/>
<xs:element type="xs:float" name="d_Toa"/>
<xs:element type="xs:byte" name="i_WNa"/>
<xs:element type="xs:float" name="d_M_0"/>
<xs:element type="xs:float" name="d_e_eccentricity"/>
<xs:element type="xs:float" name="d_sqrt_A"/>
<xs:element type="xs:float" name="d_OMEGA0"/>
<xs:element type="xs:float" name="d_OMEGA"/>
<xs:element type="xs:float" name="d_OMEGA_DOT"/>
<xs:element type="xs:byte" name="i_SV_health"/>
<xs:element type="xs:byte" name="i_AS_status"/>
<xs:element type="xs:float" name="d_A_f0"/>
<xs:element type="xs:float" name="d_A_f1"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>
<xs:attribute type="xs:byte" name="version" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,27 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_iono_model">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:float" name="d_alpha0"/>
<xs:element type="xs:float" name="d_alpha1"/>
<xs:element type="xs:float" name="d_alpha2"/>
<xs:element type="xs:float" name="d_alpha3"/>
<xs:element type="xs:float" name="d_beta0"/>
<xs:element type="xs:float" name="d_beta1"/>
<xs:element type="xs:float" name="d_beta2"/>
<xs:element type="xs:float" name="d_beta3"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,28 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
<xs:element name="GNSS-SDR_utc_model">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="valid"/>
<xs:element type="xs:float" name="d_A1"/>
<xs:element type="xs:float" name="d_A0"/>
<xs:element type="xs:float" name="d_t_OT"/>
<xs:element type="xs:short" name="i_WN_T"/>
<xs:element type="xs:float" name="d_DeltaT_LS"/>
<xs:element type="xs:short" name="i_WN_LSF"/>
<xs:element type="xs:byte" name="i_DN"/>
<xs:element type="xs:float" name="d_DeltaT_LSF"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="signature"/>
<xs:attribute type="xs:byte" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -30,6 +30,7 @@
#include "rtklib_pvt.h" #include "rtklib_pvt.h"
#include "pvt_conf.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/archive/xml_oarchive.hpp> #include <boost/archive/xml_oarchive.hpp>
@ -54,97 +55,87 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {
Pvt_Conf pvt_output_parameters = Pvt_Conf();
// dump parameters // dump parameters
std::string default_dump_filename = "./pvt.dat"; std::string default_dump_filename = "./pvt.dat";
std::string default_nmea_dump_filename = "./nmea_pvt.nmea"; std::string default_nmea_dump_filename = "./nmea_pvt.nmea";
std::string default_nmea_dump_devname = "/dev/tty1"; std::string default_nmea_dump_devname = "/dev/tty1";
std::string default_rtcm_dump_devname = "/dev/pts/1"; std::string default_rtcm_dump_devname = "/dev/pts/1";
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false); pvt_output_parameters.dump = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); pvt_output_parameters.dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
pvt_output_parameters.dump_mat = configuration->property(role + ".dump_mat", true);
// output rate // output rate
int output_rate_ms = configuration->property(role + ".output_rate_ms", 500); pvt_output_parameters.output_rate_ms = configuration->property(role + ".output_rate_ms", 500);
// display rate // display rate
int display_rate_ms = configuration->property(role + ".display_rate_ms", 500); pvt_output_parameters.display_rate_ms = configuration->property(role + ".display_rate_ms", 500);
// NMEA Printer settings // NMEA Printer settings
bool flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false); pvt_output_parameters.flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false);
std::string nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename); pvt_output_parameters.nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename);
std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname); std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname);
// RINEX version // RINEX version
int rinex_version = configuration->property(role + ".rinex_version", 3); pvt_output_parameters.rinex_version = configuration->property(role + ".rinex_version", 3);
if (FLAGS_RINEX_version.compare("3.01") == 0) if (FLAGS_RINEX_version.compare("3.01") == 0)
{ {
rinex_version = 3; pvt_output_parameters.rinex_version = 3;
} }
else if (FLAGS_RINEX_version.compare("3.02") == 0) else if (FLAGS_RINEX_version.compare("3.02") == 0)
{ {
rinex_version = 3; pvt_output_parameters.rinex_version = 3;
} }
else if (FLAGS_RINEX_version.compare("3") == 0) else if (FLAGS_RINEX_version.compare("3") == 0)
{ {
rinex_version = 3; pvt_output_parameters.rinex_version = 3;
} }
else if (FLAGS_RINEX_version.compare("2.11") == 0) else if (FLAGS_RINEX_version.compare("2.11") == 0)
{ {
rinex_version = 2; pvt_output_parameters.rinex_version = 2;
} }
else if (FLAGS_RINEX_version.compare("2.10") == 0) else if (FLAGS_RINEX_version.compare("2.10") == 0)
{ {
rinex_version = 2; pvt_output_parameters.rinex_version = 2;
} }
else if (FLAGS_RINEX_version.compare("2") == 0) else if (FLAGS_RINEX_version.compare("2") == 0)
{ {
rinex_version = 2; pvt_output_parameters.rinex_version = 2;
} }
int rinexobs_rate_ms = bc::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), output_rate_ms); pvt_output_parameters.rinexobs_rate_ms = bc::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), pvt_output_parameters.output_rate_ms);
int rinexnav_rate_ms = bc::lcm(configuration->property(role + ".rinexnav_rate_ms", 6000), output_rate_ms); pvt_output_parameters.rinexnav_rate_ms = bc::lcm(configuration->property(role + ".rinexnav_rate_ms", 6000), pvt_output_parameters.output_rate_ms);
// RTCM Printer settings // RTCM Printer settings
bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false); pvt_output_parameters.flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
std::string rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname); pvt_output_parameters.rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
bool flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false); pvt_output_parameters.flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101); pvt_output_parameters.rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234); pvt_output_parameters.rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
// RTCM message rates: least common multiple with output_rate_ms // RTCM message rates: least common multiple with output_rate_ms
int rtcm_MT1019_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), output_rate_ms); int rtcm_MT1019_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), pvt_output_parameters.output_rate_ms);
int rtcm_MT1020_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), output_rate_ms); int rtcm_MT1020_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), pvt_output_parameters.output_rate_ms);
int rtcm_MT1045_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), output_rate_ms); int rtcm_MT1045_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), pvt_output_parameters.output_rate_ms);
int rtcm_MSM_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), output_rate_ms); int rtcm_MSM_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), pvt_output_parameters.output_rate_ms);
int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), output_rate_ms); int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), output_rate_ms); int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), output_rate_ms); int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
std::map<int, int> rtcm_msg_rate_ms; //std::map<int, int> rtcm_msg_rate_ms;
rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms; pvt_output_parameters.rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms;
rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms; pvt_output_parameters.rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms;
rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms; pvt_output_parameters.rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms;
for (int k = 1071; k < 1078; k++) // All GPS MSM for (int k = 1071; k < 1078; k++) // All GPS MSM
{ {
rtcm_msg_rate_ms[k] = rtcm_MT1077_rate_ms; pvt_output_parameters.rtcm_msg_rate_ms[k] = rtcm_MT1077_rate_ms;
} }
for (int k = 1081; k < 1088; k++) // All GLONASS MSM for (int k = 1081; k < 1088; k++) // All GLONASS MSM
{ {
rtcm_msg_rate_ms[k] = rtcm_MT1087_rate_ms; pvt_output_parameters.rtcm_msg_rate_ms[k] = rtcm_MT1087_rate_ms;
} }
for (int k = 1091; k < 1098; k++) // All Galileo MSM for (int k = 1091; k < 1098; k++) // All Galileo MSM
{ {
rtcm_msg_rate_ms[k] = rtcm_MT1097_rate_ms; pvt_output_parameters.rtcm_msg_rate_ms[k] = rtcm_MT1097_rate_ms;
} }
// getting names from the config file, if available
// default filename for assistance data
const std::string eph_default_xml_filename = "./gps_ephemeris.xml";
const std::string utc_default_xml_filename = "./gps_utc_model.xml";
const std::string iono_default_xml_filename = "./gps_iono.xml";
const std::string ref_time_default_xml_filename = "./gps_ref_time.xml";
const std::string ref_location_default_xml_filename = "./gps_ref_location.xml";
eph_xml_filename_ = configuration->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename);
//std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename);
//std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename);
//std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename);
//std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
// Infer the type of receiver // Infer the type of receiver
/* /*
@ -188,47 +179,46 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
int glo_1G_count = configuration->property("Channels_1G.count", 0); int glo_1G_count = configuration->property("Channels_1G.count", 0);
int glo_2G_count = configuration->property("Channels_2G.count", 0); int glo_2G_count = configuration->property("Channels_2G.count", 0);
unsigned int type_of_receiver = 0; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 1; // L1
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 2;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 3; // L5
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 4; // E1
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 5; // E5a
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 6;
// *******************WARNING!!!!!!!*********** if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 7;
// GPS L5 only configurable for single frequency, single system at the moment!!!!!! if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 8; // L1+L5
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 1; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 9; // L1+E1
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 2; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 10;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 3; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 11;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 4; if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 12;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 5; if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 13; // L5+E5a
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 6; if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 14;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 15;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) pvt_output_parameters.type_of_receiver = 16;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 17;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 18;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) pvt_output_parameters.type_of_receiver = 19;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) pvt_output_parameters.type_of_receiver = 20;
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 21;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0)) pvt_output_parameters.type_of_receiver = 22;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0)) pvt_output_parameters.type_of_receiver = 23;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 24;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 25;
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 26;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 27;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 28;
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 29;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 30;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 31;
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 7; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a
//if( (gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 8;
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 9; // RTKLIB PVT solver options
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 10;
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 11;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 12;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 13;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 14;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 15;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 16;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 17;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 18;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 19;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 20;
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 21;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0)) type_of_receiver = 22;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0)) type_of_receiver = 23;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 24;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0)) type_of_receiver = 25;
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 26;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 27;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 28;
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 29;
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 30;
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 31;
//RTKLIB PVT solver options
// Settings 1 // Settings 1
int positioning_mode = -1; int positioning_mode = -1;
std::string default_pos_mode("Single"); std::string default_pos_mode("Single");
std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); /* (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h */ std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h
if (positioning_mode_str.compare("Single") == 0) positioning_mode = PMODE_SINGLE; if (positioning_mode_str.compare("Single") == 0) positioning_mode = PMODE_SINGLE;
if (positioning_mode_str.compare("Static") == 0) positioning_mode = PMODE_STATIC; if (positioning_mode_str.compare("Static") == 0) positioning_mode = PMODE_STATIC;
if (positioning_mode_str.compare("Kinematic") == 0) positioning_mode = PMODE_KINEMA; if (positioning_mode_str.compare("Kinematic") == 0) positioning_mode = PMODE_KINEMA;
@ -489,8 +479,29 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
rtkinit(&rtk, &rtklib_configuration_options); rtkinit(&rtk, &rtklib_configuration_options);
// Outputs
bool default_output_enabled = configuration->property(role + ".output_enabled", true);
pvt_output_parameters.output_enabled = default_output_enabled;
pvt_output_parameters.rinex_output_enabled = configuration->property(role + ".rinex_output_enabled", default_output_enabled);
pvt_output_parameters.gpx_output_enabled = configuration->property(role + ".gpx_output_enabled", default_output_enabled);
pvt_output_parameters.geojson_output_enabled = configuration->property(role + ".geojson_output_enabled", default_output_enabled);
pvt_output_parameters.kml_output_enabled = configuration->property(role + ".kml_output_enabled", default_output_enabled);
pvt_output_parameters.xml_output_enabled = configuration->property(role + ".xml_output_enabled", default_output_enabled);
pvt_output_parameters.nmea_output_file_enabled = configuration->property(role + ".nmea_output_file_enabled", default_output_enabled);
pvt_output_parameters.rtcm_output_file_enabled = configuration->property(role + ".rtcm_output_file_enabled", default_output_enabled);
std::string default_output_path = configuration->property(role + ".output_path", std::string("."));
pvt_output_parameters.output_path = default_output_path;
pvt_output_parameters.rinex_output_path = configuration->property(role + ".rinex_output_path", default_output_path);
pvt_output_parameters.gpx_output_path = configuration->property(role + ".gpx_output_path", default_output_path);
pvt_output_parameters.geojson_output_path = configuration->property(role + ".geojson_output_path", default_output_path);
pvt_output_parameters.kml_output_path = configuration->property(role + ".kml_output_path", default_output_path);
pvt_output_parameters.xml_output_path = configuration->property(role + ".xml_output_path", default_output_path);
pvt_output_parameters.nmea_output_file_path = configuration->property(role + ".nmea_output_file_path", default_output_path);
pvt_output_parameters.rtcm_output_file_path = configuration->property(role + ".rtcm_output_file_path", default_output_path);
// make PVT object // make PVT object
pvt_ = rtklib_make_pvt_cc(in_streams_, dump_, dump_filename_, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, rinex_version, rinexobs_rate_ms, rinexnav_rate_ms, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtk); pvt_ = rtklib_make_pvt_cc(in_streams_, pvt_output_parameters, rtk);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
if (out_streams_ > 0) if (out_streams_ > 0)
{ {
@ -499,40 +510,9 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
} }
bool RtklibPvt::save_assistance_to_XML()
{
LOG(INFO) << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename_;
std::map<int, Gps_Ephemeris> eph_map = pvt_->get_GPS_L1_ephemeris_map();
if (eph_map.empty() == false)
{
std::ofstream ofs;
try
{
ofs.open(eph_xml_filename_.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
LOG(INFO) << "Saved GPS L1 Ephemeris map data";
}
catch (const std::exception& e)
{
LOG(WARNING) << e.what();
return false;
}
}
else
{
LOG(WARNING) << "Failed to save Ephemeris, map is empty";
return false;
}
return true; // return variable (true == succeeded)
}
RtklibPvt::~RtklibPvt() RtklibPvt::~RtklibPvt()
{ {
rtkfree(&rtk); rtkfree(&rtk);
save_assistance_to_XML();
} }

View File

@ -40,7 +40,7 @@
class ConfigurationInterface; class ConfigurationInterface;
/*! /*!
* \brief This class implements a PvtInterface for Galileo E1 * \brief This class implements a PvtInterface for the RTKLIB PVT block
*/ */
class RtklibPvt : public PvtInterface class RtklibPvt : public PvtInterface
{ {
@ -87,8 +87,6 @@ private:
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;
unsigned int out_streams_; unsigned int out_streams_;
std::string eph_xml_filename_;
bool save_assistance_to_XML();
}; };
#endif #endif

View File

@ -36,6 +36,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/core/receiver ${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}

File diff suppressed because it is too large Load Diff

View File

@ -38,6 +38,7 @@
#include "geojson_printer.h" #include "geojson_printer.h"
#include "rinex_printer.h" #include "rinex_printer.h"
#include "rtcm_printer.h" #include "rtcm_printer.h"
#include "pvt_conf.h"
#include "rtklib_solver.h" #include "rtklib_solver.h"
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <sys/types.h> #include <sys/types.h>
@ -55,23 +56,7 @@ class rtklib_pvt_cc;
typedef boost::shared_ptr<rtklib_pvt_cc> rtklib_pvt_cc_sptr; typedef boost::shared_ptr<rtklib_pvt_cc> rtklib_pvt_cc_sptr;
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels, rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels,
bool dump, const Pvt_Conf& conf_,
std::string dump_filename,
int32_t output_rate_ms,
int32_t display_rate_ms,
bool flag_nmea_tty_port,
std::string nmea_dump_filename,
std::string nmea_dump_devname,
int32_t rinex_version,
int32_t rinexobs_rate_ms,
int32_t rinexnav_rate_ms,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
uint16_t rtcm_tcp_port,
uint16_t rtcm_station_id,
std::map<int, int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname,
const uint32_t type_of_receiver,
rtk_t& rtk); rtk_t& rtk);
/*! /*!
@ -81,28 +66,14 @@ class rtklib_pvt_cc : public gr::sync_block
{ {
private: private:
friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
bool dump, const Pvt_Conf& conf_,
std::string dump_filename,
int32_t output_rate_ms,
int32_t display_rate_ms,
bool flag_nmea_tty_port,
std::string nmea_dump_filename,
std::string nmea_dump_devname,
int32_t rinex_version,
int32_t rinexobs_rate_ms,
int32_t rinexnav_rate_ms,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
uint16_t rtcm_tcp_port,
uint16_t rtcm_station_id,
std::map<int, int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname,
const uint32_t type_of_receiver,
rtk_t& rtk); rtk_t& rtk);
void msg_handler_telemetry(pmt::pmt_t msg); void msg_handler_telemetry(pmt::pmt_t msg);
bool d_dump; bool d_dump;
bool d_dump_mat;
bool b_rinex_output_enabled;
bool b_rinex_header_written; bool b_rinex_header_written;
bool b_rinex_header_updated; bool b_rinex_header_updated;
double d_rinex_version; double d_rinex_version;
@ -110,6 +81,7 @@ private:
int32_t d_rinexnav_rate_ms; int32_t d_rinexnav_rate_ms;
bool b_rtcm_writing_started; bool b_rtcm_writing_started;
bool b_rtcm_enabled;
int32_t d_rtcm_MT1045_rate_ms; //!< Galileo Broadcast Ephemeris int32_t d_rtcm_MT1045_rate_ms; //!< Galileo Broadcast Ephemeris
int32_t d_rtcm_MT1019_rate_ms; //!< GPS Broadcast Ephemeris (orbits) int32_t d_rtcm_MT1019_rate_ms; //!< GPS Broadcast Ephemeris (orbits)
int32_t d_rtcm_MT1020_rate_ms; //!< GLONASS Broadcast Ephemeris (orbits) int32_t d_rtcm_MT1020_rate_ms; //!< GLONASS Broadcast Ephemeris (orbits)
@ -134,6 +106,10 @@ private:
std::shared_ptr<Rtcm_Printer> d_rtcm_printer; std::shared_ptr<Rtcm_Printer> d_rtcm_printer;
double d_rx_time; double d_rx_time;
bool d_geojson_output_enabled;
bool d_gpx_output_enabled;
bool d_kml_output_enabled;
std::shared_ptr<rtklib_solver> d_ls_pvt; std::shared_ptr<rtklib_solver> d_ls_pvt;
std::map<int, Gnss_Synchro> gnss_observables_map; std::map<int, Gnss_Synchro> gnss_observables_map;
@ -156,24 +132,13 @@ private:
bool load_gnss_synchro_map_xml(const std::string file_name); //debug helper function bool load_gnss_synchro_map_xml(const std::string file_name); //debug helper function
bool d_xml_storage;
std::string xml_base_path;
public: public:
rtklib_pvt_cc(uint32_t nchannels, rtklib_pvt_cc(uint32_t nchannels,
bool dump, std::string dump_filename, const Pvt_Conf& conf_,
int32_t output_rate_ms,
int32_t display_rate_ms,
bool flag_nmea_tty_port,
std::string nmea_dump_filename,
std::string nmea_dump_devname,
int32_t rinex_version,
int32_t rinexobs_rate_ms,
int32_t rinexnav_rate_ms,
bool flag_rtcm_server,
bool flag_rtcm_tty_port,
uint16_t rtcm_tcp_port,
uint16_t rtcm_station_id,
std::map<int, int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname,
const uint32_t type_of_receiver,
rtk_t& rtk); rtk_t& rtk);
/*! /*!

View File

@ -29,6 +29,7 @@ set(PVT_LIB_SOURCES
rtcm_printer.cc rtcm_printer.cc
geojson_printer.cc geojson_printer.cc
rtklib_solver.cc rtklib_solver.cc
pvt_conf.cc
) )
set(PVT_LIB_HEADERS set(PVT_LIB_HEADERS
@ -42,6 +43,7 @@ set(PVT_LIB_HEADERS
rtcm_printer.h rtcm_printer.h
geojson_printer.h geojson_printer.h
rtklib_solver.h rtklib_solver.h
pvt_conf.h
) )
@ -57,6 +59,7 @@ include_directories(
${ARMADILLO_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
) )
list(SORT PVT_LIB_HEADERS) list(SORT PVT_LIB_HEADERS)
@ -64,7 +67,12 @@ list(SORT PVT_LIB_SOURCES)
add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS}) add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
source_group(Headers FILES ${PVT_LIB_HEADERS}) source_group(Headers FILES ${PVT_LIB_HEADERS})
add_dependencies(pvt_lib rtklib_lib armadillo-${armadillo_RELEASE} glog-${glog_RELEASE})
if(MATIO_FOUND)
add_dependencies(pvt_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE})
else(MATIO_FOUND)
add_dependencies(pvt_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif(MATIO_FOUND)
target_link_libraries( target_link_libraries(
pvt_lib pvt_lib
@ -75,4 +83,5 @@ target_link_libraries(
${ARMADILLO_LIBRARIES} ${ARMADILLO_LIBRARIES}
${BLAS} ${BLAS}
${LAPACK} ${LAPACK}
${MATIO_LIBRARIES}
) )

View File

@ -32,14 +32,48 @@
#include "geojson_printer.h" #include "geojson_printer.h"
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <glog/logging.h> #include <glog/logging.h>
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
GeoJSON_Printer::GeoJSON_Printer() GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
{ {
first_pos = true; first_pos = true;
geojson_base_path = base_path;
boost::filesystem::path full_path(boost::filesystem::current_path());
const boost::filesystem::path p(geojson_base_path);
if (!boost::filesystem::exists(p))
{
std::string new_folder;
for (auto& folder : boost::filesystem::path(geojson_base_path))
{
new_folder += folder.string();
boost::system::error_code ec;
if (!boost::filesystem::exists(new_folder))
{
if (!boost::filesystem::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
geojson_base_path = full_path.string();
}
}
new_folder += boost::filesystem::path::preferred_separator;
}
}
else
{
geojson_base_path = p.string();
}
if (geojson_base_path.compare(".") != 0)
{
std::cout << "GeoJSON files will be stored at " << geojson_base_path << std::endl;
}
geojson_base_path = geojson_base_path + boost::filesystem::path::preferred_separator;
} }
@ -96,6 +130,7 @@ bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name)
{ {
filename_ = filename + ".geojson"; filename_ = filename + ".geojson";
} }
filename_ = geojson_base_path + filename_;
geojson_file.open(filename_.c_str()); geojson_file.open(filename_.c_str());
@ -124,6 +159,7 @@ bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name)
} }
else else
{ {
std::cout << "File " << filename_ << " cannot be saved. Wrong permissions?" << std::endl;
return false; return false;
} }
} }

View File

@ -50,9 +50,10 @@ private:
std::ofstream geojson_file; std::ofstream geojson_file;
bool first_pos; bool first_pos;
std::string filename_; std::string filename_;
std::string geojson_base_path;
public: public:
GeoJSON_Printer(); GeoJSON_Printer(const std::string& base_path = ".");
~GeoJSON_Printer(); ~GeoJSON_Printer();
bool set_headers(std::string filename, bool time_tag_name = true); bool set_headers(std::string filename, bool time_tag_name = true);
bool print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values); bool print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values);

View File

@ -32,11 +32,53 @@
#include "gpx_printer.h" #include "gpx_printer.h"
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <glog/logging.h> #include <glog/logging.h>
#include <sstream> #include <sstream>
using google::LogMessage; using google::LogMessage;
Gpx_Printer::Gpx_Printer(const std::string& base_path)
{
positions_printed = false;
indent = " ";
gpx_base_path = base_path;
boost::filesystem::path full_path(boost::filesystem::current_path());
const boost::filesystem::path p(gpx_base_path);
if (!boost::filesystem::exists(p))
{
std::string new_folder;
for (auto& folder : boost::filesystem::path(gpx_base_path))
{
new_folder += folder.string();
boost::system::error_code ec;
if (!boost::filesystem::exists(new_folder))
{
if (!boost::filesystem::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
gpx_base_path = full_path.string();
}
}
new_folder += boost::filesystem::path::preferred_separator;
}
}
else
{
gpx_base_path = p.string();
}
if (gpx_base_path.compare(".") != 0)
{
std::cout << "GPX files will be stored at " << gpx_base_path << std::endl;
}
gpx_base_path = gpx_base_path + boost::filesystem::path::preferred_separator;
}
bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name) bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name)
{ {
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
@ -84,6 +126,8 @@ bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name)
{ {
gpx_filename = filename + ".gpx"; gpx_filename = filename + ".gpx";
} }
gpx_filename = gpx_base_path + gpx_filename;
gpx_file.open(gpx_filename.c_str()); gpx_file.open(gpx_filename.c_str());
if (gpx_file.is_open()) if (gpx_file.is_open())
@ -105,6 +149,7 @@ bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name)
} }
else else
{ {
std::cout << "File " << gpx_filename << " cannot be saved. Wrong permissions?" << std::endl;
return false; return false;
} }
} }
@ -171,13 +216,6 @@ bool Gpx_Printer::close_file()
} }
Gpx_Printer::Gpx_Printer()
{
positions_printed = false;
indent = " ";
}
Gpx_Printer::~Gpx_Printer() Gpx_Printer::~Gpx_Printer()
{ {
close_file(); close_file();

View File

@ -52,9 +52,10 @@ private:
bool positions_printed; bool positions_printed;
std::string gpx_filename; std::string gpx_filename;
std::string indent; std::string indent;
std::string gpx_base_path;
public: public:
Gpx_Printer(); Gpx_Printer(const std::string& base_path = ".");
~Gpx_Printer(); ~Gpx_Printer();
bool set_headers(std::string filename, bool time_tag_name = true); bool set_headers(std::string filename, bool time_tag_name = true);
bool print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values); bool print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values);

View File

@ -36,6 +36,7 @@
#include "galileo_navigation_message.h" #include "galileo_navigation_message.h"
#include "gps_navigation_message.h" #include "gps_navigation_message.h"
#include "gps_cnav_navigation_message.h" #include "gps_cnav_navigation_message.h"
#include "galileo_almanac.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "rtklib_rtkcmn.h" #include "rtklib_rtkcmn.h"
#include <fstream> #include <fstream>

View File

@ -31,11 +31,52 @@
#include "kml_printer.h" #include "kml_printer.h"
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <glog/logging.h> #include <glog/logging.h>
#include <sstream> #include <sstream>
using google::LogMessage; using google::LogMessage;
Kml_Printer::Kml_Printer(const std::string& base_path)
{
positions_printed = false;
kml_base_path = base_path;
boost::filesystem::path full_path(boost::filesystem::current_path());
const boost::filesystem::path p(kml_base_path);
if (!boost::filesystem::exists(p))
{
std::string new_folder;
for (auto& folder : boost::filesystem::path(kml_base_path))
{
new_folder += folder.string();
boost::system::error_code ec;
if (!boost::filesystem::exists(new_folder))
{
if (!boost::filesystem::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
kml_base_path = full_path.string();
}
}
new_folder += boost::filesystem::path::preferred_separator;
}
}
else
{
kml_base_path = p.string();
}
if (kml_base_path.compare(".") != 0)
{
std::cout << "KML files will be stored at " << kml_base_path << std::endl;
}
kml_base_path = kml_base_path + boost::filesystem::path::preferred_separator;
}
bool Kml_Printer::set_headers(std::string filename, bool time_tag_name) bool Kml_Printer::set_headers(std::string filename, bool time_tag_name)
{ {
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
@ -83,6 +124,7 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name)
{ {
kml_filename = filename + ".kml"; kml_filename = filename + ".kml";
} }
kml_filename = kml_base_path + kml_filename;
kml_file.open(kml_filename.c_str()); kml_file.open(kml_filename.c_str());
if (kml_file.is_open()) if (kml_file.is_open())
@ -119,6 +161,7 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name)
} }
else else
{ {
std::cout << "File " << kml_filename << " cannot be saved. Wrong permissions?" << std::endl;
return false; return false;
} }
} }
@ -178,12 +221,6 @@ bool Kml_Printer::close_file()
} }
Kml_Printer::Kml_Printer()
{
positions_printed = false;
}
Kml_Printer::~Kml_Printer() Kml_Printer::~Kml_Printer()
{ {
close_file(); close_file();

View File

@ -50,9 +50,10 @@ private:
std::ofstream kml_file; std::ofstream kml_file;
bool positions_printed; bool positions_printed;
std::string kml_filename; std::string kml_filename;
std::string kml_base_path;
public: public:
Kml_Printer(); Kml_Printer(const std::string& base_path = std::string("."));
~Kml_Printer(); ~Kml_Printer();
bool set_headers(std::string filename, bool time_tag_name = true); bool set_headers(std::string filename, bool time_tag_name = true);
bool print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values); bool print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values);

View File

@ -35,6 +35,9 @@
#include "nmea_printer.h" #include "nmea_printer.h"
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <glog/logging.h> #include <glog/logging.h>
#include <cstdint> #include <cstdint>
#include <fcntl.h> #include <fcntl.h>
@ -44,14 +47,56 @@
using google::LogMessage; using google::LogMessage;
Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::string nmea_dump_devname) Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path)
{ {
nmea_filename = filename; nmea_base_path = base_path;
d_flag_nmea_output_file = flag_nmea_output_file;
if (d_flag_nmea_output_file == true)
{
boost::filesystem::path full_path(boost::filesystem::current_path());
const boost::filesystem::path p(nmea_base_path);
if (!boost::filesystem::exists(p))
{
std::string new_folder;
for (auto& folder : boost::filesystem::path(nmea_base_path))
{
new_folder += folder.string();
boost::system::error_code ec;
if (!boost::filesystem::exists(new_folder))
{
if (!boost::filesystem::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
nmea_base_path = full_path.string();
}
}
new_folder += boost::filesystem::path::preferred_separator;
}
}
else
{
nmea_base_path = p.string();
}
if ((nmea_base_path.compare(".") != 0) and (d_flag_nmea_output_file == true))
{
std::cout << "NMEA files will be stored at " << nmea_base_path << std::endl;
}
nmea_base_path = nmea_base_path + boost::filesystem::path::preferred_separator;
nmea_filename = nmea_base_path + filename;
nmea_file_descriptor.open(nmea_filename.c_str(), std::ios::out); nmea_file_descriptor.open(nmea_filename.c_str(), std::ios::out);
if (nmea_file_descriptor.is_open()) if (nmea_file_descriptor.is_open())
{ {
DLOG(INFO) << "NMEA printer writing on " << nmea_filename.c_str(); DLOG(INFO) << "NMEA printer writing on " << nmea_filename.c_str();
} }
else
{
std::cout << "File " << nmea_filename << " cannot be saved. Wrong permissions?" << std::endl;
}
}
nmea_devname = nmea_dump_devname; nmea_devname = nmea_dump_devname;
if (flag_nmea_tty_port == true) if (flag_nmea_tty_port == true)
@ -94,13 +139,13 @@ int Nmea_Printer::init_serial(std::string serial_device)
int64_t PARITY; int64_t PARITY;
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY); fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
if (fd == -1) return fd; //failed to open TTY port if (fd == -1) return fd; // failed to open TTY port
if (fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O if (fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
tcgetattr(fd, &options); // read serial port options tcgetattr(fd, &options); // read serial port options
BAUD = B9600; BAUD = B9600;
//BAUD = B38400; // BAUD = B38400;
DATABITS = CS8; DATABITS = CS8;
STOPBITS = 0; STOPBITS = 0;
PARITYON = 0; PARITYON = 0;
@ -108,7 +153,7 @@ int Nmea_Printer::init_serial(std::string serial_device)
options.c_cflag = BAUD | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD; options.c_cflag = BAUD | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
// enable receiver, set 8 bit data, ignore control lines // enable receiver, set 8 bit data, ignore control lines
//options.c_cflag |= (CLOCAL | CREAD | CS8); // options.c_cflag |= (CLOCAL | CREAD | CS8);
options.c_iflag = IGNPAR; options.c_iflag = IGNPAR;
// set the new port options // set the new port options
@ -139,34 +184,36 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_dat
// generate the NMEA sentences // generate the NMEA sentences
//GPRMC // GPRMC
GPRMC = get_GPRMC(); GPRMC = get_GPRMC();
//GPGGA (Global Positioning System Fixed Data) // GPGGA (Global Positioning System Fixed Data)
GPGGA = get_GPGGA(); GPGGA = get_GPGGA();
//GPGSA // GPGSA
GPGSA = get_GPGSA(); GPGSA = get_GPGSA();
//GPGSV // GPGSV
GPGSV = get_GPGSV(); GPGSV = get_GPGSV();
// write to log file // write to log file
if (d_flag_nmea_output_file)
{
try try
{ {
//GPRMC // GPRMC
nmea_file_descriptor << GPRMC; nmea_file_descriptor << GPRMC;
//GPGGA (Global Positioning System Fixed Data) // GPGGA (Global Positioning System Fixed Data)
nmea_file_descriptor << GPGGA; nmea_file_descriptor << GPGGA;
//GPGSA // GPGSA
nmea_file_descriptor << GPGSA; nmea_file_descriptor << GPGSA;
//GPGSV // GPGSV
nmea_file_descriptor << GPGSV; nmea_file_descriptor << GPGSV;
} }
catch (const std::exception& ex) catch (const std::exception& ex)
{ {
DLOG(INFO) << "NMEA printer can not write on output file" << nmea_filename.c_str(); DLOG(INFO) << "NMEA printer can not write on output file" << nmea_filename.c_str();
; }
} }
//write to serial device // write to serial device
if (nmea_dev_descriptor != -1) if (nmea_dev_descriptor != -1)
{ {
if (write(nmea_dev_descriptor, GPRMC.c_str(), GPRMC.length()) == -1) if (write(nmea_dev_descriptor, GPRMC.c_str(), GPRMC.length()) == -1)
@ -284,7 +331,7 @@ std::string Nmea_Printer::longitude_to_hm(double longitude)
std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time) std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time)
{ {
//UTC Time: hhmmss.sss // UTC Time: hhmmss.sss
std::stringstream sentence_str; std::stringstream sentence_str;
boost::posix_time::time_duration td = d_position_UTC_time.time_of_day(); boost::posix_time::time_duration td = d_position_UTC_time.time_of_day();
@ -335,20 +382,19 @@ std::string Nmea_Printer::get_GPRMC()
double speed_over_ground_knots = 0; double speed_over_ground_knots = 0;
double course_over_ground_deg = 0; double course_over_ground_deg = 0;
//boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time(); // boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time();
std::stringstream sentence_str; std::stringstream sentence_str;
//GPRMC (RMC-Recommended,Minimum Specific GNSS Data) // GPRMC (RMC-Recommended,Minimum Specific GNSS Data)
std::string sentence_header; std::string sentence_header;
sentence_header = "$GPRMC,"; sentence_header = "$GPRMC,";
sentence_str << sentence_header; sentence_str << sentence_header;
//UTC Time: hhmmss.sss // UTC Time: hhmmss.sss
sentence_str << get_UTC_NMEA_time(d_PVT_data->get_position_UTC_time()); sentence_str << get_UTC_NMEA_time(d_PVT_data->get_position_UTC_time());
//Status: A: data valid, V: data NOT valid // Status: A: data valid, V: data NOT valid
if (valid_fix == true) if (valid_fix == true)
{ {
sentence_str << ",A"; sentence_str << ",A";
@ -373,13 +419,13 @@ std::string Nmea_Printer::get_GPRMC()
sentence_str << "," << longitude_to_hm(d_PVT_data->get_longitude()); sentence_str << "," << longitude_to_hm(d_PVT_data->get_longitude());
} }
//Speed over ground (knots) // Speed over ground (knots)
sentence_str << ","; sentence_str << ",";
sentence_str.setf(std::ios::fixed, std::ios::floatfield); sentence_str.setf(std::ios::fixed, std::ios::floatfield);
sentence_str.precision(2); sentence_str.precision(2);
sentence_str << speed_over_ground_knots; sentence_str << speed_over_ground_knots;
//course over ground (degrees) // course over ground (degrees)
sentence_str << ","; sentence_str << ",";
sentence_str.setf(std::ios::fixed, std::ios::floatfield); sentence_str.setf(std::ios::fixed, std::ios::floatfield);
sentence_str.precision(2); sentence_str.precision(2);
@ -403,11 +449,11 @@ std::string Nmea_Printer::get_GPRMC()
year_strs << std::dec << year; year_strs << std::dec << year;
sentence_str << std::dec << year_strs.str().substr(2); sentence_str << std::dec << year_strs.str().substr(2);
//Magnetic Variation (degrees) // Magnetic Variation (degrees)
// ToDo: Implement magnetic compass // ToDo: Implement magnetic compass
sentence_str << ","; sentence_str << ",";
//Magnetic Variation (E or W) // Magnetic Variation (E or W)
// ToDo: Implement magnetic compass // ToDo: Implement magnetic compass
sentence_str << ","; sentence_str << ",";
@ -429,7 +475,7 @@ std::string Nmea_Printer::get_GPRMC()
std::string Nmea_Printer::get_GPGSA() std::string Nmea_Printer::get_GPGSA()
{ {
//$GPGSA,A,3,07,02,26,27,09,04,15, , , , , ,1.8,1.0,1.5*33 // $GPGSA,A,3,07,02,26,27,09,04,15, , , , , ,1.8,1.0,1.5*33
// GSA-GNSS DOP and Active Satellites // GSA-GNSS DOP and Active Satellites
bool valid_fix = d_PVT_data->is_valid_position(); bool valid_fix = d_PVT_data->is_valid_position();
int n_sats_used = d_PVT_data->get_num_valid_observations(); int n_sats_used = d_PVT_data->get_num_valid_observations();
@ -480,14 +526,14 @@ std::string Nmea_Printer::get_GPGSA()
sentence_str.precision(1); sentence_str.precision(1);
sentence_str.fill('0'); sentence_str.fill('0');
sentence_str << pdop; sentence_str << pdop;
//HDOP // HDOP
sentence_str << ","; sentence_str << ",";
sentence_str.setf(std::ios::fixed, std::ios::floatfield); sentence_str.setf(std::ios::fixed, std::ios::floatfield);
sentence_str.width(2); sentence_str.width(2);
sentence_str.precision(1); sentence_str.precision(1);
sentence_str.fill('0'); sentence_str.fill('0');
sentence_str << hdop; sentence_str << hdop;
//VDOP // VDOP
sentence_str << ","; sentence_str << ",";
sentence_str.setf(std::ios::fixed, std::ios::floatfield); sentence_str.setf(std::ios::fixed, std::ios::floatfield);
sentence_str.width(2); sentence_str.width(2);
@ -548,7 +594,7 @@ std::string Nmea_Printer::get_GPGSV()
frame_str.fill('0'); frame_str.fill('0');
frame_str << std::dec << n_sats_used; frame_str << std::dec << n_sats_used;
//satellites info // satellites info
for (int j = 0; j < 4; j++) for (int j = 0; j < 4; j++)
{ {
// write satellite info // write satellite info
@ -595,13 +641,13 @@ std::string Nmea_Printer::get_GPGSV()
sentence_str << frame_str.str(); sentence_str << frame_str.str();
} }
return sentence_str.str(); return sentence_str.str();
//$GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42*71 // $GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42*71
} }
std::string Nmea_Printer::get_GPGGA() std::string Nmea_Printer::get_GPGGA()
{ {
//boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time(); // boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time();
bool valid_fix = d_PVT_data->is_valid_position(); bool valid_fix = d_PVT_data->is_valid_position();
int n_channels = d_PVT_data->get_num_valid_observations(); //d_nchannels int n_channels = d_PVT_data->get_num_valid_observations(); //d_nchannels
double hdop = d_PVT_data->get_hdop(); double hdop = d_PVT_data->get_hdop();
@ -618,12 +664,12 @@ std::string Nmea_Printer::get_GPGGA()
std::stringstream sentence_str; std::stringstream sentence_str;
//GPGGA (Global Positioning System Fixed Data) // GPGGA (Global Positioning System Fixed Data)
std::string sentence_header; std::string sentence_header;
sentence_header = "$GPGGA,"; sentence_header = "$GPGGA,";
sentence_str << sentence_header; sentence_str << sentence_header;
//UTC Time: hhmmss.sss // UTC Time: hhmmss.sss
sentence_str << get_UTC_NMEA_time(d_PVT_data->get_position_UTC_time()); sentence_str << get_UTC_NMEA_time(d_PVT_data->get_position_UTC_time());
if (d_PVT_data->is_averaging() == true) if (d_PVT_data->is_averaging() == true)
@ -708,5 +754,5 @@ std::string Nmea_Printer::get_GPGGA()
// end NMEA sentence // end NMEA sentence
sentence_str << "\r\n"; sentence_str << "\r\n";
return sentence_str.str(); return sentence_str.str();
//$GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A // $GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A
} }

View File

@ -53,7 +53,7 @@ public:
/*! /*!
* \brief Default constructor. * \brief Default constructor.
*/ */
Nmea_Printer(std::string filename, bool flag_nmea_tty_port, std::string nmea_dump_filename); Nmea_Printer(std::string filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_filename, const std::string& base_path = ".");
/*! /*!
* \brief Print NMEA PVT and satellite info to the initialized device * \brief Print NMEA PVT and satellite info to the initialized device
@ -67,6 +67,7 @@ public:
private: private:
std::string nmea_filename; // String with the NMEA log filename std::string nmea_filename; // String with the NMEA log filename
std::string nmea_base_path;
std::ofstream nmea_file_descriptor; // Output file stream for NMEA log file std::ofstream nmea_file_descriptor; // Output file stream for NMEA log file
std::string nmea_devname; std::string nmea_devname;
int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port) int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port)
@ -82,6 +83,7 @@ private:
std::string latitude_to_hm(double lat); std::string latitude_to_hm(double lat);
char checkSum(std::string sentence); char checkSum(std::string sentence);
bool print_avg_pos; bool print_avg_pos;
bool d_flag_nmea_output_file;
}; };
#endif #endif

View File

@ -0,0 +1,70 @@
/*!
* \file pvt_conf.cc
* \brief Class that contains all the configuration parameters for a PVT block
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#include "pvt_conf.h"
Pvt_Conf::Pvt_Conf()
{
type_of_receiver = 0U;
output_rate_ms = 0;
display_rate_ms = 0;
rinex_version = 0;
rinexobs_rate_ms = 0;
rinexnav_rate_ms = 0;
dump = false;
dump_mat = true;
flag_nmea_tty_port = false;
flag_rtcm_server = false;
flag_rtcm_tty_port = false;
rtcm_tcp_port = 0U;
rtcm_station_id = 0U;
output_enabled = true;
rinex_output_enabled = true;
gpx_output_enabled = true;
geojson_output_enabled = true;
nmea_output_file_enabled = true;
kml_output_enabled = true;
xml_output_enabled = true;
rtcm_output_file_enabled = true;
output_path = std::string(".");
rinex_output_path = std::string(".");
gpx_output_path = std::string(".");
geojson_output_path = std::string(".");
nmea_output_file_path = std::string(".");
kml_output_path = std::string(".");
xml_output_path = std::string(".");
rtcm_output_file_path = std::string(".");
}

View File

@ -0,0 +1,86 @@
/*!
* \file pvt_conf.h
* \brief Class that contains all the configuration parameters for the PVT block
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_PVT_CONF_H_
#define GNSS_SDR_PVT_CONF_H_
#include <cstddef>
#include <cstdint>
#include <string>
#include <map>
class Pvt_Conf
{
public:
uint32_t type_of_receiver;
int32_t output_rate_ms;
int32_t display_rate_ms;
int32_t rinex_version;
int32_t rinexobs_rate_ms;
int32_t rinexnav_rate_ms;
std::map<int, int> rtcm_msg_rate_ms;
bool dump;
bool dump_mat;
std::string dump_filename;
bool flag_nmea_tty_port;
std::string nmea_dump_filename;
std::string nmea_dump_devname;
bool flag_rtcm_server;
bool flag_rtcm_tty_port;
uint16_t rtcm_tcp_port;
uint16_t rtcm_station_id;
std::string rtcm_dump_devname;
bool output_enabled;
bool rinex_output_enabled;
bool gpx_output_enabled;
bool geojson_output_enabled;
bool nmea_output_file_enabled;
bool kml_output_enabled;
bool xml_output_enabled;
bool rtcm_output_file_enabled;
std::string output_path;
std::string rinex_output_path;
std::string gpx_output_path;
std::string geojson_output_path;
std::string nmea_output_file_path;
std::string kml_output_path;
std::string xml_output_path;
std::string rtcm_output_file_path;
Pvt_Conf();
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -77,12 +77,12 @@ class Rinex_Printer
{ {
public: public:
/*! /*!
* \brief Default constructor. Creates GPS Navigation and Observables RINEX files and their headers * \brief Default constructor. Creates GNSS Navigation and Observables RINEX files and their headers
*/ */
Rinex_Printer(int version = 0); Rinex_Printer(int version = 0, const std::string& base_path = ".");
/*! /*!
* \brief Default destructor. Closes GPS Navigation and Observables RINEX files * \brief Default destructor. Closes GNSS Navigation and Observables RINEX files
*/ */
~Rinex_Printer(); ~Rinex_Printer();
@ -106,12 +106,17 @@ public:
/*! /*!
* \brief Generates the Galileo Navigation Data header * \brief Generates the Galileo Navigation Data header
*/ */
void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac); void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model);
/*! /*!
* \brief Generates the Mixed (GPS/Galileo) Navigation Data header * \brief Generates the Mixed (GPS/Galileo) Navigation Data header
*/ */
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac); void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
/*!
* \brief Generates the Mixed (GPS CNAV/Galileo) Navigation Data header
*/
void rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& iono, const Gps_CNAV_Utc_Model& utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
/*! /*!
* \brief Generates the GLONASS L1, L2 C/A Navigation Data header * \brief Generates the GLONASS L1, L2 C/A Navigation Data header
@ -121,7 +126,7 @@ public:
/*! /*!
* \brief Generates the Mixed (Galileo/GLONASS) Navigation Data header * \brief Generates the Mixed (Galileo/GLONASS) Navigation Data header
*/ */
void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
/*! /*!
* \brief Generates the Mixed (GPS L1 C/A/GLONASS L1, L2) Navigation Data header * \brief Generates the Mixed (GPS L1 C/A/GLONASS L1, L2) Navigation Data header
@ -141,12 +146,12 @@ public:
/*! /*!
* \brief Generates the GPS L2 Observation data header * \brief Generates the GPS L2 Observation data header
*/ */
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const double d_TOW_first_observation); void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const double d_TOW_first_observation, const std::string gps_bands = "2S");
/*! /*!
* \brief Generates the dual frequency GPS L1 & L2 Observation data header * \brief Generates the dual frequency GPS L1 & L2/L5 Observation data header
*/ */
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation); void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation, const std::string gps_bands = "1C 2S");
/*! /*!
* \brief Generates the Galileo Observation data header. Example: bands("1B"), bands("1B 5X"), bands("5X"), ... Default: "1B". * \brief Generates the Galileo Observation data header. Example: bands("1B"), bands("1B 5X"), bands("5X"), ... Default: "1B".
@ -158,6 +163,16 @@ public:
*/ */
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string galileo_bands = "1B"); void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string galileo_bands = "1B");
/*!
* \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
*/
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string gps_bands = "1C 2S", const std::string galileo_bands = "1B");
/*!
* \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
*/
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string gps_bands = "2S", const std::string galileo_bands = "1B");
/*! /*!
* \brief Generates the GLONASS GNAV Observation data header. Example: bands("1C"), bands("1C 2C"), bands("2C"), ... Default: "1C". * \brief Generates the GLONASS GNAV Observation data header. Example: bands("1C"), bands("1C 2C"), bands("2C"), ... Default: "1C".
*/ */
@ -239,6 +254,11 @@ public:
*/ */
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& gps_eph_map, const std::map<int32_t, Galileo_Ephemeris>& galileo_eph_map); void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& gps_eph_map, const std::map<int32_t, Galileo_Ephemeris>& galileo_eph_map);
/*!
* \brief Writes data from the Mixed (GPS/Galileo) navigation message into the RINEX file
*/
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_CNAV_Ephemeris>& gps_cnav_eph_map, const std::map<int32_t, Galileo_Ephemeris>& galileo_eph_map);
/*! /*!
* \brief Writes data from the GLONASS GNAV navigation message into the RINEX file * \brief Writes data from the GLONASS GNAV navigation message into the RINEX file
*/ */
@ -284,6 +304,16 @@ public:
*/ */
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables); void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
/*!
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
*/
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
/*!
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
*/
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
/*! /*!
* \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". * \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
*/ */
@ -318,9 +348,11 @@ public:
void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono); void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono);
void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac); void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac); void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model);
void update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); void update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
@ -328,7 +360,7 @@ public:
void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_cnav_iono, const Gps_CNAV_Utc_Model& gps_cnav_utc, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_cnav_iono, const Gps_CNAV_Utc_Model& gps_cnav_utc, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model); void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model);

View File

@ -33,6 +33,9 @@
#include "rtcm_printer.h" #include "rtcm_printer.h"
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <glog/logging.h> #include <glog/logging.h>
#include <iomanip> #include <iomanip>
#include <fcntl.h> // for O_RDWR #include <fcntl.h> // for O_RDWR
@ -42,10 +45,45 @@
using google::LogMessage; using google::LogMessage;
Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name) Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name, const std::string& base_path)
{ {
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
tm timeinfo = boost::posix_time::to_tm(pt); tm timeinfo = boost::posix_time::to_tm(pt);
d_rtcm_file_dump = flag_rtcm_file_dump;
rtcm_base_path = base_path;
if (d_rtcm_file_dump)
{
boost::filesystem::path full_path(boost::filesystem::current_path());
const boost::filesystem::path p(rtcm_base_path);
if (!boost::filesystem::exists(p))
{
std::string new_folder;
for (auto& folder : boost::filesystem::path(rtcm_base_path))
{
new_folder += folder.string();
boost::system::error_code ec;
if (!boost::filesystem::exists(new_folder))
{
if (!boost::filesystem::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
rtcm_base_path = full_path.string();
}
}
new_folder += boost::filesystem::path::preferred_separator;
}
}
else
{
rtcm_base_path = p.string();
}
if (rtcm_base_path.compare(".") != 0)
{
std::cout << "RTCM binary file will be stored at " << rtcm_base_path << std::endl;
}
rtcm_base_path = rtcm_base_path + boost::filesystem::path::preferred_separator;
}
if (time_tag_name) if (time_tag_name)
{ {
@ -89,12 +127,19 @@ Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool fla
{ {
rtcm_filename = filename + ".rtcm"; rtcm_filename = filename + ".rtcm";
} }
rtcm_filename = rtcm_base_path + rtcm_filename;
if (d_rtcm_file_dump)
{
rtcm_file_descriptor.open(rtcm_filename.c_str(), std::ios::out); rtcm_file_descriptor.open(rtcm_filename.c_str(), std::ios::out);
if (rtcm_file_descriptor.is_open()) if (rtcm_file_descriptor.is_open())
{ {
DLOG(INFO) << "RTCM printer writing on " << rtcm_filename.c_str(); DLOG(INFO) << "RTCM printer writing on " << rtcm_filename.c_str();
} }
else
{
std::cout << "File " << rtcm_filename << "cannot be saved. Wrong permissions?" << std::endl;
}
}
rtcm_devname = rtcm_dump_devname; rtcm_devname = rtcm_dump_devname;
if (flag_rtcm_tty_port == true) if (flag_rtcm_tty_port == true)
@ -341,6 +386,8 @@ void Rtcm_Printer::close_serial()
bool Rtcm_Printer::Print_Message(const std::string& message) bool Rtcm_Printer::Print_Message(const std::string& message)
{ {
//write to file //write to file
if (d_rtcm_file_dump)
{
try try
{ {
rtcm_file_descriptor << message << std::endl; rtcm_file_descriptor << message << std::endl;
@ -350,6 +397,7 @@ bool Rtcm_Printer::Print_Message(const std::string& message)
DLOG(INFO) << "RTCM printer cannot write on the output file " << rtcm_filename.c_str(); DLOG(INFO) << "RTCM printer cannot write on the output file " << rtcm_filename.c_str();
return false; return false;
} }
}
//write to serial device //write to serial device
if (rtcm_dev_descriptor != -1) if (rtcm_dev_descriptor != -1)

View File

@ -48,7 +48,7 @@ public:
/*! /*!
* \brief Default constructor. * \brief Default constructor.
*/ */
Rtcm_Printer(std::string filename, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true); Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true, const std::string& base_path = ".");
/*! /*!
* \brief Default destructor. * \brief Default destructor.
@ -143,6 +143,7 @@ public:
private: private:
std::string rtcm_filename; // String with the RTCM log filename std::string rtcm_filename; // String with the RTCM log filename
std::string rtcm_base_path;
std::ofstream rtcm_file_descriptor; // Output file stream for RTCM log file std::ofstream rtcm_file_descriptor; // Output file stream for RTCM log file
std::string rtcm_devname; std::string rtcm_devname;
uint16_t port; uint16_t port;
@ -152,6 +153,7 @@ private:
void close_serial(); void close_serial();
std::shared_ptr<Rtcm> rtcm; std::shared_ptr<Rtcm> rtcm;
bool Print_Message(const std::string& message); bool Print_Message(const std::string& message);
bool d_rtcm_file_dump;
}; };
#endif #endif

View File

@ -56,17 +56,19 @@
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "GLONASS_L1_L2_CA.h" #include "GLONASS_L1_L2_CA.h"
#include <matio.h>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage; using google::LogMessage;
rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t& rtk) rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, rtk_t &rtk)
{ {
// init empty ephemeris for all the available GNSS channels // init empty ephemeris for all the available GNSS channels
d_nchannels = nchannels; d_nchannels = nchannels;
d_dump_filename = dump_filename; d_dump_filename = dump_filename;
d_flag_dump_enabled = flag_dump_to_file; d_flag_dump_enabled = flag_dump_to_file;
d_flag_dump_mat_enabled = flag_dump_to_mat;
count_valid_position = 0; count_valid_position = 0;
this->set_averaging_flag(false); this->set_averaging_flag(false);
rtk_ = rtk; rtk_ = rtk;
@ -84,7 +86,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str(); LOG(INFO) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str();
} }
catch (const std::ifstream::failure& e) catch (const std::ifstream::failure &e)
{ {
LOG(WARNING) << "Exception opening RTKLIB dump file " << e.what(); LOG(WARNING) << "Exception opening RTKLIB dump file " << e.what();
} }
@ -92,6 +94,301 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
} }
} }
bool rtklib_solver::save_matfile()
{
// READ DUMP FILE
std::string dump_filename = d_dump_filename;
std::ifstream::pos_type size;
int32_t number_of_double_vars = 21;
int32_t number_of_uint32_vars = 2;
int32_t number_of_uint8_vars = 3;
int32_t number_of_float_vars = 2;
int32_t epoch_size_bytes = sizeof(double) * number_of_double_vars +
sizeof(uint32_t) * number_of_uint32_vars +
sizeof(uint8_t) * number_of_uint8_vars +
sizeof(float) * number_of_float_vars;
std::ifstream dump_file;
std::cout << "Generating .mat file for " << dump_filename << std::endl;
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try
{
dump_file.open(dump_filename.c_str(), std::ios::binary | std::ios::ate);
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Problem opening dump file:" << e.what() << std::endl;
return false;
}
// count number of epochs and rewind
int64_t num_epoch = 0LL;
if (dump_file.is_open())
{
size = dump_file.tellg();
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
dump_file.seekg(0, std::ios::beg);
}
else
{
return false;
}
uint32_t *TOW_at_current_symbol_ms = new uint32_t[num_epoch];
uint32_t *week = new uint32_t[num_epoch];
double *RX_time = new double[num_epoch];
double *user_clk_offset = new double[num_epoch];
double *pos_x = new double[num_epoch];
double *pos_y = new double[num_epoch];
double *pos_z = new double[num_epoch];
double *vel_x = new double[num_epoch];
double *vel_y = new double[num_epoch];
double *vel_z = new double[num_epoch];
double *cov_xx = new double[num_epoch];
double *cov_yy = new double[num_epoch];
double *cov_zz = new double[num_epoch];
double *cov_xy = new double[num_epoch];
double *cov_yz = new double[num_epoch];
double *cov_zx = new double[num_epoch];
double *latitude = new double[num_epoch];
double *longitude = new double[num_epoch];
double *height = new double[num_epoch];
uint8_t *valid_sats = new uint8_t[num_epoch];
uint8_t *solution_status = new uint8_t[num_epoch];
uint8_t *solution_type = new uint8_t[num_epoch];
float *AR_ratio_factor = new float[num_epoch];
float *AR_ratio_threshold = new float[num_epoch];
double *gdop = new double[num_epoch];
double *pdop = new double[num_epoch];
double *hdop = new double[num_epoch];
double *vdop = new double[num_epoch];
try
{
if (dump_file.is_open())
{
for (int64_t i = 0; i < num_epoch; i++)
{
dump_file.read(reinterpret_cast<char *>(&TOW_at_current_symbol_ms[i]), sizeof(uint32_t));
dump_file.read(reinterpret_cast<char *>(&week[i]), sizeof(uint32_t));
dump_file.read(reinterpret_cast<char *>(&RX_time[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&user_clk_offset[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&pos_x[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&pos_y[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&pos_z[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&vel_x[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&vel_y[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&vel_z[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&cov_xx[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&cov_yy[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&cov_zz[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&cov_xy[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&cov_yz[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&cov_zx[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&latitude[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&longitude[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&height[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&valid_sats[i]), sizeof(uint8_t));
dump_file.read(reinterpret_cast<char *>(&solution_status[i]), sizeof(uint8_t));
dump_file.read(reinterpret_cast<char *>(&solution_type[i]), sizeof(uint8_t));
dump_file.read(reinterpret_cast<char *>(&AR_ratio_factor[i]), sizeof(float));
dump_file.read(reinterpret_cast<char *>(&AR_ratio_threshold[i]), sizeof(float));
dump_file.read(reinterpret_cast<char *>(&gdop[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&pdop[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&hdop[i]), sizeof(double));
dump_file.read(reinterpret_cast<char *>(&vdop[i]), sizeof(double));
}
}
dump_file.close();
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Problem reading dump file:" << e.what() << std::endl;
delete[] TOW_at_current_symbol_ms;
delete[] week;
delete[] RX_time;
delete[] user_clk_offset;
delete[] pos_x;
delete[] pos_y;
delete[] pos_z;
delete[] vel_x;
delete[] vel_y;
delete[] vel_z;
delete[] cov_xx;
delete[] cov_yy;
delete[] cov_zz;
delete[] cov_xy;
delete[] cov_yz;
delete[] cov_zx;
delete[] latitude;
delete[] longitude;
delete[] height;
delete[] valid_sats;
delete[] solution_status;
delete[] solution_type;
delete[] AR_ratio_factor;
delete[] AR_ratio_threshold;
delete[] gdop;
delete[] pdop;
delete[] hdop;
delete[] vdop;
return false;
}
// WRITE MAT FILE
mat_t *matfp;
matvar_t *matvar;
std::string filename = dump_filename;
filename.erase(filename.length() - 4, 4);
filename.append(".mat");
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
if (reinterpret_cast<int64_t *>(matfp) != NULL)
{
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
matvar = Mat_VarCreate("TOW_at_current_symbol_ms", MAT_C_UINT32, MAT_T_UINT32, 2, dims, TOW_at_current_symbol_ms, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("week", MAT_C_UINT32, MAT_T_UINT32, 2, dims, week, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("RX_time", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, RX_time, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("user_clk_offset", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, user_clk_offset, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("pos_x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, pos_x, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("pos_y", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, pos_y, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("pos_z", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, pos_z, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("vel_x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, vel_x, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("vel_y", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, vel_y, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("vel_z", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, vel_z, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("cov_xx", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, cov_xx, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("cov_yy", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, cov_yy, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("cov_zz", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, cov_zz, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("cov_xy", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, cov_xy, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("cov_yz", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, cov_yz, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("cov_zx", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, cov_zx, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("latitude", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, latitude, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("longitude", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, longitude, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("height", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, height, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("valid_sats", MAT_C_UINT8, MAT_T_UINT8, 2, dims, valid_sats, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("solution_status", MAT_C_UINT8, MAT_T_UINT8, 2, dims, solution_status, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("solution_type", MAT_C_UINT8, MAT_T_UINT8, 2, dims, solution_type, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("AR_ratio_factor", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, AR_ratio_factor, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("AR_ratio_threshold", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, AR_ratio_threshold, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("gdop", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, gdop, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("pdop", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, pdop, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("hdop", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, hdop, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
matvar = Mat_VarCreate("vdop", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, vdop, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
}
Mat_Close(matfp);
delete[] TOW_at_current_symbol_ms;
delete[] week;
delete[] RX_time;
delete[] user_clk_offset;
delete[] pos_x;
delete[] pos_y;
delete[] pos_z;
delete[] vel_x;
delete[] vel_y;
delete[] vel_z;
delete[] cov_xx;
delete[] cov_yy;
delete[] cov_zz;
delete[] cov_xy;
delete[] cov_yz;
delete[] cov_zx;
delete[] latitude;
delete[] longitude;
delete[] height;
delete[] valid_sats;
delete[] solution_status;
delete[] solution_type;
delete[] AR_ratio_factor;
delete[] AR_ratio_threshold;
delete[] gdop;
delete[] pdop;
delete[] hdop;
delete[] vdop;
return true;
}
rtklib_solver::~rtklib_solver() rtklib_solver::~rtklib_solver()
{ {
@ -101,11 +398,15 @@ rtklib_solver::~rtklib_solver()
{ {
d_dump_file.close(); d_dump_file.close();
} }
catch (const std::exception& ex) catch (const std::exception &ex)
{ {
LOG(WARNING) << "Exception in destructor closing the RTKLIB dump file " << ex.what(); LOG(WARNING) << "Exception in destructor closing the RTKLIB dump file " << ex.what();
} }
} }
if (d_flag_dump_mat_enabled)
{
save_matfile();
}
} }
@ -133,7 +434,7 @@ double rtklib_solver::get_vdop() const
} }
bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging) bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging)
{ {
std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter; std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter;
std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter; std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter;
@ -493,7 +794,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
unsigned int used_sats = 0; unsigned int used_sats = 0;
for (unsigned int i = 0; i < MAXSAT; i++) for (unsigned int i = 0; i < MAXSAT; i++)
{ {
if (rtk_.ssat[i].vsat[0] == 1) used_sats++; if (rtk_.ssat[i].vs == 1) used_sats++;
} }
std::vector<double> azel; std::vector<double> azel;
@ -501,7 +802,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
unsigned int index_aux = 0; unsigned int index_aux = 0;
for (unsigned int i = 0; i < MAXSAT; i++) for (unsigned int i = 0; i < MAXSAT; i++)
{ {
if (rtk_.ssat[i].vsat[0] == 1) if (rtk_.ssat[i].vs == 1)
{ {
azel[2 * index_aux] = rtk_.ssat[i].azel[0]; azel[2 * index_aux] = rtk_.ssat[i].azel[0];
azel[2 * index_aux + 1] = rtk_.ssat[i].azel[1]; azel[2 * index_aux + 1] = rtk_.ssat[i].azel[1];
@ -559,73 +860,73 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_
uint32_t tmp_uint32; uint32_t tmp_uint32;
// TOW // TOW
tmp_uint32 = gnss_observables_map.begin()->second.TOW_at_current_symbol_ms; tmp_uint32 = gnss_observables_map.begin()->second.TOW_at_current_symbol_ms;
d_dump_file.write(reinterpret_cast<char*>(&tmp_uint32), sizeof(uint32_t)); d_dump_file.write(reinterpret_cast<char *>(&tmp_uint32), sizeof(uint32_t));
// WEEK // WEEK
tmp_uint32 = adjgpsweek(nav_data.eph[0].week); tmp_uint32 = adjgpsweek(nav_data.eph[0].week);
d_dump_file.write(reinterpret_cast<char*>(&tmp_uint32), sizeof(uint32_t)); d_dump_file.write(reinterpret_cast<char *>(&tmp_uint32), sizeof(uint32_t));
// PVT GPS time // PVT GPS time
tmp_double = gnss_observables_map.begin()->second.RX_time; tmp_double = gnss_observables_map.begin()->second.RX_time;
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// User clock offset [s] // User clock offset [s]
tmp_double = rx_position_and_time(3); tmp_double = rx_position_and_time(3);
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// ECEF POS X,Y,X [m] + ECEF VEL X,Y,X [m/s] (6 x double) // ECEF POS X,Y,X [m] + ECEF VEL X,Y,X [m/s] (6 x double)
tmp_double = pvt_sol.rr[0]; tmp_double = pvt_sol.rr[0];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.rr[1]; tmp_double = pvt_sol.rr[1];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.rr[2]; tmp_double = pvt_sol.rr[2];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.rr[3]; tmp_double = pvt_sol.rr[3];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.rr[4]; tmp_double = pvt_sol.rr[4];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.rr[5]; tmp_double = pvt_sol.rr[5];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// position variance/covariance (m^2) {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} (6 x double) // position variance/covariance (m^2) {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} (6 x double)
tmp_double = pvt_sol.qr[0]; tmp_double = pvt_sol.qr[0];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.qr[1]; tmp_double = pvt_sol.qr[1];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.qr[2]; tmp_double = pvt_sol.qr[2];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.qr[3]; tmp_double = pvt_sol.qr[3];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.qr[4]; tmp_double = pvt_sol.qr[4];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
tmp_double = pvt_sol.qr[5]; tmp_double = pvt_sol.qr[5];
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// GEO user position Latitude [deg] // GEO user position Latitude [deg]
tmp_double = get_latitude(); tmp_double = get_latitude();
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// GEO user position Longitude [deg] // GEO user position Longitude [deg]
tmp_double = get_longitude(); tmp_double = get_longitude();
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// GEO user position Height [m] // GEO user position Height [m]
tmp_double = get_height(); tmp_double = get_height();
d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
// NUMBER OF VALID SATS // NUMBER OF VALID SATS
d_dump_file.write(reinterpret_cast<char*>(&pvt_sol.ns), sizeof(uint8_t)); d_dump_file.write(reinterpret_cast<char *>(&pvt_sol.ns), sizeof(uint8_t));
// RTKLIB solution status // RTKLIB solution status
d_dump_file.write(reinterpret_cast<char*>(&pvt_sol.stat), sizeof(uint8_t)); d_dump_file.write(reinterpret_cast<char *>(&pvt_sol.stat), sizeof(uint8_t));
// RTKLIB solution type (0:xyz-ecef,1:enu-baseline) // RTKLIB solution type (0:xyz-ecef,1:enu-baseline)
d_dump_file.write(reinterpret_cast<char*>(&pvt_sol.type), sizeof(uint8_t)); d_dump_file.write(reinterpret_cast<char *>(&pvt_sol.type), sizeof(uint8_t));
// AR ratio factor for validation // AR ratio factor for validation
d_dump_file.write(reinterpret_cast<char*>(&pvt_sol.ratio), sizeof(float)); d_dump_file.write(reinterpret_cast<char *>(&pvt_sol.ratio), sizeof(float));
// AR ratio threshold for validation // AR ratio threshold for validation
d_dump_file.write(reinterpret_cast<char*>(&pvt_sol.thres), sizeof(float)); d_dump_file.write(reinterpret_cast<char *>(&pvt_sol.thres), sizeof(float));
// GDOP / PDOP/ HDOP/ VDOP // GDOP / PDOP/ HDOP/ VDOP
d_dump_file.write(reinterpret_cast<char*>(&dop_[0]), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&dop_[0]), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&dop_[1]), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&dop_[1]), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&dop_[2]), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&dop_[2]), sizeof(double));
d_dump_file.write(reinterpret_cast<char*>(&dop_[3]), sizeof(double)); d_dump_file.write(reinterpret_cast<char *>(&dop_[3]), sizeof(double));
} }
catch (const std::ifstream::failure& e) catch (const std::ifstream::failure &e)
{ {
LOG(WARNING) << "Exception writing RTKLIB dump file " << e.what(); LOG(WARNING) << "Exception writing RTKLIB dump file " << e.what();
} }

View File

@ -60,6 +60,7 @@
#include "gps_navigation_message.h" #include "gps_navigation_message.h"
#include "gps_cnav_navigation_message.h" #include "gps_cnav_navigation_message.h"
#include "glonass_gnav_navigation_message.h" #include "glonass_gnav_navigation_message.h"
#include "galileo_almanac.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "pvt_solution.h" #include "pvt_solution.h"
#include <fstream> #include <fstream>
@ -76,14 +77,16 @@ private:
rtk_t rtk_; rtk_t rtk_;
std::string d_dump_filename; std::string d_dump_filename;
std::ofstream d_dump_file; std::ofstream d_dump_file;
bool save_matfile();
bool d_flag_dump_enabled; bool d_flag_dump_enabled;
bool d_flag_dump_mat_enabled;
int d_nchannels; // Number of available channels for positioning int d_nchannels; // Number of available channels for positioning
double dop_[4]; double dop_[4];
public: public:
sol_t pvt_sol; sol_t pvt_sol;
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t& rtk); rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, rtk_t& rtk);
~rtklib_solver(); ~rtklib_solver();
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging); bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging);
@ -99,10 +102,11 @@ public:
Galileo_Utc_Model galileo_utc_model; Galileo_Utc_Model galileo_utc_model;
Galileo_Iono galileo_iono; Galileo_Iono galileo_iono;
Galileo_Almanac galileo_almanac; std::map<int, Galileo_Almanac> galileo_almanac_map;
Gps_Utc_Model gps_utc_model; Gps_Utc_Model gps_utc_model;
Gps_Iono gps_iono; Gps_Iono gps_iono;
std::map<int, Gps_Almanac> gps_almanac_map;
Gps_CNAV_Iono gps_cnav_iono; Gps_CNAV_Iono gps_cnav_iono;
Gps_CNAV_Utc_Model gps_cnav_utc_model; Gps_CNAV_Utc_Model gps_cnav_utc_model;

View File

@ -40,6 +40,9 @@
using google::LogMessage; using google::LogMessage;
void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition()
{
}
GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -122,6 +122,12 @@ public:
* \brief Restart acquisition algorithm * \brief Restart acquisition algorithm
*/ */
void reset() override; void reset() override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
void set_state(int state __attribute__((unused))) override{}; void set_state(int state __attribute__((unused))) override{};
private: private:

View File

@ -42,6 +42,10 @@
using google::LogMessage; using google::LogMessage;
void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition()
{
}
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
@ -49,7 +53,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
Acq_Conf acq_parameters; Acq_Conf acq_parameters;
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./data/acquisition.dat"; std::string default_dump_filename = "./acquisition.mat";
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;

View File

@ -131,6 +131,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_acquisition_sptr acquisition_; pcps_acquisition_sptr acquisition_;

View File

@ -39,9 +39,12 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage; using google::LogMessage;
void GalileoE1PcpsAmbiguousAcquisitionFpga::stop_acquisition()
{
}
GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
@ -49,12 +52,14 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
//printf("top acq constructor start\n"); //printf("top acq constructor start\n");
pcpsconf_fpga_t acq_parameters; pcpsconf_fpga_t acq_parameters;
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "cshort"; std::string default_item_type = "cshort";
std::string default_dump_filename = "./data/acquisition.dat"; std::string default_dump_filename = "./data/acquisition.dat";
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
// item_type_ = configuration_->property(role + ".item_type", default_item_type); // item_type_ = configuration_->property(role + ".item_type", default_item_type);
long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
@ -76,7 +81,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
// dump_ = configuration_->property(role + ".dump", false); // dump_ = configuration_->property(role + ".dump", false);
// acq_parameters.dump = dump_; // acq_parameters.dump = dump_;
// blocking_ = configuration_->property(role + ".blocking", true); // blocking_ = configuration_->property(role + ".blocking", true);
// acq_parameters.blocking = blocking_; // acq_parameters.blocking = blocking_;
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
acq_parameters.doppler_max = doppler_max_; acq_parameters.doppler_max = doppler_max_;
@ -102,10 +107,10 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
//acq_parameters.samples_per_ms = samples_per_ms; //acq_parameters.samples_per_ms = samples_per_ms;
//unsigned int vector_length = sampled_ms * samples_per_ms; //unsigned int vector_length = sampled_ms * samples_per_ms;
// if (bit_transition_flag_) // if (bit_transition_flag_)
// { // {
// vector_length_ *= 2; // vector_length_ *= 2;
// } // }
//printf("fs_in = %d\n", fs_in); //printf("fs_in = %d\n", fs_in);
//printf("Galileo_E1_B_CODE_LENGTH_CHIPS = %f\n", Galileo_E1_B_CODE_LENGTH_CHIPS); //printf("Galileo_E1_B_CODE_LENGTH_CHIPS = %f\n", Galileo_E1_B_CODE_LENGTH_CHIPS);
@ -122,7 +127,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
std::string default_device_name = "/dev/uio0"; std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name); std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name; acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total/sampled_ms; acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
acq_parameters.samples_per_code = nsamples_total; acq_parameters.samples_per_code = nsamples_total;
acq_parameters.excludelimit = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / Galileo_E1_CODE_CHIP_RATE_HZ)); acq_parameters.excludelimit = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / Galileo_E1_CODE_CHIP_RATE_HZ));
@ -139,6 +144,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++) for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++)
{ {
//code_ = new gr_complex[vector_length_]; //code_ = new gr_complex[vector_length_];
bool cboc = false; // cboc is set to 0 when using the FPGA bool cboc = false; // cboc is set to 0 when using the FPGA
@ -272,23 +278,24 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
// fclose(fid2); // fclose(fid2);
} }
// for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++) // for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++)
// { // {
// // debug // // debug
// char filename2[25]; // char filename2[25];
// FILE *fid2; // FILE *fid2;
// sprintf(filename2,"fft_gal_prn%d_norm_last.txt", PRN); // sprintf(filename2,"fft_gal_prn%d_norm_last.txt", PRN);
// fid2 = fopen(filename2, "w"); // fid2 = fopen(filename2, "w");
// for (unsigned int kk=0;kk< nsamples_total; kk++) // for (unsigned int kk=0;kk< nsamples_total; kk++)
// { // {
// fprintf(fid2, "%d\n", d_all_fft_codes_[kk + nsamples_total * (PRN - 1)].real()); // fprintf(fid2, "%d\n", d_all_fft_codes_[kk + nsamples_total * (PRN - 1)].real());
// fprintf(fid2, "%d\n", d_all_fft_codes_[kk + nsamples_total * (PRN - 1)].imag()); // fprintf(fid2, "%d\n", d_all_fft_codes_[kk + nsamples_total * (PRN - 1)].imag());
// } // }
// fclose(fid2); // fclose(fid2);
// } // }
//acq_parameters //acq_parameters
@ -304,14 +311,14 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
// stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); // stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
// DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")"; // DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
// if (item_type_.compare("cbyte") == 0) // if (item_type_.compare("cbyte") == 0)
// { // {
// cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); // cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
// float_to_complex_ = gr::blocks::float_to_complex::make(); // float_to_complex_ = gr::blocks::float_to_complex::make();
// } // }
channel_ = 0; channel_ = 0;
//threshold_ = 0.0; //threshold_ = 0.0;
@ -345,22 +352,22 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_threshold(float threshold)
// the .pfa parameter and the threshold calculation is only used for the CFAR algorithm. // the .pfa parameter and the threshold calculation is only used for the CFAR algorithm.
// We don't use the CFAR algorithm in the FPGA. Therefore the threshold is set as such. // We don't use the CFAR algorithm in the FPGA. Therefore the threshold is set as such.
// float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); // float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
// //
// if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); // if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
// //
// if (pfa == 0.0) // if (pfa == 0.0)
// { // {
// threshold_ = threshold; // threshold_ = threshold;
// } // }
// else // else
// { // {
// threshold_ = calculate_threshold(pfa); // threshold_ = calculate_threshold(pfa);
// } // }
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold; DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
acquisition_fpga_->set_threshold(threshold); acquisition_fpga_->set_threshold(threshold);
// acquisition_fpga_->set_threshold(threshold_); // acquisition_fpga_->set_threshold(threshold_);
//printf("top acq set threshold end\n"); //printf("top acq set threshold end\n");
} }
@ -415,33 +422,33 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::init()
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_local_code() void GalileoE1PcpsAmbiguousAcquisitionFpga::set_local_code()
{ {
// printf("top acq set local code start\n"); // printf("top acq set local code start\n");
// bool cboc = configuration_->property( // bool cboc = configuration_->property(
// "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); // "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false);
// //
// std::complex<float>* code = new std::complex<float>[code_length_]; // std::complex<float>* code = new std::complex<float>[code_length_];
// //
// if (acquire_pilot_ == true) // if (acquire_pilot_ == true)
// { // {
// //set local signal generator to Galileo E1 pilot component (1C) // //set local signal generator to Galileo E1 pilot component (1C)
// char pilot_signal[3] = "1C"; // char pilot_signal[3] = "1C";
// galileo_e1_code_gen_complex_sampled(code, pilot_signal, // galileo_e1_code_gen_complex_sampled(code, pilot_signal,
// cboc, gnss_synchro_->PRN, fs_in_, 0, false); // cboc, gnss_synchro_->PRN, fs_in_, 0, false);
// } // }
// else // else
// { // {
// galileo_e1_code_gen_complex_sampled(code, gnss_synchro_->Signal, // galileo_e1_code_gen_complex_sampled(code, gnss_synchro_->Signal,
// cboc, gnss_synchro_->PRN, fs_in_, 0, false); // cboc, gnss_synchro_->PRN, fs_in_, 0, false);
// } // }
// //
// //
// for (unsigned int i = 0; i < sampled_ms_ / 4; i++) // for (unsigned int i = 0; i < sampled_ms_ / 4; i++)
// { // {
// memcpy(&(code_[i * code_length_]), code, sizeof(gr_complex) * code_length_); // memcpy(&(code_[i * code_length_]), code, sizeof(gr_complex) * code_length_);
// } // }
//acquisition_fpga_->set_local_code(code_); //acquisition_fpga_->set_local_code(code_);
acquisition_fpga_->set_local_code(); acquisition_fpga_->set_local_code();
// delete[] code; // delete[] code;
// printf("top acq set local code end\n"); // printf("top acq set local code end\n");
} }
@ -510,25 +517,25 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::read_fpga_total_scale_factor(uint32_
void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block) void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block)
{ {
// printf("top acq connect\n"); // printf("top acq connect\n");
// if (item_type_.compare("gr_complex") == 0) // if (item_type_.compare("gr_complex") == 0)
// { // {
// top_block->connect(stream_to_vector_, 0, acquisition_fpga_, 0); // top_block->connect(stream_to_vector_, 0, acquisition_fpga_, 0);
// } // }
// else if (item_type_.compare("cshort") == 0) // else if (item_type_.compare("cshort") == 0)
// { // {
// top_block->connect(stream_to_vector_, 0, acquisition_fpga_, 0); // top_block->connect(stream_to_vector_, 0, acquisition_fpga_, 0);
// } // }
// else if (item_type_.compare("cbyte") == 0) // else if (item_type_.compare("cbyte") == 0)
// { // {
// top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0); // top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
// top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1); // top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
// top_block->connect(float_to_complex_, 0, stream_to_vector_, 0); // top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
// top_block->connect(stream_to_vector_, 0, acquisition_fpga_, 0); // top_block->connect(stream_to_vector_, 0, acquisition_fpga_, 0);
// } // }
// else // else
// { // {
// LOG(WARNING) << item_type_ << " unknown acquisition item type"; // LOG(WARNING) << item_type_ << " unknown acquisition item type";
// } // }
// nothing to connect // nothing to connect
} }
@ -536,27 +543,27 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block
void GalileoE1PcpsAmbiguousAcquisitionFpga::disconnect(gr::top_block_sptr top_block) void GalileoE1PcpsAmbiguousAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
{ {
// if (item_type_.compare("gr_complex") == 0) // if (item_type_.compare("gr_complex") == 0)
// { // {
// top_block->disconnect(stream_to_vector_, 0, acquisition_fpga_, 0); // top_block->disconnect(stream_to_vector_, 0, acquisition_fpga_, 0);
// } // }
// else if (item_type_.compare("cshort") == 0) // else if (item_type_.compare("cshort") == 0)
// { // {
// top_block->disconnect(stream_to_vector_, 0, acquisition_fpga_, 0); // top_block->disconnect(stream_to_vector_, 0, acquisition_fpga_, 0);
// } // }
// else if (item_type_.compare("cbyte") == 0) // else if (item_type_.compare("cbyte") == 0)
// { // {
// // Since a byte-based acq implementation is not available, // // Since a byte-based acq implementation is not available,
// // we just convert cshorts to gr_complex // // we just convert cshorts to gr_complex
// top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); // top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
// top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); // top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
// top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0); // top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
// top_block->disconnect(stream_to_vector_, 0, acquisition_fpga_, 0); // top_block->disconnect(stream_to_vector_, 0, acquisition_fpga_, 0);
// } // }
// else // else
// { // {
// LOG(WARNING) << item_type_ << " unknown acquisition item type"; // LOG(WARNING) << item_type_ << " unknown acquisition item type";
// } // }
// nothing to disconnect // nothing to disconnect
// printf("top acq disconnect\n"); // printf("top acq disconnect\n");
@ -566,23 +573,23 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::disconnect(gr::top_block_sptr top_bl
gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_left_block() gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_left_block()
{ {
// printf("top acq get left block start\n"); // printf("top acq get left block start\n");
// if (item_type_.compare("gr_complex") == 0) // if (item_type_.compare("gr_complex") == 0)
// { // {
// return stream_to_vector_; // return stream_to_vector_;
// } // }
// else if (item_type_.compare("cshort") == 0) // else if (item_type_.compare("cshort") == 0)
// { // {
// return stream_to_vector_; // return stream_to_vector_;
// } // }
// else if (item_type_.compare("cbyte") == 0) // else if (item_type_.compare("cbyte") == 0)
// { // {
// return cbyte_to_float_x2_; // return cbyte_to_float_x2_;
// } // }
// else // else
// { // {
// LOG(WARNING) << item_type_ << " unknown acquisition item type"; // LOG(WARNING) << item_type_ << " unknown acquisition item type";
return nullptr; return nullptr;
// } // }
// printf("top acq get left block end\n"); // printf("top acq get left block end\n");
} }
@ -593,4 +600,3 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_right_block()
return acquisition_fpga_; return acquisition_fpga_;
// printf("top acq get right block end\n"); // printf("top acq get right block end\n");
} }

View File

@ -156,6 +156,11 @@ public:
*/ */
void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor);
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
//pcps_acquisition_sptr acquisition_; //pcps_acquisition_sptr acquisition_;

View File

@ -40,6 +40,10 @@
using google::LogMessage; using google::LogMessage;
void GalileoE1PcpsCccwsrAmbiguousAcquisition::stop_acquisition()
{
}
GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition( GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -125,6 +125,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_cccwsr_acquisition_cc_sptr acquisition_cc_; pcps_cccwsr_acquisition_cc_sptr acquisition_cc_;

View File

@ -40,6 +40,10 @@
using google::LogMessage; using google::LogMessage;
void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition()
{
}
GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition( GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -129,6 +129,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_quicksync_acquisition_cc_sptr acquisition_cc_; pcps_quicksync_acquisition_cc_sptr acquisition_cc_;

View File

@ -40,6 +40,10 @@
using google::LogMessage; using google::LogMessage;
void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition()
{
}
GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -128,6 +128,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_tong_acquisition_cc_sptr acquisition_cc_; pcps_tong_acquisition_cc_sptr acquisition_cc_;

View File

@ -46,6 +46,10 @@
using google::LogMessage; using google::LogMessage;
void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition()
{
}
GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -131,6 +131,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_; galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;

View File

@ -42,13 +42,17 @@
using google::LogMessage; using google::LogMessage;
void GalileoE5aPcpsAcquisition::stop_acquisition()
{
}
GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
Acq_Conf acq_parameters = Acq_Conf(); Acq_Conf acq_parameters = Acq_Conf();
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "../data/acquisition.dat"; std::string default_dump_filename = "./acquisition.mat";
DLOG(INFO) << "Role " << role; DLOG(INFO) << "Role " << role;

View File

@ -122,6 +122,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
float calculate_threshold(float pfa); float calculate_threshold(float pfa);

View File

@ -39,11 +39,12 @@
#include <volk_gnsssdr/volk_gnsssdr_complex.h> #include <volk_gnsssdr/volk_gnsssdr_complex.h>
using google::LogMessage; using google::LogMessage;
void GalileoE5aPcpsAcquisitionFpga::stop_acquisition()
{
}
GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
@ -109,7 +110,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
std::string default_device_name = "/dev/uio0"; std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name); std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name; acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total/sampled_ms; acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
acq_parameters.samples_per_code = nsamples_total; acq_parameters.samples_per_code = nsamples_total;
//vector_length_ = code_length_ * sampled_ms_; //vector_length_ = code_length_ * sampled_ms_;
@ -155,7 +156,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
// fill in zero padding // fill in zero padding
for (int s = 2*code_length; s < nsamples_total; s++) for (int s = 2*code_length; s < nsamples_total; s++)
{ {
code[s] = std::complex<float>(static_cast<float>(0,0)); code[s] = std::complex<float>(static_cast<float>(0, 0));
//code[s] = 0; //code[s] = 0;
} }
@ -180,7 +181,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
d_all_fft_codes_[i + nsamples_total * (PRN - 1)] = lv_16sc_t(static_cast<int>(floor(fft_codes_padded[i].real() * (pow(2, 5) - 1) / max)), d_all_fft_codes_[i + nsamples_total * (PRN - 1)] = lv_16sc_t(static_cast<int>(floor(fft_codes_padded[i].real() * (pow(2, 5) - 1) / max)),
static_cast<int>(floor(fft_codes_padded[i].imag() * (pow(2, 5) - 1) / max))); static_cast<int>(floor(fft_codes_padded[i].imag() * (pow(2, 5) - 1) / max)));
} }
} }
@ -193,19 +193,19 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
//code_ = new gr_complex[vector_length_]; //code_ = new gr_complex[vector_length_];
// if (item_type_.compare("gr_complex") == 0) // if (item_type_.compare("gr_complex") == 0)
// { // {
// item_size_ = sizeof(gr_complex); // item_size_ = sizeof(gr_complex);
// } // }
// else if (item_type_.compare("cshort") == 0) // else if (item_type_.compare("cshort") == 0)
// { // {
// item_size_ = sizeof(lv_16sc_t); // item_size_ = sizeof(lv_16sc_t);
// } // }
// else // else
// { // {
// item_size_ = sizeof(gr_complex); // item_size_ = sizeof(gr_complex);
// LOG(WARNING) << item_type_ << " unknown acquisition item type"; // LOG(WARNING) << item_type_ << " unknown acquisition item type";
// } // }
//acq_parameters.it_size = item_size_; //acq_parameters.it_size = item_size_;
//acq_parameters.samples_per_code = code_length_; //acq_parameters.samples_per_code = code_length_;
//acq_parameters.samples_per_ms = code_length_; //acq_parameters.samples_per_ms = code_length_;
@ -248,22 +248,22 @@ void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel)
void GalileoE5aPcpsAcquisitionFpga::set_threshold(float threshold) void GalileoE5aPcpsAcquisitionFpga::set_threshold(float threshold)
{ {
// float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); // float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
// //
// if (pfa == 0.0) // if (pfa == 0.0)
// { // {
// pfa = configuration_->property(role_ + ".pfa", 0.0); // pfa = configuration_->property(role_ + ".pfa", 0.0);
// } // }
// //
// if (pfa == 0.0) // if (pfa == 0.0)
// { // {
// threshold_ = threshold; // threshold_ = threshold;
// } // }
// //
// else // else
// { // {
// threshold_ = calculate_threshold(pfa); // threshold_ = calculate_threshold(pfa);
// } // }
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold; DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
@ -312,32 +312,32 @@ void GalileoE5aPcpsAcquisitionFpga::init()
void GalileoE5aPcpsAcquisitionFpga::set_local_code() void GalileoE5aPcpsAcquisitionFpga::set_local_code()
{ {
// gr_complex* code = new gr_complex[code_length_]; // gr_complex* code = new gr_complex[code_length_];
// char signal_[3]; // char signal_[3];
// //
// if (acq_iq_) // if (acq_iq_)
// { // {
// strcpy(signal_, "5X"); // strcpy(signal_, "5X");
// } // }
// else if (acq_pilot_) // else if (acq_pilot_)
// { // {
// strcpy(signal_, "5Q"); // strcpy(signal_, "5Q");
// } // }
// else // else
// { // {
// strcpy(signal_, "5I"); // strcpy(signal_, "5I");
// } // }
// //
// galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, fs_in_, 0); // galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, fs_in_, 0);
// //
// for (unsigned int i = 0; i < sampled_ms_; i++) // for (unsigned int i = 0; i < sampled_ms_; i++)
// { // {
// memcpy(code_ + (i * code_length_), code, sizeof(gr_complex) * code_length_); // memcpy(code_ + (i * code_length_), code, sizeof(gr_complex) * code_length_);
// } // }
//acquisition_->set_local_code(code_); //acquisition_->set_local_code(code_);
acquisition_fpga_->set_local_code(); acquisition_fpga_->set_local_code();
// delete[] code; // delete[] code;
} }
@ -400,35 +400,35 @@ void GalileoE5aPcpsAcquisitionFpga::read_fpga_total_scale_factor(uint32_t *total
void GalileoE5aPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block) void GalileoE5aPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
{ {
// if (item_type_.compare("gr_complex") == 0) // if (item_type_.compare("gr_complex") == 0)
// { // {
// top_block->connect(stream_to_vector_, 0, acquisition_, 0); // top_block->connect(stream_to_vector_, 0, acquisition_, 0);
// } // }
// else if (item_type_.compare("cshort") == 0) // else if (item_type_.compare("cshort") == 0)
// { // {
// top_block->connect(stream_to_vector_, 0, acquisition_, 0); // top_block->connect(stream_to_vector_, 0, acquisition_, 0);
// } // }
// else // else
// { // {
// LOG(WARNING) << item_type_ << " unknown acquisition item type"; // LOG(WARNING) << item_type_ << " unknown acquisition item type";
// } // }
} }
void GalileoE5aPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block) void GalileoE5aPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
{ {
// if (item_type_.compare("gr_complex") == 0) // if (item_type_.compare("gr_complex") == 0)
// { // {
// top_block->disconnect(stream_to_vector_, 0, acquisition_, 0); // top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
// } // }
// else if (item_type_.compare("cshort") == 0) // else if (item_type_.compare("cshort") == 0)
// { // {
// top_block->disconnect(stream_to_vector_, 0, acquisition_, 0); // top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
// } // }
// else // else
// { // {
// LOG(WARNING) << item_type_ << " unknown acquisition item type"; // LOG(WARNING) << item_type_ << " unknown acquisition item type";
// } // }
} }

View File

@ -144,6 +144,11 @@ public:
*/ */
void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor);
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
//float calculate_threshold(float pfa); //float calculate_threshold(float pfa);

View File

@ -43,6 +43,10 @@
using google::LogMessage; using google::LogMessage;
void GlonassL1CaPcpsAcquisition::stop_acquisition()
{
}
GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -131,6 +131,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_acquisition_sptr acquisition_; pcps_acquisition_sptr acquisition_;

View File

@ -42,6 +42,10 @@
using google::LogMessage; using google::LogMessage;
void GlonassL2CaPcpsAcquisition::stop_acquisition()
{
}
GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -130,6 +130,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_acquisition_sptr acquisition_; pcps_acquisition_sptr acquisition_;

View File

@ -45,6 +45,10 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsAcquisition::stop_acquisition()
{
}
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
@ -52,7 +56,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
Acq_Conf acq_parameters = Acq_Conf(); Acq_Conf acq_parameters = Acq_Conf();
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./data/acquisition.dat"; std::string default_dump_filename = "./acquisition.mat";
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;

View File

@ -135,6 +135,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_acquisition_sptr acquisition_; pcps_acquisition_sptr acquisition_;

View File

@ -42,12 +42,16 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsAcquisitionFineDoppler::stop_acquisition()
{
}
GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./data/acquisition.dat"; std::string default_dump_filename = "./acquisition.mat";
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
Acq_Conf acq_parameters = Acq_Conf(); Acq_Conf acq_parameters = Acq_Conf();

View File

@ -126,6 +126,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
pcps_acquisition_fine_doppler_cc_sptr acquisition_cc_; pcps_acquisition_fine_doppler_cc_sptr acquisition_cc_;
size_t item_size_; size_t item_size_;

View File

@ -48,6 +48,10 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsAcquisitionFpga::stop_acquisition()
{
}
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -154,6 +154,11 @@ public:
*/ */
void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor);
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_acquisition_fpga_sptr acquisition_fpga_; pcps_acquisition_fpga_sptr acquisition_fpga_;

View File

@ -42,6 +42,10 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsAssistedAcquisition::stop_acquisition()
{
}
GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -122,6 +122,11 @@ public:
void reset() override; void reset() override;
void set_state(int state __attribute__((unused))) override{}; void set_state(int state __attribute__((unused))) override{};
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
pcps_assisted_acquisition_cc_sptr acquisition_cc_; pcps_assisted_acquisition_cc_sptr acquisition_cc_;
size_t item_size_; size_t item_size_;

View File

@ -40,6 +40,10 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsOpenClAcquisition::stop_acquisition()
{
}
GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -124,6 +124,11 @@ public:
void reset() override; void reset() override;
void set_state(int state __attribute__((unused))) override{}; void set_state(int state __attribute__((unused))) override{};
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_opencl_acquisition_cc_sptr acquisition_cc_; pcps_opencl_acquisition_cc_sptr acquisition_cc_;

View File

@ -41,6 +41,10 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition()
{
}
GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -130,6 +130,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_quicksync_acquisition_cc_sptr acquisition_cc_; pcps_quicksync_acquisition_cc_sptr acquisition_cc_;

View File

@ -40,6 +40,10 @@
using google::LogMessage; using google::LogMessage;
void GpsL1CaPcpsTongAcquisition::stop_acquisition()
{
}
GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -129,6 +129,11 @@ public:
*/ */
void set_state(int state) override; void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_tong_acquisition_cc_sptr acquisition_cc_; pcps_tong_acquisition_cc_sptr acquisition_cc_;

Some files were not shown because too many files have changed in this diff Show More