diff --git a/matlab/tests/main_runAllTests.m b/matlab/tests/main_runAllTests.m index 1ae7a6e9029124bd0e2fbf636322ac1112bb1bac..d58750d0321dc07fe9f7b8b85c98217f6ee9ec01 100644 --- a/matlab/tests/main_runAllTests.m +++ b/matlab/tests/main_runAllTests.m @@ -13,4 +13,4 @@ test_GPSaidedINS_cycling test_gravity test_Nav_eq test_q2dcm -% test_Rt2d \ No newline at end of file +test_Rt2d \ No newline at end of file diff --git a/matlab/tests/test_Rt2d.m b/matlab/tests/test_Rt2d.m new file mode 100644 index 0000000000000000000000000000000000000000..3c6330e7f65ac6e42f4b4050069db7f243b978fe --- /dev/null +++ b/matlab/tests/test_Rt2d.m @@ -0,0 +1,25 @@ +% test case for function Rt2d + +%purpose: test the function in basic case to verify it runs correctly, i.e. +% returns a 3x3 matrix + +%oracle: the rotation matrix with null angles should be the identity +% matrix + +clear all %clear workspace +close all +cd .. %move to functions directory + +%initialize inputs +ang=[0,0,0]; +%execute function +R=Rt2b(ang); + +cd tests %go back to tests directory + +%verify output +if ~(R==eye(3)) + error('error in function Rt2d') +else + disp('function Rt2d ok') +end \ No newline at end of file