From 4ce829012e3629b8d202c42cc343ae9f9eed05bd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 25 Jun 2019 13:13:28 +0200 Subject: [PATCH] Revert "Add Glonass and BeiDou time correction" This reverts commit 539c7e977dd63959bf1910f04f6584f77cf4722a. --- src/algorithms/PVT/libs/rtklib_solver.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index 77ea5f489..ecf0efe9a 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -961,19 +961,22 @@ bool Rtklib_Solver::get_PVT(const std::map &gnss_observables_ rx_position_and_time(0) = pvt_sol.rr[0]; // [m] rx_position_and_time(1) = pvt_sol.rr[1]; // [m] rx_position_and_time(2) = pvt_sol.rr[2]; // [m] + //todo: fix this ambiguity in the RTKLIB units in receiver clock offset! if (rtk_.opt.mode == PMODE_SINGLE) { // if the RTKLIB solver is set to SINGLE, the dtr is already expressed in [s] - rx_position_and_time(3) = pvt_sol.dtr[0] + pvt_sol.dtr[1] + pvt_sol.dtr[2] + pvt_sol.dtr[3]; + // add also the clock offset from gps to galileo (pvt_sol.dtr[2]) + rx_position_and_time(3) = pvt_sol.dtr[0] + pvt_sol.dtr[2]; } else { // the receiver clock offset is expressed in [meters], so we convert it into [s] - rx_position_and_time(3) = (pvt_sol.dtr[0] + pvt_sol.dtr[1] + pvt_sol.dtr[2] + pvt_sol.dtr[3]) / GPS_C_M_S; + // add also the clock offset from gps to galileo (pvt_sol.dtr[2]) + rx_position_and_time(3) = pvt_sol.dtr[2] + pvt_sol.dtr[0] / GPS_C_M_S; } this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration - // compute Ground speed and COG + //compute Ground speed and COG double ground_speed_ms = 0.0; double pos[3]; double enuv[3];