1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-04 07:20:03 +00:00

Merging next, solving conflicts (#28)

* Decouple the FPGA DMA signal source from the AD9361 FPGA signal source.

* Add the MAX2771_EVKIT FPGA signal source and the ENABLE_FPGA_MAX2771_EVKIT flag to enable it.

* Adjust cross-compilation flags to properly support FPGA signal sources

* fix signal source names for consistency

* Detect if the spidev driver is installed when the ENABLE_MAX2771 flag is set. Detect if the DMA proxy driver is installed when the ENABLE_DMA_PROXY flag is set. Check if ENABLE_FPGA is set when either ENABLE_MAX2771 or ENABLE_DMA_PROXY is set.

* fix FPGA signal source names for consistency

* Fix FPGA-related CMakefile flags

* make cpplint happy

* make cpplint happy

* make cmakelint happy

* make clang-format happy

* Replaced the AD9361 FPGA signal source with the ADRV9361_Z7035 FPGA and the FMCOMMS5 FPGA signal sources.

* Bump local version of GoogleTest to 1.15.2 and Protocol Buffers to 27.3

* Avoid code duplication in CMake modules

* Update clang-tidy job

* Clang Tidy fixes

* Improve efficiency of Concurrent_Map and Concurrent_Queue classes

* Fix segmentation fault if the SignalSource implementation is not available

* Moved decimation factor count variable to the class

* Avoid possible runtime error when PVT.enable_rx_clock_correction=true

* Fix formatting

* Fix clang-tidy job

* Capitalize FPGA in class implementation names

* Capitalize acronyms in FPGA-related class names

* Instantiate sources only once

* Update changelog

* Bump version of google benchmark to 1.9.0

* Fix CMakeLists header file list in signal source libs

Header file paths were being appended to the source files list.

This is not that important since, in general, you don't need to add the header files to the cmake target.

* Added ION GNSS SDR Metadata Standard signal source

* Only specify outputs for the requested streams

* Fixed block iteration withing a file

The `File` object only holds a shallow reference to its `Lane` (without the list of blocks). So we must retrieve the full reference manually.

* Treat data file paths as relative to the metadata file

The data file paths are actually not native paths but URLs, this covers most cases but not all of them.

* Fixed decoding errors and refactored each class into its own file

* Fixed sample count error & refactored

* Bufferef IO & propagate configuration inside ION source

* Reset sample value before writing new one

Sample values are ORed into the output buffer because they may need a few read/write operations depending on alignment.
So, if we don't set the value to 0 before doing this, all samples quickly become 0xFF after a few cycles of the output buffer.

* Simpler handling of simpler bit formats

If a sample is the same size as a word, it is much easier to read.

* Less callback shenanigans

* Fix wrong buffer size

* Fixed conditional compilation issues

And added a comment

* Linting fixes

* Fixed arithmetic operations on pointers

* Fix formatting

* Use lock_guard instead of unique_lock

* Create a CMake target for the ION dependency for consistency

* Improve formatting, add missing include

* Fixes for C++ standards older than 20. Avoid C++20-specific lambda templates

* Update changelog

* Add Victor to the list of authors

* Fix CMake error

* Fix building error

* Fix building

* Add -DENABLE_ION=ON to CI jobs

* Fix CMake lists

* Catch all exceptions

* Fix building for -DENABLE_PLUTOSDR=ON

* Removed unused member fields and function parameters

* Use std::ifstream instead of FILE for reading sample data

* Fixed includes and code style

* Simplified disconnect() function

We can disconnect the sources directly instead of disconnecting each of their outputs.

* Implemented range check in `IONGSMSSignalSource::get_right_block(int)`

* Moved ION GSMS file source to `gnuradio_blocks/` directory

Also fixed some header guards.

* Fixed ION GNSS Metadata Standard dependency version

* Simplified by removing a very shallow class

`ion_gnss_metadata_handler` was only reading the metadata file, which can easily be done in `ion_gsms_signal_source`.

* Added valves to properly handle end of samples

* Cleaner exit if the data file is not found

* Fix uninitialized warning

* Remove unused configuration parameter. Uniformize guard names

* Fix for CMake < 3.14

* fix configuration options for the FPGA-based AD9361-based boards

* Put the global function into an anonymous namespace

Use emplace_back instead of push_back

* Make private member metadata_ a std::shared_pointer

* Simplify code

* Remove ION source from CI

* Apply clang-tidy fixes

* Initialize the receiver local oscillator frequency to GPS_L5_FREQ_HZ by default in the ADRV9361Z7035 FPGA signal source and remove unnecessary include files.

* Sort out building flags and improve their reporting

* Allow building Ad936x_Custom_Signal_Source when gnuradio-iio is not available

* Bump local version of Protocol Buffers to v28.0

* Update AArch64 features to Linux 6.10.6

* Update AArch64 features to Linux 6.10.6

* Fix: Windows does not define __ARM_NEON

* Improve detection of the dma_proxy module and the spidev driver

* Add missing include (fixes building with modern GCC)

* Adapted udp_port to multiple ports

* Fixed typo

* Fixed clang format

* Update changelog

* Add Xavier Guerrero to the authors list

* Update changelog

* Bump local version of Protocol Buffers to 28.1

* Add install and uninstall targets to nav_msg_listener

* Add Cesare to the authors list

* Add OSNMA to changelog

* Leave OSNMA files in the same folder for consistency

* Fix conflict

---------

Co-authored-by: Marc Majoral <majoralmarc@gmail.com>
Co-authored-by: cesaaargm <cesare.martinez@proton.me>
Co-authored-by: Xavier Guerrero-Pau <xguerrero@cttc.es>
Co-authored-by: Victor Castillo <victorcastilloaguero@gmail.com>
This commit is contained in:
Carles Fernandez 2024-09-21 11:40:17 +02:00 committed by GitHub
parent 3ec25f2347
commit abc07e414b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 226 additions and 111 deletions

1
.gitignore vendored
View File

@ -22,6 +22,7 @@ cmake-build-release/
.vscode/
.vs/
Testing/
GSDR*
PVT_*
HAS_*

70
AUTHORS
View File

@ -33,40 +33,42 @@ Contact Information
List of authors
--------------------------------------------------------------------------------
Carles Fernández-Prades carles.fernandez@cttc.cat Project manager
Javier Arribas javier.arribas@cttc.es Developer
Luis Esteve Elfau luis@epsilon-formacion.com Developer
Marc Majoral marc.majoral@cttc.cat Developer
Jordi Vilà-Valls jordi.vila-valls@isae-supaero.fr Consultant
Pau Closas pau.closas@northeastern.edu Consultant
Álvaro Cebrián Juan acebrianjuan@gmail.com Contributor
Andres Cecilia Luque a.cecilia.luque@gmail.com Contributor
Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor
Antonio Ramos antonio.ramosdet@gmail.com Contributor
Carlos Avilés carlos.avilesr@googlemail.com Contributor
Cillian O'Driscoll cillian.odriscoll@gmail.com Contributor
Damian Miralles dmiralles2009@gmail.com Contributor
Daniel Fehr daniel.co@bluewin.ch Contributor
David Pubill david.pubill@cttc.cat Contributor
En Shin seanstone5923@gmail.com Contributor
Fran Fabra fabra@ice.csic.es Contributor
Gabriel Araujo gabriel.araujo.5000@gmail.com Contributor
Gerald LaMountain gerald@gece.neu.edu Contributor
Into Pääkkönen into.paakkonen@aalto.fi Contributor
Irene Pérez Riega iperrie@inta.es Contributor
Jim Melton jim.melton@sncorp.com Contributor
Josh Schindehette jschindehette@geontech.com Contributor
Leonardo Tonetto tonetto.dev@gmail.com Contributor
Malte Lenhart malte.lenhart@mailbox.org Contributor
Mara Branzanti mara.branzanti@gmail.com Contributor
Marc Molina marc.molina.pena@gmail.com Contributor
Marc Sales marcsales92@gmail.com Contributor
Piyush Gupta piyush04111999@gmail.com Contributor
Rodrigo Muñoz rodrigo.munoz@proteinlab.cl Contributor
Stefan van der Linden spvdlinden@gmail.com Contributor
Víctor Castillo-Agüero victorcastilloaguero@gmail.com Contributor
Will Silberman wsilberm@google.com Contributor
Carlos Paniego carpanie@hotmail.com Artwork
Carles Fernández-Prades carles.fernandez@cttc.cat Project manager
Javier Arribas javier.arribas@cttc.es Developer
Luis Esteve Elfau luis@epsilon-formacion.com Developer
Marc Majoral marc.majoral@cttc.cat Developer
Xavier Guerrero xavier.guerrero@cttc.es Developer
Jordi Vilà-Valls jordi.vila-valls@isae-supaero.fr Consultant
Pau Closas pau.closas@northeastern.edu Consultant
Álvaro Cebrián Juan acebrianjuan@gmail.com Contributor
Andres Cecilia Luque a.cecilia.luque@gmail.com Contributor
Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor
Antonio Ramos antonio.ramosdet@gmail.com Contributor
Carlos Avilés carlos.avilesr@googlemail.com Contributor
Cesare Ghionoiu Martinez c.ghionoiu-martinez@tu-braunschweig.de Contributor
Cillian O'Driscoll cillian.odriscoll@gmail.com Contributor
Damian Miralles dmiralles2009@gmail.com Contributor
Daniel Fehr daniel.co@bluewin.ch Contributor
David Pubill david.pubill@cttc.cat Contributor
En Shin seanstone5923@gmail.com Contributor
Fran Fabra fabra@ice.csic.es Contributor
Gabriel Araujo gabriel.araujo.5000@gmail.com Contributor
Gerald LaMountain gerald@gece.neu.edu Contributor
Into Pääkkönen into.paakkonen@aalto.fi Contributor
Irene Pérez Riega iperrie@inta.es Contributor
Jim Melton jim.melton@sncorp.com Contributor
Josh Schindehette jschindehette@geontech.com Contributor
Leonardo Tonetto tonetto.dev@gmail.com Contributor
Malte Lenhart malte.lenhart@mailbox.org Contributor
Mara Branzanti mara.branzanti@gmail.com Contributor
Marc Molina marc.molina.pena@gmail.com Contributor
Marc Sales marcsales92@gmail.com Contributor
Piyush Gupta piyush04111999@gmail.com Contributor
Rodrigo Muñoz rodrigo.munoz@proteinlab.cl Contributor
Stefan van der Linden spvdlinden@gmail.com Contributor
Víctor Castillo-Agüero victorcastilloaguero@gmail.com Contributor
Will Silberman wsilberm@google.com Contributor
Carlos Paniego carpanie@hotmail.com Artwork
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2011-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>

View File

@ -20,6 +20,11 @@ authors:
family-names: Majoral
given-names: Marc
orcid: "https://orcid.org/0000-0001-6161-6747"
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
alias: xguerreropau
email: xavier.guerrero@cttc.es
family-names: Guerrero
given-names: Xavier
- alias: Gastd
email: gabriel.araujo.5000@gmail.com
family-names: Araujo
@ -56,6 +61,11 @@ authors:
- email: daniel.co@bluewin.ch
family-names: Fehr
given-names: Daniel
- alias: cesaaargm
affiliation: "Technische Universität Braunschweig"
email: c.ghionoiu-martinez@tu-braunschweig.de
family-names: "Ghionoiu Martinez"
given-names: Cesare
- alias: piyush0411
email: piyush04111999@gmail.com
family-names: Gupta

View File

@ -360,7 +360,7 @@ set(GNSSSDR_ARMADILLO_LOCAL_VERSION "14.0.x")
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.7.1")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.27")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "28.0")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "28.1")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.14")
set(GNSSSDR_GTEST_LOCAL_VERSION "1.15.2")
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "origin/master")
@ -3358,46 +3358,23 @@ if(ENABLE_MAX2771)
if(DEFINED ENV{SDKTARGETSYSROOT})
set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT})
else()
set(TARGET_ROOTFS_PATH "")
endif()
find_program(STRINGS_EXECUTABLE strings)
if(NOT STRINGS_EXECUTABLE)
message(STATUS "The 'strings' command could not be found. See https://www.gnu.org/software/binutils/")
message(STATUS " You can try to install it by typing:")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
message(STATUS " sudo yum install binutils")
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
message(STATUS " sudo zypper install binutils")
else()
message(STATUS " sudo apt-get install binutils")
endif()
endif()
message(FATAL_ERROR "Binutils are required to build GNSS-SDR for SoC FPGA devices using the MAX2771 option.")
endif()
set(DTB_FILE "${TARGET_ROOTFS_PATH}/boot/devicetree/system-top.dtb")
if(EXISTS "${DTB_FILE}")
message(STATUS "Found DTB file: ${DTB_FILE}")
# Run the strings command and grep for "spidev"
execute_process(
COMMAND ${STRINGS_EXECUTABLE} ${DTB_FILE}
COMMAND grep "spidev"
OUTPUT_VARIABLE GREP_OUTPUT
RESULT_VARIABLE GREP_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(GREP_RESULT EQUAL 0)
message(STATUS "Found spidev-compatible peripheral in ${DTB_FILE}.")
string(REGEX MATCH "(.*/tmp-glibc)" MATCHED_PATH "${GNURADIO_RUNTIME_INCLUDE_DIRS}")
if(MATCHED_PATH)
set(TARGET_ROOTFS_PATH "${MATCHED_PATH}/sysroots-components")
else()
message(STATUS "SPIdev driver not found, its installation is required.")
if(ENABLE_PACKAGING)
set(ENABLE_MAX2771 OFF)
else()
message(FATAL_ERROR "SPIdev driver is required for building gnss-sdr with -DENABLE_MAX2271=ON.")
endif()
set(TARGET_ROOTFS_PATH "")
endif()
endif()
file(GLOB_RECURSE SPIDEV_FILE "${TARGET_ROOTFS_PATH}/*/spidev.h")
if(EXISTS "${SPIDEV_FILE}")
message(STATUS "SPIdev driver found: ${SPIDEV_FILE}")
else()
message(FATAL_ERROR "The device tree (DTB) file ${DTB_FILE} cannot be found.")
message(STATUS "SPIdev driver not found, its installation is required.")
if(ENABLE_PACKAGING)
set(ENABLE_MAX2771 OFF)
else()
message(FATAL_ERROR "SPIdev driver is required for building gnss-sdr with -DENABLE_MAX2271=ON.")
endif()
endif()
endif()
@ -3412,9 +3389,14 @@ if(ENABLE_DMA_PROXY)
if(DEFINED ENV{SDKTARGETSYSROOT})
set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT})
else()
set(TARGET_ROOTFS_PATH "")
string(REGEX MATCH "(.*/tmp-glibc)" MATCHED_PATH "${GNURADIO_RUNTIME_INCLUDE_DIRS}")
if(MATCHED_PATH)
set(TARGET_ROOTFS_PATH "${MATCHED_PATH}/sysroots-components")
else()
set(TARGET_ROOTFS_PATH "")
endif()
endif()
set(DMA_PROXY_FILE "${TARGET_ROOTFS_PATH}/lib/modules/5.10.0-xilinx-v2021.2/extra/dma-proxy.ko")
file(GLOB_RECURSE DMA_PROXY_FILE "${TARGET_ROOTFS_PATH}/*/dma-proxy.ko")
if(EXISTS "${DMA_PROXY_FILE}")
message(STATUS "Found dma-proxy.ko file: ${DMA_PROXY_FILE}")
else()
@ -3513,9 +3495,14 @@ if(ENABLE_DMA_PROXY)
if(DEFINED ENV{SDKTARGETSYSROOT})
set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT})
else()
set(TARGET_ROOTFS_PATH "")
string(REGEX MATCH "(.*/tmp-glibc)" MATCHED_PATH "${GNURADIO_RUNTIME_INCLUDE_DIRS}")
if(MATCHED_PATH)
set(TARGET_ROOTFS_PATH "${MATCHED_PATH}/sysroots-components")
else()
set(TARGET_ROOTFS_PATH "")
endif()
endif()
set(DMA_PROXY_FILE "${TARGET_ROOTFS_PATH}/lib/modules/5.10.0-xilinx-v2021.2/extra/dma-proxy.ko")
file(GLOB_RECURSE DMA_PROXY_FILE "${TARGET_ROOTFS_PATH}/*/dma-proxy.ko")
if(EXISTS "${DMA_PROXY_FILE}")
message(STATUS "Found dma-proxy.ko file: ${DMA_PROXY_FILE}")
else()

View File

@ -45,6 +45,8 @@ All notable changes to GNSS-SDR will be documented in this file.
described with the
[ION GNSS Software Defined Receiver Metadata Standard](https://sdr.ion.org/).
It requires the `-DENABLE_ION=ON` building configuration option.
- The `Monitor` and `PVT` blocks are now able to send data to multiple UDP
ports.
### Improvements in Portability:
@ -89,9 +91,20 @@ All notable changes to GNSS-SDR will be documented in this file.
Accordingly, the GNSS-SDR building system now looks for OpenSSL in the first
place and, if not found, then it looks for GnuTLS as a fallback.
### Reliability
- Implementation of the Galileo Open Service Navigation Message Authentication
(OSNMA), a data authentication function for the Galileo Open Service worldwide
users, freely accessible to all. OSNMA provides receivers with the assurance
that the received Galileo navigation message is coming from the system itself
and has not been modified. OSNMA is enabled by default if the receiver
configuration defines Galileo E1 OS channels. More details can be found in
[Introducing GNSS Navigation Message Authentication](https://gnss-sdr.org/osnma).
### Improvements in Usability:
- Tidy up the `conf/` folder.
- Add `install` and `uninstall` targets to the `nav_msg_listener` utility.
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/

View File

@ -887,7 +887,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
// Read PVT MONITOR Configuration
pvt_output_parameters.monitor_enabled = configuration->property(role + ".enable_monitor", false);
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_ports = configuration->property(role + ".monitor_udp_port", std::string("1234"));
pvt_output_parameters.protobuf_enabled = configuration->property(role + ".enable_protobuf", true);
if (configuration->property("Monitor.enable_protobuf", false) == true)
{

View File

@ -482,7 +482,12 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
std::sort(udp_addr_vec.begin(), udp_addr_vec.end());
udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end());
d_udp_sink_ptr = std::make_unique<Monitor_Pvt_Udp_Sink>(udp_addr_vec, conf_.udp_port, conf_.protobuf_enabled);
std::string port_string = conf_.udp_ports;
std::vector<std::string> udp_port_vec = split_string(port_string, '_');
std::sort(udp_port_vec.begin(), udp_port_vec.end());
udp_port_vec.erase(std::unique(udp_port_vec.begin(), udp_port_vec.end()), udp_port_vec.end());
d_udp_sink_ptr = std::make_unique<Monitor_Pvt_Udp_Sink>(udp_addr_vec, udp_port_vec, conf_.protobuf_enabled);
}
else
{

View File

@ -17,19 +17,24 @@
#include "monitor_pvt_udp_sink.h"
#include <boost/archive/binary_oarchive.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <sstream>
Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses,
const uint16_t& port,
Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(
const std::vector<std::string>& addresses,
const std::vector<std::string>& ports,
bool protobuf_enabled) : socket{io_context},
use_protobuf(protobuf_enabled)
{
for (const auto& address : addresses)
{
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
endpoints.push_back(endpoint);
for (const auto& port : ports)
{
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), boost::lexical_cast<int>(port));
endpoints.push_back(endpoint);
}
}
if (use_protobuf)

View File

@ -40,7 +40,10 @@ using b_io_context = boost::asio::io_service;
class Monitor_Pvt_Udp_Sink
{
public:
Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port, bool protobuf_enabled);
Monitor_Pvt_Udp_Sink(
const std::vector<std::string>& addresses,
const std::vector<std::string>& ports,
bool protobuf_enabled);
bool write_monitor_pvt(const Monitor_Pvt* const monitor_pvt);
private:

View File

@ -48,6 +48,7 @@ public:
std::string rtcm_output_file_path = std::string(".");
std::string has_output_file_path = std::string(".");
std::string udp_addresses;
std::string udp_ports;
std::string udp_eph_addresses;
std::string log_source_timetag_file;
@ -64,7 +65,6 @@ public:
int32_t rinexobs_rate_ms = 0;
int32_t an_rate_ms = 20;
int32_t max_obs_block_rx_clock_offset_ms = 40;
int udp_port = 0;
int udp_eph_port = 0;
int rtk_trace_level = 0;

View File

@ -226,13 +226,14 @@
#endif // defined(CPU_FEATURES_ARCH_X86)
#if defined(CPU_FEATURES_ARCH_ANY_ARM)
#if defined(__ARM_NEON)
// Note: MSVC targeting ARM does not define `__ARM_NEON` but Windows on ARM
// requires it. In that case we force NEON detection.
#if defined(__ARM_NEON) || \
(defined(CPU_FEATURES_COMPILER_MSC) && defined(CPU_FEATURES_ARCH_ANY_ARM))
#define CPU_FEATURES_COMPILED_ANY_ARM_NEON 1
#else
#define CPU_FEATURES_COMPILED_ANY_ARM_NEON 0
#endif // defined(__ARM_NEON)
#endif // defined(CPU_FEATURES_ARCH_ANY_ARM)
#endif
#if defined(CPU_FEATURES_ARCH_MIPS)
#if defined(__mips_msa)

View File

@ -16,6 +16,7 @@
#ifndef GNSS_SDR_FPGA_SPIDEV_H
#define GNSS_SDR_FPGA_SPIDEV_H
#include <cstdint>
#include <string>
class Fpga_spidev

View File

@ -26,21 +26,20 @@
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
int decimation_factor,
int udp_port,
const std::vector<std::string>& udp_ports,
const std::vector<std::string>& udp_addresses,
bool enable_protobuf)
{
return gnss_synchro_monitor_sptr(new gnss_synchro_monitor(n_channels,
decimation_factor,
udp_port,
udp_ports,
udp_addresses,
enable_protobuf));
}
gnss_synchro_monitor::gnss_synchro_monitor(int n_channels,
int decimation_factor,
int udp_port,
const std::vector<std::string>& udp_ports,
const std::vector<std::string>& udp_addresses,
bool enable_protobuf)
: gr::block("gnss_synchro_monitor",
@ -50,7 +49,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels,
d_nchannels(n_channels),
d_decimation_factor(decimation_factor)
{
udp_sink_ptr = std::make_unique<Gnss_Synchro_Udp_Sink>(udp_addresses, udp_port, enable_protobuf);
udp_sink_ptr = std::make_unique<Gnss_Synchro_Udp_Sink>(udp_addresses, udp_ports, enable_protobuf);
}

View File

@ -41,7 +41,7 @@ using gnss_synchro_monitor_sptr = gnss_shared_ptr<gnss_synchro_monitor>;
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
int decimation_factor,
int udp_port,
const std::vector<std::string>& udp_ports,
const std::vector<std::string>& udp_addresses,
bool enable_protobuf);
@ -61,13 +61,13 @@ public:
private:
friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels,
int decimation_factor,
int udp_port,
const std::vector<std::string>& udp_ports,
const std::vector<std::string>& udp_addresses,
bool enable_protobuf);
gnss_synchro_monitor(int n_channels,
int decimation_factor,
int udp_port,
const std::vector<std::string>& udp_ports,
const std::vector<std::string>& udp_addresses,
bool enable_protobuf);

View File

@ -17,12 +17,14 @@
#include "gnss_synchro_udp_sink.h"
#include <boost/archive/binary_oarchive.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/serialization/vector.hpp>
#include <iostream>
#include <sstream>
Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(const std::vector<std::string>& addresses,
const uint16_t& port,
Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(
const std::vector<std::string>& addresses,
const std::vector<std::string>& ports,
bool enable_protobuf)
: socket{io_context},
use_protobuf(enable_protobuf)
@ -33,8 +35,13 @@ Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(const std::vector<std::string>& add
}
for (const auto& address : addresses)
{
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
endpoints.push_back(endpoint);
for (const auto& port : ports)
{
boost::asio::ip::udp::endpoint endpoint(
boost::asio::ip::address::from_string(address, error),
boost::lexical_cast<int>(port));
endpoints.push_back(endpoint);
}
}
}

View File

@ -45,7 +45,7 @@ using b_io_context = boost::asio::io_service;
class Gnss_Synchro_Udp_Sink
{
public:
Gnss_Synchro_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port, bool enable_protobuf);
Gnss_Synchro_Udp_Sink(const std::vector<std::string>& addresses, const std::vector<std::string>& ports, bool enable_protobuf);
bool write_gnss_synchro(const std::vector<Gnss_Synchro>& stocks);
private:

View File

@ -237,11 +237,17 @@ void GNSSFlowgraph::init()
std::sort(udp_addr_vec.begin(), udp_addr_vec.end());
udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end());
std::string udp_port_string = configuration_->property("Monitor.udp_port", std::string("1234"));
std::vector<std::string> udp_port_vec = split_string(udp_port_string, '_');
std::sort(udp_port_vec.begin(), udp_port_vec.end());
udp_port_vec.erase(std::unique(udp_port_vec.begin(), udp_port_vec.end()), udp_port_vec.end());
// Instantiate monitor object
GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_,
configuration_->property("Monitor.decimation_factor", 1),
configuration_->property("Monitor.udp_port", 1234),
udp_addr_vec, enable_protobuf);
udp_port_vec,
udp_addr_vec,
enable_protobuf);
}
/*
@ -261,10 +267,16 @@ void GNSSFlowgraph::init()
std::sort(udp_addr_vec.begin(), udp_addr_vec.end());
udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end());
std::string udp_port_string = configuration_->property("AcquisitionMonitor.udp_port", std::string("1235"));
std::vector<std::string> udp_port_vec = split_string(udp_port_string, '_');
std::sort(udp_port_vec.begin(), udp_port_vec.end());
udp_port_vec.erase(std::unique(udp_port_vec.begin(), udp_port_vec.end()), udp_port_vec.end());
GnssSynchroAcquisitionMonitor_ = gnss_synchro_make_monitor(channels_count_,
configuration_->property("AcquisitionMonitor.decimation_factor", 1),
configuration_->property("AcquisitionMonitor.udp_port", 1235),
udp_addr_vec, enable_protobuf);
udp_port_vec,
udp_addr_vec,
enable_protobuf);
}
/*
@ -284,10 +296,16 @@ void GNSSFlowgraph::init()
std::sort(udp_addr_vec.begin(), udp_addr_vec.end());
udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end());
std::string udp_port_string = configuration_->property("TrackingMonitor.udp_port", std::string("1236"));
std::vector<std::string> udp_port_vec = split_string(udp_port_string, '_');
std::sort(udp_port_vec.begin(), udp_port_vec.end());
udp_port_vec.erase(std::unique(udp_port_vec.begin(), udp_port_vec.end()), udp_port_vec.end());
GnssSynchroTrackingMonitor_ = gnss_synchro_make_monitor(channels_count_,
configuration_->property("TrackingMonitor.decimation_factor", 1),
configuration_->property("TrackingMonitor.udp_port", 1236),
udp_addr_vec, enable_protobuf);
udp_port_vec,
udp_addr_vec,
enable_protobuf);
}
/*

View File

@ -158,10 +158,10 @@ const std::unordered_map<std::string, uint16_t> OSNMA_TABLE_15 = {
{std::string("ECDSA P-256"), 512},
{std::string("ECDSA P-521"), 1056}}; // key: ECDSA Curve and hash function, value: {l_ds_bits}
const std::string PEMFILE_DEFAULT("./data/OSNMA_PublicKey.pem");
const std::string CRTFILE_DEFAULT("./data/OSNMA_PublicKey_20240115100000_newPKID_1.crt");
const std::string MERKLEFILE_DEFAULT("./data/OSNMA_MerkleTree_20240115100000_newPKID_1.xml");
const std::string KROOTFILE_DEFAULT("./data/OSNMA_DSM_KROOT_NMAHeader.bin");
const std::string PEMFILE_DEFAULT("./OSNMA_PublicKey.pem");
const std::string CRTFILE_DEFAULT("./OSNMA_PublicKey_20240115100000_newPKID_1.crt");
const std::string MERKLEFILE_DEFAULT("./OSNMA_MerkleTree_20240115100000_newPKID_1.xml");
const std::string KROOTFILE_DEFAULT("./OSNMA_DSM_KROOT_NMAHeader.bin");
class Mack_lookup
{

View File

@ -39,3 +39,19 @@ target_include_directories(navmsg_lib
add_executable(nav_msg_listener ${NAVLISTENER_SOURCE_DIR}/main.cc)
target_link_libraries(nav_msg_listener PUBLIC navmsg_lib)
install(TARGETS nav_msg_listener
RUNTIME DESTINATION bin
COMPONENT "nav_msg_listener"
)
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY
)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
)
endif()

View File

@ -27,6 +27,18 @@ $ cmake ..
$ make
```
Optionally, you can install it:
```
$ sudo make install
```
and uninstall it later with:
```
$ sudo make uninstall
```
## Usage
In order to tell GNSS-SDR to generate those messages, you need to include the

View File

@ -0,0 +1,35 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif()
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
if(CMAKE_VERSION VERSION_LESS 3.17)
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
else()
execute_process(
COMMAND @CMAKE_COMMAND@ -E rm "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
endif()
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif()
else()
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif()
endforeach()