Module: opNavPoint
Executive Summary
This module implements a opNav point attitude guidance routine.
This algorithm is intended to be incredibly simple and robust: it finds the angle error between the camera boresight (or desired control axis in the camera frame) and the planet heading in the camera frame and brings them to zero. This is analoguous to sunSafePoint. The file
PDF Description
.
contains further information on this module’s function, how to run it, as well as testing.
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.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
attGuidanceOutMsg |
name of the output guidance message |
|
opnavDataInMsg |
name of the optical navigation input message |
|
imuInMsg |
name of the incoming IMU message |
|
cameraConfigInMsg |
name of the camera config message |
Functions
-
void SelfInit_opNavPoint(OpNavPointConfig *configData, int64_t moduleID)
This method initializes the configData for the opNav attitude guidance. It checks to ensure that the inputs are sane and then creates the output message
- Parameters:
configData – The configuration data associated with the opNav guidance
moduleID – The Basilisk module identifier
- Returns:
void
-
void Update_opNavPoint(OpNavPointConfig *configData, uint64_t callTime, int64_t moduleID)
This method takes the estimated camera-observed target vector and computes the current attitude/attitude rate errors to pass on to control.
- Parameters:
configData – The configuration data associated with the opNav attitude guidance
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The Basilisk module identifier
- Returns:
void
-
void Reset_opNavPoint(OpNavPointConfig *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.
- Parameters:
configData – The configuration data associated with the guidance module
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The Basilisk module identifier
- Returns:
void
-
struct OpNavPointConfig
- #include <opNavPoint.h>
module configuration message definition
Public Members
-
AttGuidMsg_C attGuidanceOutMsg
The name of the output message
-
OpNavMsg_C opnavDataInMsg
The name of the Input message
-
NavAttMsg_C imuInMsg
The name of the incoming IMU message
-
CameraConfigMsg_C cameraConfigInMsg
The name of the camera config message.
-
double minUnitMag
— The minimally acceptable norm of opNav body vector
-
double opNavAngleErr
— rad The current error between cmd and obs opNav angle
-
double smallAngle
— rad An angle value that specifies what is near 0 or 180 degrees
-
double eHat180_B[3]
— Eigen axis to use if commanded axis is 180 from opNav axis
-
double opNavMnvrVec[3]
— The eigen axis that we want to rotate on to see target
-
double lastTime
— Last time a measurement came in to integrate pointing
-
double timeOut
— If no images were seen in this much time, stop using past values
-
double alignAxis_C[3]
— Desired camera vector to point at target
-
double currentHeading_N[3]
— Previous heading command in intertial Frame
-
double omega_RN_B[3]
— Desired body rate vector if no opNav direction is available
-
double opNavAxisSpinRate
— r/s Desired constant spin rate about opNav vector
-
AttGuidMsgPayload attGuidanceOutBuffer
— The output data that we compute
-
BSKLogger *bskLogger
BSK Logging.
-
AttGuidMsg_C attGuidanceOutMsg