2018-03-30 10:04:14 +00:00
|
|
|
function corrTime = check_t(time)
|
|
|
|
% CHECK_T accounting for beginning or end of week crossover.
|
|
|
|
%
|
|
|
|
% corrTime = check_t(time);
|
|
|
|
%
|
|
|
|
% Inputs:
|
|
|
|
% time - time in seconds
|
|
|
|
%
|
|
|
|
% Outputs:
|
|
|
|
% corrTime - corrected time (seconds)
|
|
|
|
|
2020-12-30 12:35:06 +00:00
|
|
|
% GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2020-02-08 00:20:02 +00:00
|
|
|
% This file is part of GNSS-SDR.
|
|
|
|
%
|
2020-12-30 12:35:06 +00:00
|
|
|
% SPDX-FileCopyrightText: Kai Borre
|
2020-02-08 00:20:02 +00:00
|
|
|
% SPDX-License-Identifier: GPL-3.0-or-later
|
2018-03-30 10:04:14 +00:00
|
|
|
%==========================================================================
|
|
|
|
|
|
|
|
half_week = 302400; % seconds
|
|
|
|
|
|
|
|
corrTime = time;
|
|
|
|
|
|
|
|
if time > half_week
|
|
|
|
corrTime = time - 2*half_week;
|
|
|
|
elseif time < -half_week
|
|
|
|
corrTime = time + 2*half_week;
|
2018-03-30 09:36:50 +00:00
|
|
|
end
|
2018-03-30 10:04:14 +00:00
|
|
|
|
|
|
|
%%%%%%% end check_t.m %%%%%%%%%%%%%%%%%
|