Skip to content
Snippets Groups Projects
Commit 485b0f95 authored by leprob001's avatar leprob001
Browse files

fix: Display of topogrophical lines now working with ETOPO

parent ce75333f
No related branches found
No related tags found
No related merge requests found
326 327
\ No newline at end of file \ No newline at end of file
...@@ -36,7 +36,6 @@ if ~isfield(artoaWorkspace, 'trajectoryOutput') ...@@ -36,7 +36,6 @@ if ~isfield(artoaWorkspace, 'trajectoryOutput')
artoaWorkspace.trajectoryOutput = struct(); artoaWorkspace.trajectoryOutput = struct();
artoaWorkspace.trajectoryOutput.updateTrackParameterWindow = false; artoaWorkspace.trajectoryOutput.updateTrackParameterWindow = false;
artoaWorkspace.trajectoryOutput.showPositionDates = true; artoaWorkspace.trajectoryOutput.showPositionDates = true;
artoaWorkspace.trajectoryOutput.topographicalLines = artoaConfig.defaults.topographical_lines';
artoaWorkspace.trajectoryOutput.enableMercatorProjection = false; artoaWorkspace.trajectoryOutput.enableMercatorProjection = false;
artoaWorkspace.trajectoryOutput.syncZoomToaWindow = true; artoaWorkspace.trajectoryOutput.syncZoomToaWindow = true;
artoaWorkspace.trajectoryOutput.enableTrueDistance = false; artoaWorkspace.trajectoryOutput.enableTrueDistance = false;
...@@ -73,4 +72,3 @@ artoa.controller.track.trajectoryOutput.updateGui(); ...@@ -73,4 +72,3 @@ artoa.controller.track.trajectoryOutput.updateGui();
artoa.controller.track.trajectoryOutput.plot(artoaWorkspace.trajectoryOutput.enableMercatorProjection); artoa.controller.track.trajectoryOutput.plot(artoaWorkspace.trajectoryOutput.enableMercatorProjection);
end end
...@@ -2,7 +2,7 @@ function [topographicalLineHandles] = plotTopographicalLines(pAxesHandle) ...@@ -2,7 +2,7 @@ function [topographicalLineHandles] = plotTopographicalLines(pAxesHandle)
%PLOTSOUNDSOURCELINES Summary of this function goes here %PLOTSOUNDSOURCELINES Summary of this function goes here
% Detailed explanation goes here % Detailed explanation goes here
global artoaWorkspace artoaDataInput; global artoaWorkspace artoaDataInput artoaConfig;
%% Load etopo %% Load etopo
...@@ -13,24 +13,27 @@ if ~artoa.controller.file.loadEtopoFile( ... ...@@ -13,24 +13,27 @@ if ~artoa.controller.file.loadEtopoFile( ...
return; return;
end end
%% Get required variables
topographical_line_values = artoaConfig.defaults.topographical_lines;
%% Plot topographical lines %% Plot topographical lines
% make handle the current axes % make handle the current axes
axes(pAxesHandle); axes(pAxesHandle);
hold(pAxesHandle, 'on'); hold(pAxesHandle, 'on');
topographicalLineHandles = cell(length(artoaWorkspace.trajectoryOutput.topographicalLines), 1); topographicalLineHandles = cell(length(topographical_line_values), 1);
for o = 1:length(artoaWorkspace.trajectoryOutput.topographicalLines) for o = 1:length(topographicalLineHandles)
if isnan(artoaWorkspace.trajectoryOutput.topographicalLines{o}) ... if isnan(topographical_line_values(o)) ...
| (ischar(artoaWorkspace.trajectoryOutput.topographicalLines{o}) && strcmp(strip(artoaWorkspace.trajectoryOutput.topographicalLines{o}), '')) | (ischar(topographical_line_values(o)) && strcmp(strip(topographical_line_values(o)), ''))
continue; continue;
end end
try try
if ischar(artoaWorkspace.trajectoryOutput.topographicalLines{o}) if ischar(topographical_line_values(o))
lineValue = str2double(artoaWorkspace.trajectoryOutput.topographicalLines{o}); lineValue = str2double(topographical_line_values(o));
else else
lineValue = artoaWorkspace.trajectoryOutput.topographicalLines{o}; lineValue = topographical_line_values(o);
end end
[~, topographicalLineHandles{o}] = contourm( ... [~, topographicalLineHandles{o}] = contourm( ...
artoaDataInput.etopo.Z, ... artoaDataInput.etopo.Z, ...
...@@ -44,6 +47,9 @@ for o = 1:length(artoaWorkspace.trajectoryOutput.topographicalLines) ...@@ -44,6 +47,9 @@ for o = 1:length(artoaWorkspace.trajectoryOutput.topographicalLines)
end end
end end
% Store handles in workspace
artoaWorkspace.trajectoryOutput.topographicalLines = topographicalLineHandles;
hold(pAxesHandle, 'off'); hold(pAxesHandle, 'off');
end 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