attRefCorrection#

Executive Summary#

This module reads in the attitude reference message and adjusts it by a fixed rotation. This allows a general body-fixed frame \(B\) to align with this corrected reference frame \(R_c\).

Message Connection Descriptions#

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages#

Msg Variable Name

Msg Type

Description

attRefInMsg

AttRefMsgPayload

attitude reference input message

attRefOutMsg

AttRefMsgPayload

corrected attitude reference input message

Detailed Module Description#

This module is an attitude reference message feed-through module where a fixed orientation offset can be applied to the output attitude sigma_RN. In not all cases do we wish to drive a body-fixed frame \(\cal B\) to a reference frame \(\cal R\). Rather, maybe it is desired to align the first \(\cal R\) frame axis with the 2nd body axis. Thus, a corrected body frame \({\cal B}_c\) must align with R. The can also be achieved by aligning \(\cal B\) with a corrected attitude reference frame \({\cal R}_c\).

Let the rotation between \(\cal B\) and \({\cal B}_c\) be given by the MRP set \(\sigma_{B/B_c}\). Using DCMs, thus we need

\[[BN] = [R_cN]\]

The original reference frame relates to the body frame through

\[[RN] = [B_cN][BN]\]

which leads to

\[[BN] = [B_cN]^T [RN]\]

Substituting this into the first equatino leads to the desired corrected reference frame:

\[[R_cN] = [B_cN]^T [RN]\]

The orientation of \([R_cN]\) is then translated to a MRP set for the output message.

User Guide#

The only variable that is set with this module is the sigma_BcB MRP to rotate from the original body frame and the corrected frame.

Class AttRefCorrection#

class AttRefCorrection : public SysModel#

This module reads in the attitude reference message and adjusts it by a fixed rotation. This allows a general body-fixed frame B to align with this corrected reference frame Rc.

Public Functions

void reset(uint64_t callTime) override#

This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values. Check if required input messages are connected.

Parameters:

callTime – [ns] time the method is called

Returns:

void

void updateState(uint64_t callTime) override#

Corrects the reference attitude message by a fixed rotation

Parameters:

callTime – The clock time at which the function was called (nanoseconds)

Returns:

void

Public Members

ReadFunctor<AttRefMsgPayload> attRefInMsg#

attitude reference input message

Message<AttRefMsgPayload> attRefOutMsg#

corrected attitude reference input message

double sigma_BcB[3]#

MRP from from body frame B to the corrected body frame Bc.

BSKLogger bskLogger = {}#

BSK Logging.