Module: horizonOpNav

Converter that takes a limb message and camera information and outputs a relative position to the object. This algorithm was developed by J. Christian.

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


Functions

void SelfInit_horizonOpNav(HorizonOpNavData *configData, uint64_t moduleID)

This method transforms pixel, line, and diameter data into heading data for orbit determination or heading determination.

Return

void

Parameters
  • configData: The configuration data associated with the ephemeris model

  • moduleID: The module identification integer

void CrossInit_horizonOpNav(HorizonOpNavData *configData, uint64_t moduleID)

This method subscribes to the camera and circle messages

Return

void

Parameters
  • configData: The configuration data associated with the ephemeris model

  • moduleID: The module identification integer

void Update_horizonOpNav(HorizonOpNavData *configData, uint64_t callTime, uint64_t moduleID)

This method reads in the camera and circle messages and extracts navigation data from them. It outputs the heading (norm and direction) to the celestial body identified in the inertial frame. It provides the heading to the most robust circle identified by the image processing algorithm.

Return

void

Parameters
  • configData: The configuration data associated with the ephemeris model

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

  • moduleID: The module identification integer

void Reset_horizonOpNav(HorizonOpNavData *configData, uint64_t callTime, uint64_t moduleID)

This resets the module to original states.

Return

void

Parameters
  • configData: The configuration data associated with the ephemeris model

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

  • moduleID: The module identification integer

void QRDecomp(double *inMat, int32_t nRow, double *Q, double *R)

This performs a QR decomposition on a input matrix. In this method it’s used on the H matrix made up of the limb points

Return

void

Parameters
  • inMat: The input matrix to decompose

  • nRow: The number of rows

  • nRow: The number of columns

  • Q: The output Q matrix (numbLimb x 3)

  • R: The output R matrix (3 x 3)

void BackSub(double *R, double *inVec, int32_t nRow, double *n)

This performs a backsubstitution solve. This methods solves for n given Rn = V with R an upper triangular matrix.

Return

void

Parameters
  • R: The upper triangular matrix for the backsolve

  • inVec: Vector on the Right-Hand-Side of the Rn = V equation

  • nRow: The number of rows/columns

  • n: The solution vector

struct HorizonOpNavData
#include <horizonOpNav.h>

The configuration structure for the horizon OpNav module.

Public Members

char opNavOutMsgName[MAX_STAT_MSG_LENGTH]

[-] The name of the output navigation message for relative position

char cameraConfigMsgName[MAX_STAT_MSG_LENGTH]

The name of the camera config message.

char attInMsgName[MAX_STAT_MSG_LENGTH]

The name of the attitude message.

char limbInMsgName[MAX_STAT_MSG_LENGTH]

The name of the limb message.

int32_t planetTarget

The planet targeted (None = 0, Earth = 1, Mars = 2, Jupiter = 3 are allowed)

double noiseSF

A scale factor to control measurement noise.

int32_t stateOutMsgID

[-] The ID associated with the outgoing message

int32_t attInMsgID

[-] The ID associated with the outgoing message

int32_t limbInMsgID

[-] The ID associated with the incoming circle message

int32_t cameraConfigMsgID

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

BSKLogger *bskLogger

BSK Logging.