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.
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 availableFaultMode
= 1: is more restrictive: only the primary is used if both are available and the secondary is only used for a dissimilar checkFaultMode
= 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
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
Class FaultDetection#
-
class FaultDetection : public SysModel#
Module data structure.
Public Functions
-
void reset(uint64_t callTime) override#
This resets the module to original states.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
void updateState(uint64_t callTime) override#
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:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
Public Members
[-] output navigation message for relative position
-
ReadFunctor<NavAttMsgPayload> attInMsg#
attitude input message
first measurement input message
second measurement input message
-
ReadFunctor<CameraConfigMsgPayload> 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.
-
void reset(uint64_t callTime) override#