Module: 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.


Functions

void SelfInit_attRefCorrection(attRefCorrectionConfig *configData, int64_t moduleID)

This method initializes the output messages for this module.

Parameters
  • configData – The configuration data associated with this module

  • moduleID – The module identifier

Returns

void

void Update_attRefCorrection(attRefCorrectionConfig *configData, uint64_t callTime, int64_t moduleID)

Corrects the reference attitude message by a fixed rotation

Parameters
  • configData – The configuration data associated with the module

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

  • moduleID – The module identifier

Returns

void

void Reset_attRefCorrection(attRefCorrectionConfig *configData, uint64_t callTime, int64_t moduleID)

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
  • configData – The configuration data associated with the module

  • callTime – [ns] time the method is called

  • moduleID – The module identifier

Returns

void

struct attRefCorrectionConfig
#include <attRefCorrection.h>

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 Members

AttRefMsg_C attRefInMsg

attitude reference input message

AttRefMsg_C 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.