Module: faultDetection

Executive Summary

This module is a fault detection module for optical navigation. It uses a scenario in which two image processing methods are implemented, and then can be compared in different ways.

Module Assumptions and Limitations

There are no direct assumptions in this module. The performance and limitations are tied to the two methods that are input.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg variable name 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

navMeasPrimaryInMsg

OpNavMsgPayload

Input primary nav message

navMeasSecondaryInMsg

OpNavMsgPayload

Input secondary nav message

cameraConfigInMsg

CameraConfigMsgPayload

Input camera message

attInMsg

NavAttMsgPayload

Input attitude message

opNavOutMsg

OpNavMsgPayload

Ouput navigation message given the two inputs

Detailed Module Description

The document provides details that are reminded here: Three fault modes are possible:

  • FaultMode = 0: is the less restrictive: it uses either of the measurements available and merges them if they are both available

  • FaultMode = 1: is more restrictive: only the primary is used if both are available and the secondary is only used for a dissimilar check

  • FaultMode = 2: is most restrictive: the primary is not used in the absence of the secondary measurement

Equations

The important merging equations for the state and covariance of the two inputs are given here

\[P = (P1^{-1} + P2^{-1})^{-1} x = P (P1^{-1}x1 + P2^{-1}x2)\]

The rest of the module is logic driven as explained in the doxygen documentation.

User Guide

An example setup is provided here:

1faults = faultDetection.FaultDetectionData()
2faults.sigmaFault = 3
3faults.faultMode = 1

The sigmaFault parameter is the multiplier on the covariances that needs to be passed for the faults to be triggered


Functions

void SelfInit_faultDetection(FaultDetectionData *configData, int64_t moduleID)

Self-init for the fault detection module

Parameters
  • configData – The configuration data associated with the model

  • moduleID – The module identification integer

Returns

void

void Update_faultDetection(FaultDetectionData *configData, uint64_t callTime, int64_t moduleID)

This method reads in the two compared navigation messages and outputs the best measurement possible. It compares the faults of each and uses camera and attitude knowledge to output the information in all necessary frames. Three fault modes are possible. FaultMode = 0 is the less restricitve: it uses either of the measurements availabe and merges them if they are both available FaultMode = 1 is more restricitve: only the primary is used if both are available and the secondary is only used for a dissimilar check FaultMode = 2 is most restricive: the primary is not used in the abscence of the secondary measurement

Parameters
  • configData – The configuration data associated with the model

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

  • moduleID – The module identification integer

Returns

void

void Reset_faultDetection(FaultDetectionData *configData, uint64_t callTime, int64_t moduleID)

This resets the module to original states.

Parameters
  • configData – The configuration data associated with the model

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

  • moduleID – The module identification integer

Returns

void

struct FaultDetectionData
#include <faultDetection.h>

Module data structure.

Public Members

OpNavMsg_C opNavOutMsg

[-] output navigation message for relative position

NavAttMsg_C attInMsg

attitude input message

OpNavMsg_C navMeasPrimaryInMsg

first measurement input message

OpNavMsg_C navMeasSecondaryInMsg

second measurement input message

CameraConfigMsg_C cameraConfigInMsg

camera config inut message

int32_t planetTarget

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

double faultMode

What fault mode to go in: 0 is dissimilar (use the primary measurement and compare with secondary), 1 merges the measurements if they are both valid and similar.

double sigmaFault

What is the sigma multiplication factor when comparing measurements.

BSKLogger *bskLogger

BSK Logging.