Module: mrpRotation

Executive Summary

This module creates a dynamic reference frame attitude state message where the initial orientation relative to the input reference frame is specified through an MRP set, and the angular velocity vector is held fixed as seen by the resulting reference frame. More information can be found in the PDF Description.

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.

../../../../_images/moduleIOMrpRotation.svg

Figure 1: mrpRotation() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

attRefOutMsg

AttRefMsgPayload

name of the output message containing the Reference

attRefInMsg

AttRefMsgPayload

name of the guidance reference input message

desiredAttInMsg

AttStateMsgPayload

(optional) name of the incoming message containing the desired Euler angle set


Functions

void SelfInit_mrpRotation(mrpRotationConfig *configData, int64_t moduleID)

This method initializes the configData for mrpRotation model. It creates the module output message.

Parameters:
  • configData – The configuration data associated with the null space control

  • moduleID – The ID associated with the configData

Returns:

void

void Reset_mrpRotation(mrpRotationConfig *configData, uint64_t callTime, int64_t moduleID)

This resets the module to original states.

Parameters:
  • configData – The configuration data associated with the null space control

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

  • moduleID – The ID associated with the configData

Returns:

void

void Update_mrpRotation(mrpRotationConfig *configData, uint64_t callTime, int64_t moduleID)

This method takes the input attitude reference frame, and and superimposes the dynamics MRP scanning motion on top of this.

Parameters:
  • configData – The configuration data associated with the mrpRotation module

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

  • moduleID – The ID associated with the configData

Returns:

void

void checkRasterCommands(mrpRotationConfig *configData)

This function checks if there is a new commanded raster maneuver message available.

Parameters:

configData – The configuration data associated with the mrpRotation module

Returns:

void

void computeTimeStep(mrpRotationConfig *configData, uint64_t callTime)

This function computes control update time.

Parameters:
  • configData – The configuration data associated with the mrpRotation module

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

Returns:

void

void computeMRPRotationReference(mrpRotationConfig *configData, double sigma_R0N[3], double omega_R0N_N[3], double domega_R0N_N[3], AttRefMsgPayload *attRefOut)

This function computes the reference (MRP attitude Set, angular velocity and angular acceleration) associated with a rotation defined in terms of an initial MRP set and a constant angular velocity vector.

Parameters:
  • configData – The configuration data associated with the mrpRotation module

  • sigma_R0N – The input reference attitude using MRPs

  • omega_R0N_N – The input reference frame angular rate vector

  • domega_R0N_N – The input reference frame angular acceleration vector

  • attRefOut – The output message copy

Returns:

void

struct mrpRotationConfig
#include <mrpRotation.h>

Top level structure for the sub-module routines.

Public Members

double mrpSet[3]

[-] current MRP attitude coordinate set with respect to the input reference

double omega_RR0_R[3]

[rad/s] angular velocity vector relative to input reference

double cmdSet[3]

[] msg commanded initial MRP sigma_RR0 set with respect to input reference

double cmdRates[3]

[rad/s] msg commanded constant angular velocity vector omega_RR0_R

double priorCmdSet[3]

[] prior commanded MRP set

double priorCmdRates[3]

[rad/s] prior commanded angular velocity vector

uint64_t priorTime

[ns] last time the guidance module is called

double dt

[s] integration time-step

AttRefMsg_C attRefOutMsg

The name of the output message containing the Reference.

AttRefMsg_C attRefInMsg

The name of the guidance reference input message.

AttStateMsg_C desiredAttInMsg

The name of the incoming message containing the desired EA set.

BSKLogger *bskLogger

BSK Logging.