Skip to content
Snippets Groups Projects
Verified Commit 5ab57b5a authored by leprob001's avatar leprob001
Browse files

feat: Extrapolate TOA/ETA differences beyond TOA range

parent 95ca00ae
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,17 @@ global artoaWorkspace artoaConfig artoaDataInput; ...@@ -6,6 +6,17 @@ global artoaWorkspace artoaConfig artoaDataInput;
%% Get required variables %% Get required variables
fnames = fieldnames(artoaWorkspace.filteredSoundsources); fnames = fieldnames(artoaWorkspace.filteredSoundsources);
launchDateVec = artoaWorkspace.float.launchtime;
if length(launchDateVec) == 5
launchDateVec(6) = 0;
end
launchDate = artoa.convert.datevec2rd(launchDateVec);
recoveryDateVec = artoaWorkspace.float.recovertime;
if length(recoveryDateVec) == 5
recoveryDateVec(6) = 0;
end
recoveryDate = artoa.convert.datevec2rd(recoveryDateVec);
%% Get soundspeed %% Get soundspeed
floatSoundspeed = artoaWorkspace.editOffsets.offsets.AppliedSoundspeed(1,1); floatSoundspeed = artoaWorkspace.editOffsets.offsets.AppliedSoundspeed(1,1);
...@@ -35,10 +46,10 @@ for i = 1:length(fnames) ...@@ -35,10 +46,10 @@ for i = 1:length(fnames)
toas = artoaWorkspace.toaData.toa(selection); toas = artoaWorkspace.toaData.toa(selection);
toaDates = ceil(artoaWorkspace.toaData.toaDate(selection)); toaDates = ceil(artoaWorkspace.toaData.toaDate(selection));
if length(toaDates) > 1 if length(toaDates) > 1
% interpolate % interpolate
toas = interp1(toaDates, toas, min(toaDates):1:max(toaDates))'; newToaDates = floor(launchDate):1:ceil(recoveryDate);
toaDates = [min(toaDates):1:max(toaDates)]'; toas = interp1(toaDates, toas, newToaDates, 'linear', 'extrap')';
toaDates = newToaDates';
end end
dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate); dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate);
indicesToa = ismember(toaDates, dates); indicesToa = ismember(toaDates, dates);
......
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