mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga
This commit is contained in:
commit
bef7e42fb9
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ thirdparty/
|
|||||||
cmake-build-debug/
|
cmake-build-debug/
|
||||||
/install
|
/install
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.pydevproject
|
||||||
|
616
CMakeLists.txt
616
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@ -542,7 +542,7 @@ In a terminal, type:
|
|||||||
~~~~~~
|
~~~~~~
|
||||||
$ sudo port selfupdate
|
$ sudo port selfupdate
|
||||||
$ sudo port upgrade outdated
|
$ sudo port upgrade outdated
|
||||||
$ sudo port install doxygen +latex
|
$ sudo port install doxygen +docs
|
||||||
$ sudo port install gnuradio
|
$ sudo port install gnuradio
|
||||||
$ sudo port install armadillo
|
$ sudo port install armadillo
|
||||||
$ sudo port install gnutls
|
$ sudo port install gnutls
|
||||||
|
@ -43,6 +43,9 @@ macro(LIST_CONTAINS var value)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# Trick for feature_summary
|
||||||
|
set(GNURADIO_FOUND TRUE)
|
||||||
|
|
||||||
function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||||
list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
|
list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
|
||||||
if(NOT REQUIRED_MODULE)
|
if(NOT REQUIRED_MODULE)
|
||||||
@ -140,6 +143,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
|||||||
# generate an error if the module is missing
|
# generate an error if the module is missing
|
||||||
if(NOT GNURADIO_${EXTVAR}_FOUND)
|
if(NOT GNURADIO_${EXTVAR}_FOUND)
|
||||||
message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
|
message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
|
||||||
|
set(GNURADIO_FOUND FALSE) # Trick for feature_summary
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
|
mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
|
||||||
@ -200,3 +204,6 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
|
|||||||
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
|
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Trick for feature_summary
|
||||||
|
set(GNURADIO_FOUND TRUE)
|
||||||
|
51
cmake/Modules/FindGOOGLETEST.cmake
Normal file
51
cmake/Modules/FindGOOGLETEST.cmake
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
|
||||||
|
# - Try to find Googletest source code
|
||||||
|
#
|
||||||
|
# The following environment variable is optionally searched for:
|
||||||
|
# GTEST_DIR: Base directory where Googletest source code is found.
|
||||||
|
#
|
||||||
|
# The following are set after configuration is done:
|
||||||
|
# GOOGLETEST_FOUND
|
||||||
|
# LIBGTEST_DEV_DIR
|
||||||
|
# GTEST_INCLUDE_DIRS
|
||||||
|
|
||||||
|
|
||||||
|
find_path(LIBGTEST_DEV_DIR
|
||||||
|
NAMES src/gtest-all.cc
|
||||||
|
PATHS
|
||||||
|
${GTEST_DIR}
|
||||||
|
${GTEST_DIR}/googletest
|
||||||
|
/usr/src/googletest/googletest
|
||||||
|
/usr/src/gtest
|
||||||
|
/usr/include/gtest
|
||||||
|
/opt/local/src/gtest-1.7.0
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(GTEST_INCLUDE_DIRS
|
||||||
|
NAMES gtest/gtest.h
|
||||||
|
PATHS
|
||||||
|
${GTEST_DIR}/googletest/include
|
||||||
|
/usr/include
|
||||||
|
/opt/local/src/gtest-1.7.0/include
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(GOOGLETEST DEFAULT_MSG LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS)
|
||||||
|
mark_as_advanced(LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS)
|
@ -82,7 +82,6 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
|||||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
endif()
|
endif()
|
||||||
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
|
||||||
else()
|
else()
|
||||||
find_package(Python3 COMPONENTS Interpreter)
|
find_package(Python3 COMPONENTS Interpreter)
|
||||||
if(Python3_FOUND)
|
if(Python3_FOUND)
|
||||||
|
@ -1,27 +1,56 @@
|
|||||||
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
|
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
|
||||||
|
|
||||||
|
### Improvements in Availability
|
||||||
|
|
||||||
|
- Fixed bug that caused a random deadlock in the Observables block, preventing the computation of PVT fixes.
|
||||||
|
- Fixed bug in Galileo INAV message decoding when PLL is locked at 180 degrees, which prevented from correct navigation message decoding in some situations.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Efficiency
|
### Improvements in Efficiency
|
||||||
|
|
||||||
- Applied clang-tidy checks and fixes related to performance.
|
- Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average).
|
||||||
|
- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, performance-unnecessary-value-param, readability-string-compare.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Interoperability:
|
### Improvements in Interoperability:
|
||||||
|
|
||||||
- Added the BeiDou B1I receiver chain.
|
- Added the BeiDou B1I receiver chain.
|
||||||
- Fix bug in GLONASS dual frequency receiver.
|
- Fix bug in GLONASS dual frequency receiver.
|
||||||
|
- Added a custom UDP/IP output for PVT data streaming.
|
||||||
|
- Improved Monitor block with UDP/IP output for internal receiver's data streaming.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Maintainability:
|
### Improvements in Maintainability:
|
||||||
|
|
||||||
- Usage of clang-tidy integrated into CMake scripts. New option -DENABLE_CLANG_TIDY=ON executes clang-tidy along with compilation. Requires clang compiler.
|
- Usage of clang-tidy integrated into CMake scripts. New option -DENABLE_CLANG_TIDY=ON executes clang-tidy along with compilation. Requires clang compiler.
|
||||||
- Applied clang-tidy checks and fixes related to readability.
|
- Applied clang-tidy checks and fixes related to readability: readability-container-size-empty, readability-identifier-naming, readability-inconsistent-declaration-parameter-name, readability-named-parameter, readability-non-const-parameter, readability-string-compare.
|
||||||
|
- Improved includes selection following suggestions by include-what-you-use (see https://include-what-you-use.org/), allowing faster compiles, fewer recompiles and making refactoring easier.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Portability:
|
### Improvements in Portability:
|
||||||
|
|
||||||
|
- Added interfaces for FPGA off-loading.
|
||||||
- CMake scripts now follow a modern approach (targets and properties) but still work in 2.8.12
|
- CMake scripts now follow a modern approach (targets and properties) but still work in 2.8.12
|
||||||
|
|
||||||
|
|
||||||
## Improvements in Reliability
|
### Improvements in Reliability
|
||||||
|
|
||||||
|
- Applied clang-tidy checks and fixes related to High Integrity C++: performance-move-const-arg, modernize-use-auto, modernize-use-equals-default, modernize-use-equals-delete, modernize-use-noexcept, modernize-use-nullptr, cert-dcl21-cpp, misc-new-delete-overloads, cert-dcl58-cpp, cert-err52-cpp, cert-err60-cpp.
|
||||||
|
|
||||||
|
|
||||||
|
### Improvements in Usability
|
||||||
|
|
||||||
|
- The receiver now admits FPGA off-loading, allowing for real time operation at high sampling rates and higher number of signals and channels.
|
||||||
|
- Fixed program termination (avoiding hangs and segfaults in some platforms/configurations).
|
||||||
|
- CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory.
|
||||||
|
- New parameter PVT.show_local_time_zone displays time in the local time zone. Subject to the proper system configuration of the machine running the software receiver.
|
||||||
|
- Improved information provided to the user in case of failure.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
See the definitions of concepts and metrics at https://gnss-sdr.org/design-forces/
|
||||||
|
|
||||||
|
|
||||||
- Applied clang-tidy checks and fixes related to High Integrity C++.
|
|
||||||
|
|
||||||
|
|
||||||
## [0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)
|
## [0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)
|
||||||
|
@ -32,6 +32,7 @@ add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS})
|
|||||||
target_link_libraries(pvt_adapters
|
target_link_libraries(pvt_adapters
|
||||||
PUBLIC
|
PUBLIC
|
||||||
pvt_gr_blocks
|
pvt_gr_blocks
|
||||||
|
algorithms_libs_rtklib
|
||||||
core_system_parameters
|
core_system_parameters
|
||||||
PRIVATE
|
PRIVATE
|
||||||
gnss_sdr_flags
|
gnss_sdr_flags
|
||||||
|
@ -30,10 +30,17 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "rtklib_pvt.h"
|
#include "rtklib_pvt.h"
|
||||||
#include "configuration_interface.h"
|
#include "MATH_CONSTANTS.h" // for D2R
|
||||||
#include "gnss_sdr_flags.h"
|
#include "configuration_interface.h" // for ConfigurationInterface
|
||||||
#include "pvt_conf.h"
|
#include "galileo_almanac.h" // for Galileo_Almanac
|
||||||
#include <glog/logging.h>
|
#include "galileo_ephemeris.h" // for Galileo_Ephemeris
|
||||||
|
#include "gnss_sdr_flags.h" // for FLAGS_RINEX_version
|
||||||
|
#include "gps_almanac.h" // for Gps_Almanac
|
||||||
|
#include "gps_ephemeris.h" // for Gps_Ephemeris
|
||||||
|
#include "pvt_conf.h" // for Pvt_Conf
|
||||||
|
#include "rtklib_rtkpos.h" // for rtkfree, rtkinit
|
||||||
|
#include <glog/logging.h> // for LOG
|
||||||
|
#include <iostream> // for operator<<
|
||||||
#if OLD_BOOST
|
#if OLD_BOOST
|
||||||
#include <boost/math/common_factor_rt.hpp>
|
#include <boost/math/common_factor_rt.hpp>
|
||||||
namespace bc = boost::math;
|
namespace bc = boost::math;
|
||||||
@ -43,9 +50,6 @@ namespace bc = boost::integer;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
unsigned int in_streams,
|
unsigned int in_streams,
|
||||||
@ -710,8 +714,11 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
|||||||
pvt_output_parameters.udp_addresses = configuration->property(role + ".monitor_client_addresses", std::string("127.0.0.1"));
|
pvt_output_parameters.udp_addresses = configuration->property(role + ".monitor_client_addresses", std::string("127.0.0.1"));
|
||||||
pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234);
|
pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234);
|
||||||
|
|
||||||
|
// Show time in local zone
|
||||||
|
pvt_output_parameters.show_local_time_zone = configuration->property(role + ".show_local_time_zone", false);
|
||||||
|
|
||||||
// make PVT object
|
// make PVT object
|
||||||
pvt_ = rtklib_make_pvt_cc(in_streams_, pvt_output_parameters, rtk);
|
pvt_ = rtklib_make_pvt_gs(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)
|
||||||
{
|
{
|
||||||
|
@ -32,18 +32,21 @@
|
|||||||
#ifndef GNSS_SDR_RTKLIB_PVT_H_
|
#ifndef GNSS_SDR_RTKLIB_PVT_H_
|
||||||
#define GNSS_SDR_RTKLIB_PVT_H_
|
#define GNSS_SDR_RTKLIB_PVT_H_
|
||||||
|
|
||||||
#include "galileo_almanac.h"
|
#include "pvt_interface.h" // for PvtInterface
|
||||||
#include "galileo_ephemeris.h"
|
#include "rtklib.h" // for rtk_t
|
||||||
#include "gps_almanac.h"
|
#include "rtklib_pvt_gs.h" // for rtklib_pvt_gs_sptr
|
||||||
#include "gps_ephemeris.h"
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
#include "pvt_interface.h"
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include "rtklib.h"
|
#include <cstddef> // for size_t
|
||||||
#include "rtklib_pvt_cc.h"
|
#include <ctime> // for time_t
|
||||||
#include <map>
|
#include <map> // for map
|
||||||
#include <string>
|
#include <string> // for string
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
class Galileo_Almanac;
|
||||||
|
class Galileo_Ephemeris;
|
||||||
|
class Gps_Almanac;
|
||||||
|
class Gps_Ephemeris;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a PvtInterface for the RTKLIB PVT block
|
* \brief This class implements a PvtInterface for the RTKLIB PVT block
|
||||||
@ -99,7 +102,7 @@ public:
|
|||||||
time_t* UTC_time) override;
|
time_t* UTC_time) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
rtklib_pvt_cc_sptr pvt_;
|
rtklib_pvt_gs_sptr pvt_;
|
||||||
rtk_t rtk{};
|
rtk_t rtk{};
|
||||||
std::string role_;
|
std::string role_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
set(PVT_GR_BLOCKS_SOURCES
|
set(PVT_GR_BLOCKS_SOURCES
|
||||||
rtklib_pvt_cc.cc
|
rtklib_pvt_gs.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PVT_GR_BLOCKS_HEADERS
|
set(PVT_GR_BLOCKS_HEADERS
|
||||||
rtklib_pvt_cc.h
|
rtklib_pvt_gs.h
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})
|
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})
|
||||||
@ -30,12 +30,13 @@ add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
|
|||||||
|
|
||||||
target_link_libraries(pvt_gr_blocks
|
target_link_libraries(pvt_gr_blocks
|
||||||
PUBLIC
|
PUBLIC
|
||||||
pvt_libs
|
algorithms_libs_rtklib
|
||||||
core_system_parameters
|
core_system_parameters
|
||||||
Boost::date_time
|
Boost::date_time
|
||||||
Gnuradio::pmt
|
Gnuradio::pmt
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
pvt_libs
|
||||||
algorithms_libs
|
algorithms_libs
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
@ -57,6 +58,18 @@ if(Boost_VERSION LESS 105800)
|
|||||||
target_compile_definitions(pvt_gr_blocks PRIVATE -DOLD_BOOST=1)
|
target_compile_definitions(pvt_gr_blocks PRIVATE -DOLD_BOOST=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Check if we have std::put_time (Workaround for gcc < 5.0)
|
||||||
|
include(CheckCXXSourceCompiles)
|
||||||
|
check_cxx_source_compiles("
|
||||||
|
#include <iomanip>
|
||||||
|
int main()
|
||||||
|
{ std::put_time(nullptr, \"\"); }"
|
||||||
|
has_put_time
|
||||||
|
)
|
||||||
|
if(${has_put_time})
|
||||||
|
target_compile_definitions(pvt_gr_blocks PRIVATE -DHAS_PUT_TIME=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_property(TARGET pvt_gr_blocks
|
set_property(TARGET pvt_gr_blocks
|
||||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file rtklib_pvt_cc.cc
|
* \file rtklib_pvt_gs.cc
|
||||||
* \brief Interface of a Position Velocity and Time computation block
|
* \brief Interface of a Position Velocity and Time computation block
|
||||||
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
||||||
*
|
*
|
||||||
@ -28,24 +28,61 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtklib_pvt_cc.h"
|
#include "rtklib_pvt_gs.h"
|
||||||
|
#include "beidou_dnav_almanac.h"
|
||||||
|
#include "beidou_dnav_ephemeris.h"
|
||||||
|
#include "beidou_dnav_iono.h"
|
||||||
|
#include "beidou_dnav_utc_model.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
#include "galileo_almanac.h"
|
||||||
#include "galileo_almanac_helper.h"
|
#include "galileo_almanac_helper.h"
|
||||||
|
#include "galileo_ephemeris.h"
|
||||||
|
#include "galileo_iono.h"
|
||||||
|
#include "galileo_utc_model.h"
|
||||||
|
#include "geojson_printer.h"
|
||||||
|
#include "glonass_gnav_almanac.h"
|
||||||
|
#include "glonass_gnav_ephemeris.h"
|
||||||
|
#include "glonass_gnav_utc_model.h"
|
||||||
#include "gnss_sdr_create_directory.h"
|
#include "gnss_sdr_create_directory.h"
|
||||||
|
#include "gps_almanac.h"
|
||||||
|
#include "gps_cnav_ephemeris.h"
|
||||||
|
#include "gps_cnav_iono.h"
|
||||||
|
#include "gps_cnav_utc_model.h"
|
||||||
|
#include "gps_ephemeris.h"
|
||||||
|
#include "gps_iono.h"
|
||||||
|
#include "gps_utc_model.h"
|
||||||
|
#include "gpx_printer.h"
|
||||||
|
#include "kml_printer.h"
|
||||||
|
#include "monitor_pvt.h"
|
||||||
|
#include "monitor_pvt_udp_sink.h"
|
||||||
|
#include "nmea_printer.h"
|
||||||
#include "pvt_conf.h"
|
#include "pvt_conf.h"
|
||||||
#include <boost/archive/xml_iarchive.hpp>
|
#include "rinex_printer.h"
|
||||||
#include <boost/archive/xml_oarchive.hpp>
|
#include "rtcm_printer.h"
|
||||||
#include <boost/exception/all.hpp>
|
#include "rtklib_solver.h"
|
||||||
|
#include <boost/any.hpp> // for any_cast, any
|
||||||
|
#include <boost/archive/xml_iarchive.hpp> // for xml_iarchive
|
||||||
|
#include <boost/archive/xml_oarchive.hpp> // for xml_oarchive
|
||||||
|
#include <boost/bind/bind.hpp> // for bind_t, bind
|
||||||
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
|
#include <boost/exception/exception.hpp>
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#include <boost/serialization/map.hpp>
|
#include <boost/serialization/map.hpp>
|
||||||
#include <glog/logging.h>
|
#include <boost/serialization/nvp.hpp> // for nvp, make_nvp
|
||||||
#include <gnuradio/gr_complex.h>
|
#include <boost/system/error_code.hpp> // for error_code
|
||||||
#include <gnuradio/io_signature.h>
|
#include <glog/logging.h> // for LOG
|
||||||
#include <algorithm>
|
#include <gnuradio/io_signature.h> // for io_signature
|
||||||
#include <exception>
|
#include <pmt/pmt_sugar.h> // for mp
|
||||||
#include <fstream>
|
#include <algorithm> // for sort, unique
|
||||||
#include <iostream>
|
#include <exception> // for exception
|
||||||
#include <stdexcept>
|
#include <fstream> // for ofstream
|
||||||
|
#include <iomanip> // for put_time, setprecision
|
||||||
|
#include <iostream> // for operator<<
|
||||||
|
#include <locale> // for locale
|
||||||
|
#include <sstream> // for ostringstream
|
||||||
|
#include <stdexcept> // for length_error
|
||||||
|
#include <sys/ipc.h> // for IPC_CREAT
|
||||||
|
#include <sys/msg.h> // for msgctl
|
||||||
#if OLD_BOOST
|
#if OLD_BOOST
|
||||||
#include <boost/math/common_factor_rt.hpp>
|
#include <boost/math/common_factor_rt.hpp>
|
||||||
namespace bc = boost::math;
|
namespace bc = boost::math;
|
||||||
@ -54,22 +91,20 @@ namespace bc = boost::math;
|
|||||||
namespace bc = boost::integer;
|
namespace bc = boost::integer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
|
||||||
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
|
|
||||||
const Pvt_Conf& conf_,
|
const Pvt_Conf& conf_,
|
||||||
const rtk_t& rtk)
|
const rtk_t& rtk)
|
||||||
{
|
{
|
||||||
return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels,
|
return rtklib_pvt_gs_sptr(new rtklib_pvt_gs(nchannels,
|
||||||
conf_,
|
conf_,
|
||||||
rtk));
|
rtk));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||||
const Pvt_Conf& conf_,
|
const Pvt_Conf& conf_,
|
||||||
const rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc",
|
const rtk_t& rtk) : gr::sync_block("rtklib_pvt_gs",
|
||||||
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
||||||
gr::io_signature::make(0, 0, 0))
|
gr::io_signature::make(0, 0, 0))
|
||||||
{
|
{
|
||||||
@ -118,7 +153,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
|||||||
|
|
||||||
// GPS Ephemeris data message port in
|
// GPS Ephemeris data message port in
|
||||||
this->message_port_register_in(pmt::mp("telemetry"));
|
this->message_port_register_in(pmt::mp("telemetry"));
|
||||||
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_cc::msg_handler_telemetry, this, _1));
|
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_gs::msg_handler_telemetry, this, _1));
|
||||||
|
|
||||||
// initialize kml_printer
|
// initialize kml_printer
|
||||||
std::string kml_dump_filename;
|
std::string kml_dump_filename;
|
||||||
@ -151,7 +186,6 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
|||||||
// initialize geojson_printer
|
// initialize geojson_printer
|
||||||
std::string geojson_dump_filename;
|
std::string geojson_dump_filename;
|
||||||
geojson_dump_filename = d_dump_filename;
|
geojson_dump_filename = d_dump_filename;
|
||||||
|
|
||||||
d_geojson_output_enabled = conf_.geojson_output_enabled;
|
d_geojson_output_enabled = conf_.geojson_output_enabled;
|
||||||
if (d_geojson_output_enabled)
|
if (d_geojson_output_enabled)
|
||||||
{
|
{
|
||||||
@ -330,13 +364,50 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
|||||||
throw std::exception();
|
throw std::exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Display time in local time zone
|
||||||
|
d_show_local_time_zone = conf_.show_local_time_zone;
|
||||||
|
time_t when = std::time(nullptr);
|
||||||
|
auto const tm = *std::localtime(&when);
|
||||||
|
std::ostringstream os;
|
||||||
|
#ifdef HAS_PUT_TIME
|
||||||
|
os << std::put_time(&tm, "%z");
|
||||||
|
#endif
|
||||||
|
std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM"
|
||||||
|
if (utc_diff_str.empty())
|
||||||
|
{
|
||||||
|
utc_diff_str = "+0000";
|
||||||
|
}
|
||||||
|
int h = std::stoi(utc_diff_str.substr(0, 3), nullptr, 10);
|
||||||
|
int m = std::stoi(utc_diff_str[0] + utc_diff_str.substr(3), nullptr, 10);
|
||||||
|
d_utc_diff_time = boost::posix_time::hours(h) + boost::posix_time::minutes(m);
|
||||||
|
std::ostringstream os2;
|
||||||
|
#ifdef HAS_PUT_TIME
|
||||||
|
os2 << std::put_time(&tm, "%Z");
|
||||||
|
#endif
|
||||||
|
std::string time_zone_abrv = os2.str();
|
||||||
|
if (time_zone_abrv.empty())
|
||||||
|
{
|
||||||
|
if (utc_diff_str == "+0000")
|
||||||
|
{
|
||||||
|
d_local_time_str = " UTC";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d_local_time_str = " (UTC " + utc_diff_str.substr(0, 3) + ":" + utc_diff_str.substr(3, 2) + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d_local_time_str = std::string(" ") + time_zone_abrv + " (UTC " + utc_diff_str.substr(0, 3) + ":" + utc_diff_str.substr(3, 2) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
d_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
d_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
||||||
d_pvt_solver->set_averaging_depth(1);
|
d_pvt_solver->set_averaging_depth(1);
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rtklib_pvt_cc::~rtklib_pvt_cc()
|
rtklib_pvt_gs::~rtklib_pvt_gs()
|
||||||
{
|
{
|
||||||
msgctl(sysv_msqid, IPC_RMID, nullptr);
|
msgctl(sysv_msqid, IPC_RMID, nullptr);
|
||||||
try
|
try
|
||||||
@ -883,7 +954,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtklib_pvt_cc::msg_handler_telemetry(const pmt::pmt_t& msg)
|
void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -1097,43 +1168,43 @@ void rtklib_pvt_cc::msg_handler_telemetry(const pmt::pmt_t& msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Gps_Ephemeris> rtklib_pvt_cc::get_gps_ephemeris_map() const
|
std::map<int, Gps_Ephemeris> rtklib_pvt_gs::get_gps_ephemeris_map() const
|
||||||
{
|
{
|
||||||
return d_pvt_solver->gps_ephemeris_map;
|
return d_pvt_solver->gps_ephemeris_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Gps_Almanac> rtklib_pvt_cc::get_gps_almanac_map() const
|
std::map<int, Gps_Almanac> rtklib_pvt_gs::get_gps_almanac_map() const
|
||||||
{
|
{
|
||||||
return d_pvt_solver->gps_almanac_map;
|
return d_pvt_solver->gps_almanac_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Galileo_Ephemeris> rtklib_pvt_cc::get_galileo_ephemeris_map() const
|
std::map<int, Galileo_Ephemeris> rtklib_pvt_gs::get_galileo_ephemeris_map() const
|
||||||
{
|
{
|
||||||
return d_pvt_solver->galileo_ephemeris_map;
|
return d_pvt_solver->galileo_ephemeris_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Galileo_Almanac> rtklib_pvt_cc::get_galileo_almanac_map() const
|
std::map<int, Galileo_Almanac> rtklib_pvt_gs::get_galileo_almanac_map() const
|
||||||
{
|
{
|
||||||
return d_pvt_solver->galileo_almanac_map;
|
return d_pvt_solver->galileo_almanac_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Beidou_Dnav_Ephemeris> rtklib_pvt_cc::get_beidou_dnav_ephemeris_map() const
|
std::map<int, Beidou_Dnav_Ephemeris> rtklib_pvt_gs::get_beidou_dnav_ephemeris_map() const
|
||||||
{
|
{
|
||||||
return d_pvt_solver->beidou_dnav_ephemeris_map;
|
return d_pvt_solver->beidou_dnav_ephemeris_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<int, Beidou_Dnav_Almanac> rtklib_pvt_cc::get_beidou_dnav_almanac_map() const
|
std::map<int, Beidou_Dnav_Almanac> rtklib_pvt_gs::get_beidou_dnav_almanac_map() const
|
||||||
{
|
{
|
||||||
return d_pvt_solver->beidou_dnav_almanac_map;
|
return d_pvt_solver->beidou_dnav_almanac_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtklib_pvt_cc::clear_ephemeris()
|
void rtklib_pvt_gs::clear_ephemeris()
|
||||||
{
|
{
|
||||||
d_pvt_solver->gps_ephemeris_map.clear();
|
d_pvt_solver->gps_ephemeris_map.clear();
|
||||||
d_pvt_solver->gps_almanac_map.clear();
|
d_pvt_solver->gps_almanac_map.clear();
|
||||||
@ -1144,13 +1215,13 @@ void rtklib_pvt_cc::clear_ephemeris()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_pvt_cc::observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b)
|
bool rtklib_pvt_gs::observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b)
|
||||||
{
|
{
|
||||||
return (a.second.Pseudorange_m) < (b.second.Pseudorange_m);
|
return (a.second.Pseudorange_m) < (b.second.Pseudorange_m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff)
|
bool rtklib_pvt_gs::send_sys_v_ttff_msg(ttff_msgbuf ttff)
|
||||||
{
|
{
|
||||||
// Fill Sys V message structures
|
// Fill Sys V message structures
|
||||||
int msgsend_size;
|
int msgsend_size;
|
||||||
@ -1166,7 +1237,7 @@ bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name)
|
bool rtklib_pvt_gs::save_gnss_synchro_map_xml(const std::string& file_name)
|
||||||
{
|
{
|
||||||
if (gnss_observables_map.empty() == false)
|
if (gnss_observables_map.empty() == false)
|
||||||
{
|
{
|
||||||
@ -1191,7 +1262,7 @@ bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name)
|
bool rtklib_pvt_gs::load_gnss_synchro_map_xml(const std::string& file_name)
|
||||||
{
|
{
|
||||||
// load from xml (boost serialize)
|
// load from xml (boost serialize)
|
||||||
std::ifstream ifs;
|
std::ifstream ifs;
|
||||||
@ -1212,7 +1283,7 @@ bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim) const
|
std::vector<std::string> rtklib_pvt_gs::split_string(const std::string& s, char delim) const
|
||||||
{
|
{
|
||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
std::stringstream ss(s);
|
std::stringstream ss(s);
|
||||||
@ -1227,7 +1298,7 @@ std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
bool rtklib_pvt_gs::get_latest_PVT(double* longitude_deg,
|
||||||
double* latitude_deg,
|
double* latitude_deg,
|
||||||
double* height_m,
|
double* height_m,
|
||||||
double* ground_speed_kmh,
|
double* ground_speed_kmh,
|
||||||
@ -1250,7 +1321,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
|
int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items __attribute__((unused)))
|
gr_vector_void_star& output_items __attribute__((unused)))
|
||||||
{
|
{
|
||||||
for (int32_t epoch = 0; epoch < noutput_items; epoch++)
|
for (int32_t epoch = 0; epoch < noutput_items; epoch++)
|
||||||
@ -1433,8 +1504,16 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
|
|
||||||
if (first_fix == true)
|
if (first_fix == true)
|
||||||
{
|
{
|
||||||
std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_pvt_solver->get_position_UTC_time())
|
if (d_show_local_time_zone)
|
||||||
<< " UTC is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude()
|
{
|
||||||
|
boost::posix_time::ptime time_first_solution = d_pvt_solver->get_position_UTC_time() + d_utc_diff_time;
|
||||||
|
std::cout << "First position fix at " << time_first_solution << d_local_time_str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "First position fix at " << d_pvt_solver->get_position_UTC_time() << " UTC";
|
||||||
|
}
|
||||||
|
std::cout << " is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude()
|
||||||
<< " [deg], Height= " << d_pvt_solver->get_height() << " [m]" << std::endl;
|
<< " [deg], Height= " << d_pvt_solver->get_height() << " [m]" << std::endl;
|
||||||
ttff_msgbuf ttff;
|
ttff_msgbuf ttff;
|
||||||
ttff.mtype = 1;
|
ttff.mtype = 1;
|
||||||
@ -3256,18 +3335,31 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
// DEBUG MESSAGE: Display position in console output
|
// DEBUG MESSAGE: Display position in console output
|
||||||
if (d_pvt_solver->is_valid_position() and flag_display_pvt)
|
if (d_pvt_solver->is_valid_position() and flag_display_pvt)
|
||||||
{
|
{
|
||||||
|
boost::posix_time::ptime time_solution;
|
||||||
|
std::string UTC_solution_str;
|
||||||
|
if (d_show_local_time_zone)
|
||||||
|
{
|
||||||
|
time_solution = d_pvt_solver->get_position_UTC_time() + d_utc_diff_time;
|
||||||
|
UTC_solution_str = d_local_time_str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
time_solution = d_pvt_solver->get_position_UTC_time();
|
||||||
|
UTC_solution_str = " UTC";
|
||||||
|
}
|
||||||
std::streamsize ss = std::cout.precision(); // save current precision
|
std::streamsize ss = std::cout.precision(); // save current precision
|
||||||
std::cout.setf(std::ios::fixed, std::ios::floatfield);
|
std::cout.setf(std::ios::fixed, std::ios::floatfield);
|
||||||
auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
||||||
std::cout.imbue(std::locale(std::cout.getloc(), facet));
|
std::cout.imbue(std::locale(std::cout.getloc(), facet));
|
||||||
|
std::cout
|
||||||
std::cout << TEXT_BOLD_GREEN
|
<< TEXT_BOLD_GREEN
|
||||||
<< "Position at " << d_pvt_solver->get_position_UTC_time()
|
<< "Position at " << time_solution << UTC_solution_str
|
||||||
<< " UTC using " << d_pvt_solver->get_num_valid_observations()
|
<< " using " << d_pvt_solver->get_num_valid_observations()
|
||||||
<< std::fixed << std::setprecision(9)
|
<< std::fixed << std::setprecision(9)
|
||||||
<< " observations is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude()
|
<< " observations is Lat = " << d_pvt_solver->get_latitude() << " [deg], Long = " << d_pvt_solver->get_longitude()
|
||||||
<< std::fixed << std::setprecision(3)
|
<< std::fixed << std::setprecision(3)
|
||||||
<< " [deg], Height = " << d_pvt_solver->get_height() << " [m]" << TEXT_RESET << std::endl;
|
<< " [deg], Height = " << d_pvt_solver->get_height() << " [m]" << TEXT_RESET << std::endl;
|
||||||
|
|
||||||
std::cout << std::setprecision(ss);
|
std::cout << std::setprecision(ss);
|
||||||
DLOG(INFO) << "RX clock offset: " << d_pvt_solver->get_time_offset_s() << "[s]";
|
DLOG(INFO) << "RX clock offset: " << d_pvt_solver->get_time_offset_s() << "[s]";
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file rtklib_pvt_cc.h
|
* \file rtklib_pvt_gs.h
|
||||||
* \brief Interface of a Position Velocity and Time computation block
|
* \brief Interface of a Position Velocity and Time computation block
|
||||||
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
||||||
*
|
*
|
||||||
@ -28,56 +28,61 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H
|
#ifndef GNSS_SDR_RTKLIB_PVT_GS_H
|
||||||
#define GNSS_SDR_RTKLIB_PVT_CC_H
|
#define GNSS_SDR_RTKLIB_PVT_GS_H
|
||||||
|
|
||||||
#include "beidou_dnav_almanac.h"
|
|
||||||
#include "beidou_dnav_ephemeris.h"
|
|
||||||
#include "galileo_almanac.h"
|
|
||||||
#include "galileo_ephemeris.h"
|
|
||||||
#include "geojson_printer.h"
|
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "gps_almanac.h"
|
#include "rtklib.h"
|
||||||
#include "gps_ephemeris.h"
|
|
||||||
#include "gpx_printer.h"
|
|
||||||
#include "kml_printer.h"
|
|
||||||
#include "monitor_pvt_udp_sink.h"
|
|
||||||
#include "nmea_printer.h"
|
|
||||||
#include "pvt_conf.h"
|
|
||||||
#include "rinex_printer.h"
|
|
||||||
#include "rtcm_printer.h"
|
|
||||||
#include "rtklib_solver.h"
|
|
||||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <gnuradio/sync_block.h>
|
#include <boost/shared_ptr.hpp> // for boost::shared_ptr
|
||||||
#include <pmt/pmt.h>
|
#include <gnuradio/sync_block.h> // for sync_block
|
||||||
#include <chrono>
|
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||||
#include <cstdint>
|
#include <pmt/pmt.h> // for pmt_t
|
||||||
#include <map>
|
#include <chrono> // for system_clock
|
||||||
#include <memory>
|
#include <cstdint> // for int32_t
|
||||||
#include <string>
|
#include <ctime> // for time_t
|
||||||
#include <sys/ipc.h>
|
#include <map> // for map
|
||||||
#include <sys/msg.h>
|
#include <memory> // for shared_ptr, unique_ptr
|
||||||
#include <sys/types.h>
|
#include <string> // for string
|
||||||
#include <utility>
|
#include <sys/types.h> // for key_t
|
||||||
#include <vector>
|
#include <utility> // for pair
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
class Beidou_Dnav_Almanac;
|
||||||
|
class Beidou_Dnav_Ephemeris;
|
||||||
|
class Galileo_Almanac;
|
||||||
|
class Galileo_Ephemeris;
|
||||||
|
class GeoJSON_Printer;
|
||||||
|
class Gps_Almanac;
|
||||||
|
class Gps_Ephemeris;
|
||||||
|
class Gpx_Printer;
|
||||||
|
class Kml_Printer;
|
||||||
|
class Monitor_Pvt_Udp_Sink;
|
||||||
|
class Nmea_Printer;
|
||||||
|
class Pvt_Conf;
|
||||||
|
class Rinex_Printer;
|
||||||
|
class Rtcm_Printer;
|
||||||
|
class Rtklib_Solver;
|
||||||
|
class rtklib_pvt_gs;
|
||||||
|
|
||||||
class rtklib_pvt_cc;
|
using rtklib_pvt_gs_sptr = boost::shared_ptr<rtklib_pvt_gs>;
|
||||||
|
|
||||||
using rtklib_pvt_cc_sptr = boost::shared_ptr<rtklib_pvt_cc>;
|
rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
|
||||||
|
|
||||||
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
|
|
||||||
const Pvt_Conf& conf_,
|
const Pvt_Conf& conf_,
|
||||||
const rtk_t& rtk);
|
const rtk_t& rtk);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library
|
* \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library
|
||||||
*/
|
*/
|
||||||
class rtklib_pvt_cc : public gr::sync_block
|
class rtklib_pvt_gs : public gr::sync_block
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
|
friend rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
|
||||||
|
const Pvt_Conf& conf_,
|
||||||
|
const rtk_t& rtk);
|
||||||
|
|
||||||
|
rtklib_pvt_gs(uint32_t nchannels,
|
||||||
const Pvt_Conf& conf_,
|
const Pvt_Conf& conf_,
|
||||||
const rtk_t& rtk);
|
const rtk_t& rtk);
|
||||||
|
|
||||||
@ -135,7 +140,7 @@ private:
|
|||||||
int sysv_msqid;
|
int sysv_msqid;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
long mtype; //required by sys v message
|
long mtype; // NOLINT(google-runtime-int) required by SysV queue messaging
|
||||||
double ttff;
|
double ttff;
|
||||||
} ttff_msgbuf;
|
} ttff_msgbuf;
|
||||||
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
||||||
@ -157,32 +162,45 @@ private:
|
|||||||
std::unique_ptr<Monitor_Pvt_Udp_Sink> udp_sink_ptr;
|
std::unique_ptr<Monitor_Pvt_Udp_Sink> udp_sink_ptr;
|
||||||
std::vector<std::string> split_string(const std::string& s, char delim) const;
|
std::vector<std::string> split_string(const std::string& s, char delim) const;
|
||||||
|
|
||||||
public:
|
bool d_show_local_time_zone;
|
||||||
rtklib_pvt_cc(uint32_t nchannels,
|
std::string d_local_time_str;
|
||||||
const Pvt_Conf& conf_,
|
boost::posix_time::time_duration d_utc_diff_time;
|
||||||
const rtk_t& rtk);
|
|
||||||
|
|
||||||
~rtklib_pvt_cc(); //!< Default destructor
|
public:
|
||||||
|
~rtklib_pvt_gs(); //!< Default destructor
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get latest set of GPS ephemeris from PVT block
|
* \brief Get latest set of GPS ephemeris from PVT block
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
|
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Get latest set of GPS almanac from PVT block
|
||||||
|
*/
|
||||||
std::map<int, Gps_Almanac> get_gps_almanac_map() const;
|
std::map<int, Gps_Almanac> get_gps_almanac_map() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Get latest set of Galileo ephemeris from PVT block
|
||||||
|
*/
|
||||||
std::map<int, Galileo_Ephemeris> get_galileo_ephemeris_map() const;
|
std::map<int, Galileo_Ephemeris> get_galileo_ephemeris_map() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Get latest set of Galileo almanac from PVT block
|
||||||
|
*/
|
||||||
std::map<int, Galileo_Almanac> get_galileo_almanac_map() const;
|
std::map<int, Galileo_Almanac> get_galileo_almanac_map() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Get latest set of BeiDou DNAV ephemeris from PVT block
|
||||||
|
*/
|
||||||
std::map<int, Beidou_Dnav_Ephemeris> get_beidou_dnav_ephemeris_map() const;
|
std::map<int, Beidou_Dnav_Ephemeris> get_beidou_dnav_ephemeris_map() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Get latest set of BeiDou DNAV almanac from PVT block
|
||||||
|
*/
|
||||||
std::map<int, Beidou_Dnav_Almanac> get_beidou_dnav_almanac_map() const;
|
std::map<int, Beidou_Dnav_Almanac> get_beidou_dnav_almanac_map() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Clear all ephemeris information and the almanacs for GPS and Galileo
|
* \brief Clear all ephemeris information and the almanacs for GPS and Galileo
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
void clear_ephemeris();
|
void clear_ephemeris();
|
||||||
|
|
@ -26,6 +26,7 @@ set(PVT_LIB_SOURCES
|
|||||||
rinex_printer.cc
|
rinex_printer.cc
|
||||||
nmea_printer.cc
|
nmea_printer.cc
|
||||||
rtcm_printer.cc
|
rtcm_printer.cc
|
||||||
|
rtcm.cc
|
||||||
geojson_printer.cc
|
geojson_printer.cc
|
||||||
rtklib_solver.cc
|
rtklib_solver.cc
|
||||||
pvt_conf.cc
|
pvt_conf.cc
|
||||||
@ -41,6 +42,7 @@ set(PVT_LIB_HEADERS
|
|||||||
rinex_printer.h
|
rinex_printer.h
|
||||||
nmea_printer.h
|
nmea_printer.h
|
||||||
rtcm_printer.h
|
rtcm_printer.h
|
||||||
|
rtcm.h
|
||||||
geojson_printer.h
|
geojson_printer.h
|
||||||
rtklib_solver.h
|
rtklib_solver.h
|
||||||
pvt_conf.h
|
pvt_conf.h
|
||||||
@ -59,10 +61,10 @@ target_link_libraries(pvt_libs
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
Armadillo::armadillo
|
Armadillo::armadillo
|
||||||
Boost::date_time
|
Boost::date_time
|
||||||
algorithms_libs
|
|
||||||
algorithms_libs_rtklib
|
algorithms_libs_rtklib
|
||||||
core_system_parameters
|
core_system_parameters
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
algorithms_libs
|
||||||
Boost::filesystem
|
Boost::filesystem
|
||||||
Boost::system
|
Boost::system
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
@ -72,13 +74,20 @@ target_link_libraries(pvt_libs
|
|||||||
|
|
||||||
target_include_directories(pvt_libs
|
target_include_directories(pvt_libs
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
|
||||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
|
|
||||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||||
|
|
||||||
|
if(OS_IS_MACOSX)
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang
|
||||||
|
target_compile_definitions(pvt_libs
|
||||||
|
PUBLIC
|
||||||
|
-DBOOST_ASIO_HAS_STD_STRING_VIEW
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CLANG_TIDY)
|
if(ENABLE_CLANG_TIDY)
|
||||||
if(CLANG_TIDY_EXE)
|
if(CLANG_TIDY_EXE)
|
||||||
set_target_properties(pvt_libs
|
set_target_properties(pvt_libs
|
||||||
|
@ -31,14 +31,19 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "geojson_printer.h"
|
#include "geojson_printer.h"
|
||||||
|
#include "pvt_solution.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/operations.hpp> // for create_directories, exists
|
||||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||||
|
#include <boost/system/error_code.hpp> // for error_code
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <exception>
|
#include <cstdio> // for remove
|
||||||
#include <iomanip>
|
#include <ctime> // for tm
|
||||||
#include <sstream>
|
#include <exception> // for exception
|
||||||
|
#include <iomanip> // for operator<<
|
||||||
|
#include <iostream> // for cout, cerr
|
||||||
|
#include <sstream> // for stringstream
|
||||||
|
|
||||||
|
|
||||||
GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
|
GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
|
||||||
|
@ -33,11 +33,12 @@
|
|||||||
#ifndef GNSS_SDR_GEOJSON_PRINTER_H_
|
#ifndef GNSS_SDR_GEOJSON_PRINTER_H_
|
||||||
#define GNSS_SDR_GEOJSON_PRINTER_H_
|
#define GNSS_SDR_GEOJSON_PRINTER_H_
|
||||||
|
|
||||||
#include "pvt_solution.h"
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Pvt_Solution;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints PVT solutions in GeoJSON format file
|
* \brief Prints PVT solutions in GeoJSON format file
|
||||||
|
@ -31,15 +31,19 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "gpx_printer.h"
|
#include "gpx_printer.h"
|
||||||
|
#include "rtklib_solver.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/operations.hpp> // for create_directories, exists
|
||||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||||
|
#include <boost/system/error_code.hpp> // for error_code
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <exception>
|
#include <cstdio> // for remove
|
||||||
#include <sstream>
|
#include <ctime> // for tm
|
||||||
|
#include <exception> // for exception
|
||||||
using google::LogMessage;
|
#include <iomanip> // for operator<<
|
||||||
|
#include <iostream> // for cout, cerr
|
||||||
|
#include <sstream> // for stringstream
|
||||||
|
|
||||||
|
|
||||||
Gpx_Printer::Gpx_Printer(const std::string& base_path)
|
Gpx_Printer::Gpx_Printer(const std::string& base_path)
|
||||||
|
@ -33,12 +33,12 @@
|
|||||||
#ifndef GNSS_SDR_GPX_PRINTER_H_
|
#ifndef GNSS_SDR_GPX_PRINTER_H_
|
||||||
#define GNSS_SDR_GPX_PRINTER_H_
|
#define GNSS_SDR_GPX_PRINTER_H_
|
||||||
|
|
||||||
#include "pvt_solution.h"
|
|
||||||
#include "rtklib_solver.h"
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Rtklib_Solver;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints PVT information to GPX format file
|
* \brief Prints PVT information to GPX format file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file galileo_e1_ls_pvt.cc
|
* \file hybrid_ls_pvt.cc
|
||||||
* \brief Implementation of a Least Squares Position, Velocity, and Time
|
* \brief Implementation of a Least Squares Position, Velocity, and Time
|
||||||
* (PVT) solver, based on K.Borre's Matlab receiver.
|
* (PVT) solver, based on K.Borre's Matlab receiver.
|
||||||
* \author Javier Arribas, 2011. jarribas(at)cttc.es
|
* \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
@ -38,8 +38,6 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
Hybrid_Ls_Pvt::Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt()
|
Hybrid_Ls_Pvt::Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt()
|
||||||
{
|
{
|
||||||
// init empty ephemeris for all the available GNSS channels
|
// init empty ephemeris for all the available GNSS channels
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file galileo_e1_ls_pvt.h
|
* \file hybrid_ls_pvt.h
|
||||||
* \brief Interface of a Least Squares Position, Velocity, and Time (PVT)
|
* \brief Interface of a Least Squares Position, Velocity, and Time (PVT)
|
||||||
* solver, based on K.Borre's Matlab receiver.
|
* solver, based on K.Borre's Matlab receiver.
|
||||||
* \author Javier Arribas, 2011. jarribas(at)cttc.es
|
* \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||||
|
@ -31,15 +31,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "kml_printer.h"
|
#include "kml_printer.h"
|
||||||
|
#include "rtklib_solver.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/operations.hpp> // for create_directories, exists
|
||||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||||
|
#include <boost/system/error_code.hpp> // for error_code
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <exception>
|
#include <cstdio> // for remove
|
||||||
|
#include <ctime> // for tm
|
||||||
|
#include <exception> // for exception
|
||||||
|
#include <iostream> // for cout, cerr
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Kml_Printer::Kml_Printer(const std::string& base_path)
|
Kml_Printer::Kml_Printer(const std::string& base_path)
|
||||||
|
@ -33,13 +33,12 @@
|
|||||||
#ifndef GNSS_SDR_KML_PRINTER_H_
|
#ifndef GNSS_SDR_KML_PRINTER_H_
|
||||||
#define GNSS_SDR_KML_PRINTER_H_
|
#define GNSS_SDR_KML_PRINTER_H_
|
||||||
|
|
||||||
#include "pvt_solution.h"
|
#include <fstream> // for ofstream
|
||||||
#include "rtklib_solver.h"
|
#include <memory> // for shared_ptr
|
||||||
#include <fstream>
|
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
|
||||||
|
class Rtklib_Solver;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth)
|
* \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth)
|
||||||
*
|
*
|
||||||
|
@ -33,13 +33,9 @@
|
|||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "geofunctions.h"
|
#include "geofunctions.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <exception>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Ls_Pvt::Ls_Pvt() : Pvt_Solution()
|
Ls_Pvt::Ls_Pvt() : Pvt_Solution()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -35,20 +35,19 @@
|
|||||||
|
|
||||||
#include "nmea_printer.h"
|
#include "nmea_printer.h"
|
||||||
#include "rtklib_solution.h"
|
#include "rtklib_solution.h"
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include "rtklib_solver.h"
|
||||||
#include <boost/filesystem/operations.hpp> // for create_directories, exists
|
#include <boost/filesystem/operations.hpp> // for create_directories, exists
|
||||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||||
|
#include <boost/system/error_code.hpp> // for error_code
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <iostream> // for cout, cerr
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path)
|
Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path)
|
||||||
{
|
{
|
||||||
nmea_base_path = base_path;
|
nmea_base_path = base_path;
|
||||||
|
@ -36,11 +36,12 @@
|
|||||||
#ifndef GNSS_SDR_NMEA_PRINTER_H_
|
#ifndef GNSS_SDR_NMEA_PRINTER_H_
|
||||||
#define GNSS_SDR_NMEA_PRINTER_H_
|
#define GNSS_SDR_NMEA_PRINTER_H_
|
||||||
|
|
||||||
#include "rtklib_solver.h"
|
#include <boost/date_time/posix_time/ptime.hpp> // for ptime
|
||||||
#include <fstream>
|
#include <fstream> // for ofstream
|
||||||
#include <memory>
|
#include <memory> // for shared_ptr
|
||||||
#include <string>
|
#include <string> // for string
|
||||||
|
|
||||||
|
class Rtklib_Solver;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class provides a implementation of a subset of the NMEA-0183 standard for interfacing
|
* \brief This class provides a implementation of a subset of the NMEA-0183 standard for interfacing
|
||||||
|
@ -70,4 +70,6 @@ Pvt_Conf::Pvt_Conf()
|
|||||||
|
|
||||||
monitor_enabled = false;
|
monitor_enabled = false;
|
||||||
udp_port = 0;
|
udp_port = 0;
|
||||||
|
|
||||||
|
show_local_time_zone = false;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#ifndef GNSS_SDR_PVT_CONF_H_
|
#ifndef GNSS_SDR_PVT_CONF_H_
|
||||||
#define GNSS_SDR_PVT_CONF_H_
|
#define GNSS_SDR_PVT_CONF_H_
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -84,6 +83,8 @@ public:
|
|||||||
std::string udp_addresses;
|
std::string udp_addresses;
|
||||||
int udp_port;
|
int udp_port;
|
||||||
|
|
||||||
|
bool show_local_time_zone;
|
||||||
|
|
||||||
Pvt_Conf();
|
Pvt_Conf();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -33,10 +33,6 @@
|
|||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "geofunctions.h"
|
#include "geofunctions.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <exception>
|
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Pvt_Solution::Pvt_Solution()
|
Pvt_Solution::Pvt_Solution()
|
||||||
@ -57,6 +53,7 @@ Pvt_Solution::Pvt_Solution()
|
|||||||
d_rx_dt_s = 0.0;
|
d_rx_dt_s = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
arma::vec Pvt_Solution::rotateSatellite(double const traveltime, const arma::vec &X_sat)
|
arma::vec Pvt_Solution::rotateSatellite(double const traveltime, const arma::vec &X_sat)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -29,6 +29,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rinex_printer.h"
|
#include "rinex_printer.h"
|
||||||
|
#include "Beidou_B1I.h"
|
||||||
|
#include "GLONASS_L1_L2_CA.h"
|
||||||
|
#include "GPS_L1_CA.h"
|
||||||
|
#include "Galileo_E1.h"
|
||||||
|
#include "beidou_dnav_ephemeris.h"
|
||||||
|
#include "beidou_dnav_iono.h"
|
||||||
|
#include "beidou_dnav_utc_model.h"
|
||||||
|
#include "galileo_ephemeris.h"
|
||||||
|
#include "galileo_iono.h"
|
||||||
|
#include "galileo_utc_model.h"
|
||||||
|
#include "glonass_gnav_almanac.h"
|
||||||
|
#include "glonass_gnav_ephemeris.h"
|
||||||
|
#include "glonass_gnav_utc_model.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
|
#include "gps_cnav_ephemeris.h"
|
||||||
|
#include "gps_cnav_iono.h"
|
||||||
|
#include "gps_cnav_utc_model.h"
|
||||||
|
#include "gps_ephemeris.h"
|
||||||
|
#include "gps_iono.h"
|
||||||
|
#include "gps_navigation_message.h"
|
||||||
|
#include "gps_utc_model.h"
|
||||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||||
#include <boost/date_time/local_time/local_time.hpp>
|
#include <boost/date_time/local_time/local_time.hpp>
|
||||||
#include <boost/date_time/time_zone_base.hpp>
|
#include <boost/date_time/time_zone_base.hpp>
|
||||||
@ -38,8 +59,9 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <algorithm> // for min and max
|
#include <algorithm> // for min and max
|
||||||
#include <cmath> // for floor
|
#include <cmath> // for floor
|
||||||
#include <cstdlib> // for getenv()
|
#include <cstring> // for memcpy
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <iostream> // for cout
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -48,9 +70,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
||||||
{
|
{
|
||||||
std::string base_rinex_path = base_path;
|
std::string base_rinex_path = base_path;
|
||||||
|
@ -51,25 +51,33 @@
|
|||||||
#ifndef GNSS_SDR_RINEX_PRINTER_H_
|
#ifndef GNSS_SDR_RINEX_PRINTER_H_
|
||||||
#define GNSS_SDR_RINEX_PRINTER_H_
|
#define GNSS_SDR_RINEX_PRINTER_H_
|
||||||
|
|
||||||
#include "Beidou_B1I.h"
|
|
||||||
#include "GLONASS_L1_L2_CA.h"
|
|
||||||
#include "GPS_L1_CA.h"
|
|
||||||
#include "Galileo_E1.h"
|
|
||||||
#include "beidou_dnav_navigation_message.h"
|
|
||||||
#include "galileo_navigation_message.h"
|
|
||||||
#include "glonass_gnav_navigation_message.h"
|
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include "gps_cnav_navigation_message.h"
|
|
||||||
#include "gps_navigation_message.h"
|
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint> // for int32_t
|
||||||
#include <fstream>
|
#include <cstdlib> // for strtol, strtod
|
||||||
|
#include <fstream> // for fstream
|
||||||
#include <iomanip> // for setprecision
|
#include <iomanip> // for setprecision
|
||||||
#include <map>
|
#include <map> // for map
|
||||||
#include <sstream> // for stringstream
|
#include <sstream> // for stringstream
|
||||||
#include <string>
|
#include <string> // for string
|
||||||
|
|
||||||
|
class Beidou_Dnav_Ephemeris;
|
||||||
|
class Beidou_Dnav_Iono;
|
||||||
|
class Beidou_Dnav_Utc_Model;
|
||||||
|
class Galileo_Ephemeris;
|
||||||
|
class Galileo_Iono;
|
||||||
|
class Galileo_Utc_Model;
|
||||||
|
class Glonass_Gnav_Almanac;
|
||||||
|
class Glonass_Gnav_Ephemeris;
|
||||||
|
class Glonass_Gnav_Utc_Model;
|
||||||
|
class Gnss_Synchro;
|
||||||
|
class Gps_CNAV_Ephemeris;
|
||||||
|
class Gps_CNAV_Iono;
|
||||||
|
class Gps_CNAV_Utc_Model;
|
||||||
|
class Gps_Ephemeris;
|
||||||
|
class Gps_Iono;
|
||||||
|
class Gps_Navigation_Message;
|
||||||
|
class Gps_Utc_Model;
|
||||||
|
|
||||||
class Sbas_Raw_Msg;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Class that handles the generation of Receiver
|
* \brief Class that handles the generation of Receiver
|
||||||
@ -88,13 +96,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
~Rinex_Printer();
|
~Rinex_Printer();
|
||||||
|
|
||||||
std::fstream obsFile; //<! Output file stream for RINEX observation file
|
std::fstream obsFile; //!< Output file stream for RINEX observation file
|
||||||
std::fstream navFile; //<! Output file stream for RINEX navigation data file
|
std::fstream navFile; //!< Output file stream for RINEX navigation data file
|
||||||
std::fstream sbsFile; //<! Output file stream for RINEX SBAS raw data file
|
std::fstream sbsFile; //!< Output file stream for RINEX SBAS raw data file
|
||||||
std::fstream navGalFile; //<! Output file stream for RINEX Galileo navigation data file
|
std::fstream navGalFile; //!< Output file stream for RINEX Galileo navigation data file
|
||||||
std::fstream navGloFile; //<! Output file stream for RINEX GLONASS navigation data file
|
std::fstream navGloFile; //!< Output file stream for RINEX GLONASS navigation data file
|
||||||
std::fstream navBdsFile; //<! Output file stream for RINEX Galileo navigation data file
|
std::fstream navBdsFile; //!< Output file stream for RINEX Galileo navigation data file
|
||||||
std::fstream navMixFile; //<! Output file stream for RINEX Mixed navigation data file
|
std::fstream navMixFile; //!< Output file stream for RINEX Mixed navigation data file
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Generates the GPS L1 C/A Navigation Data header
|
* \brief Generates the GPS L1 C/A Navigation Data header
|
||||||
@ -404,10 +412,10 @@ public:
|
|||||||
|
|
||||||
void update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model);
|
void update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model);
|
||||||
|
|
||||||
std::map<std::string, std::string> satelliteSystem; //<! GPS, GLONASS, SBAS payload, Galileo or Beidou
|
std::map<std::string, std::string> satelliteSystem; //!< GPS, GLONASS, SBAS payload, Galileo or Beidou
|
||||||
std::map<std::string, std::string> observationType; //<! PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
std::map<std::string, std::string> observationType; //!< PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
||||||
std::map<std::string, std::string> observationCode; //<! GNSS observation descriptors
|
std::map<std::string, std::string> observationCode; //!< GNSS observation descriptors
|
||||||
std::string stringVersion; //<! RINEX version (2.10/2.11 or 3.01/3.02)
|
std::string stringVersion; //!< RINEX version (2.10/2.11 or 3.01/3.02)
|
||||||
|
|
||||||
std::string navfilename;
|
std::string navfilename;
|
||||||
std::string obsfilename;
|
std::string obsfilename;
|
||||||
|
@ -29,8 +29,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtcm.h"
|
#include "rtcm.h"
|
||||||
|
#include "GLONASS_L1_L2_CA.h"
|
||||||
|
#include "GPS_L1_CA.h"
|
||||||
#include "GPS_L2C.h"
|
#include "GPS_L2C.h"
|
||||||
#include "Galileo_E1.h"
|
#include "Galileo_E1.h"
|
||||||
|
#include "Galileo_E5a.h"
|
||||||
#include <boost/algorithm/string.hpp> // for to_upper_copy
|
#include <boost/algorithm/string.hpp> // for to_upper_copy
|
||||||
#include <boost/crc.hpp>
|
#include <boost/crc.hpp>
|
||||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||||
@ -39,10 +42,8 @@
|
|||||||
#include <chrono> // std::chrono::seconds
|
#include <chrono> // std::chrono::seconds
|
||||||
#include <cmath> // for std::fmod
|
#include <cmath> // for std::fmod
|
||||||
#include <cstdlib> // for strtol
|
#include <cstdlib> // for strtol
|
||||||
|
#include <iostream> // for cout
|
||||||
#include <sstream> // for std::stringstream
|
#include <sstream> // for std::stringstream
|
||||||
#include <thread>
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Rtcm::Rtcm(uint16_t port)
|
Rtcm::Rtcm(uint16_t port)
|
||||||
@ -3366,6 +3367,7 @@ std::map<std::string, int> Rtcm::gps_signal_map = [] {
|
|||||||
gps_signal_map_["5I"] = 22;
|
gps_signal_map_["5I"] = 22;
|
||||||
gps_signal_map_["5Q"] = 23;
|
gps_signal_map_["5Q"] = 23;
|
||||||
gps_signal_map_["5X"] = 24;
|
gps_signal_map_["5X"] = 24;
|
||||||
|
gps_signal_map_["L5"] = 24; // Workaround. TODO: check if it was I or Q
|
||||||
return gps_signal_map_;
|
return gps_signal_map_;
|
||||||
}();
|
}();
|
||||||
|
|
@ -34,16 +34,19 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "concurrent_queue.h"
|
#include "concurrent_queue.h"
|
||||||
#include "galileo_fnav_message.h"
|
|
||||||
#include "glonass_gnav_navigation_message.h"
|
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "gps_cnav_navigation_message.h"
|
#include <galileo_ephemeris.h>
|
||||||
#include "gps_navigation_message.h"
|
#include <gps_ephemeris.h>
|
||||||
|
#include <gps_cnav_ephemeris.h>
|
||||||
|
#include <glonass_gnav_ephemeris.h>
|
||||||
|
#include <glonass_gnav_utc_model.h>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <cstring> // for memcpy
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -55,7 +58,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This class implements the generation and reading of some Message Types
|
* \brief This class implements the generation and reading of some Message Types
|
||||||
* defined in the RTCM 3.2 Standard, plus some utilities to handle messages.
|
* defined in the RTCM 3.2 Standard, plus some utilities to handle messages.
|
||||||
*
|
*
|
||||||
* Generation of the following Message Types:
|
* Generation of the following Message Types:
|
||||||
@ -86,7 +89,7 @@
|
|||||||
class Rtcm
|
class Rtcm
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Rtcm(uint16_t port = 2101); //<! Default constructor that sets TCP port of the RTCM message server and RTCM Station ID. 2101 is the standard RTCM port according to the Internet Assigned Numbers Authority (IANA). See https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
|
Rtcm(uint16_t port = 2101); //!< Default constructor that sets TCP port of the RTCM message server and RTCM Station ID. 2101 is the standard RTCM port according to the Internet Assigned Numbers Authority (IANA). See https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
|
||||||
~Rtcm();
|
~Rtcm();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -124,7 +127,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::string print_MT1006(uint32_t ref_id, double ecef_x, double ecef_y, double ecef_z, bool gps, bool glonass, bool galileo, bool non_physical, bool single_oscillator, uint32_t quarter_cycle_indicator, double height);
|
std::string print_MT1006(uint32_t ref_id, double ecef_x, double ecef_y, double ecef_z, bool gps, bool glonass, bool galileo, bool non_physical, bool single_oscillator, uint32_t quarter_cycle_indicator, double height);
|
||||||
|
|
||||||
std::string print_MT1005_test(); //<! For testing purposes
|
std::string print_MT1005_test(); //!< For testing purposes
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints message type 1008 (Antenna Descriptor & Serial Number)
|
* \brief Prints message type 1008 (Antenna Descriptor & Serial Number)
|
||||||
@ -141,6 +144,7 @@ public:
|
|||||||
* \return string with message contents
|
* \return string with message contents
|
||||||
*/
|
*/
|
||||||
std::string print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id);
|
std::string print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints Extended L1-Only GLONASS RTK Observables
|
* \brief Prints Extended L1-Only GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases.
|
* \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases.
|
||||||
@ -151,6 +155,7 @@ public:
|
|||||||
* \return string with message contents
|
* \return string with message contents
|
||||||
*/
|
*/
|
||||||
std::string print_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id);
|
std::string print_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints L1&L2 GLONASS RTK Observables
|
* \brief Prints L1&L2 GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred
|
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred
|
||||||
@ -161,6 +166,7 @@ public:
|
|||||||
* \return string with message contents
|
* \return string with message contents
|
||||||
*/
|
*/
|
||||||
std::string print_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id);
|
std::string print_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints Extended L1&L2 GLONASS RTK Observables
|
* \brief Prints Extended L1&L2 GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found.
|
* \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found.
|
||||||
@ -329,9 +335,10 @@ public:
|
|||||||
bool divergence_free,
|
bool divergence_free,
|
||||||
bool more_messages);
|
bool more_messages);
|
||||||
|
|
||||||
uint32_t lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //<! Returns the time period in which GPS L1 signals have been continually tracked.
|
uint32_t lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //!< Returns the time period in which GPS L1 signals have been continually tracked.
|
||||||
uint32_t lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //<! Returns the time period in which GPS L2 signals have been continually tracked.
|
uint32_t lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //!< Returns the time period in which GPS L2 signals have been continually tracked.
|
||||||
uint32_t lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //<! Returns the time period in which Galileo signals have been continually tracked.
|
uint32_t lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro); //!< Returns the time period in which Galileo signals have been continually tracked.
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Locks time period in which GLONASS signals have been continually tracked.
|
* \brief Locks time period in which GLONASS signals have been continually tracked.
|
||||||
* \note Code added as part of GSoC 2017 program
|
* \note Code added as part of GSoC 2017 program
|
||||||
@ -342,34 +349,26 @@ public:
|
|||||||
*/
|
*/
|
||||||
uint32_t lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
|
|
||||||
std::string bin_to_hex(const std::string& s) const; //<! Returns a string of hexadecimal symbols from a string of binary symbols
|
std::string bin_to_hex(const std::string& s) const; //!< Returns a string of hexadecimal symbols from a string of binary symbols
|
||||||
std::string hex_to_bin(const std::string& s) const; //<! Returns a string of binary symbols from a string of hexadecimal symbols
|
std::string hex_to_bin(const std::string& s) const; //!< Returns a string of binary symbols from a string of hexadecimal symbols
|
||||||
|
|
||||||
std::string bin_to_binary_data(const std::string& s) const; //<! Returns a string of binary data from a string of binary symbols
|
std::string bin_to_binary_data(const std::string& s) const; //!< Returns a string of binary data from a string of binary symbols
|
||||||
std::string binary_data_to_bin(const std::string& s) const; //<! Returns a string of binary symbols from a string of binary data
|
std::string binary_data_to_bin(const std::string& s) const; //!< Returns a string of binary symbols from a string of binary data
|
||||||
|
|
||||||
uint32_t bin_to_uint(const std::string& s) const; //<! Returns an uint32_t from a string of binary symbols
|
uint32_t bin_to_uint(const std::string& s) const; //!< Returns an uint32_t from a string of binary symbols
|
||||||
int32_t bin_to_int(const std::string& s) const;
|
int32_t bin_to_int(const std::string& s) const;
|
||||||
double bin_to_double(const std::string& s) const; //<! Returns double from a string of binary symbols
|
double bin_to_double(const std::string& s) const; //!< Returns double from a string of binary symbols
|
||||||
/*!
|
|
||||||
* \brief Locks time period in which GLONASS signals have been continually tracked.
|
|
||||||
* \note Code added as part of GSoC 2017 program
|
|
||||||
* \param eph GLONASS GNAV Broadcast Ephemeris
|
|
||||||
* \param obs_time Time of observation at the moment of printing
|
|
||||||
* \param observables Set of observables as defined by the platform
|
|
||||||
* \return //<! Returns a int64_t from a string of binary symbols
|
|
||||||
*/
|
|
||||||
int32_t bin_to_sint(const std::string& s) const;
|
int32_t bin_to_sint(const std::string& s) const;
|
||||||
uint64_t hex_to_uint(const std::string& s) const; //<! Returns an uint64_t from a string of hexadecimal symbols
|
uint64_t hex_to_uint(const std::string& s) const; //!< Returns an uint64_t from a string of hexadecimal symbols
|
||||||
int64_t hex_to_int(const std::string& s) const; //<! Returns a int64_t from a string of hexadecimal symbols
|
int64_t hex_to_int(const std::string& s) const; //!< Returns a int64_t from a string of hexadecimal symbols
|
||||||
|
|
||||||
bool check_CRC(const std::string& message) const; //<! Checks that the CRC of a RTCM package is correct
|
bool check_CRC(const std::string& message) const; //!< Checks that the CRC of a RTCM package is correct
|
||||||
|
|
||||||
void run_server(); //<! Starts running the server
|
void run_server(); //!< Starts running the server
|
||||||
void stop_server(); //<! Stops the server
|
void stop_server(); //!< Stops the server
|
||||||
|
|
||||||
void send_message(const std::string& msg); //<! Sends a message through the server to all connected clients
|
void send_message(const std::string& msg); //!< Sends a message through the server to all connected clients
|
||||||
bool is_server_running() const; //<! Returns true if the server is running, false otherwise
|
bool is_server_running() const; //!< Returns true if the server is running, false otherwise
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//
|
//
|
@ -32,20 +32,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtcm_printer.h"
|
#include "rtcm_printer.h"
|
||||||
|
#include "galileo_ephemeris.h"
|
||||||
|
#include "glonass_gnav_ephemeris.h"
|
||||||
|
#include "glonass_gnav_utc_model.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
|
#include "gps_cnav_ephemeris.h"
|
||||||
|
#include "gps_ephemeris.h"
|
||||||
|
#include "rtcm.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/operations.hpp> // for create_directories, exists
|
||||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||||
|
#include <boost/system/error_code.hpp> // for error_codes
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <cstdint>
|
#include <cstdio> // for remove
|
||||||
#include <exception>
|
#include <ctime> // for tm
|
||||||
|
#include <exception> // for exception
|
||||||
#include <fcntl.h> // for O_RDWR
|
#include <fcntl.h> // for O_RDWR
|
||||||
#include <iomanip>
|
#include <iostream> // for cout, cerr
|
||||||
#include <termios.h> // for tcgetattr
|
#include <termios.h> // for tcgetattr
|
||||||
#include <utility>
|
#include <unistd.h> // for close, write
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
Rtcm_Printer::Rtcm_Printer(const 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, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path)
|
Rtcm_Printer::Rtcm_Printer(const 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, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path)
|
||||||
|
@ -34,11 +34,19 @@
|
|||||||
#ifndef GNSS_SDR_RTCM_PRINTER_H_
|
#ifndef GNSS_SDR_RTCM_PRINTER_H_
|
||||||
#define GNSS_SDR_RTCM_PRINTER_H_
|
#define GNSS_SDR_RTCM_PRINTER_H_
|
||||||
|
|
||||||
#include "rtcm.h"
|
#include <cstdint> // for int32_t
|
||||||
#include <fstream> // std::ofstream
|
#include <fstream> // for std::ofstream
|
||||||
#include <map>
|
#include <map> // for std::map
|
||||||
#include <memory> // std::shared_ptr
|
#include <memory> // std::shared_ptr
|
||||||
|
|
||||||
|
class Galileo_Ephemeris;
|
||||||
|
class Glonass_Gnav_Ephemeris;
|
||||||
|
class Glonass_Gnav_Utc_Model;
|
||||||
|
class Gnss_Synchro;
|
||||||
|
class Gps_CNAV_Ephemeris;
|
||||||
|
class Gps_Ephemeris;
|
||||||
|
class Rtcm;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages
|
* \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages
|
||||||
*/
|
*/
|
||||||
@ -59,6 +67,7 @@ public:
|
|||||||
bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints L1-Only GLONASS RTK Observables
|
* \brief Prints L1-Only GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred.
|
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred.
|
||||||
@ -69,6 +78,7 @@ public:
|
|||||||
* \return true or false upon operation success
|
* \return true or false upon operation success
|
||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints Extended L1-Only GLONASS RTK Observables
|
* \brief Prints Extended L1-Only GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases.
|
* \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases.
|
||||||
@ -79,6 +89,7 @@ public:
|
|||||||
* \return true or false upon operation success
|
* \return true or false upon operation success
|
||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints L1&L2 GLONASS RTK Observables
|
* \brief Prints L1&L2 GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred
|
* \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred
|
||||||
@ -90,6 +101,7 @@ public:
|
|||||||
* \return true or false upon operation success
|
* \return true or false upon operation success
|
||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints Extended L1&L2 GLONASS RTK Observables
|
* \brief Prints Extended L1&L2 GLONASS RTK Observables
|
||||||
* \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found.
|
* \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found.
|
||||||
@ -102,8 +114,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
bool Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||||
|
|
||||||
bool Print_Rtcm_MT1019(const Gps_Ephemeris& gps_eph); //<! GPS Ephemeris, should be broadcast in the event that the IODC does not match the IODE, and every 2 minutes.
|
bool Print_Rtcm_MT1019(const Gps_Ephemeris& gps_eph); //!< GPS Ephemeris, should be broadcast in the event that the IODC does not match the IODE, and every 2 minutes.
|
||||||
bool Print_Rtcm_MT1045(const Galileo_Ephemeris& gal_eph); //<! Galileo Ephemeris, should be broadcast every 2 minutes
|
bool Print_Rtcm_MT1045(const Galileo_Ephemeris& gal_eph); //!< Galileo Ephemeris, should be broadcast every 2 minutes
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Prints GLONASS GNAV Ephemeris
|
* \brief Prints GLONASS GNAV Ephemeris
|
||||||
* \details This GLONASS message should be broadcast every 2 minutes
|
* \details This GLONASS message should be broadcast every 2 minutes
|
||||||
@ -127,10 +140,11 @@ public:
|
|||||||
bool divergence_free,
|
bool divergence_free,
|
||||||
bool more_messages);
|
bool more_messages);
|
||||||
|
|
||||||
std::string print_MT1005_test(); //<! For testing purposes
|
std::string print_MT1005_test(); //!< For testing purposes
|
||||||
uint32_t lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
uint32_t lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
uint32_t lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
uint32_t lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Locks time for logging given GLONASS GNAV Broadcast Ephemeris
|
* \brief Locks time for logging given GLONASS GNAV Broadcast Ephemeris
|
||||||
* \note Code added as part of GSoC 2017 program
|
* \note Code added as part of GSoC 2017 program
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "Galileo_E1.h"
|
#include "Galileo_E1.h"
|
||||||
#include "rtklib_conversions.h"
|
#include "rtklib_conversions.h"
|
||||||
|
#include "rtklib_rtkpos.h"
|
||||||
#include "rtklib_solution.h"
|
#include "rtklib_solution.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <matio.h>
|
#include <matio.h>
|
||||||
@ -64,8 +65,6 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
|
Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
|
||||||
{
|
{
|
||||||
// init empty ephemeris for all the available GNSS channels
|
// init empty ephemeris for all the available GNSS channels
|
||||||
@ -481,11 +480,13 @@ double Rtklib_Solver::get_vdop() const
|
|||||||
return dop_[3];
|
return dop_[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Monitor_Pvt Rtklib_Solver::get_monitor_pvt() const
|
Monitor_Pvt Rtklib_Solver::get_monitor_pvt() const
|
||||||
{
|
{
|
||||||
return monitor_pvt;
|
return monitor_pvt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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;
|
||||||
|
@ -55,16 +55,28 @@
|
|||||||
#define GNSS_SDR_RTKLIB_SOLVER_H_
|
#define GNSS_SDR_RTKLIB_SOLVER_H_
|
||||||
|
|
||||||
|
|
||||||
#include "beidou_dnav_navigation_message.h"
|
#include "beidou_dnav_almanac.h"
|
||||||
|
#include "beidou_dnav_ephemeris.h"
|
||||||
|
#include "beidou_dnav_iono.h"
|
||||||
|
#include "beidou_dnav_utc_model.h"
|
||||||
#include "galileo_almanac.h"
|
#include "galileo_almanac.h"
|
||||||
#include "galileo_navigation_message.h"
|
#include "galileo_ephemeris.h"
|
||||||
#include "glonass_gnav_navigation_message.h"
|
#include "galileo_iono.h"
|
||||||
|
#include "galileo_utc_model.h"
|
||||||
|
#include "glonass_gnav_almanac.h"
|
||||||
|
#include "glonass_gnav_ephemeris.h"
|
||||||
|
#include "glonass_gnav_utc_model.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "gps_cnav_navigation_message.h"
|
#include "gps_almanac.h"
|
||||||
#include "gps_navigation_message.h"
|
#include "gps_cnav_ephemeris.h"
|
||||||
|
#include "gps_cnav_iono.h"
|
||||||
|
#include "gps_cnav_utc_model.h"
|
||||||
|
#include "gps_ephemeris.h"
|
||||||
|
#include "gps_iono.h"
|
||||||
|
#include "gps_utc_model.h"
|
||||||
#include "monitor_pvt.h"
|
#include "monitor_pvt.h"
|
||||||
#include "pvt_solution.h"
|
#include "pvt_solution.h"
|
||||||
#include "rtklib_rtkpos.h"
|
#include "rtklib.h"
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -89,12 +101,13 @@ private:
|
|||||||
Monitor_Pvt monitor_pvt;
|
Monitor_Pvt monitor_pvt;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
sol_t pvt_sol;
|
|
||||||
ssat_t pvt_ssat[MAXSAT];
|
|
||||||
Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk);
|
Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const 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);
|
||||||
|
|
||||||
|
sol_t pvt_sol;
|
||||||
|
ssat_t pvt_ssat[MAXSAT];
|
||||||
double get_hdop() const;
|
double get_hdop() const;
|
||||||
double get_vdop() const;
|
double get_vdop() const;
|
||||||
double get_pdop() const;
|
double get_pdop() const;
|
||||||
|
@ -92,15 +92,17 @@ add_library(acquisition_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
|
|||||||
|
|
||||||
target_link_libraries(acquisition_adapters
|
target_link_libraries(acquisition_adapters
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Gnuradio::blocks
|
|
||||||
algorithms_libs
|
algorithms_libs
|
||||||
gnss_sdr_flags
|
gnss_sdr_flags
|
||||||
acquisition_gr_blocks
|
acquisition_gr_blocks
|
||||||
core_system_parameters
|
core_system_parameters
|
||||||
|
Gnuradio::blocks
|
||||||
|
Volk::volk
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Boost::boost
|
Boost::boost
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
|
Gnuradio::fft
|
||||||
Volkgnsssdr::volkgnsssdr
|
Volkgnsssdr::volkgnsssdr
|
||||||
acquisition_libs
|
acquisition_libs
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -41,8 +41,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file beidou_bi1_pcps_acquisition.h
|
* \file beidou_b1i_pcps_acquisition.h
|
||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||||
* Beidou B1I signals
|
* Beidou B1I signals
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#include <boost/math/distributions/exponential.hpp>
|
#include <boost/math/distributions/exponential.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||||
* Galileo E1 Signals for the FPGA
|
* Galileo E1 Signals for the FPGA
|
||||||
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
@ -35,12 +34,15 @@
|
|||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include "galileo_e1_signal_processing.h"
|
#include "galileo_e1_signal_processing.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include <boost/lexical_cast.hpp>
|
#include "gnss_synchro.h"
|
||||||
#include <boost/math/distributions/exponential.hpp>
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||||
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
using google::LogMessage;
|
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
#include <cmath> // for abs, pow, floor
|
||||||
|
#include <complex> // for complex
|
||||||
|
#include <cstring> // for memcpy
|
||||||
|
|
||||||
|
|
||||||
GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||||
@ -57,11 +59,8 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
|||||||
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);
|
|
||||||
|
|
||||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||||
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
|
|
||||||
@ -78,12 +77,12 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
|||||||
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||||
acq_parameters.sampled_ms = sampled_ms;
|
acq_parameters.sampled_ms = sampled_ms;
|
||||||
|
|
||||||
acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); //will be true in future versions
|
acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); // could be true in future versions
|
||||||
|
|
||||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
// Find number of samples per spreading code (4 ms)
|
||||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||||
|
|
||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
|
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length * 2));
|
float nbits = ceilf(log2f((float)code_length * 2));
|
||||||
uint32_t nsamples_total = pow(2, nbits);
|
uint32_t nsamples_total = pow(2, nbits);
|
||||||
@ -128,11 +127,10 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
|||||||
code[s] = code[s - code_length];
|
code[s] = code[s - code_length];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// fill in zero padding
|
// fill in zero padding
|
||||||
for (uint32_t s = 2 * code_length; s < nsamples_total; s++)
|
for (uint32_t s = 2 * code_length; s < nsamples_total; s++)
|
||||||
{
|
{
|
||||||
code[s] = std::complex<float>(static_cast<float>(0, 0));
|
code[s] = std::complex<float>(0.0, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(fft_if->get_inbuf(), code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
memcpy(fft_if->get_inbuf(), code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
||||||
@ -260,15 +258,22 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_state(int state)
|
|||||||
acquisition_fpga_->set_state(state);
|
acquisition_fpga_->set_state(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to connect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to connect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
void GalileoE1PcpsAmbiguousAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to disconnect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to disconnect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file galileo_e1_pcps_ambiguous_acquisition_fpga.h
|
* \file galileo_e1_pcps_ambiguous_acquisition_fpga.h
|
||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||||
* Galileo E1 Signals
|
* Galileo E1 Signals for the FPGA
|
||||||
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
@ -35,19 +34,20 @@
|
|||||||
|
|
||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
#include <gnuradio/blocks/stream_to_vector.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class adapts a PCPS acquisition block to an
|
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||||
* AcquisitionInterface for Galileo E1 Signals
|
* to an AcquisitionInterface for Galileo E1 Signals
|
||||||
*/
|
*/
|
||||||
class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface
|
class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface
|
||||||
{
|
{
|
||||||
@ -148,15 +148,10 @@ private:
|
|||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
bool bit_transition_flag_;
|
|
||||||
bool use_CFAR_algorithm_flag_;
|
|
||||||
bool acquire_pilot_;
|
bool acquire_pilot_;
|
||||||
uint32_t channel_;
|
uint32_t channel_;
|
||||||
uint32_t doppler_max_;
|
uint32_t doppler_max_;
|
||||||
uint32_t doppler_step_;
|
uint32_t doppler_step_;
|
||||||
uint32_t max_dwells_;
|
|
||||||
bool dump_;
|
|
||||||
bool blocking_;
|
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
Gnss_Synchro* gnss_synchro_;
|
Gnss_Synchro* gnss_synchro_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#include <boost/math/distributions/exponential.hpp>
|
#include <boost/math/distributions/exponential.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition(
|
GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#include <boost/math/distributions/exponential.hpp>
|
#include <boost/math/distributions/exponential.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition(
|
GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#include <boost/math/distributions/exponential.hpp>
|
#include <boost/math/distributions/exponential.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
|
@ -43,8 +43,6 @@
|
|||||||
#include <boost/math/distributions/exponential.hpp>
|
#include <boost/math/distributions/exponential.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration,
|
GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
unsigned int in_streams,
|
unsigned int in_streams,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||||
* Galileo E5a data and pilot Signals for the FPGA
|
* Galileo E5a data and pilot Signals for the FPGA
|
||||||
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||||
@ -34,12 +34,15 @@
|
|||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include "galileo_e5_signal_processing.h"
|
#include "galileo_e5_signal_processing.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
#include <boost/math/distributions/exponential.hpp>
|
#include "gnss_synchro.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||||
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
|
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||||
using google::LogMessage;
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
#include <cmath> // for abs, pow, floor
|
||||||
|
#include <complex> // for complex
|
||||||
|
#include <cstring> // for strcpy, memcpy
|
||||||
|
|
||||||
|
|
||||||
GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
||||||
@ -119,7 +122,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
|||||||
strcpy(signal_, "5I");
|
strcpy(signal_, "5I");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, PRN, fs_in, 0);
|
galileo_e5_a_code_gen_complex_sampled(code, signal_, PRN, fs_in, 0);
|
||||||
|
|
||||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||||
@ -156,7 +158,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
||||||
|
|
||||||
// reference for the FPGA FFT-IFFT attenuation factor
|
// reference for the FPGA FFT-IFFT attenuation factor
|
||||||
@ -251,20 +252,28 @@ void GalileoE5aPcpsAcquisitionFpga::reset()
|
|||||||
acquisition_fpga_->set_active(true);
|
acquisition_fpga_->set_active(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aPcpsAcquisitionFpga::set_state(int state)
|
void GalileoE5aPcpsAcquisitionFpga::set_state(int state)
|
||||||
{
|
{
|
||||||
acquisition_fpga_->set_state(state);
|
acquisition_fpga_->set_state(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
void GalileoE5aPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to connect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to connect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
void GalileoE5aPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to connect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to disconnect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||||
* Galileo E5a data and pilot Signals for the FPGA
|
* Galileo E5a data and pilot Signals for the FPGA
|
||||||
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||||
@ -29,19 +29,27 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_
|
#ifndef GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_
|
||||||
#define GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
|
|
||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
#include <gnuradio/blocks/stream_to_vector.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstddef> // for size_t
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||||
|
* to an AcquisitionInterface for Galileo E5a signals
|
||||||
|
*/
|
||||||
class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface
|
class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -67,7 +75,7 @@ public:
|
|||||||
|
|
||||||
inline size_t item_size() override
|
inline size_t item_size() override
|
||||||
{
|
{
|
||||||
return item_size_;
|
return sizeof(lv_16sc_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void connect(gr::top_block_sptr top_block) override;
|
void connect(gr::top_block_sptr top_block) override;
|
||||||
@ -146,42 +154,25 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
|
|
||||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||||
|
|
||||||
size_t item_size_;
|
|
||||||
|
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
|
|
||||||
bool bit_transition_flag_;
|
|
||||||
bool dump_;
|
|
||||||
bool acq_pilot_;
|
bool acq_pilot_;
|
||||||
bool use_CFAR_;
|
|
||||||
bool blocking_;
|
|
||||||
bool acq_iq_;
|
bool acq_iq_;
|
||||||
|
|
||||||
uint32_t vector_length_;
|
|
||||||
uint32_t code_length_;
|
|
||||||
uint32_t channel_;
|
uint32_t channel_;
|
||||||
uint32_t doppler_max_;
|
uint32_t doppler_max_;
|
||||||
uint32_t doppler_step_;
|
uint32_t doppler_step_;
|
||||||
uint32_t sampled_ms_;
|
|
||||||
uint32_t max_dwells_;
|
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
|
|
||||||
int64_t fs_in_;
|
|
||||||
|
|
||||||
|
|
||||||
float threshold_;
|
|
||||||
|
|
||||||
gr_complex* code_;
|
|
||||||
|
|
||||||
Gnss_Synchro* gnss_synchro_;
|
Gnss_Synchro* gnss_synchro_;
|
||||||
|
|
||||||
lv_16sc_t* d_all_fft_codes_; // memory that contains all the code ffts
|
lv_16sc_t* d_all_fft_codes_; // memory that contains all the code ffts
|
||||||
};
|
};
|
||||||
#endif /* GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_ */
|
|
||||||
|
#endif /* GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_ */
|
||||||
|
@ -41,9 +41,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -40,9 +40,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -43,9 +43,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -40,8 +40,6 @@
|
|||||||
#include "gps_sdr_signal_processing.h"
|
#include "gps_sdr_signal_processing.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
* for GPS L1 C/A signals for the FPGA
|
* for GPS L1 C/A signals for the FPGA
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
* <li> Marc Molina, 2013. marc.molina.pena(at)gmail.com
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -38,16 +36,20 @@
|
|||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
#include "gps_sdr_signal_processing.h"
|
#include "gps_sdr_signal_processing.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/fft/fft.h>
|
#include <gnuradio/fft/fft.h>
|
||||||
#include <new>
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
|
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
#include <cmath> // for abs, pow, floor
|
||||||
|
#include <complex> // for complex
|
||||||
|
#include <cstring> // for memcpy
|
||||||
|
|
||||||
|
|
||||||
#define NUM_PRNs 32
|
#define NUM_PRNs 32
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
@ -242,13 +244,19 @@ void GpsL1CaPcpsAcquisitionFpga::set_state(int state)
|
|||||||
|
|
||||||
void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to connect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to connect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
void GpsL1CaPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to disconnect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to disconnect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
* for GPS L1 C/A signals for the FPGA
|
* for GPS L1 C/A signals for the FPGA
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
* <li> Marc Molina, 2013. marc.molina.pena(at)gmail.com
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -38,16 +36,18 @@
|
|||||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <string>
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstddef> // for size_t
|
||||||
|
#include <string> // for string
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||||
* for GPS L1 C/A signals
|
* to an AcquisitionInterface for GPS L1 C/A signals
|
||||||
*/
|
*/
|
||||||
class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface
|
class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface
|
||||||
{
|
{
|
||||||
|
@ -40,9 +40,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -38,9 +38,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -38,9 +38,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -41,9 +41,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
@ -375,6 +372,8 @@ gr::basic_block_sptr GpsL2MPcpsAcquisition::get_right_block()
|
|||||||
{
|
{
|
||||||
return acquisition_;
|
return acquisition_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL2MPcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
|
void GpsL2MPcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||||
{
|
{
|
||||||
acquisition_->set_resampler_latency(latency_samples);
|
acquisition_->set_resampler_latency(latency_samples);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file gps_l2_m_pcps_acquisition.cc
|
* \file gps_l2_m_pcps_acquisition_fpga.cc
|
||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts an FPGA-offloaded PCPS acquisition block
|
||||||
* GPS L2 M signals
|
* to an AcquisitionInterface for GPS L2 M signals
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Javier Arribas, 2015. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -35,14 +35,19 @@
|
|||||||
#include "GPS_L2C.h"
|
#include "GPS_L2C.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
#include "gps_l2c_signal.h"
|
#include "gps_l2c_signal.h"
|
||||||
#include <boost/math/distributions/exponential.hpp>
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||||
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
|
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
#include <cmath> // for abs, pow, floor
|
||||||
|
#include <complex> // for complex
|
||||||
|
#include <cstring> // for memcpy
|
||||||
|
|
||||||
#define NUM_PRNs 32
|
#define NUM_PRNs 32
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
@ -52,7 +57,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
//pcpsconf_t acq_parameters;
|
|
||||||
pcpsconf_fpga_t acq_parameters;
|
pcpsconf_fpga_t acq_parameters;
|
||||||
configuration_ = configuration;
|
configuration_ = configuration;
|
||||||
std::string default_item_type = "gr_complex";
|
std::string default_item_type = "gr_complex";
|
||||||
@ -61,33 +65,17 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
LOG(INFO) << "role " << role;
|
LOG(INFO) << "role " << role;
|
||||||
|
|
||||||
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
||||||
//float pfa = configuration_->property(role + ".pfa", 0.0);
|
|
||||||
|
|
||||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
acq_parameters.fs_in = fs_in_;
|
acq_parameters.fs_in = fs_in_;
|
||||||
//if_ = configuration_->property(role + ".if", 0);
|
|
||||||
//acq_parameters.freq = if_;
|
|
||||||
//dump_ = configuration_->property(role + ".dump", false);
|
|
||||||
//acq_parameters.dump = dump_;
|
|
||||||
//blocking_ = configuration_->property(role + ".blocking", true);
|
|
||||||
//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_;
|
||||||
//bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
|
||||||
//acq_parameters.bit_transition_flag = bit_transition_flag_;
|
|
||||||
//use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
|
|
||||||
//acq_parameters.use_CFAR_algorithm_flag = use_CFAR_algorithm_flag_;
|
|
||||||
//max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
|
||||||
//acq_parameters.max_dwells = max_dwells_;
|
|
||||||
//dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
|
||||||
//acq_parameters.dump_filename = dump_filename_;
|
|
||||||
//--- Find number of samples per spreading code -------------------------
|
|
||||||
//code_length_ = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
|
||||||
|
|
||||||
acq_parameters.sampled_ms = 20;
|
acq_parameters.sampled_ms = 20;
|
||||||
unsigned code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length));
|
float nbits = ceilf(log2f((float)code_length));
|
||||||
@ -99,10 +87,13 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
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 / acq_parameters.sampled_ms;
|
acq_parameters.samples_per_ms = nsamples_total / acq_parameters.sampled_ms;
|
||||||
//acq_parameters.samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001));
|
|
||||||
acq_parameters.samples_per_code = nsamples_total;
|
acq_parameters.samples_per_code = nsamples_total;
|
||||||
|
|
||||||
// compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
acq_parameters.downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||||
|
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||||
|
acq_parameters.excludelimit = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / GPS_L2_M_CODE_RATE_HZ));
|
||||||
|
|
||||||
|
// compute all the GPS L2C PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||||
// a channel is assigned)
|
// a channel is assigned)
|
||||||
auto* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT
|
auto* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT
|
||||||
// allocate memory to compute all the PRNs and compute all the possible codes
|
// allocate memory to compute all the PRNs and compute all the possible codes
|
||||||
@ -114,10 +105,9 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
{
|
{
|
||||||
gps_l2c_m_code_gen_complex_sampled(code, PRN, fs_in_);
|
gps_l2c_m_code_gen_complex_sampled(code, PRN, fs_in_);
|
||||||
// fill in zero padding
|
// fill in zero padding
|
||||||
for (int s = code_length; s < nsamples_total; s++)
|
for (unsigned int s = code_length; s < nsamples_total; s++)
|
||||||
{
|
{
|
||||||
code[s] = std::complex<float>(0.0, 0.0);
|
code[s] = std::complex<float>(0.0, 0.0);
|
||||||
//code[s] = 0;
|
|
||||||
}
|
}
|
||||||
memcpy(fft_if->get_inbuf(), code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
memcpy(fft_if->get_inbuf(), code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
||||||
fft_if->execute(); // Run the FFT of local code
|
fft_if->execute(); // Run the FFT of local code
|
||||||
@ -141,7 +131,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//acq_parameters
|
|
||||||
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
||||||
|
|
||||||
// temporary buffers that we can delete
|
// temporary buffers that we can delete
|
||||||
@ -156,53 +145,14 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
gnss_synchro_ = nullptr;
|
gnss_synchro_ = nullptr;
|
||||||
|
|
||||||
|
|
||||||
// vector_length_ = code_length_;
|
|
||||||
//
|
|
||||||
// if (bit_transition_flag_)
|
|
||||||
// {
|
|
||||||
// vector_length_ *= 2;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// code_ = new gr_complex[vector_length_];
|
|
||||||
//
|
|
||||||
// if (item_type_.compare("cshort") == 0)
|
|
||||||
// {
|
|
||||||
// item_size_ = sizeof(lv_16sc_t);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// item_size_ = sizeof(gr_complex);
|
|
||||||
// }
|
|
||||||
//acq_parameters.samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001));
|
|
||||||
//acq_parameters.samples_per_code = code_length_;
|
|
||||||
//acq_parameters.it_size = item_size_;
|
|
||||||
//acq_parameters.sampled_ms = 20;
|
|
||||||
//acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
|
||||||
//acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
|
||||||
//acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", true);
|
|
||||||
//acquisition_ = pcps_make_acquisition(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_);
|
|
||||||
// DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
|
||||||
//
|
|
||||||
// if (item_type_.compare("cbyte") == 0)
|
|
||||||
// {
|
|
||||||
// cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
|
||||||
// float_to_complex_ = gr::blocks::float_to_complex::make();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// channel_ = 0;
|
|
||||||
threshold_ = 0.0;
|
threshold_ = 0.0;
|
||||||
// doppler_step_ = 0;
|
|
||||||
// gnss_synchro_ = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GpsL2MPcpsAcquisitionFpga::~GpsL2MPcpsAcquisitionFpga()
|
GpsL2MPcpsAcquisitionFpga::~GpsL2MPcpsAcquisitionFpga()
|
||||||
{
|
{
|
||||||
//delete[] code_;
|
|
||||||
delete[] d_all_fft_codes_;
|
delete[] d_all_fft_codes_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,23 +171,8 @@ void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel)
|
|||||||
|
|
||||||
void GpsL2MPcpsAcquisitionFpga::set_threshold(float threshold)
|
void GpsL2MPcpsAcquisitionFpga::set_threshold(float threshold)
|
||||||
{
|
{
|
||||||
// float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
threshold_ = threshold;
|
||||||
//
|
|
||||||
// if (pfa == 0.0)
|
|
||||||
// {
|
|
||||||
// pfa = configuration_->property(role_ + ".pfa", 0.0);
|
|
||||||
// }
|
|
||||||
// if (pfa == 0.0)
|
|
||||||
// {
|
|
||||||
// threshold_ = threshold;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// 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_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,9 +218,6 @@ void GpsL2MPcpsAcquisitionFpga::init()
|
|||||||
|
|
||||||
void GpsL2MPcpsAcquisitionFpga::set_local_code()
|
void GpsL2MPcpsAcquisitionFpga::set_local_code()
|
||||||
{
|
{
|
||||||
//gps_l2c_m_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_);
|
|
||||||
|
|
||||||
//acquisition_fpga_->set_local_code(code_);
|
|
||||||
acquisition_fpga_->set_local_code();
|
acquisition_fpga_->set_local_code();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,105 +227,33 @@ void GpsL2MPcpsAcquisitionFpga::reset()
|
|||||||
acquisition_fpga_->set_active(true);
|
acquisition_fpga_->set_active(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL2MPcpsAcquisitionFpga::set_state(int state)
|
void GpsL2MPcpsAcquisitionFpga::set_state(int state)
|
||||||
{
|
{
|
||||||
acquisition_fpga_->set_state(state);
|
acquisition_fpga_->set_state(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//float GpsL2MPcpsAcquisitionFpga::calculate_threshold(float pfa)
|
|
||||||
//{
|
|
||||||
// //Calculate the threshold
|
|
||||||
// unsigned int frequency_bins = 0;
|
|
||||||
// for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
|
||||||
// {
|
|
||||||
// frequency_bins++;
|
|
||||||
// }
|
|
||||||
// DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
|
|
||||||
// unsigned int ncells = vector_length_ * frequency_bins;
|
|
||||||
// double exponent = 1.0 / static_cast<double>(ncells);
|
|
||||||
// double val = pow(1.0 - pfa, exponent);
|
|
||||||
// double lambda = double(vector_length_);
|
|
||||||
// boost::math::exponential_distribution<double> mydist(lambda);
|
|
||||||
// float threshold = static_cast<float>(quantile(mydist, val));
|
|
||||||
//
|
|
||||||
// return threshold;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
void GpsL2MPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
void GpsL2MPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// if (item_type_.compare("gr_complex") == 0)
|
if (top_block)
|
||||||
// {
|
{ /* top_block is not null */
|
||||||
// top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
};
|
||||||
// }
|
// Nothing to connect
|
||||||
// else if (item_type_.compare("cshort") == 0)
|
|
||||||
// {
|
|
||||||
// top_block->connect(stream_to_vector_, 0, acquisition_, 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_, 1, float_to_complex_, 1);
|
|
||||||
// top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
|
||||||
// top_block->connect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// nothing to connect
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL2MPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
void GpsL2MPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// if (item_type_.compare("gr_complex") == 0)
|
if (top_block)
|
||||||
// {
|
{ /* top_block is not null */
|
||||||
// top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
};
|
||||||
// }
|
// Nothing to diconnect
|
||||||
// else if (item_type_.compare("cshort") == 0)
|
|
||||||
// {
|
|
||||||
// top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
// }
|
|
||||||
// else if (item_type_.compare("cbyte") == 0)
|
|
||||||
// {
|
|
||||||
// // Since a byte-based acq implementation is not available,
|
|
||||||
// // 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_, 1, float_to_complex_, 1);
|
|
||||||
// top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
|
||||||
// top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// nothing to disconnect
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_left_block()
|
gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_left_block()
|
||||||
{
|
{
|
||||||
// if (item_type_.compare("gr_complex") == 0)
|
|
||||||
// {
|
|
||||||
// return stream_to_vector_;
|
|
||||||
// }
|
|
||||||
// else if (item_type_.compare("cshort") == 0)
|
|
||||||
// {
|
|
||||||
// return stream_to_vector_;
|
|
||||||
// }
|
|
||||||
// else if (item_type_.compare("cbyte") == 0)
|
|
||||||
// {
|
|
||||||
// return cbyte_to_float_x2_;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
|
||||||
// return nullptr;
|
|
||||||
// }
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file gps_l2_m_pcps_acquisition.h
|
* \file gps_l2_m_pcps_acquisition_fpga.h
|
||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts an FPGA-offloaded PCPS acquisition block
|
||||||
* GPS L2 M signals
|
* to an AcquisitionInterface for GPS L2 M signals
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Javier Arribas, 2015. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -36,19 +36,20 @@
|
|||||||
|
|
||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
#include <gnuradio/blocks/stream_to_vector.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <string>
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstddef> // for size_t
|
||||||
|
#include <string> // for string
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||||
* for GPS L2 M signals
|
* to an AcquisitionInterface for GPS L2 M signals
|
||||||
*/
|
*/
|
||||||
class GpsL2MPcpsAcquisitionFpga : public AcquisitionInterface
|
class GpsL2MPcpsAcquisitionFpga : public AcquisitionInterface
|
||||||
{
|
{
|
||||||
@ -66,16 +67,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns "GPS_L2_M_PCPS_Acquisition"
|
* \brief Returns "GPS_L2_M_PCPS_Acquisition_Fpga"
|
||||||
*/
|
*/
|
||||||
inline std::string implementation() override
|
inline std::string implementation() override
|
||||||
{
|
{
|
||||||
return "GPS_L2_M_PCPS_Acquisition";
|
return "GPS_L2_M_PCPS_Acquisition_Fpga";
|
||||||
}
|
}
|
||||||
|
|
||||||
inline size_t item_size() override
|
inline size_t item_size() override
|
||||||
{
|
{
|
||||||
return item_size_;
|
return sizeof(lv_16sc_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void connect(gr::top_block_sptr top_block) override;
|
void connect(gr::top_block_sptr top_block) override;
|
||||||
@ -144,28 +145,17 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
//pcps_acquisition_sptr acquisition_;
|
|
||||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
unsigned int vector_length_;
|
|
||||||
unsigned int code_length_;
|
|
||||||
bool bit_transition_flag_;
|
|
||||||
bool use_CFAR_algorithm_flag_;
|
|
||||||
unsigned int channel_;
|
unsigned int channel_;
|
||||||
float threshold_;
|
float threshold_;
|
||||||
unsigned int doppler_max_;
|
unsigned int doppler_max_;
|
||||||
unsigned int doppler_step_;
|
unsigned int doppler_step_;
|
||||||
unsigned int max_dwells_;
|
|
||||||
int64_t fs_in_;
|
int64_t fs_in_;
|
||||||
//long if_;
|
|
||||||
bool dump_;
|
|
||||||
bool blocking_;
|
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
std::complex<float>* code_;
|
|
||||||
Gnss_Synchro* gnss_synchro_;
|
Gnss_Synchro* gnss_synchro_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
|
@ -41,9 +41,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
const std::string& role,
|
const std::string& role,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file gps_l5i pcps_acquisition_fpga.cc
|
* \file gps_l5i_pcps_acquisition_fpga.cc
|
||||||
* \brief Adapts a PCPS acquisition block to an Acquisition Interface for
|
* \brief Adapts a PCPS acquisition block to an Acquisition Interface for
|
||||||
* GPS L5i signals for the FPGA
|
* GPS L5i signals for the FPGA
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2017. mmajoral(at)cttc.es
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* <li> Javier Arribas, 2017. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -36,14 +36,19 @@
|
|||||||
#include "GPS_L5.h"
|
#include "GPS_L5.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
#include "gps_l5_signal.h"
|
#include "gps_l5_signal.h"
|
||||||
#include <boost/math/distributions/exponential.hpp>
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||||
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
|
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||||
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
|
#include <cmath> // for abs, pow, floor
|
||||||
|
#include <complex> // for complex
|
||||||
|
#include <cstring> // for memcpy
|
||||||
|
|
||||||
#define NUM_PRNs 32
|
#define NUM_PRNs 32
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||||
ConfigurationInterface* configuration,
|
ConfigurationInterface* configuration,
|
||||||
@ -67,7 +72,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
|
|
||||||
fs_in = fs_in / downsampling_factor;
|
fs_in = fs_in / downsampling_factor;
|
||||||
|
|
||||||
|
|
||||||
acq_parameters.fs_in = fs_in;
|
acq_parameters.fs_in = fs_in;
|
||||||
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;
|
||||||
@ -93,8 +97,8 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
|
|
||||||
// compute all the GPS L5 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
// compute all the GPS L5 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||||
// a channel is assigned)
|
// a channel is assigned)
|
||||||
gr::fft::fft_complex* fft_if = new gr::fft::fft_complex(nsamples_total, true); // Direct FFT
|
auto* fft_if = new gr::fft::fft_complex(nsamples_total, true); // Direct FFT
|
||||||
std::complex<float>* code = new gr_complex[nsamples_total];
|
auto* code = new gr_complex[nsamples_total];
|
||||||
auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||||
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * NUM_PRNs]; // memory containing all the possible fft codes for PRN 0 to 32
|
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * NUM_PRNs]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||||
|
|
||||||
@ -111,7 +115,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
for (uint32_t s = 2 * code_length; s < nsamples_total; s++)
|
for (uint32_t s = 2 * code_length; s < nsamples_total; s++)
|
||||||
{
|
{
|
||||||
// fill in zero padding
|
// fill in zero padding
|
||||||
code[s] = std::complex<float>(static_cast<float>(0, 0));
|
code[s] = std::complex<float>(0.0, 0.0);
|
||||||
}
|
}
|
||||||
memcpy(fft_if->get_inbuf(), code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
memcpy(fft_if->get_inbuf(), code, sizeof(gr_complex) * nsamples_total); // copy to FFT buffer
|
||||||
fft_if->execute(); // Run the FFT of local code
|
fft_if->execute(); // Run the FFT of local code
|
||||||
@ -136,7 +140,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//acq_parameters
|
|
||||||
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
||||||
|
|
||||||
// reference for the FPGA FFT-IFFT attenuation factor
|
// reference for the FPGA FFT-IFFT attenuation factor
|
||||||
@ -194,6 +197,7 @@ void GpsL5iPcpsAcquisitionFpga::set_doppler_max(unsigned int doppler_max)
|
|||||||
acquisition_fpga_->set_doppler_max(doppler_max_);
|
acquisition_fpga_->set_doppler_max(doppler_max_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Be aware that Doppler step should be set to 2/(3T) Hz, where T is the coherent integration time (GPS L2 period is 0.02s)
|
// Be aware that Doppler step should be set to 2/(3T) Hz, where T is the coherent integration time (GPS L2 period is 0.02s)
|
||||||
// Doppler bin minimum size= 33 Hz
|
// Doppler bin minimum size= 33 Hz
|
||||||
void GpsL5iPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
void GpsL5iPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||||
@ -232,20 +236,28 @@ void GpsL5iPcpsAcquisitionFpga::reset()
|
|||||||
acquisition_fpga_->set_active(true);
|
acquisition_fpga_->set_active(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL5iPcpsAcquisitionFpga::set_state(int state)
|
void GpsL5iPcpsAcquisitionFpga::set_state(int state)
|
||||||
{
|
{
|
||||||
acquisition_fpga_->set_state(state);
|
acquisition_fpga_->set_state(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL5iPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
void GpsL5iPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to connect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to connect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL5iPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
void GpsL5iPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
// nothing to disconnect
|
if (top_block)
|
||||||
|
{ /* top_block is not null */
|
||||||
|
};
|
||||||
|
// Nothing to disconnect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file GPS_L5i_PCPS_Acquisition_fpga.h
|
* \file gps_l5i_pcps_acquisition_fpga.h
|
||||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||||
* GPS L5i signals for the FPGA
|
* GPS L5i signals for the FPGA
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* <li> Javier Arribas, 2017. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -32,24 +32,25 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_
|
#ifndef GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||||
#define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
#include "complex_byte_to_float_x2.h"
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
#include <gnuradio/blocks/float_to_complex.h>
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
#include <gnuradio/blocks/stream_to_vector.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||||
* for GPS L5i signals
|
* to an AcquisitionInterface for GPS L5i signals
|
||||||
*/
|
*/
|
||||||
class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface
|
class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface
|
||||||
{
|
{
|
||||||
@ -76,7 +77,7 @@ public:
|
|||||||
|
|
||||||
inline size_t item_size() override
|
inline size_t item_size() override
|
||||||
{
|
{
|
||||||
return item_size_;
|
return sizeof(lv_16sc_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void connect(gr::top_block_sptr top_block) override;
|
void connect(gr::top_block_sptr top_block) override;
|
||||||
@ -117,7 +118,7 @@ public:
|
|||||||
void init() override;
|
void init() override;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets local code for GPS L2/M PCPS acquisition algorithm.
|
* \brief Sets local code for GPS L5 PCPS acquisition algorithm.
|
||||||
*/
|
*/
|
||||||
void set_local_code() override;
|
void set_local_code() override;
|
||||||
|
|
||||||
@ -149,22 +150,11 @@ private:
|
|||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||||
size_t item_size_;
|
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
uint32_t vector_length_;
|
|
||||||
uint32_t code_length_;
|
|
||||||
bool bit_transition_flag_;
|
|
||||||
bool use_CFAR_algorithm_flag_;
|
|
||||||
uint32_t channel_;
|
uint32_t channel_;
|
||||||
float threshold_;
|
|
||||||
uint32_t doppler_max_;
|
uint32_t doppler_max_;
|
||||||
uint32_t doppler_step_;
|
uint32_t doppler_step_;
|
||||||
uint32_t max_dwells_;
|
|
||||||
int64_t fs_in_;
|
|
||||||
bool dump_;
|
|
||||||
bool blocking_;
|
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
std::complex<float>* code_;
|
|
||||||
Gnss_Synchro* gnss_synchro_;
|
Gnss_Synchro* gnss_synchro_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
@ -175,4 +165,4 @@ private:
|
|||||||
float calculate_threshold(float pfa);
|
float calculate_threshold(float pfa);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_ */
|
#endif /* GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ */
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
||||||
unsigned int sampled_ms,
|
unsigned int sampled_ms,
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||||
uint32_t sampled_ms,
|
uint32_t sampled_ms,
|
||||||
|
@ -36,17 +36,24 @@
|
|||||||
#include "pcps_acquisition.h"
|
#include "pcps_acquisition.h"
|
||||||
#include "GLONASS_L1_L2_CA.h" // for GLONASS_TWO_PI
|
#include "GLONASS_L1_L2_CA.h" // for GLONASS_TWO_PI
|
||||||
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||||
|
#include "gnss_frequencies.h"
|
||||||
#include "gnss_sdr_create_directory.h"
|
#include "gnss_sdr_create_directory.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <matio.h>
|
#include <matio.h>
|
||||||
|
#include <pmt/pmt.h> // for from_long
|
||||||
|
#include <pmt/pmt_sugar.h> // for mp
|
||||||
|
#include <volk/volk.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <cstring>
|
#include <algorithm> // for fill_n, min
|
||||||
|
#include <cmath> // for floor, fmod, rint, ceil
|
||||||
|
#include <cstring> // for memcpy
|
||||||
|
#include <iostream>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
|
pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
|
||||||
{
|
{
|
||||||
return pcps_acquisition_sptr(new pcps_acquisition(conf_));
|
return pcps_acquisition_sptr(new pcps_acquisition(conf_));
|
||||||
@ -187,6 +194,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pcps_acquisition::~pcps_acquisition()
|
pcps_acquisition::~pcps_acquisition()
|
||||||
{
|
{
|
||||||
if (d_num_doppler_bins > 0)
|
if (d_num_doppler_bins > 0)
|
||||||
@ -227,6 +235,7 @@ void pcps_acquisition::set_resampler_latency(uint32_t latency_samples)
|
|||||||
acq_parameters.resampler_latency_samples = latency_samples;
|
acq_parameters.resampler_latency_samples = latency_samples;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pcps_acquisition::set_local_code(std::complex<float>* code)
|
void pcps_acquisition::set_local_code(std::complex<float>* code)
|
||||||
{
|
{
|
||||||
// reset the intermediate frequency
|
// reset the intermediate frequency
|
||||||
@ -912,6 +921,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Called by gnuradio to enable drivers, etc for i/o devices.
|
// Called by gnuradio to enable drivers, etc for i/o devices.
|
||||||
bool pcps_acquisition::start()
|
bool pcps_acquisition::start()
|
||||||
{
|
{
|
||||||
@ -919,8 +929,10 @@ bool pcps_acquisition::start()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
gr_vector_int& ninput_items,
|
||||||
|
gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items __attribute__((unused)))
|
gr_vector_void_star& output_items __attribute__((unused)))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -53,14 +53,17 @@
|
|||||||
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
||||||
|
|
||||||
#include "acq_conf.h"
|
#include "acq_conf.h"
|
||||||
#include "gnss_synchro.h"
|
|
||||||
#include <armadillo>
|
#include <armadillo>
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <gnuradio/fft/fft.h>
|
#include <gnuradio/fft/fft.h>
|
||||||
#include <volk/volk.h>
|
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||||
|
#include <gnuradio/thread/thread.h> // for scoped_lock
|
||||||
|
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||||
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
class pcps_acquisition;
|
class pcps_acquisition;
|
||||||
|
|
||||||
using pcps_acquisition_sptr = boost::shared_ptr<pcps_acquisition>;
|
using pcps_acquisition_sptr = boost::shared_ptr<pcps_acquisition>;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file pcps_acquisition_fine_doppler_acquisition_cc.cc
|
* \file pcps_acquisition_fine_doppler_cc.cc
|
||||||
* \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation
|
* \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Javier Arribas, 2013. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2013. jarribas(at)cttc.es
|
||||||
@ -44,8 +44,6 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(const Acq_Conf &conf_)
|
pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(const Acq_Conf &conf_)
|
||||||
{
|
{
|
||||||
return pcps_acquisition_fine_doppler_cc_sptr(
|
return pcps_acquisition_fine_doppler_cc_sptr(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file pcps_acquisition_fine_doppler_acquisition_cc.h
|
* \file pcps_acquisition_fine_doppler_cc.h
|
||||||
* \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation
|
* \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation
|
||||||
* for GPS L1 C/A signal
|
* for GPS L1 C/A signal
|
||||||
*
|
*
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
* \brief This class implements a Parallel Code Phase Search Acquisition for the FPGA
|
* \brief This class implements a Parallel Code Phase Search Acquisition for the FPGA
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
* <li> Marc Molina, 2013. marc.molina.pena@gmail.com
|
|
||||||
* <li> Cillian O'Driscoll, 2017. cillian(at)ieee.org
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -36,13 +33,18 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <utility>
|
#include <pmt/pmt.h> // for from_long
|
||||||
|
#include <pmt/pmt_sugar.h> // for mp
|
||||||
|
#include <cmath> // for ceil
|
||||||
|
#include <iostream> // for operator<<
|
||||||
|
#include <utility> // for move
|
||||||
|
|
||||||
|
|
||||||
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
|
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
|
pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||||
{
|
{
|
||||||
@ -66,6 +68,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block(
|
|||||||
d_num_doppler_bins = 0U;
|
d_num_doppler_bins = 0U;
|
||||||
d_threshold = 0.0;
|
d_threshold = 0.0;
|
||||||
d_doppler_step = 0U;
|
d_doppler_step = 0U;
|
||||||
|
d_doppler_index = 0U;
|
||||||
d_test_statistics = 0.0;
|
d_test_statistics = 0.0;
|
||||||
d_channel = 0U;
|
d_channel = 0U;
|
||||||
d_gnss_synchro = nullptr;
|
d_gnss_synchro = nullptr;
|
||||||
@ -82,7 +85,8 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block(
|
|||||||
|
|
||||||
d_doppler_max = acq_parameters.doppler_max;
|
d_doppler_max = acq_parameters.doppler_max;
|
||||||
|
|
||||||
acquisition_fpga = std::make_shared<fpga_acquisition>(acq_parameters.device_name, acq_parameters.code_length, acq_parameters.doppler_max, d_fft_size,
|
acquisition_fpga = std::make_shared<Fpga_Acquisition>(acq_parameters.device_name, acq_parameters.code_length, acq_parameters.doppler_max, d_fft_size,
|
||||||
|
|
||||||
acq_parameters.fs_in, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes, acq_parameters.excludelimit);
|
acq_parameters.fs_in, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes, acq_parameters.excludelimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +147,7 @@ void pcps_acquisition_fpga::set_state(int32_t state)
|
|||||||
void pcps_acquisition_fpga::send_positive_acquisition()
|
void pcps_acquisition_fpga::send_positive_acquisition()
|
||||||
{
|
{
|
||||||
// Declare positive acquisition using a message port
|
// Declare positive acquisition using a message port
|
||||||
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
// 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||||
DLOG(INFO) << "positive acquisition"
|
DLOG(INFO) << "positive acquisition"
|
||||||
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||||
<< ", sample_stamp " << d_sample_counter
|
<< ", sample_stamp " << d_sample_counter
|
||||||
@ -183,23 +187,21 @@ void pcps_acquisition_fpga::acquisition_core(uint32_t num_doppler_bins, uint32_t
|
|||||||
uint64_t initial_sample;
|
uint64_t initial_sample;
|
||||||
int32_t doppler;
|
int32_t doppler;
|
||||||
|
|
||||||
acquisition_fpga->configure_acquisition();
|
|
||||||
acquisition_fpga->set_doppler_sweep(num_doppler_bins, doppler_step, doppler_min);
|
acquisition_fpga->set_doppler_sweep(num_doppler_bins, doppler_step, doppler_min);
|
||||||
acquisition_fpga->write_local_code();
|
|
||||||
acquisition_fpga->set_block_exp(d_total_block_exp);
|
|
||||||
acquisition_fpga->run_acquisition();
|
acquisition_fpga->run_acquisition();
|
||||||
acquisition_fpga->read_acquisition_results(&indext, &firstpeak, &secondpeak, &initial_sample, &d_input_power, &d_doppler_index, &total_block_exp);
|
acquisition_fpga->read_acquisition_results(&indext, &firstpeak, &secondpeak, &initial_sample, &d_input_power, &d_doppler_index, &total_block_exp);
|
||||||
|
|
||||||
|
doppler = static_cast<int32_t>(doppler_min) + doppler_step * (d_doppler_index - 1);
|
||||||
|
|
||||||
if (total_block_exp > d_total_block_exp)
|
if (total_block_exp > d_total_block_exp)
|
||||||
{
|
{
|
||||||
// if the attenuation factor of the FPGA FFT-IFFT is smaller than the reference attenuation factor then we need to update the reference attenuation factor
|
// if the attenuation factor of the FPGA FFT-IFFT is smaller than the reference attenuation factor then we need to update the reference attenuation factor
|
||||||
std::cout << "changing blk exp..... d_total_block_exp = " << d_total_block_exp << " total_block_exp = " << total_block_exp << " chan = " << d_channel << std::endl;
|
std::cout << "changing blk exp..... d_total_block_exp = " << d_total_block_exp << " total_block_exp = " << total_block_exp << " chan = " << d_channel << std::endl;
|
||||||
d_total_block_exp = total_block_exp;
|
d_total_block_exp = total_block_exp;
|
||||||
|
d_test_statistics = 0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
//doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * (d_doppler_index - 1);
|
{
|
||||||
doppler = static_cast<int32_t>(doppler_min) + doppler_step * (d_doppler_index - 1);
|
|
||||||
|
|
||||||
if (secondpeak > 0)
|
if (secondpeak > 0)
|
||||||
{
|
{
|
||||||
d_test_statistics = firstpeak / secondpeak;
|
d_test_statistics = firstpeak / secondpeak;
|
||||||
@ -208,6 +210,9 @@ void pcps_acquisition_fpga::acquisition_core(uint32_t num_doppler_bins, uint32_t
|
|||||||
{
|
{
|
||||||
d_test_statistics = 0.0;
|
d_test_statistics = 0.0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
d_gnss_synchro->Acq_doppler_hz = static_cast<double>(doppler);
|
d_gnss_synchro->Acq_doppler_hz = static_cast<double>(doppler);
|
||||||
d_sample_counter = initial_sample;
|
d_sample_counter = initial_sample;
|
||||||
@ -249,6 +254,13 @@ void pcps_acquisition_fpga::set_active(bool active)
|
|||||||
<< ", use_CFAR_algorithm_flag: false";
|
<< ", use_CFAR_algorithm_flag: false";
|
||||||
|
|
||||||
|
|
||||||
|
//acquisition_fpga->configure_acquisition();
|
||||||
|
//acquisition_fpga->write_local_code();
|
||||||
|
|
||||||
|
acquisition_fpga->configure_acquisition();
|
||||||
|
acquisition_fpga->write_local_code();
|
||||||
|
acquisition_fpga->set_block_exp(d_total_block_exp);
|
||||||
|
|
||||||
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max);
|
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max);
|
||||||
|
|
||||||
if (!d_make_2_steps)
|
if (!d_make_2_steps)
|
||||||
@ -271,6 +283,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
|||||||
if (d_test_statistics > d_threshold)
|
if (d_test_statistics > d_threshold)
|
||||||
{
|
{
|
||||||
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||||
|
acquisition_fpga->open_device();
|
||||||
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2);
|
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2);
|
||||||
|
|
||||||
if (d_test_statistics > d_threshold)
|
if (d_test_statistics > d_threshold)
|
||||||
@ -319,19 +332,22 @@ void pcps_acquisition_fpga::set_active(bool active)
|
|||||||
|
|
||||||
|
|
||||||
int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)),
|
int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)),
|
||||||
gr_vector_int& ninput_items, gr_vector_const_void_star& input_items,
|
gr_vector_int& ninput_items __attribute__((unused)),
|
||||||
|
gr_vector_const_void_star& input_items __attribute__((unused)),
|
||||||
gr_vector_void_star& output_items __attribute__((unused)))
|
gr_vector_void_star& output_items __attribute__((unused)))
|
||||||
{
|
{
|
||||||
// the general work is not used with the acquisition that uses the FPGA
|
// the general work is not used with the acquisition that uses the FPGA
|
||||||
return noutput_items;
|
return noutput_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pcps_acquisition_fpga::reset_acquisition(void)
|
void pcps_acquisition_fpga::reset_acquisition(void)
|
||||||
{
|
{
|
||||||
// this function triggers a HW reset of the FPGA PL.
|
// this function triggers a HW reset of the FPGA PL.
|
||||||
acquisition_fpga->reset_acquisition();
|
acquisition_fpga->reset_acquisition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pcps_acquisition_fpga::read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor)
|
void pcps_acquisition_fpga::read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor)
|
||||||
{
|
{
|
||||||
acquisition_fpga->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor);
|
acquisition_fpga->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor);
|
||||||
|
@ -9,11 +9,7 @@
|
|||||||
*
|
*
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||||
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
|
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||||
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
||||||
* <li> Marc Molina, 2013. marc.molina.pena@gmail.com
|
|
||||||
* <li> Cillian O'Driscoll, 2017. cillian(at)ieee.org
|
|
||||||
* <li> Antonio Ramos, 2017. antonio.ramos@cttc.es
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -46,8 +42,15 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "fpga_acquisition.h"
|
#include "fpga_acquisition.h"
|
||||||
#include "gnss_synchro.h"
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h> // for block
|
||||||
|
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||||
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
|
#include <cstdint> // for uint32_t
|
||||||
|
#include <memory> // for shared_ptr
|
||||||
|
#include <string> // for string
|
||||||
|
|
||||||
|
class Gnss_Synchro;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -71,7 +74,7 @@ typedef struct
|
|||||||
|
|
||||||
class pcps_acquisition_fpga;
|
class pcps_acquisition_fpga;
|
||||||
|
|
||||||
typedef boost::shared_ptr<pcps_acquisition_fpga> pcps_acquisition_fpga_sptr;
|
using pcps_acquisition_fpga_sptr = boost::shared_ptr<pcps_acquisition_fpga>;
|
||||||
|
|
||||||
pcps_acquisition_fpga_sptr
|
pcps_acquisition_fpga_sptr
|
||||||
pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||||
@ -85,9 +88,7 @@ pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
|||||||
class pcps_acquisition_fpga : public gr::block
|
class pcps_acquisition_fpga : public gr::block
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
friend pcps_acquisition_fpga_sptr
|
friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||||
|
|
||||||
pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
|
||||||
|
|
||||||
pcps_acquisition_fpga(pcpsconf_fpga_t conf_);
|
pcps_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||||
|
|
||||||
@ -114,7 +115,7 @@ private:
|
|||||||
uint32_t d_num_doppler_bins;
|
uint32_t d_num_doppler_bins;
|
||||||
uint64_t d_sample_counter;
|
uint64_t d_sample_counter;
|
||||||
Gnss_Synchro* d_gnss_synchro;
|
Gnss_Synchro* d_gnss_synchro;
|
||||||
std::shared_ptr<fpga_acquisition> acquisition_fpga;
|
std::shared_ptr<Fpga_Acquisition> acquisition_fpga;
|
||||||
|
|
||||||
float d_downsampling_factor;
|
float d_downsampling_factor;
|
||||||
uint32_t d_select_queue_Fpga;
|
uint32_t d_select_queue_Fpga;
|
||||||
@ -211,13 +212,6 @@ public:
|
|||||||
acquisition_fpga->set_doppler_step(doppler_step);
|
acquisition_fpga->set_doppler_step(doppler_step);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
|
||||||
*/
|
|
||||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
|
||||||
gr_vector_const_void_star& input_items,
|
|
||||||
gr_vector_void_star& output_items);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This funciton triggers a HW reset of the FPGA PL.
|
* \brief This funciton triggers a HW reset of the FPGA PL.
|
||||||
*/
|
*/
|
||||||
@ -227,6 +221,13 @@ public:
|
|||||||
* \brief This funciton is only used for the unit tests
|
* \brief This funciton is only used for the unit tests
|
||||||
*/
|
*/
|
||||||
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 Parallel Code Phase Search Acquisition signal processing.
|
||||||
|
*/
|
||||||
|
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||||
|
gr_vector_const_void_star& input_items,
|
||||||
|
gr_vector_void_star& output_items);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/
|
#endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||||
uint32_t sampled_ms,
|
uint32_t sampled_ms,
|
||||||
|
@ -64,8 +64,6 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
|
pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
|
||||||
uint32_t sampled_ms, uint32_t max_dwells,
|
uint32_t sampled_ms, uint32_t max_dwells,
|
||||||
uint32_t doppler_max, int64_t fs_in,
|
uint32_t doppler_max, int64_t fs_in,
|
||||||
|
@ -40,8 +40,6 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||||
uint32_t folding_factor,
|
uint32_t folding_factor,
|
||||||
uint32_t sampled_ms,
|
uint32_t sampled_ms,
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||||
uint32_t sampled_ms,
|
uint32_t sampled_ms,
|
||||||
|
@ -37,7 +37,6 @@ add_library(acquisition_libs
|
|||||||
target_link_libraries(acquisition_libs
|
target_link_libraries(acquisition_libs
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Volk::volk
|
Volk::volk
|
||||||
Gnuradio::fft
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file acq_conf.cc
|
* \file acq_conf.h
|
||||||
* \brief Class that contains all the configuration parameters for generic
|
* \brief Class that contains all the configuration parameters for generic
|
||||||
* acquisition block based on the PCPS algoritm.
|
* acquisition block based on the PCPS algoritm.
|
||||||
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
|
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file fpga_acquisition.cc
|
* \file fpga_acquisition.cc
|
||||||
* \brief High optimized FPGA vector correlator class
|
* \brief Highly optimized FPGA vector correlator class
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* Class that controls and executes a high optimized acquisition HW
|
* Class that controls and executes a highly optimized acquisition HW
|
||||||
* accelerator in the FPGA
|
* accelerator in the FPGA
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -34,13 +34,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fpga_acquisition.h"
|
#include "fpga_acquisition.h"
|
||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||||
#include "gps_sdr_signal_processing.h"
|
#include <glog/logging.h> // for LOG
|
||||||
#include <glog/logging.h>
|
#include <cmath> // for log2
|
||||||
#include <fcntl.h> // libraries used by the GIPO
|
#include <fcntl.h> // libraries used by the GIPO
|
||||||
#include <iostream>
|
#include <iostream> // for operator<<
|
||||||
#include <sys/mman.h> // libraries used by the GIPO
|
#include <sys/mman.h> // libraries used by the GIPO
|
||||||
#include <utility>
|
#include <unistd.h> // for write, close, read, ssize_t
|
||||||
|
#include <utility> // for move
|
||||||
|
|
||||||
|
|
||||||
// FPGA register parameters
|
// FPGA register parameters
|
||||||
@ -62,32 +63,27 @@
|
|||||||
#define SELECT_ALL_CODE_BITS 0x000FFFFF // Select a 20 bit word
|
#define SELECT_ALL_CODE_BITS 0x000FFFFF // Select a 20 bit word
|
||||||
#define SHL_CODE_BITS 1024 // shift left by 10 bits
|
#define SHL_CODE_BITS 1024 // shift left by 10 bits
|
||||||
|
|
||||||
|
#ifndef TEMP_FAILURE_RETRY
|
||||||
bool fpga_acquisition::init()
|
#define TEMP_FAILURE_RETRY(exp) \
|
||||||
{
|
({ \
|
||||||
return true;
|
decltype(exp) _rc; \
|
||||||
}
|
do \
|
||||||
|
{ \
|
||||||
|
_rc = (exp); \
|
||||||
|
} \
|
||||||
|
while (_rc == -1 && errno == EINTR); \
|
||||||
|
_rc; \
|
||||||
|
})
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
bool fpga_acquisition::set_local_code(uint32_t PRN)
|
Fpga_Acquisition::Fpga_Acquisition(std::string device_name,
|
||||||
{
|
|
||||||
// select the code with the chosen PRN
|
|
||||||
d_PRN = PRN;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::write_local_code()
|
|
||||||
{
|
|
||||||
fpga_acquisition::fpga_configure_acquisition_local_code(
|
|
||||||
&d_all_fft_codes[d_nsamples_total * (d_PRN - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
fpga_acquisition::fpga_acquisition(std::string device_name,
|
|
||||||
uint32_t nsamples,
|
uint32_t nsamples,
|
||||||
uint32_t doppler_max,
|
uint32_t doppler_max,
|
||||||
uint32_t nsamples_total, int64_t fs_in,
|
uint32_t nsamples_total,
|
||||||
uint32_t sampled_ms, uint32_t select_queue,
|
int64_t fs_in,
|
||||||
|
uint32_t sampled_ms __attribute__((unused)),
|
||||||
|
uint32_t select_queue,
|
||||||
lv_16sc_t *all_fft_codes,
|
lv_16sc_t *all_fft_codes,
|
||||||
uint32_t excludelimit)
|
uint32_t excludelimit)
|
||||||
{
|
{
|
||||||
@ -107,17 +103,42 @@ fpga_acquisition::fpga_acquisition(std::string device_name,
|
|||||||
d_map_base = nullptr; // driver memory map
|
d_map_base = nullptr; // driver memory map
|
||||||
d_all_fft_codes = all_fft_codes;
|
d_all_fft_codes = all_fft_codes;
|
||||||
|
|
||||||
fpga_acquisition::reset_acquisition();
|
Fpga_Acquisition::reset_acquisition();
|
||||||
fpga_acquisition::open_device();
|
Fpga_Acquisition::open_device();
|
||||||
fpga_acquisition::fpga_acquisition_test_register();
|
Fpga_Acquisition::fpga_acquisition_test_register();
|
||||||
fpga_acquisition::close_device();
|
Fpga_Acquisition::close_device();
|
||||||
|
|
||||||
d_PRN = 0;
|
d_PRN = 0;
|
||||||
DLOG(INFO) << "Acquisition FPGA class created";
|
DLOG(INFO) << "Acquisition FPGA class created";
|
||||||
//printf("d_excludelimit = %d\n", d_excludelimit);
|
//printf("d_excludelimit = %d\n", d_excludelimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fpga_acquisition::open_device()
|
|
||||||
|
Fpga_Acquisition::~Fpga_Acquisition() = default;
|
||||||
|
|
||||||
|
|
||||||
|
bool Fpga_Acquisition::init()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Fpga_Acquisition::set_local_code(uint32_t PRN)
|
||||||
|
{
|
||||||
|
// select the code with the chosen PRN
|
||||||
|
d_PRN = PRN;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Fpga_Acquisition::write_local_code()
|
||||||
|
{
|
||||||
|
Fpga_Acquisition::fpga_configure_acquisition_local_code(
|
||||||
|
&d_all_fft_codes[d_nsamples_total * (d_PRN - 1)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Fpga_Acquisition::open_device()
|
||||||
{
|
{
|
||||||
// open communication with HW accelerator
|
// open communication with HW accelerator
|
||||||
if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1)
|
if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1)
|
||||||
@ -125,7 +146,7 @@ void fpga_acquisition::open_device()
|
|||||||
LOG(WARNING) << "Cannot open deviceio" << d_device_name;
|
LOG(WARNING) << "Cannot open deviceio" << d_device_name;
|
||||||
std::cout << "Acq: cannot open deviceio" << d_device_name << std::endl;
|
std::cout << "Acq: cannot open deviceio" << d_device_name << std::endl;
|
||||||
}
|
}
|
||||||
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(NULL, PAGE_SIZE,
|
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE,
|
||||||
PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0));
|
PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0));
|
||||||
|
|
||||||
if (d_map_base == reinterpret_cast<void *>(-1))
|
if (d_map_base == reinterpret_cast<void *>(-1))
|
||||||
@ -135,18 +156,14 @@ void fpga_acquisition::open_device()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fpga_acquisition::~fpga_acquisition()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
bool Fpga_Acquisition::free()
|
||||||
bool fpga_acquisition::free()
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::fpga_acquisition_test_register()
|
void Fpga_Acquisition::fpga_acquisition_test_register()
|
||||||
{
|
{
|
||||||
// sanity check : check test register
|
// sanity check : check test register
|
||||||
uint32_t writeval = TEST_REG_SANITY_CHECK;
|
uint32_t writeval = TEST_REG_SANITY_CHECK;
|
||||||
@ -157,7 +174,6 @@ void fpga_acquisition::fpga_acquisition_test_register()
|
|||||||
// read value from test register
|
// read value from test register
|
||||||
readval = d_map_base[15];
|
readval = d_map_base[15];
|
||||||
|
|
||||||
|
|
||||||
if (writeval != readval)
|
if (writeval != readval)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Acquisition test register sanity check failed";
|
LOG(WARNING) << "Acquisition test register sanity check failed";
|
||||||
@ -169,7 +185,7 @@ void fpga_acquisition::fpga_acquisition_test_register()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
|
void Fpga_Acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
|
||||||
{
|
{
|
||||||
uint32_t local_code;
|
uint32_t local_code;
|
||||||
uint32_t k, tmp, tmp2;
|
uint32_t k, tmp, tmp2;
|
||||||
@ -189,12 +205,16 @@ void fpga_acquisition::fpga_configure_acquisition_local_code(lv_16sc_t fft_local
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::run_acquisition(void)
|
void Fpga_Acquisition::run_acquisition(void)
|
||||||
{
|
{
|
||||||
// enable interrupts
|
// enable interrupts
|
||||||
int32_t reenable = 1;
|
int32_t reenable = 1;
|
||||||
int32_t disable_int = 0;
|
int32_t disable_int = 0;
|
||||||
write(d_fd, reinterpret_cast<void *>(&reenable), sizeof(int32_t));
|
ssize_t nbytes = TEMP_FAILURE_RETRY(write(d_fd, reinterpret_cast<void *>(&reenable), sizeof(int32_t)));
|
||||||
|
if (nbytes != sizeof(int32_t))
|
||||||
|
{
|
||||||
|
std::cerr << "Error enabling run in the FPGA." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// launch the acquisition process
|
// launch the acquisition process
|
||||||
d_map_base[8] = LAUNCH_ACQUISITION; // writing a 1 to reg 8 launches the acquisition process
|
d_map_base[8] = LAUNCH_ACQUISITION; // writing a 1 to reg 8 launches the acquisition process
|
||||||
@ -209,21 +229,25 @@ void fpga_acquisition::run_acquisition(void)
|
|||||||
std::cout << "acquisition module Interrupt number " << irq_count << std::endl;
|
std::cout << "acquisition module Interrupt number " << irq_count << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
write(d_fd, reinterpret_cast<void *>(&disable_int), sizeof(int32_t));
|
nbytes = TEMP_FAILURE_RETRY(write(d_fd, reinterpret_cast<void *>(&disable_int), sizeof(int32_t)));
|
||||||
|
if (nbytes != sizeof(int32_t))
|
||||||
|
{
|
||||||
|
std::cerr << "Error disabling interruptions in the FPGA." << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fpga_acquisition::set_block_exp(uint32_t total_block_exp)
|
|
||||||
|
void Fpga_Acquisition::set_block_exp(uint32_t total_block_exp)
|
||||||
{
|
{
|
||||||
d_map_base[11] = total_block_exp;
|
d_map_base[11] = total_block_exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fpga_acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_step, int32_t doppler_min)
|
void Fpga_Acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_step, int32_t doppler_min)
|
||||||
{
|
{
|
||||||
float phase_step_rad_real;
|
float phase_step_rad_real;
|
||||||
float phase_step_rad_int_temp;
|
float phase_step_rad_int_temp;
|
||||||
int32_t phase_step_rad_int;
|
int32_t phase_step_rad_int;
|
||||||
//int32_t doppler = static_cast<int32_t>(-d_doppler_max);
|
auto doppler = static_cast<int32_t>(doppler_min);
|
||||||
int32_t doppler = static_cast<int32_t>(doppler_min);
|
|
||||||
float phase_step_rad = GPS_TWO_PI * (doppler) / static_cast<float>(d_fs_in);
|
float phase_step_rad = GPS_TWO_PI * (doppler) / static_cast<float>(d_fs_in);
|
||||||
// The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing
|
// The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing
|
||||||
// The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi)
|
// The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi)
|
||||||
@ -255,9 +279,10 @@ void fpga_acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_s
|
|||||||
d_map_base[5] = num_sweeps;
|
d_map_base[5] = num_sweeps;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fpga_acquisition::configure_acquisition()
|
|
||||||
|
void Fpga_Acquisition::configure_acquisition()
|
||||||
{
|
{
|
||||||
fpga_acquisition::open_device();
|
Fpga_Acquisition::open_device();
|
||||||
|
|
||||||
d_map_base[0] = d_select_queue;
|
d_map_base[0] = d_select_queue;
|
||||||
d_map_base[1] = d_vector_length;
|
d_map_base[1] = d_vector_length;
|
||||||
@ -267,7 +292,34 @@ void fpga_acquisition::configure_acquisition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::read_acquisition_results(uint32_t *max_index,
|
//<<<<<<< HEAD
|
||||||
|
//void fpga_acquisition::read_acquisition_results(uint32_t *max_index,
|
||||||
|
//=======
|
||||||
|
//void Fpga_Acquisition::set_phase_step(uint32_t doppler_index)
|
||||||
|
//{
|
||||||
|
// float phase_step_rad_real;
|
||||||
|
// float phase_step_rad_int_temp;
|
||||||
|
// int32_t phase_step_rad_int;
|
||||||
|
// int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||||
|
// float phase_step_rad = GPS_TWO_PI * (doppler) / static_cast<float>(d_fs_in);
|
||||||
|
// // The doppler step can never be outside the range -pi to +pi, otherwise there would be aliasing
|
||||||
|
// // The FPGA expects phase_step_rad between -1 (-pi) to +1 (+pi)
|
||||||
|
// // The FPGA also expects the phase to be negative since it produces cos(x) -j*sin(x)
|
||||||
|
// // while the gnss-sdr software (volk_gnsssdr_s32f_sincos_32fc) generates cos(x) + j*sin(x)
|
||||||
|
// phase_step_rad_real = phase_step_rad / (GPS_TWO_PI / 2);
|
||||||
|
// // avoid saturation of the fixed point representation in the fpga
|
||||||
|
// // (only the positive value can saturate due to the 2's complement representation)
|
||||||
|
// if (phase_step_rad_real >= 1.0)
|
||||||
|
// {
|
||||||
|
// phase_step_rad_real = MAX_PHASE_STEP_RAD;
|
||||||
|
// }
|
||||||
|
// phase_step_rad_int_temp = phase_step_rad_real * POW_2_2; // * 2^2
|
||||||
|
// phase_step_rad_int = static_cast<int32_t>(phase_step_rad_int_temp * (POW_2_29)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings
|
||||||
|
// d_map_base[3] = phase_step_rad_int;
|
||||||
|
//}
|
||||||
|
//>>>>>>> b409f1c15efdd3c80fde680f4b5b966a1c18467b
|
||||||
|
|
||||||
|
void Fpga_Acquisition::read_acquisition_results(uint32_t *max_index,
|
||||||
float *firstpeak, float *secondpeak, uint64_t *initial_sample, float *power_sum, uint32_t *doppler_index, uint32_t *total_blk_exp)
|
float *firstpeak, float *secondpeak, uint64_t *initial_sample, float *power_sum, uint32_t *doppler_index, uint32_t *total_blk_exp)
|
||||||
{
|
{
|
||||||
uint64_t initial_sample_tmp = 0;
|
uint64_t initial_sample_tmp = 0;
|
||||||
@ -303,25 +355,25 @@ void fpga_acquisition::read_acquisition_results(uint32_t *max_index,
|
|||||||
|
|
||||||
readval = d_map_base[15]; // read dummy
|
readval = d_map_base[15]; // read dummy
|
||||||
|
|
||||||
fpga_acquisition::close_device();
|
Fpga_Acquisition::close_device();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::block_samples()
|
void Fpga_Acquisition::block_samples()
|
||||||
{
|
{
|
||||||
d_map_base[14] = 1; // block the samples
|
d_map_base[14] = 1; // block the samples
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::unblock_samples()
|
void Fpga_Acquisition::unblock_samples()
|
||||||
{
|
{
|
||||||
d_map_base[14] = 0; // unblock the samples
|
d_map_base[14] = 0; // unblock the samples
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::close_device()
|
void Fpga_Acquisition::close_device()
|
||||||
{
|
{
|
||||||
uint32_t *aux = const_cast<uint32_t *>(d_map_base);
|
auto *aux = const_cast<uint32_t *>(d_map_base);
|
||||||
if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1)
|
if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1)
|
||||||
{
|
{
|
||||||
std::cout << "Failed to unmap memory uio" << std::endl;
|
std::cout << "Failed to unmap memory uio" << std::endl;
|
||||||
@ -330,16 +382,16 @@ void fpga_acquisition::close_device()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fpga_acquisition::reset_acquisition(void)
|
void Fpga_Acquisition::reset_acquisition(void)
|
||||||
{
|
{
|
||||||
fpga_acquisition::open_device();
|
Fpga_Acquisition::open_device();
|
||||||
d_map_base[8] = RESET_ACQUISITION; // writing a 2 to d_map_base[8] resets the multicorrelator
|
d_map_base[8] = RESET_ACQUISITION; // writing a 2 to d_map_base[8] resets the multicorrelator
|
||||||
fpga_acquisition::close_device();
|
Fpga_Acquisition::close_device();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// this function is only used for the unit tests
|
// this function is only used for the unit tests
|
||||||
void fpga_acquisition::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor)
|
void Fpga_Acquisition::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor)
|
||||||
{
|
{
|
||||||
uint32_t readval = 0;
|
uint32_t readval = 0;
|
||||||
readval = d_map_base[8];
|
readval = d_map_base[8];
|
||||||
@ -349,7 +401,7 @@ void fpga_acquisition::read_fpga_total_scale_factor(uint32_t *total_scale_factor
|
|||||||
*fw_scale_factor = 0;
|
*fw_scale_factor = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fpga_acquisition::read_result_valid(uint32_t *result_valid)
|
void Fpga_Acquisition::read_result_valid(uint32_t *result_valid)
|
||||||
{
|
{
|
||||||
uint32_t readval = 0;
|
uint32_t readval = 0;
|
||||||
readval = d_map_base[0];
|
readval = d_map_base[0];
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file fpga_acquisition.h
|
* \file fpga_acquisition.h
|
||||||
* \brief High optimized FPGA vector correlator class
|
* \brief Highly optimized FPGA vector correlator class
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
|
* <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* Class that controls and executes a high optimized acquisition HW
|
* Class that controls and executes a highly optimized acquisition HW
|
||||||
* accelerator in the FPGA
|
* accelerator in the FPGA
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -36,17 +36,17 @@
|
|||||||
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
||||||
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
||||||
|
|
||||||
#include <gnuradio/fft/fft.h>
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <volk/volk.h>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Class that implements carrier wipe-off and correlators.
|
* \brief Class that implements carrier wipe-off and correlators.
|
||||||
*/
|
*/
|
||||||
class fpga_acquisition
|
class Fpga_Acquisition
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
fpga_acquisition(std::string device_name,
|
Fpga_Acquisition(std::string device_name,
|
||||||
uint32_t nsamples,
|
uint32_t nsamples,
|
||||||
uint32_t doppler_max,
|
uint32_t doppler_max,
|
||||||
uint32_t nsamples_total,
|
uint32_t nsamples_total,
|
||||||
@ -56,7 +56,7 @@ public:
|
|||||||
lv_16sc_t *all_fft_codes,
|
lv_16sc_t *all_fft_codes,
|
||||||
uint32_t excludelimit);
|
uint32_t excludelimit);
|
||||||
|
|
||||||
~fpga_acquisition();
|
~Fpga_Acquisition();
|
||||||
bool init();
|
bool init();
|
||||||
bool set_local_code(uint32_t PRN);
|
bool set_local_code(uint32_t PRN);
|
||||||
bool free();
|
bool free();
|
||||||
|
@ -30,6 +30,7 @@ target_link_libraries(channel_adapters
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
channel_libs
|
channel_libs
|
||||||
|
core_system_parameters
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
|
@ -30,12 +30,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
|
#include "acquisition_interface.h"
|
||||||
|
#include "channel_fsm.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include "gnss_sdr_flags.h"
|
#include "gnss_sdr_flags.h"
|
||||||
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tracking_interface.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <cstdint>
|
#include <cstring> // for memcpy
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::shared_ptr<AcquisitionInterface> acq,
|
Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::shared_ptr<AcquisitionInterface> acq,
|
||||||
@ -158,16 +162,19 @@ gr::basic_block_sptr Channel::get_left_block()
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr Channel::get_left_block_trk()
|
gr::basic_block_sptr Channel::get_left_block_trk()
|
||||||
{
|
{
|
||||||
return trk_->get_left_block();
|
return trk_->get_left_block();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr Channel::get_left_block_acq()
|
gr::basic_block_sptr Channel::get_left_block_acq()
|
||||||
{
|
{
|
||||||
return acq_->get_left_block();
|
return acq_->get_left_block();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr Channel::get_right_block()
|
gr::basic_block_sptr Channel::get_right_block()
|
||||||
{
|
{
|
||||||
return nav_->get_right_block();
|
return nav_->get_right_block();
|
||||||
@ -198,10 +205,10 @@ void Channel::stop_channel()
|
|||||||
LOG(WARNING) << "Invalid channel event";
|
LOG(WARNING) << "Invalid channel event";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DLOG(INFO)
|
DLOG(INFO) << "Channel stop_channel()";
|
||||||
<< "Channel stop_channel()";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Channel::start_acquisition()
|
void Channel::start_acquisition()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx);
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
|
@ -35,12 +35,14 @@
|
|||||||
#ifndef GNSS_SDR_CHANNEL_H_
|
#ifndef GNSS_SDR_CHANNEL_H_
|
||||||
#define GNSS_SDR_CHANNEL_H_
|
#define GNSS_SDR_CHANNEL_H_
|
||||||
|
|
||||||
#include "channel_fsm.h"
|
|
||||||
#include "channel_interface.h"
|
#include "channel_interface.h"
|
||||||
#include "channel_msg_receiver_cc.h"
|
#include "channel_msg_receiver_cc.h"
|
||||||
|
#include "gnss_signal.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <gnuradio/msg_queue.h>
|
#include <gnuradio/msg_queue.h>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -49,6 +51,7 @@ class ConfigurationInterface;
|
|||||||
class AcquisitionInterface;
|
class AcquisitionInterface;
|
||||||
class TrackingInterface;
|
class TrackingInterface;
|
||||||
class TelemetryDecoderInterface;
|
class TelemetryDecoderInterface;
|
||||||
|
class ChannelFsm;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class represents a GNSS channel. It wraps an AcquisitionInterface,
|
* \brief This class represents a GNSS channel. It wraps an AcquisitionInterface,
|
||||||
|
@ -36,8 +36,10 @@ add_library(channel_libs ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
|
|||||||
target_link_libraries(channel_libs
|
target_link_libraries(channel_libs
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
|
Gnuradio::pmt
|
||||||
core_system_parameters
|
core_system_parameters
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
Boost::boost
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
core_receiver
|
core_receiver
|
||||||
|
@ -32,8 +32,7 @@
|
|||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "control_message_factory.h"
|
#include "control_message_factory.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
#include <utility>
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
ChannelFsm::ChannelFsm()
|
ChannelFsm::ChannelFsm()
|
||||||
{
|
{
|
||||||
@ -58,13 +57,13 @@ bool ChannelFsm::Event_stop_channel()
|
|||||||
DLOG(INFO) << "CH = " << channel_ << ". Ev stop channel";
|
DLOG(INFO) << "CH = " << channel_ << ". Ev stop channel";
|
||||||
switch (d_state)
|
switch (d_state)
|
||||||
{
|
{
|
||||||
case 0: //already in stanby
|
case 0: // already in stanby
|
||||||
break;
|
break;
|
||||||
case 1: //acquisition
|
case 1: // acquisition
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
stop_acquisition();
|
stop_acquisition();
|
||||||
break;
|
break;
|
||||||
case 2: //tracking
|
case 2: // tracking
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
stop_tracking();
|
stop_tracking();
|
||||||
break;
|
break;
|
||||||
@ -74,6 +73,7 @@ bool ChannelFsm::Event_stop_channel()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ChannelFsm::Event_start_acquisition()
|
bool ChannelFsm::Event_start_acquisition()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx);
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#define GNSS_SDR_CHANNEL_FSM_H
|
#define GNSS_SDR_CHANNEL_FSM_H
|
||||||
|
|
||||||
#include "acquisition_interface.h"
|
#include "acquisition_interface.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
|
||||||
#include "tracking_interface.h"
|
#include "tracking_interface.h"
|
||||||
#include <gnuradio/msg_queue.h>
|
#include <gnuradio/msg_queue.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -55,7 +54,7 @@ public:
|
|||||||
void set_queue(gr::msg_queue::sptr queue);
|
void set_queue(gr::msg_queue::sptr queue);
|
||||||
void set_channel(uint32_t channel);
|
void set_channel(uint32_t channel);
|
||||||
|
|
||||||
//FSM EVENTS
|
// FSM EVENTS
|
||||||
bool Event_start_acquisition();
|
bool Event_start_acquisition();
|
||||||
bool Event_valid_acquisition();
|
bool Event_valid_acquisition();
|
||||||
bool Event_stop_channel();
|
bool Event_stop_channel();
|
||||||
@ -79,4 +78,4 @@ private:
|
|||||||
std::mutex mx;
|
std::mutex mx;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*GNSS_SDR_CHANNEL_FSM_H*/
|
#endif // GNSS_SDR_CHANNEL_FSM_H
|
||||||
|
@ -30,12 +30,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "channel_msg_receiver_cc.h"
|
#include "channel_msg_receiver_cc.h"
|
||||||
|
#include <boost/any.hpp>
|
||||||
|
#include <boost/bind.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/gr_complex.h>
|
#include <gnuradio/gr_complex.h>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <utility>
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
|
|
||||||
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat)
|
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat)
|
||||||
@ -44,6 +45,19 @@ channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<Channe
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
|
||||||
|
{
|
||||||
|
this->message_port_register_in(pmt::mp("events"));
|
||||||
|
this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1));
|
||||||
|
|
||||||
|
d_channel_fsm = std::move(channel_fsm);
|
||||||
|
d_repeat = repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
channel_msg_receiver_cc::~channel_msg_receiver_cc() = default;
|
||||||
|
|
||||||
|
|
||||||
void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
@ -82,16 +96,3 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
|||||||
LOG(WARNING) << "msg_handler_telemetry invalid event";
|
LOG(WARNING) << "msg_handler_telemetry invalid event";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
|
|
||||||
{
|
|
||||||
this->message_port_register_in(pmt::mp("events"));
|
|
||||||
this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1));
|
|
||||||
|
|
||||||
d_channel_fsm = std::move(channel_fsm);
|
|
||||||
d_repeat = repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
channel_msg_receiver_cc::~channel_msg_receiver_cc() = default;
|
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
|
#include <pmt/pmt.h>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
class channel_msg_receiver_cc;
|
class channel_msg_receiver_cc;
|
||||||
|
|
||||||
|
@ -30,12 +30,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "array_signal_conditioner.h"
|
#include "array_signal_conditioner.h"
|
||||||
|
#include "configuration_interface.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
|
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
|
||||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||||
|
@ -34,14 +34,14 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include <gnuradio/msg_queue.h>
|
#include <gnuradio/block.h>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
class AcquisitionInterface;
|
|
||||||
class TrackingInterface;
|
|
||||||
class TelemetryDecoderInterface;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
||||||
|
@ -30,12 +30,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "signal_conditioner.h"
|
#include "signal_conditioner.h"
|
||||||
|
#include "configuration_interface.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
|
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
|
||||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||||
|
@ -33,12 +33,12 @@
|
|||||||
#define GNSS_SDR_SIGNAL_CONDITIONER_H_
|
#define GNSS_SDR_SIGNAL_CONDITIONER_H_
|
||||||
|
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
|
#include <gnuradio/block.h>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class ConfigurationInterface;
|
class ConfigurationInterface;
|
||||||
class AcquisitionInterface;
|
|
||||||
class TrackingInterface;
|
|
||||||
class TelemetryDecoderInterface;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role,
|
ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role,
|
||||||
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
|
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <volk/volk.h>
|
#include <volk/volk.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, const std::string& role,
|
IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, const std::string& role,
|
||||||
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, const std::string& role,
|
IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, const std::string& role,
|
||||||
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
#include <volk/volk.h>
|
#include <volk/volk.h>
|
||||||
|
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, const std::string& role,
|
IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, const std::string& role,
|
||||||
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
|
|
||||||
using google::LogMessage;
|
|
||||||
|
|
||||||
IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, const std::string& role,
|
IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, const std::string& role,
|
||||||
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user