![]() |
NumCpp
2.17.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Holds a unit quaternion. More...
#include <Quaternion.hpp>
Public Member Functions | |
| Quaternion ()=default | |
| Quaternion (const NdArray< double > &inArray) | |
| Quaternion (const NdArray< double > &inAxis, double inAngle) | |
| Quaternion (const std::array< double, 4 > &components) noexcept | |
| Quaternion (const Vec3 &inAxis, double inAngle) noexcept | |
| Quaternion (double inI, double inJ, double inK, double inS) noexcept | |
| Quaternion (double roll, double pitch, double yaw) noexcept | |
| double | angleOfRotation () const noexcept |
| NdArray< double > | angularVelocity (const Quaternion &inQuat2, double inTime) const |
| Vec3 | axisOfRotation () const noexcept |
| Quaternion | conjugate () const noexcept |
| double | i () const noexcept |
| Quaternion | inverse () const noexcept |
| double | j () const noexcept |
| double | k () const noexcept |
| Quaternion | nlerp (const Quaternion &inQuat2, double inPercent) const |
| bool | operator!= (const Quaternion &inRhs) const noexcept |
| NdArray< double > | operator* (const NdArray< double > &inVec) const |
| Quaternion | operator* (const Quaternion &inRhs) const noexcept |
| Vec3 | operator* (const Vec3 &inVec3) const |
| Quaternion | operator* (double inScalar) const noexcept |
| Quaternion & | operator*= (const Quaternion &inRhs) noexcept |
| Quaternion & | operator*= (double inScalar) noexcept |
| Quaternion | operator+ (const Quaternion &inRhs) const noexcept |
| Quaternion & | operator+= (const Quaternion &inRhs) noexcept |
| Quaternion | operator- () const noexcept |
| Quaternion | operator- (const Quaternion &inRhs) const noexcept |
| Quaternion & | operator-= (const Quaternion &inRhs) noexcept |
| Quaternion | operator/ (const Quaternion &inRhs) const noexcept |
| Quaternion & | operator/= (const Quaternion &inRhs) noexcept |
| bool | operator== (const Quaternion &inRhs) const noexcept |
| double | pitch () const noexcept |
| void | print () const |
| void | propagateBody (const Vec3 &inAngularVelocity, double inDeltaT) |
| void | propagateBodyPitch (double pitchRate, double inDeltaT) |
| void | propagateBodyRoll (double rollRate, double inDeltaT) |
| void | propagateBodyYaw (double yawRate, double inDeltaT) |
| void | propagateInertial (const Vec3 &inAngularVelocity, double inDeltaT) |
| void | propagateInertialPitch (double pitchRate, double inDeltaT) |
| void | propagateInertialRoll (double rollRate, double inDeltaT) |
| void | propagateInertialYaw (double yawRate, double inDeltaT) |
| double | roll () const noexcept |
| NdArray< double > | rotate (const NdArray< double > &inVector) const |
| Vec3 | rotate (const Vec3 &inVec3) const |
| double | s () const noexcept |
| Quaternion | slerp (const Quaternion &inQuat2, double inPercent) const |
| std::string | str () const |
| NdArray< double > | toDCM () const |
| NdArray< double > | toNdArray () const |
| double | yaw () const noexcept |
Static Public Member Functions | |
| static NdArray< double > | angularVelocity (const Quaternion &inQuat1, const Quaternion &inQuat2, double inTime) |
| static Quaternion | identity () noexcept |
| static Quaternion | nlerp (const Quaternion &inQuat1, const Quaternion &inQuat2, double inPercent) |
| static Quaternion | pitchRotation (double inAngle) noexcept |
| static Quaternion | propagateBody (Quaternion inQuaternion, const Vec3 &inAngularVelocity, double inDeltaT) |
| static Quaternion | propagateBodyPitch (Quaternion inQuaternion, double pitchRate, double inDeltaT) |
| static Quaternion | propagateBodyRoll (Quaternion inQuaternion, double rollRate, double inDeltaT) |
| static Quaternion | propagateBodyYaw (Quaternion inQuaternion, double yawRate, double inDeltaT) |
| static Quaternion | propagateInertial (Quaternion inQuaternion, const Vec3 &inAngularVelocity, double inDeltaT) |
| static Quaternion | propagateInertialPitch (Quaternion inQuaternion, double pitchRate, double inDeltaT) |
| static Quaternion | propagateInertialRoll (Quaternion inQuaternion, double rollRate, double inDeltaT) |
| static Quaternion | propagateInertialYaw (Quaternion inQuaternion, double yawRate, double inDeltaT) |
| static Quaternion | rollRotation (double inAngle) noexcept |
| static Quaternion | slerp (const Quaternion &inQuat1, const Quaternion &inQuat2, double inPercent) |
| static Quaternion | xRotation (double inAngle) noexcept |
| static Quaternion | yawRotation (double inAngle) noexcept |
| static Quaternion | yRotation (double inAngle) noexcept |
| static Quaternion | zRotation (double inAngle) noexcept |
Friends | |
| std::ostream & | operator<< (std::ostream &inOStream, const Quaternion &inQuat) |
Holds a unit quaternion.
|
default |
Default Constructor
|
inlinenoexcept |
Constructor
| roll | euler roll angle in radians |
| pitch | euler pitch angle in radians |
| yaw | euler yaw angle in radians |
|
inlinenoexcept |
Constructor
| inI | |
| inJ | |
| inK | |
| inS |
|
inlinenoexcept |
Constructor
| components |
|
inline |
Constructor
| inArray | if size = 3 the roll, pitch, yaw euler angles if size = 4 the i, j, k, s components if shape = [3, 3] then direction cosine matrix |
|
inlinenoexcept |
Constructor
| inAxis | Euler axis |
| inAngle | Euler angle in radians |
|
inline |
Constructor
| inAxis | Euler axis x,y,z vector components |
| inAngle | Euler angle in radians |
|
inlinenodiscardnoexcept |
the angle of rotation around the rotation axis that is described by the quaternion
|
inlinestatic |
angular velocity vector between the two quaternions. The norm of the array is the magnitude
| inQuat1 | |
| inQuat2 | |
| inTime | (seperation time) |
|
inlinenodiscard |
angular velocity vector between the two quaternions. The norm of the array is the magnitude
| inQuat2 | |
| inTime | (seperation time) |
|
inlinenodiscardnoexcept |
the axis of rotation described by the quaternion
|
inlinenodiscardnoexcept |
quaternion conjugate
|
inlinenodiscardnoexcept |
returns the i component
|
inlinestaticnoexcept |
quaternion identity (0,0,0,1)
|
inlinenodiscardnoexcept |
quaternion inverse
|
inlinenodiscardnoexcept |
returns the j component
|
inlinenodiscardnoexcept |
returns the k component
|
inlinestatic |
linearly interpolates between the two quaternions
| inQuat1 | |
| inQuat2 | |
| inPercent | [0, 1] |
|
inlinenodiscard |
linearly interpolates between the two quaternions
| inQuat2 | |
| inPercent | (0, 1) |
|
inlinenoexcept |
equality operator
| inRhs |
|
inlinenoexcept |
|
inlinenoexcept |
multiplication operator, only useful for multiplying by negative 1, all others will be renormalized back out
| inScalar |
|
inlinenoexcept |
|
inlinenoexcept |
multiplication operator, only useful for multiplying by negative 1, all others will be renormalized back out
| inScalar |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
negative operator
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
equality operator
| inRhs |
|
inlinenodiscardnoexcept |
The euler pitch angle in radians
|
inlinestaticnoexcept |
|
inline |
prints the Quaternion to the console
|
inline |
Propagate the quaternion forward in time using the body angular velocity vector
| inAngularVelocity | the body angular velocity vector (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time using the body angular velocity vector
| inQuaternion | the quaternion to propagate |
| inAngularVelocity | the body angular velocity vector (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time along body the pitch axis
| pitchRate | the body pitch rate (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time along body the pitch axis
| inQuaternion | the quaternion to propagate |
| pitchRate | the body pitch rate (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time along body the roll axis
| rollRate | the body roll rate (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time along body the roll axis
| inQuaternion | the quaternion to propagate |
| rollRate | the body roll rate (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time along body the yaw axis
| yawRate | the body yaw rate (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time along body the yaw axis
| inQuaternion | the quaternion to propagate |
| yawRate | the body yaw rate (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time using the inertial angular velocity vector
| inAngularVelocity | the inertial angular velocity vector (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time using the inertial angular velocity vector
| inQuaternion | the quaternion to propagate |
| inAngularVelocity | the inertial angular velocity vector (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time along inertial the pitch axis
| pitchRate | the body pitch rate (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time along inertial the pitch axis
| inQuaternion | the quaternion to propagate |
| pitchRate | the body pitch rate (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time along inertial the roll axis
| rollRate | the body roll rate (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time along inertial the roll axis
| inQuaternion | the quaternion to propagate |
| rollRate | the body roll rate (rad/s) |
| inDeltaT | the time step |
|
inline |
Propagate the quaternion forward in time along inertial the yaw axis
| yawRate | the body yaw rate (rad/s) |
| inDeltaT | the time step |
|
inlinestatic |
Propagate the quaternion forward in time along inertial the yaw axis
| inQuaternion | the quaternion to propagate |
| yawRate | the body yaw rate (rad/s) |
| inDeltaT | the time step |
|
inlinenodiscardnoexcept |
The euler roll angle in radians
|
inlinestaticnoexcept |
|
inlinenodiscard |
rotate a vector using the quaternion
| inVector | (cartesian vector with x,y,z components) |
|
inlinenodiscardnoexcept |
returns the s component
|
inlinestatic |
spherical linear interpolates between the two quaternions
| inQuat1 | |
| inQuat2 | |
| inPercent | (0, 1) |
|
inlinenodiscard |
spherical linear interpolates between the two quaternions
| inQuat2 | |
| inPercent | (0, 1) |
|
inlinenodiscard |
returns the quaternion as a string representation
|
inlinenodiscard |
returns the direction cosine matrix
|
inlinenodiscard |
returns the quaternion as an NdArray
|
inlinestaticnoexcept |
returns a quaternion to rotate about the x-axis by the input angle
| inAngle | (radians) |
|
inlinenodiscardnoexcept |
The euler yaw angle in radians
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
returns a quaternion to rotate about the y-axis by the input angle
| inAngle | (radians) |
|
inlinestaticnoexcept |
returns a quaternion to rotate about the y-axis by the input angle
| inAngle | (radians) |
|
friend |