Module: mrpRotation

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.


Functions

void SelfInit_mrpRotation(mrpRotationConfig *configData, int64_t moduleID)

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

Return

void

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

  • moduleID: The ID associated with the configData

void CrossInit_mrpRotation(mrpRotationConfig *configData, int64_t moduleID)

This method performs the second stage of initialization for the mrpRotation model interface. It subscribes to the input reference frame message, and an optional desired attitude scanning message.

Return

void

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

  • moduleID: The ID associated with the configData

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

This resets the module to original states.

Return

void

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

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.

Return

void

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

void checkRasterCommands(mrpRotationConfig *configData)

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

Return

void

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

void computeTimeStep(mrpRotationConfig *configData, uint64_t callTime)

This function computes control update time.

Return

void

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

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

void computeMRPRotationReference(mrpRotationConfig *configData, double sigma_R0N[3], double omega_R0N_N[3], double domega_R0N_N[3], AttRefFswMsg *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.

Return

void

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

  • sigma_R0N[3]: The input reference attitude using MRPs

  • omega_R0N_N[3]: The input reference frame angular rate vector

  • domega_R0N_N[3]: The input reference frame angular acceleration vector

  • attRefOut: The output message copy

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

char attRefOutMsgName[MAX_STAT_MSG_LENGTH]

The name of the output message containing the Reference.

int32_t attRefOutMsgID

[-] ID for the outgoing Reference message

char attRefInMsgName[MAX_STAT_MSG_LENGTH]

The name of the guidance reference Input message.

int32_t attRefInMsgID

[-] ID for the incoming guidance reference message

char desiredAttInMsgName[MAX_STAT_MSG_LENGTH]

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

int32_t desiredAttInMsgID

[-] ID for the incoming EA set message

BSKLogger *bskLogger

BSK Logging.