Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martina Maggio
gps-modeling
Commits
b0503906
Commit
b0503906
authored
Feb 27, 2019
by
Claudio Mandrioli
Browse files
added test case for function gps_randomized_car
parent
146e57ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
matlab/tests/main_runAllTests.m
View file @
b0503906
...
...
@@ -4,8 +4,8 @@
% every time a new test-case is define simply add it here
test_dcm2q
%
test_get_settings_car
%
test_get_settings_cycling
test_get_settings_car
test_get_settings_cycling
% test_gps_randomized_car
% test_gps_randomized_cycling
% test_GPSaidedINS_car
...
...
matlab/tests/test_dcm2q.m
View file @
b0503906
...
...
@@ -5,15 +5,17 @@
%oracle: easy to chekc from the formulae
clear
all
clear
all
%clear workspace
close
all
cd
..
cd
..
%move to functions directory
%execute function
R
=
zeros
(
4
,
4
);
q
=
dcm2q
(
R
);
cd
tests
%verify output
if
q
~=
[
0
;
0
;
0
;
0.5
]
error
(
'error in function dcm_2q'
)
else
...
...
matlab/tests/test_gps_randomized_car.m
0 → 100644
View file @
b0503906
% test case for function gps_randomized_car
%purpose: verify that the transition turn_on is taken from initial state
%oracle:
clear
all
%clear workspace
close
all
cd
..
%move to functions directory
%initialize input data
sensor
.
state
=
'no_info'
;
sensor
.
fetchfp
=
1.0
;
sensor
.
geteph
=
Inf
;
sensor
.
ephExp
=
1800.0
;
sensor
.
fp
=
0
;
sensor
.
eph
=
5
;
turn
=
true
;
time
=
0
;
sv
=
5
;
%execute function
sensor
=
gps_randomized_car
(
time
,
sensor
,
turn
,
sv
);
cd
tests
%go back to tests directory
%verify output
if
~
(
strcmp
(
sensor
.
state
,
'cold_start'
))
error
(
'error in function gps_randomized_car'
)
else
disp
(
'function gps_randomized_car ok'
)
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment