Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gps-modeling
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
Container registry
Model registry
Operate
Environments
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
Martina Maggio
gps-modeling
Commits
42b7b5c2
Commit
42b7b5c2
authored
6 years ago
by
Claudio Mandrioli
Browse files
Options
Downloads
Patches
Plain Diff
polished, commented and introduced print statements in run_many_cycling file
parent
f3feffa7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/run_many_cycling.m
+16
-16
16 additions, 16 deletions
matlab/run_many_cycling.m
with
16 additions
and
16 deletions
matlab/run_many_cycling.m
+
16
−
16
View file @
42b7b5c2
%"monteCarlo" example
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Script for example of energy-accuracy trade-off evaluatio with the
% cycling trace
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Load data
disp
(
'Loads data'
)
...
...
@@ -12,29 +15,26 @@ settings=get_settings_cycling();
color
=
[[
0.7
,
0.0
,
0.0
];[
0.0
,
0.7
,
0.0
];[
0.7
,
0.0
,
0.7
];[
0.0
,
0.0
,
0.7
];[
0.0
,
0.7
,
0.7
];[
0.7
,
0.7
,
0.0
]];
%vector of refrences for P
P_treshold
=
[
4.0
,
5.0
,
6.0
,
8.0
,
10.0
,
12.0
];
%nubmer of
ru
ns per each P
n_run
=
1
;
%nubmer of
simulatio
ns per each P
n_run
=
3
;
%allocate memory for output
energy
=
zeros
(
n_run
,
length
(
P_treshold
));
error
=
zeros
(
n_run
,
length
(
P_treshold
));
%% Iterate over the threshold for tr(P)
for
j
=
1
:
length
(
P_treshold
)
%set P reference
settings
.
P_treshold
=
P_treshold
(
j
);
%run simulations
for
k
=
1
:
n_run
%% Run the GNSS-aided INS
disp
(
'Running the GNSS-aided INS'
)
P_treshold
(
j
)
k
out_data
=
GPSaidedINS_cycling
(
in_data
,
settings
);
energy
(
k
,
j
)
=
out_data
.
energy
;
error
(
k
,
j
)
=
out_data
.
error
;
disp
([
'Starting simulations with threshold for P equal to:'
,
num2str
(
P_treshold
(
j
))])
%display reached treshold
settings
.
P_treshold
=
P_treshold
(
j
);
%set P reference
for
k
=
1
:
n_run
%iterate over the number of simulations per threshold
disp
([
'Simulation number:'
,
num2str
(
k
)])
%display simulation number
out_data
=
GPSaidedINS_cycling
(
in_data
,
settings
);
% Run the GNSS-aided INS
energy
(
k
,
j
)
=
out_data
.
energy
;
% store energy
error
(
k
,
j
)
=
out_data
.
error
;
% store positioning error
end
end
%
p
lot data
%
% P
lot data
figure
hold
on
xlabel
(
'energy'
)
...
...
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