Skip to content
Snippets Groups Projects
Commit 998bbc93 authored by leprob001's avatar leprob001
Browse files

Float drift is now being calculated if it is available in RFB file.

parent 7bb077af
No related branches found
No related tags found
No related merge requests found
125 126
\ No newline at end of file \ No newline at end of file
...@@ -12,24 +12,49 @@ offsetTable = cell2table( ... ...@@ -12,24 +12,49 @@ offsetTable = cell2table( ...
); );
%% Setup rows %% Setup rows
% float
offsetTable.Properties.RowNames(1) = {'Float'}; offsetTable.Properties.RowNames(1) = {'Float'};
try floatOffsets = artoa.data.getMember(pFloatDetails, {'offset'}, false);
offsetTable{1, variableNames{1}} = artoa.convert.dmy2rd(pFloatDetails.offset(1, 3), pFloatDetails.offset(1, 2), pFloatDetails.offset(1, 1)); startDate = NaN;
catch endDate = NaN;
end startOffset = NaN;
try endOffset = NaN;
offsetTable{1, variableNames{2}} = pFloatDetails.offset(1, 7); drift = NaN;
catch if ~islogical(floatOffsets)
end sizeOffsets = size(floatOffsets);
try if sizeOffsets(1) >= 1 && sizeOffsets(2) >= 3 % start date can be calculated
offsetTable{1, variableNames{3}} = artoa.convert.dmy2rd(pFloatDetails.offset(2, 3), pFloatDetails.offset(2, 2), pFloatDetails.offset(2, 1)); startDate = artoa.convert.dmy2rd( ...
catch floatOffsets(1, 3), ...
end floatOffsets(1, 2), ...
try floatOffsets(1, 1) ...
offsetTable{1, variableNames{4}} = pFloatDetails.offset(2, 7); );
catch end
if sizeOffsets(1) >= 2 && sizeOffsets(2) >= 3 % end date can be calculated
endDate = artoa.convert.dmy2rd( ...
floatOffsets(2, 3), ...
floatOffsets(2, 2), ...
floatOffsets(2, 1) ...
);
end
if sizeOffsets(1) >= 1 && sizeOffsets(2) >= 7 % start offset can be stored
startOffset = floatOffsets(1, 7);
end
if sizeOffsets(1) >= 2 && sizeOffsets(2) >= 7
% end offset can be stored and drift can be calculated
endOffset = floatOffsets(2, 7);
% calculate drift per day
drift = (endOffset - startOffset) / (endDate - startDate);
end
end end
offsetTable{1, variableNames{1}} = startDate;
offsetTable{1, variableNames{2}} = startOffset;
offsetTable{1, variableNames{3}} = endDate;
offsetTable{1, variableNames{4}} = endOffset;
offsetTable{1, variableNames{5}} = drift;
clear startDate startOffset endDate endOffset drift;
if nargin == 1 if nargin == 1
return; return;
end end
......
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