From 586edddbcf8562eea9648e61316c4288fa423239 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 May 2016 19:14:09 +0200 Subject: [PATCH] Fix in computation of lock time in GPS L2 --- src/core/system_parameters/rtcm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/system_parameters/rtcm.cc b/src/core/system_parameters/rtcm.cc index 4a07a3a35..99cc29720 100644 --- a/src/core/system_parameters/rtcm.cc +++ b/src/core/system_parameters/rtcm.cc @@ -2593,6 +2593,8 @@ unsigned int Rtcm::lock_time(const Gps_Ephemeris & eph, double obs_time, const G } boost::posix_time::time_duration lock_duration = current_time - Rtcm::gps_L1_last_lock_time[65 - gnss_synchro.PRN]; lock_time_in_seconds = static_cast(lock_duration.total_seconds()); + // Debug: + // std::cout << "lock time PRN " << gnss_synchro.PRN << ": " << lock_time_in_seconds << " current time: " << current_time << std::endl; return lock_time_in_seconds; } @@ -2606,7 +2608,7 @@ unsigned int Rtcm::lock_time(const Gps_CNAV_Ephemeris & eph, double obs_time, co { Rtcm::gps_L2_last_lock_time[65 - gnss_synchro.PRN] = current_time; } - boost::posix_time::time_duration lock_duration = current_time - Rtcm::gps_L1_last_lock_time[65 - gnss_synchro.PRN]; + boost::posix_time::time_duration lock_duration = current_time - Rtcm::gps_L2_last_lock_time[65 - gnss_synchro.PRN]; lock_time_in_seconds = static_cast(lock_duration.total_seconds()); return lock_time_in_seconds; }