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

navMeasPrimaryMsgName

opNavFswMsg

Input primary nav message

navMeasSecondaryMsgName

opNavFswMsg

Input secondary nav message

cameraConfigMsgName

cameraConfigMsg

Input camera message

attInMsgName

navAttIntMsg

Input attitude message

opNavOutMsgName

opNavFswMsg

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:

1
2
3
4
5
6
7
8
faults = faultDetection.FaultDetectionData()
faults.navMeasPrimaryMsgName = "primary_opnav"
faults.navMeasSecondaryMsgName = "secondary_opnav"
faults.cameraConfigMsgName = "camera_config_name"
faults.attInMsgName = "nav_att_name"
faults.opNavOutMsgName = "output_nav_msg"
faults.sigmaFault = 3
faults.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

Return

void

Parameters
  • configData: The configuration data associated with the model

  • moduleID: The module identification integer

void CrossInit_faultDetection(FaultDetectionData *configData, int64_t moduleID)

This method subscribes to the camera and attitude, and navigation messages

Return

void

Parameters
  • configData: The configuration data associated with the model

  • moduleID: The module identification integer

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

Return

void

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

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

This resets the module to original states.

Return

void

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

struct FaultDetectionData

Public Members

char opNavOutMsgName[MAX_STAT_MSG_LENGTH]

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

char attInMsgName[MAX_STAT_MSG_LENGTH]

The name of the attitude message.

char navMeasPrimaryMsgName[MAX_STAT_MSG_LENGTH]

The name of the first meas message.

char navMeasSecondaryMsgName[MAX_STAT_MSG_LENGTH]

The name of the second meas message.

char cameraConfigMsgName[MAX_STAT_MSG_LENGTH]

The name of the camera config 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.

int32_t stateOutMsgID

[-] The ID associated with the outgoing message

int32_t navMeas1MsgID

[-] The ID associated with the first incoming measurements

int32_t navMeas2MsgID

[-] The ID associated with the second incoming measurements

int32_t attInMsgID

[-] The ID associated with the incoming attitude message

int32_t cameraMsgID

[-] The ID associated with the second incoming measurements