Skip to content
Snippets Groups Projects
Commit 3c569dfe authored by leprob001's avatar leprob001
Browse files

The soundvelocity can now be copied from a separate combobox.

parent 282a6ada
No related branches found
No related tags found
No related merge requests found
255
\ No newline at end of file
256
\ No newline at end of file
......@@ -37,14 +37,6 @@ artoaWorkspace.editOffsets.offsets{offsetIndicesToCopy, appliedOffsetColumn} = .
artoaWorkspace.editOffsets.offsets{driftIndicesToCopy, appliedDriftColumn} = ...
artoaWorkspace.editOffsets.offsets{driftIndicesToCopy, driftColumn};
%% Soundspeed
if strcmp(artoaGui.editOffsets.comboboxOffsetToApplied.String{index}, 'Measured')
artoaWorkspace.editOffsets.soundspeed.Applied(1) = artoaWorkspace.editOffsets.soundspeed.Measured(1);
end
if strcmp(artoaGui.editOffsets.comboboxOffsetToApplied.String{index}, 'Optimum')
artoaWorkspace.editOffsets.soundspeed.Applied(1) = artoaWorkspace.editOffsets.soundspeed.Optimum(1);
end
%% Update GUI
artoa.controller.edit.offsets.updateGui();
......
function [] = buttonCopySoundspeed(~, ~)
%BUTTONCOPYSOUNDSPEED Summary of this function goes here
% Detailed explanation goes here
global artoaGui artoaWorkspace;
%% Get selected index
index = artoaGui.editOffsets.comboboxSoundvelocityToApplied.Value;
%% Soundspeed
if strcmp(artoaGui.editOffsets.comboboxSoundvelocityToApplied.String{index}, 'Measured')
artoaWorkspace.editOffsets.soundspeed.Applied(1) = artoaWorkspace.editOffsets.soundspeed.Measured(1);
end
if strcmp(artoaGui.editOffsets.comboboxSoundvelocityToApplied.String{index}, 'Optimum')
artoaWorkspace.editOffsets.soundspeed.Applied(1) = artoaWorkspace.editOffsets.soundspeed.Optimum(1);
end
%% Update GUI
artoa.controller.edit.offsets.updateGui();
%% Recalculate
artoa.controller.edit.recalculateToaGpsAndPlot();
end
......@@ -59,6 +59,7 @@ callbacks.buttonCalculateOffsets = @artoa.controller.edit.offsets.buttonCalculat
callbacks.checkboxUseOffsets = @artoa.controller.edit.offsets.checkboxUseOffsets;
callbacks.inputSoundspeed = @artoa.controller.edit.offsets.inputSoundspeed;
callbacks.buttonCopyOffsets = @artoa.controller.edit.offsets.buttonCopyOffsets;
callbacks.buttonCopySoundvelocity = @artoa.controller.edit.offsets.buttonCopySoundspeed;
callbacks.buttonUndoLastCopy = @artoa.controller.edit.offsets.buttonUndoLastCopy;
callbacks.buttonAppliedToNan = @artoa.controller.edit.offsets.buttonAppliedToNan;
......@@ -70,7 +71,8 @@ artoa.gui.main( ...
artoa.controller.main.collectTrackingMethods(), ...
artoaConfig.defaults.interpolationMethods, ...
artoaConfig.defaults.soundspeedMethods, ...
artoaConfig.defaults.offsetsToCopy ...
artoaConfig.defaults.offsetsToCopy, ...
artoaConfig.defaults.soundvelocityToCopy ...
);
......
......@@ -24,6 +24,10 @@ artoaConfig.defaults.offsetsToCopy = { ...
'Empirical', ...
'Optimum' ...
};
artoaConfig.defaults.soundvelocityToCopy = { ...
'Measured', ...
'Optimum' ...
};
artoaConfig.defaults.pickPointMarkerSize = 80;
artoaConfig.defaults.topographicalLines = { ...
-1000; ...
......
function [ ] = main(pCallbacks, pTrackingMethods, pInterpolationMethods, pSoundspeedMethods, pOffsetsToCopy)
function [ ] = main(pCallbacks, pTrackingMethods, pInterpolationMethods, pSoundspeedMethods, pOffsetsToCopy, pSoundvelocityToCopy)
%MAIN Contains the definition of main ARTOA4 gui.
global artoaGui;
......@@ -48,6 +48,7 @@ availableCallbacks = { ...
'buttonCalculateOffsets', ...
'checkboxUseOffsets', ...
'buttonCopyOffsets', ...
'buttonCopySoundvelocity', ...
'buttonAppliedToNan', ...
'buttonUndoLastCopy' ...
};
......@@ -544,7 +545,7 @@ artoaGui.editOffsets.frameOffsets = uipanel( ...
spacer ...
(1 - 2 * spacer - heightFrame - heightTrackingFrame) ...
widthFrame ...
heightFrame ...
heightFrame + 0.025 ...
] ...
);
......@@ -608,8 +609,7 @@ artoaGui.editOffsets.textOffsetToApplied = uicontrol( ...
'Style', 'text', ...
'FontSize', 8, ...
'Units', 'normalized', ...
'Position', [(1.5*left + 4*fullwidth/8) .725 fullwidth/8 .2], ...
'CallBack', '' ...
'Position', [(1.5*left + 4*fullwidth/8) .725 fullwidth/8 .2] ...
);
artoaGui.editOffsets.comboboxOffsetToApplied = uicontrol( ...
......@@ -618,8 +618,7 @@ artoaGui.editOffsets.comboboxOffsetToApplied = uicontrol( ...
'Style', 'popupmenu', ...
'FontSize', 8, ...
'Units', 'normalized', ...
'Position', [(1.5*left + 5*fullwidth/8) .725 2*fullwidth/8 .2], ...
'CallBack', pCallbacks.comboboxInterpolationMethod ...
'Position', [(1.5*left + 5*fullwidth/8) .725 2*fullwidth/8 .2] ...
);
artoaGui.editOffsets.buttonCopyOffsets = uicontrol( ...
......@@ -632,6 +631,35 @@ artoaGui.editOffsets.buttonCopyOffsets = uicontrol( ...
'CallBack', pCallbacks.buttonCopyOffsets ...
);
artoaGui.editOffsets.textSoundvelocityToApplied = uicontrol( ...
'Parent', artoaGui.editOffsets.frameOptimumOffsets, ...
'String', 'Soundvelocity', ...
'Style', 'text', ...
'FontSize', 8, ...
'Units', 'normalized', ...
'Position', [(1.5*left + 4*fullwidth/8) .5 fullwidth/8 .2] ...
);
artoaGui.editOffsets.comboboxSoundvelocityToApplied = uicontrol( ...
'Parent', artoaGui.editOffsets.frameOptimumOffsets, ...
'String', pSoundvelocityToCopy, ...
'Style', 'popupmenu', ...
'FontSize', 8, ...
'Units', 'normalized', ...
'Position', [(1.5*left + 5*fullwidth/8) .5 2*fullwidth/8 .2] ...
);
artoaGui.editOffsets.buttonCopySoundvelocity = uicontrol( ...
'Parent', artoaGui.editOffsets.frameOptimumOffsets, ...
'String', 'to Applied', ...
'Style', 'PushButton', ...
'FontSize', 8, ...
'Units', 'normalized', ...
'Position', [(1.5*left + 7*fullwidth/8) .5 fullwidth/8 .2], ...
'CallBack', pCallbacks.buttonCopySoundvelocity ...
);
artoaGui.editOffsets.buttonAppliedToNan = uicontrol( ...
'Parent', artoaGui.editOffsets.frameOptimumOffsets, ...
'String', 'Applied to NaN', ...
......
%% Add defaults for soundvelocity to copy if required
if ~artoa.data.hasMember(artoaConfig, 'defaults', 'soundvelocityToCopy')
artoaConfig.defaults.soundvelocityToCopy = { ...
'Measured', ...
'Optimum' ...
};
end
\ No newline at end of file
......@@ -37,8 +37,5 @@ if workspaceVersion < currentArtoaVersion & workspaceVersion < maxMigration
'Artoa might be unstable otherwise!'
];
upToDate = false;
else
end
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