NumCpp  2.17.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
nc::rotations Namespace Reference

Data Structures

class  DCM
 Factory methods for generating direction cosine matrices and vectors. More...
class  Quaternion
 Holds a unit quaternion. More...

Functions

template<typename dtype>
NdArray< double > rodriguesRotation (const NdArray< dtype > &k, double theta, const NdArray< dtype > &v)
Vec3 rodriguesRotation (const Vec3 &k, double theta, const Vec3 &v) noexcept
template<typename dtype>
NdArray< double > wahbasProblem (const NdArray< dtype > &wk, const NdArray< dtype > &vk)
template<typename dtype>
NdArray< double > wahbasProblem (const NdArray< dtype > &wk, const NdArray< dtype > &vk, const NdArray< dtype > &ak)

Function Documentation

◆ rodriguesRotation() [1/2]

template<typename dtype>
NdArray< double > nc::rotations::rodriguesRotation ( const NdArray< dtype > & k,
double theta,
const NdArray< dtype > & v )

Performs Rodriques' rotation formula https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula

Parameters
kthe axis to rotate around
thetathe angle in radians to rotate
vthe vector to rotate
Returns
NdArray<double>

◆ rodriguesRotation() [2/2]

Vec3 nc::rotations::rodriguesRotation ( const Vec3 & k,
double theta,
const Vec3 & v )
inlinenoexcept

Performs Rodriques' rotation formula https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula

Parameters
kthe axis to rotate around
thetathe angle in radians to rotate
vthe vector to rotate
Returns
Vec3

◆ wahbasProblem() [1/2]

template<typename dtype>
NdArray< double > nc::rotations::wahbasProblem ( const NdArray< dtype > & wk,
const NdArray< dtype > & vk )

Finds a rotation matrix (special orthogonal matrix) between two coordinate systems from a set of (weighted) vector observations. Solutions to Wahba's problem are often used in satellite attitude determination utilising sensors such as magnetometers and multi-antenna GPS receivers https://en.wikipedia.org/wiki/Wahba%27s_problem

Parameters
wkk-th 3-vector measurement in the reference frame
vkcorresponding k-th 3-vector measurement in the body frame
Returns
NdArray rotation matrix

◆ wahbasProblem() [2/2]

template<typename dtype>
NdArray< double > nc::rotations::wahbasProblem ( const NdArray< dtype > & wk,
const NdArray< dtype > & vk,
const NdArray< dtype > & ak )

Finds a rotation matrix (special orthogonal matrix) between two coordinate systems from a set of (weighted) vector observations. Solutions to Wahba's problem are often used in satellite attitude determination utilising sensors such as magnetometers and multi-antenna GPS receivers https://en.wikipedia.org/wiki/Wahba%27s_problem

Parameters
wkk-th 3-vector measurement in the reference frame (n x 3 matrix)
vkcorresponding k-th 3-vector measurement in the body frame (n x 3 matrix)
akset of weights for each observation (1 x n or n x 1 matrix)
Returns
NdArray rotation matrix