Module: PRV_Steering

This module implements a PRV steering attitude control routine.

The module PDF Description contains further information on this module’s function, how to run it, as well as testing.


Functions

void SelfInit_PRV_Steering(PRV_SteeringConfig *configData, int64_t moduleID)

This method initializes the configData for this module. It checks to ensure that the inputs are sane and then creates the output message

Return

void

Parameters
  • configData: The configuration data associated with this module

void CrossInit_PRV_Steering(PRV_SteeringConfig *configData, int64_t moduleID)

This method performs the second stage of initialization for this module. It’s primary function is to link the input messages that were created elsewhere.

Return

void

Parameters
  • configData: The configuration data associated with this module

void Update_PRV_Steering(PRV_SteeringConfig *configData, uint64_t callTime, int64_t moduleID)

This method takes the attitude and rate errors relative to the Reference frame, as well as the reference frame angular rates and acceleration, and computes the required control torque Lr.

Return

void

Parameters
  • configData: The configuration data associated with the MRP Steering attitude control

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

void Reset_PRV_Steering(PRV_SteeringConfig *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.

Return

void

Parameters
  • configData: The configuration data associated with the MRP steering control

void PRVSteeringLaw(PRV_SteeringConfig *configData, double sigma_BR[3], double omega_ast[3], double omega_ast_p[3])

This method computes the PRV Steering law. A commanded body rate is returned given the PRV attitude error measure of the body relative to a reference frame. The function returns the commanded body rate, as well as the body frame derivative of this rate command.

Return

void

Parameters
  • configData: The configuration data associated with this module

  • sigma_BR: MRP attitude error of B relative to R

  • omega_ast: Commanded body rates

  • omega_ast_p: Body frame derivative of the commanded body rates

struct PRV_SteeringConfig
#include <PRV_Steering.h>

module configuration message definition

Public Members

double K1

[rad/sec] Proportional gain applied to principal rotation angle error

double K3

[rad/sec] Cubic gain applied to principal rotation angle error in steering saturation function

double omega_max

[rad/sec] Maximum rate command of steering control

char outputDataName[MAX_STAT_MSG_LENGTH]

The name of the control output message

int32_t outputMsgID

[-] ID for the control output message

char inputGuidName[MAX_STAT_MSG_LENGTH]

The name of the input guidance message

int32_t inputGuidID

[-] ID for the input guidance message

RateCmdFswMsg outMsg

copy of output message

BSKLogger *bskLogger

BSK Logging.