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

added test case for function Nav_eq function

parent 14f582d1
......@@ -10,13 +10,7 @@ test_gps_randomized_car
test_gps_randomized_cycling
test_GPSaidedINS_car
test_GPSaidedINS_cycling
% test_gravity
% test_main_car
% test_main_cycling
% test_main_tradeoff_car
% test_main_tradeoff_cycling
% test_Nav_eq
% test_plot_single_trace
% test_plot_tradeoff
test_gravity
test_Nav_eq
% test_q2dcm
% test_Rt2d
\ No newline at end of file
% test case for function Nav_eq
%purpose: verifies that the function runs correctly
%oracle: the dimension of the output are 10x1 since it is a position,
% velocity and attitude expressed with a quaternion
clear all %clear workspace
close all
cd .. %move to functions directory
%define input data
rng(1);
x=rand(10,1);
u=rand(6,1);
dt=0.1;
%execute function
x=Nav_eq(x,u,dt);
cd tests %go back to tests directory
%verify output
if ~(size(x)==[10,1])
error('error in function Nav_eq')
else
disp('function Nav_eq ok')
end
\ No newline at end of file
......@@ -12,7 +12,7 @@ cd .. %move to functions directory
%execute function
rng(1);
lambda=10*rand(1);
h=200;
h=100*rand(1);
g=gravity(lambda,h);
cd tests %go back to tests directory
......
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