Skip to content
Snippets Groups Projects
Commit 656befb7 authored by leprob001's avatar leprob001
Browse files

The leapseconds can now be defined in artoa.ini.

parent cc29f047
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,8 @@ for o = 1:length(fnames)
'pressure', artoaWorkspace.pressure(artoaWorkspace.statusPressure == 1), ...
'method', 'del grosso', ...
'soundSource', NaN ...
) ...
), ...
artoa.data.getMember(artoaDataInput, {'ini', 'leapseconds'}) ...
);
% remove gps dates that are past end mission of sound source
......
......@@ -15,7 +15,7 @@ if isempty(artoaDataInput.ini)
error([mfilename ': artoa.ini has been found but is empty. Please use a valid artoa.ini!']);
end
artoa.controller.edit.timeOfArrival.plot();
artoa.controller.edit.updateAvailablePlots();
end
......
function lsec=calculateLeapseconds(date1,date2)
% LEAPSEC return the leapseconds between two dates
% (dates must be in rafos day (use dmy2rd)
% lsec=lsec(date1)-lsec(date2)!
function [leapseconds] = calculateLeapseconds(pDate1, pDate2, pLeapsecondsMatrix)
%CALCULATELEAPSECIBDS Calculates the leapseconds between the two given dates based on the leapseconds matrix.
%
% Parameters:
% pDate1 (double) The first date in rafos day, see
% artoa.convert.dmy2rd.
% pDate2 (double) The second date in rafos day.
% pLeapsecondsMatrix The matrix that
%
% Returns:
% leapseconds (double) The calculated leapseconds
lsec=[];
dmys=[ 1 1 1972 10;
1 7 1972 11;
1 1 1973 12;
1 1 1974 13;
1 1 1975 14;
1 1 1976 15;
1 1 1977 16;
1 1 1978 17;
1 1 1979 18;
1 1 1980 19;
1 7 1981 20;
1 7 1982 21;
1 7 1983 22;
1 7 1985 23;
1 1 1988 24;
1 1 1990 25;
1 1 1991 26;
1 7 1992 27;
1 7 1993 28;
1 7 1994 29;
1 1 1996 30;
1 7 1997 31;
1 1 1999 32;
1 1 2006 33];
rd=artoa.convert.dmy2rd(dmys(:,1:3));
leap=dmys(:,4);
ax=find(rd <= date1);
bx=find(rd <= date2);
rd = artoa.convert.dmy2rd(pLeapsecondsMatrix(:, 1:3));
leap = pLeapsecondsMatrix(:, 4);
lsec=leap(max(ax))-leap(max(bx));
ax = find(rd <= pDate1);
bx = find(rd <= pDate2);
leapseconds = leap(max(ax)) - leap(max(bx));
function [gpsRafosDates, predictedToa] = predictToaFromGps(pRfb, pSoundSource, pSoundSpeedParameter)
function [gpsRafosDates, predictedToa] = predictToaFromGps(pRfb, pSoundSource, pSoundSpeedParameter, pLeapsecondsMatrix)
%ESTIMATETOAFROMGPS Summary of this function goes here
% Detailed explanation goes here
......@@ -37,7 +37,8 @@ soundSourcePosition = pSoundSource.position;
%% Collect generic variables
leapSeconds = artoa.data.calculateLeapseconds( ...
floatLaunchTime, ...
soundSourceEmissionBegin ...
soundSourceEmissionBegin, ...
pLeapsecondsMatrix ...
);
%% Calculations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment