1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-30 14:46:23 +00:00
gnss-sdr/utils/matlab/libs/geoFunctions/check_t.m

30 lines
724 B
Mathematica
Raw Normal View History

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)
% GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
% This file is part of GNSS-SDR.
%
% SPDX-FileCopyrightText: Kai Borre
% 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 %%%%%%%%%%%%%%%%%