diff --git a/src/algorithms/libs/beidou_b1i_signal_processing.cc b/src/algorithms/libs/beidou_b1i_signal_processing.cc index d95b2844e..61e1ffa47 100644 --- a/src/algorithms/libs/beidou_b1i_signal_processing.cc +++ b/src/algorithms/libs/beidou_b1i_signal_processing.cc @@ -57,7 +57,7 @@ void beidou_b1i_code_gen_int(int32_t* _dest, int32_t _prn, uint32_t _chip_shift) prn_idx = _prn - 1; /* A simple error check */ - if ((prn_idx < 0) || (prn_idx > 51)) + if ((prn_idx < 0) || (prn_idx > 32)) { return; } diff --git a/src/core/system_parameters/beidou_dnav_navigation_message.cc b/src/core/system_parameters/beidou_dnav_navigation_message.cc index 9a83d1598..52f1ea88b 100644 --- a/src/core/system_parameters/beidou_dnav_navigation_message.cc +++ b/src/core/system_parameters/beidou_dnav_navigation_message.cc @@ -831,7 +831,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s d_eccentricity_msb = static_cast(read_navigation_unsigned(subframe_bits, D2_E_MSB)); d_eccentricity_msb_bits = (read_navigation_unsigned(subframe_bits, D2_E_MSB)); // Adjust for lsb in next page (shift number of lsb to the left) - d_eccentricity_msb = static_cast((static_cast(d_eccentricity_msb) << 22)); + d_eccentricity_msb = d_eccentricity_msb << 22; d_eccentricity_msb_bits = d_eccentricity_msb_bits << 22; // Set system flags for message reception