Module: horizonOpNav

Executive Summary

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.

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.

Module I/O Messages

Msg Variable Name

Msg Type

Description

opNavOutMsg

OpNavMsgPayload

output navigation message for relative position

cameraConfigInMsg

CameraConfigMsgPayload

camera config input message

attInMsg

NavAttMsgPayload

attitude input message

limbInMsg

OpNavLimbMsgPayload

limb input message


Functions

void SelfInit_horizonOpNav(HorizonOpNavData *configData, int64_t moduleID)

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

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

  • moduleID – The module identification integer

Returns:

void

void Update_horizonOpNav(HorizonOpNavData *configData, uint64_t callTime, int64_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.

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

Returns:

void

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

This resets the module to original states.

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

Returns:

void

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

Parameters:
  • inMat – The input matrix to decompose

  • nRow – The number of rows

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

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

Returns:

void

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.

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

Returns:

void

struct HorizonOpNavData
#include <horizonOpNav.h>

The configuration structure for the horizon OpNav module.

Public Members

OpNavMsg_C opNavOutMsg

[-] output navigation message for relative position

CameraConfigMsg_C cameraConfigInMsg

camera config input message

NavAttMsg_C attInMsg

attitude input message

OpNavLimbMsg_C limbInMsg

limb input 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.

BSKLogger *bskLogger

BSK Logging.