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

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 B to a reference frame R. Rather, maybe it is desired to align the first R frame axis with the 2nd body axis. Thus, a corrected body frame Bc must align with R. The can also be achieved by aligning B with a corrected attitude reference frame Rc.

Let the rotation between B and Bc be given by the MRP set σB/Bc. Using DCMs, thus we need

[BN]=[RcN]

The original reference frame relates to the body frame through

[RN]=[BcN][BN]

which leads to

[BN]=[BcN]T[RN]

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

[RcN]=[BcN]T[RN]

The orientation of [RcN] 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.