diff --git a/matlab/tests/main_runAllTests.m b/matlab/tests/main_runAllTests.m index cf1de78d6483209a711687f00ff32b19231051e6..a28915d8e38cf93c1faa4821995cfbf4554191fa 100644 --- a/matlab/tests/main_runAllTests.m +++ b/matlab/tests/main_runAllTests.m @@ -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 diff --git a/matlab/tests/test_Nav_eq.m b/matlab/tests/test_Nav_eq.m new file mode 100644 index 0000000000000000000000000000000000000000..bfb7bb46cf7358691146ffcb676ac5594bca2ff5 --- /dev/null +++ b/matlab/tests/test_Nav_eq.m @@ -0,0 +1,27 @@ +% 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 diff --git a/matlab/tests/test_gravity.m b/matlab/tests/test_gravity.m index 53108ba48210fd9a77175e98cacee1122abae667..66a86e0689b06fed83796f34f0adc1bccffaf7de 100644 --- a/matlab/tests/test_gravity.m +++ b/matlab/tests/test_gravity.m @@ -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