From 63e90f862ffde4b65e6d12185cff433de10e5f43 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 13 Dec 2018 10:11:25 +0200 Subject: [PATCH 1/2] updated F/NAV message decoding (page 3 and 4) Signed-off-by: Carles Fernandez --- src/core/system_parameters/galileo_fnav_message.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/system_parameters/galileo_fnav_message.cc b/src/core/system_parameters/galileo_fnav_message.cc index 913b18461..05b6cbbc8 100644 --- a/src/core/system_parameters/galileo_fnav_message.cc +++ b/src/core/system_parameters/galileo_fnav_message.cc @@ -294,7 +294,7 @@ void Galileo_Fnav_Message::decode_page(const std::string& data) FNAV_i0_3 *= FNAV_i0_3_LSB; FNAV_w_3 = static_cast(read_navigation_signed(data_bits, FNAV_w_3_bit)); FNAV_w_3 *= FNAV_w_3_LSB; - FNAV_deltan_3 = static_cast(read_navigation_unsigned(data_bits, FNAV_deltan_3_bit)); + FNAV_deltan_3 = static_cast(read_navigation_signed(data_bits, FNAV_deltan_3_bit)); FNAV_deltan_3 *= FNAV_deltan_3_LSB; FNAV_Cuc_3 = static_cast(read_navigation_signed(data_bits, FNAV_Cuc_3_bit)); FNAV_Cuc_3 *= FNAV_Cuc_3_LSB; @@ -314,13 +314,13 @@ void Galileo_Fnav_Message::decode_page(const std::string& data) break; case 4: // Ephemeris (3/3), GST-UTC conversion, GST-GPS conversion and TOW FNAV_IODnav_4 = static_cast(read_navigation_unsigned(data_bits, FNAV_IODnav_4_bit)); - FNAV_Cic_4 = static_cast(read_navigation_unsigned(data_bits, FNAV_Cic_4_bit)); + FNAV_Cic_4 = static_cast(read_navigation_signed(data_bits, FNAV_Cic_4_bit)); FNAV_Cic_4 *= FNAV_Cic_4_LSB; - FNAV_Cis_4 = static_cast(read_navigation_unsigned(data_bits, FNAV_Cis_4_bit)); + FNAV_Cis_4 = static_cast(read_navigation_signed(data_bits, FNAV_Cis_4_bit)); FNAV_Cis_4 *= FNAV_Cis_4_LSB; - FNAV_A0_4 = static_cast(read_navigation_unsigned(data_bits, FNAV_A0_4_bit)); + FNAV_A0_4 = static_cast(read_navigation_signed(data_bits, FNAV_A0_4_bit)); FNAV_A0_4 *= FNAV_A0_4_LSB; - FNAV_A1_4 = static_cast(read_navigation_unsigned(data_bits, FNAV_A1_4_bit)); + FNAV_A1_4 = static_cast(read_navigation_signed(data_bits, FNAV_A1_4_bit)); FNAV_A1_4 *= FNAV_A1_4_LSB; FNAV_deltatls_4 = static_cast(read_navigation_signed(data_bits, FNAV_deltatls_4_bit)); FNAV_t0t_4 = static_cast(read_navigation_unsigned(data_bits, FNAV_t0t_4_bit)); From 93dfcb980b4b0750b805e87a9680d54b18e51863 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 13 Dec 2018 11:56:21 +0100 Subject: [PATCH 2/2] Fix F/NAV message decoding of mean anomaly at reference time --- src/core/system_parameters/galileo_fnav_message.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/system_parameters/galileo_fnav_message.cc b/src/core/system_parameters/galileo_fnav_message.cc index 05b6cbbc8..660f7c413 100644 --- a/src/core/system_parameters/galileo_fnav_message.cc +++ b/src/core/system_parameters/galileo_fnav_message.cc @@ -270,7 +270,7 @@ void Galileo_Fnav_Message::decode_page(const std::string& data) break; case 2: // Ephemeris (1/3) and GST FNAV_IODnav_2 = static_cast(read_navigation_unsigned(data_bits, FNAV_IODnav_2_bit)); - FNAV_M0_2 = static_cast(read_navigation_unsigned(data_bits, FNAV_M0_2_bit)); + FNAV_M0_2 = static_cast(read_navigation_signed(data_bits, FNAV_M0_2_bit)); FNAV_M0_2 *= FNAV_M0_2_LSB; FNAV_omegadot_2 = static_cast(read_navigation_signed(data_bits, FNAV_omegadot_2_bit)); FNAV_omegadot_2 *= FNAV_omegadot_2_LSB;