Commit Graph
464 Commits
Author SHA1 Message Date
Carles Fernandez 38d5fbbd04 Use traditional token representation for logical C++ operators and add clang-tidy check 2026-06-28 03:47:13 +02:00
Carles Fernandez e9077a6e11 Fix compatibility with OpenSSL versions 2026-06-20 13:03:31 +02:00
Carles Fernandez e18e8f358b Improve const correctness 2026-06-20 03:37:26 +02:00
Carles Fernandez 5f6c573c13 Fix linking against OpenSSL 4 2026-06-20 02:50:58 +02:00
Carles Fernandez 3480cbd479 Harden MT1 parsing 2026-06-12 12:12:12 +02:00
Carles Fernandez ed78b98520 Fix for old compilers 2026-06-10 08:22:47 +02:00
Carles Fernandez ef3038b375 Improve handling of TOW rollover and Galileo E6 HAS timing 2026-06-09 18:47:16 +02:00
Carles Fernandez 2f010f0161 Do not throw an exception when we should not 2026-05-24 22:48:49 +02:00
Carles Fernandez 396052d342 Make clang-tidy happy 2026-05-24 07:51:17 +02:00
Carles Fernandez 13cf8fa5cd Make clang-tidy happy 2026-05-23 23:23:11 +02:00
Carles Fernandez f6f67c5618 Add a TOW cache for HAS receiver 2026-05-23 14:20:45 +02:00
Carles Fernandez 740d5a9f12 Handle HAS Do Nou Use status and correction context 2026-05-17 10:44:00 +02:00
Carles Fernandez f27800c6a6 Harden Galileo HAS MT1 validation 2026-05-16 10:00:29 +02:00
Carles Fernandez a9822b5780 Fix Galileo HAS receiver clock subset decoding, MID reset handling, handle do not use status, harden Galileo HAS validation 2026-05-15 22:20:05 +02:00
Carles Fernandez e13730276b Hardened the Galileo OSNMA protocol implementation (Fixes #968, #967) 2026-05-13 17:05:45 +02:00
Carles Fernandez 90b2e9bab9 Handle protobuf serialization return values in serdes helpers 2026-04-27 12:30:34 +02:00
Marc Majoral deb4ddf3bf Fix signal-to-FPGA tracking multicorrelator mapping 2026-01-29 11:20:38 +01:00
Carles Fernandez 721b946102 OSNMA: be explicit if no Public Key is available 2025-09-16 11:26:23 +02:00
Carles Fernandez 96cacdf50a Remove unused function, improve logging 2025-09-08 09:03:20 +02:00
Carles Fernandez 15a7a9bae3 Improve handling of Boost 1.89 2025-08-20 11:26:45 +02:00
Carles Fernandez 0b5dfb60bf Avoid potential overflow in int16 conversion 2025-08-10 20:11:20 +02:00
Carles Fernandez 6a0ba9ac89 Fix some defects of the OSNMA receiver 2025-08-10 19:23:09 +02:00
Victor Castillo 4db7f775b5 feat: refactored configuration & renamed to sensor data 2025-07-09 16:33:54 +02:00
Victor Castillo 53006b4ea6 feat: add extra data source 2025-07-09 16:33:54 +02:00
Carles Fernandez 32e7dc03ae Fix typos detected by codespell 2025-02-10 13:20:14 +01:00
Carles Fernandez 6d00641896 Transition to clang-format 19 2024-12-26 11:38:07 +01:00
Carles Fernandez 700d4403d5 Transition to clang-format 19 2024-12-26 11:18:41 +01:00
Carles Fernandez 9158447892 Fix linking against Boost 1.87
CI: add boost in homebrew dependencies
2024-12-20 22:09:52 +01:00
Carles Fernandez 0db72cad96 Fix warning raised by GCC 14 (-Wfree-nonheap-object) 2024-11-29 13:04:26 +01:00
Carles Fernandez 7cd99e4b2b Print IODref in clock correction HAS message 2024-11-07 13:02:00 +01:00
94d7635612 Small fixes (#26)
* 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

* Fix building in some environments and fix CI jobs

* Fix clang-tidy complain

---------

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>
2024-08-16 09:40:45 +02:00
cesaaargm ea0684d640 [TAS-240][FEAT] Implement TESLA Chain Renewal and Revocation II
* revocation sucessfully tested.
* Diagram of step 1 is wrong in that KROOT with CID=0 also received after entering step 1.
* Duration of CREV=2.75h
* All tags verified succesffully.
2024-08-15 21:48:29 +02:00
cesaaargm 2e867f2dac [TAS-240][FEAT] Implement TESLA Chain Renewal and Revocation I
* Implemented a new chain renewal mechanism for OSNMA data structure updates and key management.
* Added related flags and data fields.
* tested successfully with test vectors.
2024-08-14 13:14:23 +02:00
cesaaargm e4f4c335bc [TAS-257][TEST] add osnma benchmarking
* Introduced new benchmarks to assess the performance of various OSNMA related functions, such as public key verification.
* Mostly recycled code from testing codebase.
* TODO: methods are private, could not find a MACRO like FRIEND_TEST to allow for it. Result of this, only one benchmark test is active.
2024-08-12 12:50:17 +02:00
cesaaargm 794bd61419 [TAS-249][Bug][Tag] new NavDataManager causes less tags to be verified
[TAS-234][Feature] Dummy tags verification

* Fixed the navData retrieval which caused many tags to be skipped
* Dummy tags verification added.
* Replaced direct field access with getters/setters for OSNMA navigation data.
2024-08-11 16:41:54 +02:00
Carles Fernandezandcesaaargm 5a634f7332 More fixes (#25)
* Clang Tidy fixes

* Fix some potential defects and be more consistent in class name. Improve const correctness

* Fix formatting

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
2024-08-11 12:44:18 +02:00
79da7787ff Move files (#24)
* 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

* Move receiver-related classes to src/core/libs

* Uniformize cmake module names

* Fix formatting

* Make clang-tidy happy

* Fix crypto benchmarks

* Fixes for old systems

* Instantiate sources only once

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
Co-authored-by: Xavier Guerrero-Pau <xguerrero@cttc.es>
2024-08-10 11:31:15 +02:00
Carles Fernandezandcesaaargm 98f1cdfb6b More minor fixes (#23)
* Clang Tidy fixes

* Fix defects detected by Coverity Scan

* Fix for OpenSSL 1.0

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
2024-08-08 09:33:48 +02:00
Carles Fernandezandcesaaargm 5a6d19be70 Fix some defects detected by Coverity Scan (#22)
* Clang Tidy fixes

* Fix defects detected by Coverity Scan

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
2024-08-07 09:13:13 +02:00
Carles Fernandezandcesaaargm 8a45df29a8 Some API improvements and a bug fix (#18)
* Clang Tidy fixes

* Fix reading of .crt files with GnuTLS

* Hide d_crypto pointer from public API

* Read public key type also from .pem files

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
2024-08-05 10:29:01 +02:00
Carles Fernandezandcesaaargm 3457b8ed3b Get time zone offset in a more standard way (#17)
* Clang Tidy fixes

* Get time zone offset in a more standard way

Account for leap seconds
Use GNSS-SDR.osnma_mode=strict to check for local time

* Fix for C++20

* Initialize tm in a more portable way

* Remove unnecessary data members in osnma_msg_receiver

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
2024-08-03 19:58:34 +02:00
Carles Fernandezandcesaaargm 6beb92278f Read type of public key (#16)
* Clang Tidy fixes

* Improve reading public key type

* Update osnma_nav_data_manager.cc

hotfix

---------

Co-authored-by: cesaaargm <cesare.martinez@proton.me>
2024-08-02 09:38:37 +02:00
cesaaargm 960e76e3a0 Clang Tidy fixes 2024-08-01 19:16:47 +02:00
cesaaargm a47cf1187c [TAS-255] [BUG] Assure time synch. is properly done
if d_flag_debug=false, now system clock is used to for the receiver synchronisation. It uses the UTC time and the GST epoch start time (adjusted for local time zone difference) to create a local estimation of GST, then compares with GST_SIS (coming from NavData Words 5 and 6)
2024-08-01 11:52:28 +02:00
cesaaargm 2db37f384e [TAS-242][FEAT] Implement alert message handling
* Test show that behavior is as expected.
* interestingly, the first batch of Tags after OAM received fail, then succeeds, until OAM is verified and OSNMA is disabled.
2024-07-31 17:08:06 +02:00
cesaaargm 02c5d26dcc [TAS-250] (x3) [FEAT] Implement PK renewal and revocation. Bugfix for DS length computation.
* it was based on the HF field, which is not correct. It was discovered when the PK was P521 instead of P256 then the Padding size check was failing due to this.
* The solution is temporary:
** GNSS_Crypto: when reading the key, the type is inferred (only for OSSL for the moment)
** when PK comes through the satellites, the public key type is taken from the NPKT field.
2024-07-30 18:09:07 +02:00
cesaaargm 26f77a3c42 [TAS-250] (x2) [FEAT] Implement PK renewal and revocation.
* Revocation implemented and tested. DSM-KROOT appears to be corrupted because length check fails after start of step 1, during steps 2 and 3.
2024-07-30 12:25:22 +02:00
cesaaargm 440dc582b5 [TEST][OsnmaTestVector] refactor parsing code into feedOsnmaWithTestVectors method.
* could not find a way to access osnma private methods, so had to make d_crypto and msg_handler_osnma public. Looking for a way to avoid that.
2024-07-29 15:21:35 +02:00
cesaaargm fc1541ef10 [TAS-250] [FEAT] Implement PK renewal and revocation. 2024-07-29 12:18:08 +02:00
cesaaargm a947f10fd8 [TAS-246] [TEST] CI/CD set up - more fixes 2024-07-27 21:50:33 +02:00