diff --git a/src/algorithms/libs/rtklib/rtklib_pntpos.cc b/src/algorithms/libs/rtklib/rtklib_pntpos.cc index 13ec3434b..07267c427 100644 --- a/src/algorithms/libs/rtklib/rtklib_pntpos.cc +++ b/src/algorithms/libs/rtklib/rtklib_pntpos.cc @@ -164,8 +164,6 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, } else if((obs->code[i] == CODE_NONE) && (obs->code[j] != CODE_NONE)) { - std::cout << "P1_P2 = " << P1_P2 << std::endl; - std::cout << "P2_C2 = " << P2_C2 << std::endl; P2 += P2_C2; /* C2->P2 */ PC = P2 - gamma_ * P1_P2 / (1.0 - gamma_); } diff --git a/src/core/system_parameters/gps_cnav_navigation_message.cc b/src/core/system_parameters/gps_cnav_navigation_message.cc index 1bdc48360..c4f49f849 100644 --- a/src/core/system_parameters/gps_cnav_navigation_message.cc +++ b/src/core/system_parameters/gps_cnav_navigation_message.cc @@ -258,6 +258,9 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset(read_navigation_signed(data_bits, CNAV_TGD)); + //Check if the grup delay value is not available. See IS-GPS-200, Table 30-IV. + //Bit string "1000000000000" is -4096 in 2 complement + if(ephemeris_record.d_TGD < -4095.9) { ephemeris_record.d_TGD = 0.0; } ephemeris_record.d_TGD = ephemeris_record.d_TGD * CNAV_TGD_LSB; ephemeris_record.d_ISCL1 = static_cast(read_navigation_signed(data_bits, CNAV_ISCL1)); ephemeris_record.d_ISCL1 = ephemeris_record.d_ISCL1 * CNAV_ISCL1_LSB;