isce3 0.25.0
|
Simple class to store three-dimensional basis vectors. More...
#include <Basis.h>
Public Member Functions | |
CUDA_HOSTDEV | Basis () |
Default to identity basis. | |
CUDA_HOST | Basis (const Vec3 &x0, const Vec3 &x1, const Vec3 &x2, double tol=1e-8) |
Constructor with basis vectors. | |
CUDA_HOSTDEV | Basis (const Vec3 &p, const Vec3 &v) |
Geocentric TCN constructor. | |
CUDA_HOSTDEV const Vec3 & | x0 () const |
Return first basis vector. | |
CUDA_HOSTDEV void | x0 (const Vec3 &x0) |
Set the first basis vector. | |
CUDA_HOSTDEV const Vec3 & | x1 () const |
Return second basis vector. | |
CUDA_HOSTDEV void | x1 (const Vec3 &x1) |
Set the second basis vector. | |
CUDA_HOSTDEV const Vec3 & | x2 () const |
Return third basis vector. | |
CUDA_HOSTDEV void | x2 (const Vec3 &x2) |
Set the third basis vecot. | |
CUDA_HOSTDEV Vec3 | project (const Vec3 &vec) const |
Project a given vector onto basis. | |
void | combine (const Vec3 &vec, Vec3 &res) const |
Combine the basis with given weights. | |
CUDA_HOSTDEV Mat3 | toRotationMatrix () const |
Convert to matrix, vectors (x0, x1, x2) as columns (0, 1, 2). | |
Simple class to store three-dimensional basis vectors.
|
inline |
Constructor with basis vectors.
Input vectors which must be mutually orthogonal and have unit norm. The optional tol
parameter is used to check \( \mathbf{B}^\top \mathbf{B} - \mathbf{I} = 0 \)
Geocentric TCN constructor.
[in] | p | position vector |
[in] | v | velocity vector |
Combine the basis with given weights.
[in] | vec | 3D vector to use as weights |
[out] | res | 3D vector output |
\[ res = \sum_{i=0}^2 vec[i] \cdot x_i \]
Project a given vector onto basis.
[in] | vec | 3D vector to project |
[out] | res | 3D vector output |
\[ res_i = (x_i \cdot vec) \]