mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Moving TOW crossover GPS time adjustment to convenient location
This commit is contained in:
parent
def5cb34d7
commit
33636758f1
@ -1000,12 +1000,6 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
// gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time); //Corrected RX Time (Non integer multiply of 1 ms of granularity)
|
||||
// Uncorrected RX Time (integer multiply of 1 ms and the same observables time reported in RTCM and RINEX)
|
||||
gtime_t rtklib_time = timeadd(pvt_sol.time, rx_position_and_time(3)); //uncorrected rx time
|
||||
if (gnss_observables_map.begin()->second.RX_time < 18000.0)
|
||||
{
|
||||
//p_time += boost::posix_time::seconds(604800);
|
||||
rtklib_time = timeadd(rtklib_time, 604800);
|
||||
}
|
||||
|
||||
gtime_t rtklib_utc_time = gpst2utc(rtklib_time);
|
||||
p_time = boost::posix_time::from_time_t(rtklib_utc_time.time);
|
||||
p_time += boost::posix_time::microseconds(static_cast<long>(round(rtklib_utc_time.sec * 1e6))); // NOLINT(google-runtime-int)
|
||||
|
@ -119,6 +119,13 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
||||
// }
|
||||
//
|
||||
rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time);
|
||||
//account for the TOW crossover transitory in the first 18 seconds where the week is not yet updated!
|
||||
if (gnss_synchro.RX_time < 18.0)
|
||||
{
|
||||
//p_time += boost::posix_time::seconds(604800);
|
||||
rtklib_obs.time = timeadd(rtklib_obs.time, 604800);
|
||||
}
|
||||
|
||||
rtklib_obs.rcv = 1;
|
||||
return rtklib_obs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user