mirror of https://github.com/gnss-sdr/gnss-sdr
28 lines
679 B
Matlab
28 lines
679 B
Matlab
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)
|
|
|
|
%Kai Borre 04-01-96
|
|
%Copyright (c) by Kai Borre
|
|
%
|
|
% CVS record:
|
|
% $Id: check_t.m,v 1.1.1.1.2.4 2006/08/22 13:45:59 dpl Exp $
|
|
%==========================================================================
|
|
|
|
half_week = 302400; % seconds
|
|
|
|
corrTime = time;
|
|
|
|
if time > half_week
|
|
corrTime = time - 2*half_week;
|
|
elseif time < -half_week
|
|
corrTime = time + 2*half_week;
|
|
end
|
|
%%%%%%% end check_t.m %%%%%%%%%%%%%%%%% |