Module: simpleDeadband

Executive Summary

This method applies a two-level deadbanding logic (according to the current average simple compared with the set threshold) and decides whether control should be switched ON/OFF or not.

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

attGuidOutMsg

AttGuidMsgPayload

attitude guidance output message

guidInMsg

AttGuidMsgPayload

incoming attitude guidance message


Functions

void SelfInit_simpleDeadband(simpleDeadbandConfig *configData, int64_t moduleID)

This method initializes the configData for this module. It checks to ensure that the inputs are sane and then creates the output message

Parameters:
  • configData – The configuration data associated with this module

  • moduleID – The ID associated with the configData

Returns:

void

void Update_simpleDeadband(simpleDeadbandConfig *configData, uint64_t callTime, int64_t moduleID)

This method parses the input data, checks if the deadband needs to be applied and outputs the guidance command with simples either zeroed (control OFF) or left unchanged (control ON)

Parameters:
  • configData – The configuration data associated with the attitude tracking simple module

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

  • moduleID – The ID associated with the configData

Returns:

void

void Reset_simpleDeadband(simpleDeadbandConfig *configData, uint64_t callTime, int64_t moduleID)

This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values.

Parameters:
  • configData – The configuration data associated with the MRP steering control

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

  • moduleID – The ID associated with the configData

Returns:

void

void applyDBLogic_simpleDeadband(simpleDeadbandConfig *configData)

This method applies a two-level deadbanding logic (according to the current average simple compared with the set threshold) and decides whether control should be switched ON/OFF or not.

Parameters:

configData – The configuration data associated with the attitude tracking simple module

Returns:

void

struct simpleDeadbandConfig
#include <simpleDeadband.h>

Top level structure for the sub-module routines.

Public Members

double innerAttThresh

inner limit for sigma (attitude) errors

double outerAttThresh

outer limit for sigma (attitude) errors

double innerRateThresh

inner limit for omega (rate) errors

double outerRateThresh

outer limit for omega (rate) errors

uint32_t wasControlOff

boolean variable to keep track of the last Control status (ON/OFF)

double attError

current scalar attitude error

double rateError

current scalar rate error

AttGuidMsg_C attGuidOutMsg

The name of the output message

AttGuidMsg_C guidInMsg

The name of the guidance reference Input message

AttGuidMsgPayload attGuidOut

copy of the output message

BSKLogger *bskLogger

BSK Logging.