Newer
Older
function [A, B, X, unfilteredA] = solve(pRfb, pSoundsources, pTrackingParameter, pToaData, pSatData, pAppliedTemperature, pAppliedPressure, pLeapsecondsMatrix, pOffsetsParameter)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
%% Construct matrices A and B
[unfilteredA, B] = artoa.offsets.createCalculationTables( ...
leprob001
committed
pRfb, ...
pSoundsources, ...
pTrackingParameter, ...
pToaData, ...
pSatData, ...
pAppliedTemperature, ...
pAppliedPressure, ...
pLeapsecondsMatrix ...
);
%% Subtract all known offsets
[B] = artoa.offsets.subtractKnownOffsets( ...
unfilteredA, ...
B, ...
pOffsetsParameter.offsets ...
);
%% Subtract all known drifts
[B] = artoa.offsets.subtractKnownDrifts( ...
unfilteredA, ...
B, ...
pOffsetsParameter.offsets ...
);
%% Optimize matrices for calculation
[A] = artoa.offsets.filterCalculationTables( ...
unfilteredA, ...
pOffsetsParameter.offsets ...
);
leprob001
committed
if pOffsetsParameter.useFixedSoundspeed
if isempty(A)
return; % nothing to be done, everything is given and soundspeed is fixed
end
B.toa = B.toa - A{:, 'Distances'} * pOffsetsParameter.fixedSoundspeed;
A.Distances = [];
leprob001
committed
end
%% Apply row names to X
X = table(X, 'VariableNames', {'Value'}, 'RowNames', A.Properties.VariableNames);