Table of Contents

Class MassLibrary

Namespace
NominalSystems.Universe
Assembly
NominalSystems.Universe.dll

[Nominal] A static library that helps with converting different mass values between different frames of reference. These include Center of Masses and Moment of Inertias. The frames of reference are: L -> Component (Local) Frame B -> Body Frame (Spacecraft) N -> Inertial Frame


public static class MassLibrary
Inheritance
MassLibrary

Methods

CenterOfMass_BtoL(Vector3, Matrix3, Vector3)

Converts a Center of Mass in the B frame to a Center of Mass in the L frame. This works for all three CoM forms; Dot and Prime included, as long as the com_B_B value is the correct B frame form of the value.

public static Vector3 CenterOfMass_BtoL(Vector3 com_B_B, Matrix3 dcm_LB, Vector3 r_LB_B)

Parameters

com_B_B Vector3

[m] The center of mass (standard, dot or prime) in the B frame

dcm_LB Matrix3

[-] The rotation matrix from the L to B frames

r_LB_B Vector3

[m] The location difference between the L and B frames

Returns

Vector3

[m] The center of mass (standard, dot or prime) in the L frame

CenterOfMass_LtoB(Vector3, Matrix3, Vector3)

Converts a Center of Mass in the L frame to a Center of Mass in the B frame. This works for all three CoM forms; Dot and Prime included, as long as the com_L_L value is the correct L frame form of the value.

public static Vector3 CenterOfMass_LtoB(Vector3 com_L_L, Matrix3 dcm_LB, Vector3 r_LB_B)

Parameters

com_L_L Vector3

[m] The center of mass (standard, dot or prime) in the L frame

dcm_LB Matrix3

[-] The rotation matrix from the L to B frames

r_LB_B Vector3

[m] The location difference between the L and B frames

Returns

Vector3

[m] The center of mass (standard, dot or prime) in the B frame

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 Matrix3

The inertia tensor in the new frame

transform Transform

Transform of the tensor initial frame represented in the new frame

mass double

The mass of the body

Returns

Matrix3

The transformed inertia tensor in the initial frame

InertiaPntTransform(Matrix3, Matrix3, Vector3, 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, Matrix3 dcm, Vector3 position, double mass)

Parameters

inertia Matrix3

The inertia tensor in the original frame

dcm Matrix3

The DCM of the transform

position Vector3

The position of the new frame relative to the original frame

mass double

The mass of the body

Returns

Matrix3

The transformed inertia tensor in the new frame

InertiaPrimePntTransform(Matrix3, Matrix3, Vector3, 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, Matrix3 dcm, Vector3 position, Vector3 positionDot, double mass)

Parameters

inertiaPrime Matrix3

The InertiaPrime tensor in the original frame

dcm Matrix3

The DCM of the transform

position Vector3

The position of the new frame relative to the original frame

positionDot Vector3

Rate of change of the position of the tensor frame represented in the new frame

mass double

Returns

Matrix3

MomentOfInertiaPrime_LToB(Matrix3, Matrix3, Vector3, Vector3, double)

Converts a Moment of Inertia Prime (which is a derivative) from the L frame to a B frame.

public static Matrix3 MomentOfInertiaPrime_LToB(Matrix3 moiPrime_L_L, Matrix3 dcm_LB, Vector3 com_B_B, Vector3 comDot_B_B, double mass)

Parameters

moiPrime_L_L Matrix3

[kg m^2/s] The moment of inertia in the L frame

dcm_LB Matrix3

[-] The rotation matrix from the L to B frame

com_B_B Vector3

[m] The center of mass in the B frame

comDot_B_B Vector3

[m/s] The center of mass change in time in the B frame

mass double

[kg] The mass of the object

Returns

Matrix3

[kg m^2/s] The moment of inertia in the B frame

MomentOfInertia_BToL(Matrix3, Matrix3, Vector3, double)

Converts a Moment of Inertia in the B frame to a Moment of Inertia in the L frame.

public static Matrix3 MomentOfInertia_BToL(Matrix3 moi_B_B, Matrix3 dcm_LB, Vector3 com_B_B, double mass)

Parameters

moi_B_B Matrix3

[kg m^2] The moment of inertia in the B frame

dcm_LB Matrix3

[-] The rotational matrix between the L frame and the B frame

com_B_B Vector3

[m] The center of mass in the B frame

mass double

[kg] The mass of the object

Returns

Matrix3

[kg m^2] The moment of inertia in the L frame

MomentOfInertia_LToB(Matrix3, Matrix3, Vector3, double)

Converts a Moment of Inertia in the L frame to a Moment of Inertia in the B frame.

public static Matrix3 MomentOfInertia_LToB(Matrix3 moi_L_L, Matrix3 dcm_LB, Vector3 com_B_B, double mass)

Parameters

moi_L_L Matrix3

[kg m^2] The moment of inertia in the L frame

dcm_LB Matrix3

[-] The rotational matrix between the L frame and the B frame

com_B_B Vector3

[m] The center of mass in the B frame

mass double

[kg] The mass of the object

Returns

Matrix3

[kg m^2] The moment of inertia in the B frame

TensorMatrix(Matrix3, Matrix3)

Transforms a given tensor using a directional cosine matrix (DCM). This method performs the transformation of the tensor by computing the product of the transpose of the directional cosine matrix (DCM), the tensor, and the DCM.

public static Matrix3 TensorMatrix(Matrix3 tensor, Matrix3 dcm)

Parameters

tensor Matrix3

The input tensor to be transformed. It is represented as a 3x3 matrix

dcm Matrix3

The directional cosine matrix used for the transformation

Returns

Matrix3

A new Matrix3 representing the transformed tensor

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 Matrix3

A rank-2 tensor in the original frame

transform Transform

Transform of the tensor frame represented in the new frame

Returns

Matrix3

The transformed tensor in the new frame