diff --git a/VERSION b/VERSION index 9e6181a6edf278d8fe3d626196e7a67223fae140..53c731105c7803f053a072618b750de8b3a1189c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -285 \ No newline at end of file +286 \ No newline at end of file diff --git a/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombination.m b/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombination.m index af87383aab7deee77b2a689767d611d0658119ff..cebf4f1aca39d7360a5718ebdf778e09edd4a060 100644 --- a/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombination.m +++ b/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombination.m @@ -9,7 +9,11 @@ global artoaWorkspace; artoaWorkspace.trajectoryOutput.updateTrackParameterWindow = false; %% Insert default content -artoaWorkspace.trackParameter.soundsourceCombinations(end + 1, :) = artoa.controller.track.parameter.getDefaultCombinationCell(); +if size(artoaWorkspace.trackParameter.soundsourceCombinations, 1) == 1 + artoaWorkspace.trackParameter.soundsourceCombinations(end + 1, :) = artoa.controller.track.parameter.getDefaultCombinationCell(); +else + artoaWorkspace.trackParameter.soundsourceCombinations(end + 1, :) = artoa.controller.track.parameter.getDefaultCombinationCell(false); +end try artoaWorkspace.trackParameter.soundsourceCombinations{end, 'combinationBegin'} = artoaWorkspace.trackParameter.soundsourceCombinations{end - 1, 'combinationEnd'} + 1; catch diff --git a/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombinationAbove.m b/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombinationAbove.m index f2b2cd1dd24fac6efa8d5b1ca81fcc0125ec4c97..cf79e54f7bc228b3d0679014da8619e6db5490e9 100644 --- a/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombinationAbove.m +++ b/lib/+artoa/+controller/+track/+parameter/addSoundsourceCombinationAbove.m @@ -15,7 +15,11 @@ combinations = artoaWorkspace.trackParameter.soundsourceCombinations; %% Add above the selected combinations(selectedRow + 1:end + 1, :) = combinations(selectedRow:end, :); -combinations(selectedRow, :) = artoa.controller.track.parameter.getDefaultCombinationCell(); +if selectedRow - 1 == 0 + combinations(selectedRow, :) = artoa.controller.track.parameter.getDefaultCombinationCell(); +else + combinations(selectedRow, :) = artoa.controller.track.parameter.getDefaultCombinationCell(false); +end if selectedRow == 1 artoaWorkspace.trackParameter.soundsourceCombinations = combinations; diff --git a/lib/+artoa/+controller/+track/+parameter/getDefaultCombinationCell.m b/lib/+artoa/+controller/+track/+parameter/getDefaultCombinationCell.m index 77e2784839d97d46231b364766be2c02178df529..19cf0b1bfdb085ed32a838bf002d0c68fc8cb488 100644 --- a/lib/+artoa/+controller/+track/+parameter/getDefaultCombinationCell.m +++ b/lib/+artoa/+controller/+track/+parameter/getDefaultCombinationCell.m @@ -1,9 +1,13 @@ -function [emptyCell] = getDefaultCombinationCell() +function [emptyCell] = getDefaultCombinationCell(pAddReferencePosition) %GETDEFAULTCOMBINATIONVALUES Summary of this function goes here % Detailed explanation goes here global artoaWorkspace; +if ~exist('pAddReferencePosition', 'var') + pAddReferencePosition = true; +end + %% Initialize variables startDate = floor(min(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status ~= 2))); endDate = floor(max(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status ~= 2))); @@ -11,7 +15,11 @@ endDate = floor(max(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status %% Get last known position isNotNan = ~isnan(artoaWorkspace.satData.lat_sat) & ~isnan(artoaWorkspace.satData.lon_sat); knownPositions = [artoaWorkspace.satData.lat_sat(isNotNan), artoaWorkspace.satData.lon_sat(isNotNan)]; -referencePosition = [num2str(knownPositions(1, 1)) ' ' num2str(knownPositions(1, 2))]; +if pAddReferencePosition + referencePosition = [num2str(knownPositions(1, 1)) ' ' num2str(knownPositions(1, 2))]; +else + referencePosition = ''; +end %% Create default cell emptyCell = { ...