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

feat: Added unshifted difference TOA to SatfixETA to plot

parent 5576dd93
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,15 @@ for i = 1:length(fnames)
results.(fnames{i}).difference = [];
selection = strcmp(artoaWorkspace.toaData.soundSource, fnames(i));
toas = artoaWorkspace.toaData.toa(selection);
% artoaWorkspace.toaData.toa contains offset, drift and empirical offset
% therefore to get the unshifted values, we need to subtract the empirical shift
unshiftedToas = artoaWorkspace.toaData.toa(selection) - artoaWorkspace.toaData.empiricalShift(selection);
toaDates = ceil(artoaWorkspace.toaData.toaDate(selection));
if length(toaDates) > 1
% interpolate
newToaDates = floor(launchDate):1:ceil(recoveryDate);
toas = interp1(toaDates, toas, newToaDates, 'linear', 'extrap')';
unshiftedToas = interp1(toaDates, unshiftedToas, newToaDates, 'linear', 'extrap')';
toaDates = newToaDates';
end
dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate);
......@@ -58,6 +62,7 @@ for i = 1:length(fnames)
continue;
end
results.(fnames{i}).difference = toas(indicesToa) - satfixEtas.(fnames{i}).satToa(indicesSatfix);
results.(fnames{i}).differenceUnshifted = unshiftedToas(indicesToa) - satfixEtas.(fnames{i}).satToa(indicesSatfix);
results.(fnames{i}).date = dates;
end
......
......@@ -36,6 +36,14 @@ for i = 1:length(fnames)
color, ...
'filled' ...
);
legendNames{end + 1} = [fnames{i} ' (unshifted)' ];
scatter( ...
figureName.CurrentAxes, ...
results.(fnames{i}).date, ...
results.(fnames{i}).differenceUnshifted, ...
[], ...
color ...
);
end
legend(figureName.CurrentAxes, legendNames, 'Location', 'eastoutside');
title(figureName.CurrentAxes, 'Difference SATFIX-ETA - TOA');
......
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