Commit b0503906 authored by Claudio Mandrioli's avatar Claudio Mandrioli
Browse files

added test case for function gps_randomized_car

parent 146e57ca
......@@ -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
......
......@@ -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
......
% 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment