Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
artoa4argo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
argoTools
artoa4argo
Commits
7a7f5c66
Commit
7a7f5c66
authored
5 years ago
by
leprob001
Browse files
Options
Downloads
Patches
Plain Diff
Added trajectoryOutput window to the gui package.
parent
13556816
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/+artoa/+gui/+track/trajectoryOutput.m
+187
-0
187 additions, 0 deletions
lib/+artoa/+gui/+track/trajectoryOutput.m
with
187 additions
and
0 deletions
lib/+artoa/+gui/+track/trajectoryOutput.m
0 → 100644
+
187
−
0
View file @
7a7f5c66
function
[]
=
trajectoryOutput
(
pCallbacks
)
%TRAJECTORY Summary of this function goes here
% Detailed explanation goes here
global
artoaGui
artoaWorkspace
;
%% Initialize required variables
windowTitle
=
[
'ARTOA4 - Float '
num2str
(
artoaWorkspace
.
float
.
floatname
)
' - Trajectory'
];
availableCallbacks
=
{
...
'CloseRequestFcn'
,
...
'buttonDeleteSingle'
,
...
'buttonDeleteAll'
,
...
'checkboxMercator'
,
...
'checkboxTrackVisible'
,
...
'buttonTrackInfos'
,
...
'buttonVelocities'
,
...
'tableGeneratedTracksSelect'
...
};
for
i
=
1
:
length
(
availableCallbacks
)
% check if a callback is undefined
if
~
isfield
(
pCallbacks
,
availableCallbacks
{
i
})
pCallbacks
.
(
availableCallbacks
{
i
})
=
@
(
~
,
~
)
false
;
end
end
%% Initialize trajectory output gui
artoaGui
.
figures
.
trajectoryOutput
=
figure
(
...
'Name'
,
windowTitle
,
...
'NumberTitle'
,
'off'
,
...
'MenuBar','none', ...
'Units'
,
'characters'
...
);
artoaGui
.
trajectoryOutput
=
struct
();
set
(
...
artoaGui
.
figures
.
trajectoryOutput
,
...
'CloseRequestFcn'
,
...
pCallbacks
.
CloseRequestFcn
...
);
%% Setup axes
artoaGui
.
figures
.
trajectoryOutput
.
CurrentAxes
=
axes
();
artoaGui
.
figures
.
trajectoryOutput
.
CurrentAxes
.
Position
=
[
.
1
.
1
.
55
.
85
];
titleVal
=
[
...
'Project: '
artoaWorkspace
.
float
.
projectname
...
' - Float ID: '
num2str
(
artoaWorkspace
.
float
.
floatname
)
...
' - Cycle: '
num2str
(
artoaWorkspace
.
float
.
cycle
(
1
))
...
' - Trajectory'
...
];
titleHandle
=
title
(
artoaGui
.
figures
.
trajectoryOutput
.
CurrentAxes
,
titleVal
,
'FontSize'
,
10
);
xlabel
(
'Longitude'
);
ylabel
(
'Latitude'
);
grid
(
artoaGui
.
figures
.
trajectoryOutput
.
CurrentAxes
,
'on'
);
% save axes handle
artoaGui
.
trajectoryOutput
.
axesTrajectoryOutput
=
artoaGui
.
figures
.
trajectoryOutput
.
CurrentAxes
;
%% Generate controls
%% Track list frame
artoaGui
.
trajectoryOutput
.
frameTrackList
=
uipanel
(
...
'Title'
,
'Generated tracks'
,
...
'Units'
,
'normalized'
,
...
'BackgroundColor'
,
'white'
,
...
'Position'
,
[
.
675
,
.
675
,
.
3
,
.
3
]
...
);
columns
=
{
...
''
,
...
'No.'
,
...
'Soundspeed Method'
...
};
artoaGui
.
trajectoryOutput
.
tableTrackList
=
uitable
(
...
artoaGui
.
trajectoryOutput
.
frameTrackList
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
05
,
.
05
,
.
9
,
.
9
],
...
'Data'
,
cell
(
1
,
length
(
columns
)),
...
'ColumnName'
,
columns
,
...
'ColumnEditable'
,
false
,
...
'ColumnWidth'
,
{
20
,
30
,
110
},
...
'CellSelectionCallback'
,
pCallbacks
.
tableGeneratedTracksSelect
,
...
%pCallbacks.tableSoundSourceOffsetsSelection,... %@(app,event) disp(num2str(event.Indices)) ...
'CellEditCallback'
,
''
...
%pCallbacks.tableSoundSourceOffsetsEdit ...
);
clear
columns
;
%% Control buttons frame
artoaGui
.
trajectoryOutput
.
frameControlsButtons
=
uipanel
(
...
'Title'
,
'Controls'
,
...
'Units'
,
'normalized'
,
...
'BackgroundColor'
,
'white'
,
...
'Position'
,
[
.
675
.
05
.
3
.
15
]
...
);
artoaGui
.
trajectoryOutput
.
buttonDeleteSingle
=
uicontrol
(
...
'Parent'
,
artoaGui
.
trajectoryOutput
.
frameControlsButtons
,
...
'String'
,
'Delete selected'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
1
.
6
.
8
.
3
],
...
'CallBack'
,
pCallbacks
.
buttonDeleteSingle
...
);
artoaGui
.
trajectoryOutput
.
buttonDeleteAll
=
uicontrol
(
...
'Parent'
,
artoaGui
.
trajectoryOutput
.
frameControlsButtons
,
...
'String'
,
'Delete all'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
1
.
1
.
8
.
3
],
...
'CallBack'
,
pCallbacks
.
buttonDeleteAll
...
);
%% Generic options
artoaGui
.
trajectoryOutput
.
frameGenericOptions
=
uipanel
(
...
'Title'
,
'Options'
,
...
'Units'
,
'normalized'
,
...
'BackgroundColor'
,
'white'
,
...
'Position'
,
[
.
675
.
55
.
3
.
1
]
...
);
artoaGui
.
trajectoryOutput
.
checkboxUpdateTrackParameterWindow
=
uicontrol
(
...
'Parent'
,
artoaGui
.
trajectoryOutput
.
frameGenericOptions
,
...
'String'
,
'Update track parameter on selection'
,
...
'Tooltip'
,
'If checked the track parameter of the selected trajectory will be restored in the track parameter window.'
,
...
'Style'
,
'CheckBox'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
1
.
8
.
8
.
175
],
...
'CallBack'
,
pCallbacks
.
checkboxUpdateTrackParameterWindow
...
);
%% Display options
artoaGui
.
trajectoryOutput
.
frameDisplayOptions
=
uipanel
(
...
'Title'
,
'Display options'
,
...
'Units'
,
'normalized'
,
...
'BackgroundColor'
,
'white'
,
...
'Position'
,
[
.
675
.
25
.
3
.
25
]
...
);
artoaGui
.
trajectoryOutput
.
checkboxMercator
=
uicontrol
(
...
'Parent'
,
artoaGui
.
trajectoryOutput
.
frameDisplayOptions
,
...
'String'
,
'Mercator projection'
,
...
'Style'
,
'CheckBox'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
1
.
8
.
8
.
175
],
...
'CallBack'
,
pCallbacks
.
checkboxMercator
...
);
artoaGui
.
trajectoryOutput
.
buttonTrackInfos
=
uicontrol
(
...
'Parent'
,
artoaGui
.
trajectoryOutput
.
frameDisplayOptions
,
...
'String'
,
'Track infos'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
1
.
4
.
8
.
175
],
...
'CallBack'
,
pCallbacks
.
buttonTrackInfos
...
);
artoaGui
.
trajectoryOutput
.
buttonVelocities
=
uicontrol
(
...
'Parent'
,
artoaGui
.
trajectoryOutput
.
frameDisplayOptions
,
...
'String'
,
'Velocities'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
1
.
2
.
8
.
175
],
...
'CallBack'
,
pCallbacks
.
buttonVelocities
...
);
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment