29 #ifndef __PDSQUATERNION_H__ 30 #define __PDSQUATERNION_H__ 33 #include <pds/pdscnglobal.h> 72 #define PDS_QRECT(A,B,C,D) pds_quaternion_rect(A,B,C,D) 94 #define PDS_QPOLAR(A,B,C,D) pds_quaternion_polar(A,B,C,D) 117 #define PDS_QADDQ(A,B) pds_quaternion_add_quaternion(A,B) 134 #define PDS_QADDR(A,B) pds_quaternion_add_real(A,B) 151 #define PDS_QSUBQ(A,B) pds_quaternion_sub_quaternion(A,B) 168 #define PDS_QSUBR(A,B) pds_quaternion_sub_real(A,B) 184 #define PDS_QMULQ(A,B) pds_quaternion_mul_quaternion(A,B) 201 #define PDS_QMULR(A,B) pds_quaternion_mul_real(A,B) 217 #define PDS_QDIVQ(A,B) pds_quaternion_div_quaternion(A,B) 234 #define PDS_QDIVR(A,B) pds_quaternion_div_real(A,B) 250 #define PDS_QINV(A) pds_quaternion_inv(A) 269 #define PDS_QUNIT(A) pds_quaternion_unit(A) 288 #define PDS_QCONJ(A) pds_quaternion_conj(A) 307 #define PDS_QEXP(B) pds_quaternion_exp(B) 325 #define PDS_QLOG(B) pds_quaternion_log(B) 344 #define PDS_QPOW(B,a) pds_quaternion_pow(B,a) 366 #define PDS_QNORM(A) pds_quaternion_norm(A) 385 #define PDS_QNORM2(A) pds_quaternion_norm2(A) 403 #define PDS_QGYRO(Wx,Wy,Wz,dt) pds_quaternion_gyro(Wx,Wy,Wz,dt)
PdsQuaternion pds_quaternion_unit(PdsQuaternion a)
Retona un quaternio unitario de un quaternio a. b=a/|a|.
PdsQuaternion pds_quaternion_conj(PdsQuaternion a)
Retona el conjugado de un quaternio. b=a.W-a.X i-a.Y j-a.Z k.
PdsQuaternion pds_quaternion_polar(PdsCnReal a, PdsCnReal b, PdsCnReal c, PdsCnReal d)
Evalua de forma polar. ae^{bi+cj+dk}.
PdsQuaternion pds_quaternion_pow(PdsQuaternion q, PdsCnReal a)
Evalua pow(q,a),q=W+Xi+Yj+Zk, siendo 'a' real.
PdsQuaternion pds_quaternion_rect(PdsCnReal w, PdsCnReal x, PdsCnReal y, PdsCnReal z)
Crea la variable complejas. q=w+xi+yi+zi.
PdsCnReal pds_quaternion_norm2(PdsQuaternion a)
Evalua |a|^2. |a|^2=(a.W^2+a.X^2+a.Y^2+a.Z^2).
PdsQuaternion pds_quaternion_gyro(PdsCnReal Wx, PdsCnReal Wy, PdsCnReal Wz, PdsCnReal dt)
Retorna un quaternio de giro q, provocado por el vetor de velocidad angular W = (Wx,Wy,Wz) = Wx i + Wy j + Wz k con un tiempo hasta la muestra anterior de 'dt'.
La estructura tipo PdsQuaternion .
PdsQuaternion pds_quaternion_div_quaternion(PdsQuaternion a, PdsQuaternion b)
Divide dos quaternios. a/b
PdsQuaternion pds_quaternion_add_real(PdsQuaternion a, PdsCnReal b)
Suma un quaternio y una real. a+b.
PdsQuaternion pds_quaternion_sub_quaternion(PdsQuaternion a, PdsQuaternion b)
Resta dos quaternios. a-b.
PdsQuaternion pds_quaternion_inv(PdsQuaternion a)
Retona el inverso de un quaternio a. b=a^{-1}.
PdsQuaternion pds_quaternion_div_real(PdsQuaternion a, PdsCnReal b)
Divide un quaternio y una real. a/b.
PdsQuaternion pds_quaternion_exp(PdsQuaternion q)
Evalua exp(q),q=W+Xi+Yj+Zk.
PdsCnReal pds_quaternion_norm(PdsQuaternion a)
Evalua |a|. |a|=sqrt(a.W^2+a.X^2+a.Y^2+a.Z^2).
PdsQuaternion pds_quaternion_sub_real(PdsQuaternion a, PdsCnReal b)
Resta un quaternio y una real. a-b
PdsQuaternion pds_quaternion_add_quaternion(PdsQuaternion a, PdsQuaternion b)
Suma dos quaternios. a+b.
PdsQuaternion pds_quaternion_mul_quaternion(PdsQuaternion a, PdsQuaternion b)
Multiplica dos quaternios. a*b.
PdsQuaternion pds_quaternion_mul_real(PdsQuaternion a, PdsCnReal b)
Multiplica un quaternio y una real. a*b.
PdsQuaternion pds_quaternion_log(PdsQuaternion q)
Evalua ln(q),q=W+Xi+Yj+Zk.