92 frame_target_wrt_inertial.
i = {1,0,1};
93 frame_target_wrt_inertial.
j = {0,1,0};
94 frame_target_wrt_inertial.
k = {-1,0,1};
97 frame_target_wrt_inertial.
i = {1,0,-1};
98 frame_target_wrt_inertial.
j = {0,1,0};
99 frame_target_wrt_inertial.
k = {1,0,1};
102 frame_target_wrt_inertial.
i = {1,0,0};
103 frame_target_wrt_inertial.
j = {0,1,1};
104 frame_target_wrt_inertial.
k = {0,-1,1};
116 cout <<
"test_vector " << test_vector << endl;
120 cout <<
"q_target_wrt_inertial: ";
121 cout << q_target_wrt_inertial.
d.
x <<
" ";
122 cout << q_target_wrt_inertial.
d.
y <<
" ";
123 cout << q_target_wrt_inertial.
d.
z <<
" ";
124 cout << q_target_wrt_inertial.
w <<
" " << endl;
128 using Cosmos::Math::Quaternion;
142 q.fromTwoVectors({1,0,0},{1,0,1});
145 q.fromTwoVectors({1,0,0},{1,0,-1});
148 q.fromTwoVectors({0,1,0},{0,1,1});
151 cout <<
"q: " << q << endl;
154 cout << q1.toEuler()*(180./
PI) << endl;
double y
Y value.
Definition: vector.h:114
Orthonormal basis.
Definition: rotation.h:49
cvector k
Definition: rotation.h:54
cvector cv_unitx()
Unit x vector.
Definition: vector.cpp:422
3x3 element cartesian matrix
Definition: matrix.h:96
quaternion q_dcm2quaternion_cm(cmatrix dcm)
Direction Cosine Matrix to Quaternion.
Definition: rotation.cpp:100
cvector d
Orientation.
Definition: vector.h:405
Quaternion, scalar last, using x, y, z.
Definition: vector.h:402
double x
X value.
Definition: vector.h:112
const double PI
PI.
Definition: math/constants.h:12
Definition: rotation.h:60
cvector i
Definition: rotation.h:52
double w
Rotation.
Definition: vector.h:407
cvector cv_unitz()
Unit z vector.
Definition: vector.cpp:442
cvector cv_unity()
Unit y vector.
Definition: vector.cpp:432
double z
Z value.
Definition: vector.h:116
cmatrix base1_from_base2(basisOrthonormal base1, basisOrthonormal base2)
Definition: rotation.cpp:310
cvector j
Definition: rotation.h:53
cvector cv_mmult(cmatrix m, cvector v)
Multiply cartesian vector by cartesian matrix.
Definition: matrix.cpp:80
3 element cartesian vector
Definition: vector.h:107