From a216d2250970c1684821034ac60b21a72a67b5f1 Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Fri, 2 Mar 2018 11:22:46 +0100 Subject: [PATCH] debug2 --- src/algorithms/libs/rtklib/rtklib_pntpos.cc | 2 -- src/core/system_parameters/gps_cnav_navigation_message.cc | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) 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;