Skip to content
Snippets Groups Projects
Commit 48a8934c authored by leprob001's avatar leprob001
Browse files

Introduced unfilteredC which contains the reference time that needs to be subtracted from the TOA.

parent 96ef96c1
No related branches found
No related tags found
No related merge requests found
139
\ No newline at end of file
140
\ No newline at end of file
function [a, b] = createCalculationTables(pRfb, pSoundsources, pTrackingParameter, pToaData, pSatData, pAppliedTemperature, pAppliedPressure, pLeapsecondsMatrix)
function [a, b, c] = createCalculationTables(pRfb, pSoundsources, pTrackingParameter, pToaData, pSatData, pAppliedTemperature, pAppliedPressure, pLeapsecondsMatrix)
%CREATECALCULATIONMATRICES Summary of this function goes here
% Detailed explanation goes here
......@@ -101,6 +101,7 @@ aSoundsources = table();
%aCore = zeros(rowCount, 2 * length(fnames));
%b = zeros(rowCount, 1);
b = table(zeros(rowCount, 1), 'VariableNames', {'toa'});
c = table(zeros(rowCount, 1), 'VariableNames', {'ReferenceTime'});
Distances = zeros(rowCount, 1);
daysSinceFloatStart = NaN(rowCount, 1);
......@@ -117,6 +118,9 @@ for i = 1:length(fnames)
aSoundsources{rowIndices, (fnames{i})} = results.(fnames{i}).daysSinceStart;
b{rowIndices, 'toa'} = results.(fnames{i}).measuredToa;
c{rowIndices, 'ReferenceTime'} = ...
(pSoundsources.(fnames{i}).reftime(1) * 3600 + pSoundsources.(fnames{i}).reftime(2) * 60) ...
- (floatDetails.phasereftime(1) * 3600 + floatDetails.phasereftime(2) * 60 + floatDetails.windowstart * 60);
daysSinceFloatStart(rowIndices, 1) = ...
results.(fnames{i}).satDate ...
......@@ -140,6 +144,7 @@ indicesToUse = all(~isnan(a{:, :}), 2) & all(aSoundsources{:, :} >= 0, 2) & ~isn
a = a(indicesToUse, :);
b = b(indicesToUse, :);
c = c(indicesToUse, :);
% reenable warning
warning('on');
......
......@@ -2,8 +2,8 @@ function [A, B, X, unfilteredA, unfilteredB] = solve(pRfb, pSoundsources, pTrack
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
%% Construct matrices A and B
[unfilteredA, unfilteredB] = artoa.offsets.createCalculationTables( ...
%% Construct matrices A, B and C
[unfilteredA, unfilteredB, unfilteredC] = artoa.offsets.createCalculationTables( ...
pRfb, ...
pSoundsources, ...
pTrackingParameter, ...
......@@ -34,6 +34,9 @@ function [A, B, X, unfilteredA, unfilteredB] = solve(pRfb, pSoundsources, pTrack
pOffsetsParameter.offsets ...
);
%% Subtract window start and soundsource reference time
B.toa = B.toa - unfilteredC.ReferenceTime;
%% Use fixed soundspeed
if pOffsetsParameter.useFixedSoundspeed
if isempty(A)
......
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