Fix validation of GPS navigation data (fix due to @tractoan). Closes: #737

This commit is contained in:
Carles Fernandez 2023-11-14 14:32:19 +01:00
parent 7cfdcd3ae1
commit ce14845bbb
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 3 additions and 2 deletions

View File

@ -65,6 +65,7 @@ All notable changes to GNSS-SDR will be documented in this file.
signal).
- The estimated CN0 value is now printed in the terminal when navigation data is
succesfully decoded.
- Fixed GPS navigation message satellite validation.
## [GNSS-SDR v0.0.18](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.18) - 2023-04-06

View File

@ -514,9 +514,9 @@ bool Gps_Navigation_Message::satellite_validation()
// First Step:
// check Issue Of Ephemeris Data (IODE IODC..) to find a possible interrupted reception
// and check if the data have been filled (!=0)
if (d_TOW_SF1 != 0.0 and d_TOW_SF2 != 0.0 and d_TOW_SF3 != 0.0)
if (d_TOW_SF1 != 0.0 && d_TOW_SF2 != 0.0 && d_TOW_SF3 != 0.0)
{
if (d_IODE_SF2 == d_IODE_SF3 and d_IODC == d_IODE_SF2 and d_IODC != -1.0)
if (d_IODE_SF2 == d_IODE_SF3 && (d_IODC & 0xFF) == d_IODE_SF2 && d_IODE_SF2 != -1.0)
{
flag_data_valid = true;
b_valid_ephemeris_set_flag = true;