fixed gps navigation message satellite validation: IODE field must be same only 8 bit LSB of IODC filed instead of whole word

Signed-off-by: a <a>
This commit is contained in:
a 2023-10-03 00:05:54 -07:00
parent 59d70eb338
commit 0c368c2fea
1 changed files with 1 additions and 1 deletions

View File

@ -516,7 +516,7 @@ bool Gps_Navigation_Message::satellite_validation()
// 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_IODE_SF2 == d_IODE_SF3 and d_IODC == d_IODE_SF2 and d_IODC != -1.0)
if (d_IODE_SF2 == d_IODE_SF3 and (d_IODC & 0xFF) == d_IODE_SF2 and d_IODE_SF2 != -1.0)
{
flag_data_valid = true;
b_valid_ephemeris_set_flag = true;