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