Module: opNavPoint

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.


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

Return

void

Parameters
  • configData: The configuration data associated with the opNav guidance

void CrossInit_opNavPoint(OpNavPointConfig *configData, int64_t moduleID)

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

Return

void

Parameters
  • configData: The configuration data associated with the opNav attitude guidance

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.

Return

void

Parameters
  • configData: The configuration data associated with the opNav attitude guidance

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

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.

Return

void

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

struct OpNavPointConfig
#include <opNavPoint.h>

module configuratino message definition

Public Members

char attGuidanceOutMsgName[MAX_STAT_MSG_LENGTH]

The name of the output message

char opnavDataInMsgName[MAX_STAT_MSG_LENGTH]

The name of the Input message

char imuInMsgName[MAX_STAT_MSG_LENGTH]

The name of the incoming IMU message

char cameraConfigMsgName[MAX_STAT_MSG_LENGTH]

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

int32_t attGuidanceOutMsgID

ID for the outgoing body estimate message

int32_t opnavDataInMsgId

ID for the incoming CSS sensor message

int32_t imuInMsgID

ID for the incoming IMU sensor message

int32_t cameraConfigMsgID

[-] The ID associated with the incoming camera config message

AttGuidFswMsg attGuidanceOutBuffer

The output data that we compute

BSKLogger *bskLogger

BSK Logging.