diff --git a/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m b/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m index e060a84cd7d598f16f9a4b3f2b451eea820cd930..a2106caf26a550336541cafb96d4bd567a9491bf 100644 --- a/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m +++ b/lib/+artoa/+controller/+track/+parameter/validateCombinationsInput.m @@ -21,11 +21,6 @@ if any(strcmp(pCombinationsTable.soundsources, '')) return; end -if any(strcmp(pCombinationsTable.referencePosition, '')) - message = 'The "Reference Position" column contains an invalid value!'; - return; -end - if any(isnan(pCombinationsTable.soundspeed1)) ... || any(isnan(pCombinationsTable.soundspeed2)) ... || any(isnan(pCombinationsTable.soundspeed3)) ... diff --git a/lib/+artoa/+float/calculateTrajectory.m b/lib/+artoa/+float/calculateTrajectory.m index 512fdaf5aa1e2deec035d4bbcc86d3ebdd2003f2..6ceb01b337f9e83c5062293ef0ec1adc4928d726 100644 --- a/lib/+artoa/+float/calculateTrajectory.m +++ b/lib/+artoa/+float/calculateTrajectory.m @@ -37,13 +37,6 @@ uniqueToaDates = unique(pToaData.toaDate); [involvedSoundsources, involvedSoundsourceNames] = ... artoa.controller.track.getInvolvedSoundsources(); -%% Add float drift to TOA -pToaData = artoa.data.addFloatDrift( ... - pToaData, ... - pTrackingParameter.soundsourceOffsets{'Float', 'Begin'}, ... - pTrackingParameter.soundsourceOffsets{'Float', 'End'} ... -); - %% Initialize return variables trajectory = false; trajectoryDates = false; @@ -110,12 +103,7 @@ for i = 1:length(involvedSoundsources) kx = find(abs(currentToaDate - dates(oDates)) < 1/2); currentToa(kx) = currentToa(kx) - offsets(oDates); end - - % subtract offset (corrective value) of sound source - soundsourceOffsetCorrectiveValue = ... - pTrackingParameter.soundsourceOffsets{currentSoundsource.sourcename, 'Begin'}; - currentToa = currentToa - soundsourceOffsetCorrectiveValue; - + % interpolate toa data [ ... preparedData.(currentSoundsource.sourcename).toaDate, ... @@ -128,7 +116,6 @@ for i = 1:length(involvedSoundsources) pTrackingParameter.gapSize, ... lower(pTrackingParameter.interpolationMethodString) ... ); - %preparedData.(currentSoundsource.sourcename).toaIndex = preparedData.(currentSoundsource.sourcename).toaIndex'; % combine interpolated and original data and sort them preparedData.(currentSoundsource.sourcename).toaDate = ... @@ -196,8 +183,6 @@ end %% Get static data floatReferenceTime = pFloatDetails.phasereftime; -%startPosition = [pSatData.lat_sat(1) pSatData.lon_sat(1)]; -%trackingMethod = lower(pTrackingParameter.trackingMethodString); trajectory = []; trajectoryDates = []; diff --git a/lib/+artoa/+trajectory/plotTimeDivergenceToGps.m b/lib/+artoa/+trajectory/plotTimeDivergenceToGps.m index 16ed8ef36389cae4b7b2ba76812d16743f3843ff..255f03a9e347f2e1f414217937d64582cde572bd 100644 --- a/lib/+artoa/+trajectory/plotTimeDivergenceToGps.m +++ b/lib/+artoa/+trajectory/plotTimeDivergenceToGps.m @@ -14,6 +14,7 @@ cla(pAxesHandle); %% Plot data hold(pAxesHandle, 'on'); +counter = 1; for i = 1:length(fnames) current = pTrajectory.timeDivergenceToGps.(fnames{i}); if isempty(current) @@ -22,7 +23,8 @@ for i = 1:length(fnames) x = current(:, 1); y = current(:, 2); handleTimeDivergenceToGps.(fnames{i}) = plot(pAxesHandle, x, y, '.-'); - legendText{i} = fnames{i}; + legendText{counter} = fnames{i}; + counter = counter + 1; end hold(pAxesHandle, 'off'); diff --git a/lib/+artoa/+trajectory/plotTrajectoryReferencePositions.m b/lib/+artoa/+trajectory/plotTrajectoryReferencePositions.m index 6d76b0b81259573fa266d838293bbc6f57966edf..5324c645374c8831cdf786938f43e30c00f1c086 100644 --- a/lib/+artoa/+trajectory/plotTrajectoryReferencePositions.m +++ b/lib/+artoa/+trajectory/plotTrajectoryReferencePositions.m @@ -2,14 +2,19 @@ function [scatterHandles, textHandles] = plotTrajectoryReferencePositions(pAxesH %PLOTTRAJECTORYREFERENCEPOSITIONS Summary of this function goes here % Detailed explanation goes here -%% Prepare variables -referencePositions = pTrajectory.trackParameter.soundsourceCombinations.referencePosition; -referencePositions = cellfun(@strsplit, referencePositions, 'UniformOutput', false); -referencePositions = cellfun(@str2double, referencePositions, 'UniformOutput', false); -referencePositions = cell2mat(referencePositions); - -x = referencePositions(:, 2); -y = referencePositions(:, 1); +x = []; +y = []; + +for i = 1:length(pTrajectory.trackParameter.soundsourceCombinations.referencePosition) + current = pTrajectory.trackParameter.soundsourceCombinations.referencePosition{i}; + if strcmp('', strtrim(current)) + continue; + end + tmp = str2double(strsplit(current)); + x = [x; tmp(2)]; + y = [y; tmp(1)]; +end + %% Plot