Class Matrix3Support
- Namespace
- NominalSystems.Maths
- Assembly
- NominalSystems.Maths.dll
Provides additional support functions for 3x3 matrices
public class Matrix3Support
- Inheritance
-
Matrix3Support
Constructors
Matrix3Support()
public Matrix3Support()
Methods
InertiaInversePntTransform(Matrix3, Transform, double)
Transform an inertia tensor, initially calculated at the centre-of-mass of a body, from the equivalent tensor in a new frame back to the initial frame
public static Matrix3 InertiaInversePntTransform(Matrix3 inertia, Transform transform, double mass)
Parameters
inertia
Matrix3The inertia tensor in the new frame
transform
TransformTransform of the tensor initial frame represented in the new frame
mass
doubleThe mass of the body
Returns
- Matrix3
The transformed inertia tensor in the initial frame
InertiaPntTransform(Matrix3, Transform, double)
Transform an inertia tensor, initially calculated at the centre-of-mass of a body, to the equivalent tensor in a new frame, calculated at the origin of the new frame
public static Matrix3 InertiaPntTransform(Matrix3 inertia, Transform transform, double mass)
Parameters
inertia
Matrix3The inertia tensor in the original frame
transform
TransformTransform of the tensor frame represented in the new frame
mass
doubleThe mass of the body
Returns
- Matrix3
The transformed inertia tensor in the new frame
InertiaPrimePntTransform(Matrix3, Transform, Vector3, double)
Transform an InertiaPrime tensor, initially calculated at the centre-of-mass of a body, to the equivalent tensor in a new frame, calculated at the origin of the new frame
public static Matrix3 InertiaPrimePntTransform(Matrix3 inertiaPrime, Transform transform, Vector3 positionDot, double mass)
Parameters
inertiaPrime
Matrix3The InertiaPrime tensor in the original frame
transform
TransformTransform of the tensor frame represented in the new frame
positionDot
Vector3Rate of change of the position of the tensor frame represented in the new frame
mass
double
Returns
PointingDCM(Vector3)
Return a DCM where the Up vector (the third row) points parallel to the given direction vector. The orientation given by the DCM is represented in N frame coordinates.
public static Matrix3 PointingDCM(Vector3 direction_N)
Parameters
direction_N
Vector3The direction vector, in N frame coordinates
Returns
- Matrix3
The DCM
PointingDCM(Vector3, Vector3)
Return a DCM where the Up vector (the third row) points parallel to the given direction vector, and the Right vector (the first row) points in the direction of the alignment vector (after projection perpendicular to the Up vector) The orientation given by the DCM is represented in N frame coordinates.
public static Matrix3 PointingDCM(Vector3 direction_N, Vector3 alignment_N)
Parameters
direction_N
Vector3The direction vector, in N frame coordinates
alignment_N
Vector3The alignment vector, in N frame coordinates
Returns
- Matrix3
The DCM
Rot1(double)
This function returns the DCM that corresponds to a 1-axis rotation by the angle theta.The DCM is the positive theta rotation from the original frame to the final frame.
public static Matrix3 Rot1(double angle)
Parameters
angle
doubleThe input rotation angle
Returns
- Matrix3
A new matrix
Rot2(double)
This function returns the DCM that corresponds to a 2-axis rotation by the angle theta. The DCM is the positive theta rotation from the original frame to the final frame.
public static Matrix3 Rot2(double angle)
Parameters
angle
doubleThe input rotation angle
Returns
- Matrix3
A new matrix
Rot3(double)
This function returns the DCM that corresponds to a 3-axis rotation by the angle theta. The DCM is the positive theta rotation from the original frame to the final frame.
The input rotation anglepublic static Matrix3 Rot3(double angle)
Parameters
angle
double
Returns
SkewMatrix(Vector3)
This function returns the skew-symmetric matrix version of a Vector The skew-symmetric matrix of 'a', notated [a], is the matrix equivalent to the vector cross product where [a] b = a x b
public static Matrix3 SkewMatrix(Vector3 vec)
Parameters
vec
Vector3The input vector
Returns
- Matrix3
The converted Matrix
TensorTransform(Matrix3, Transform)
Transform a rank-2 tensor to be represented in the new frame
public static Matrix3 TensorTransform(Matrix3 tensor, Transform transform)
Parameters
tensor
Matrix3A rank-2 tensor in the original frame
transform
TransformTransform of the tensor frame represented in the new frame
Returns
- Matrix3
The transformed tensor in the new frame