dvExecuteGuidance#
Executive Summary#
This module compares the magnitude of the accumulated Delta-V from the NavTransMsgPayload message with the desired Delta-V magnitude of the burn maneuver from the DvBurnCmdMsgPayload message. If the burn start time as specified in the DvBurnCmdMsgPayload message has not been reached yet, the module prevents the thrusters from firing. The module assumes that the thrusters have been turned on by another module (such as thrFiringRemainder, for example), and turns the thrusters off once the desired Delta-V has been accumulated. A minimum and maximum time can also be specified. The thrusters are only turned off once the desired Delta-V has been accumulated and the burn time is greater than the specified minimum time (defaults to 0.0 seconds), unless the burn time exceeds the maximum time. If the burn time is greater than the maximum time, the thrusters are turned off regardless of the accumulated Delta-V. If nomaximum time is specified, the burn is only stopped using the accumulated Delta-V criteria. The user should specify the flight software time step (control period) using the defaultControlPeriod parameter. Otherwise the burn time is not accurately computed.
If the same set of DV thrusters is also used for attitude control (with the thrForceMapping, thrFiringRemainder or thrFiringSchmitt modules and the baseThrustState in the corresponding modules set to 1), the thrusters are turned on by thrFiringRemainder or thrFiringSchmitt at the beginning of the burn, and the dvExecuteGuidance module turns off the thrusters at the end of the burn. To ensure that the THRArrayOnTimeCmdMsgPayload output message of the dvExecuteGuidance module turns off the thrusters, this module should be updated more frequently than thrFiringRemainder or thrFiringSchmitt and with a lower (!) task priority.
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.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
navDataInMsg |
NavTransMsgPayload |
navigation input message that includes dv accumulation info |
burnDataInMsg |
DvBurnCmdMsgPayload |
commanded burn input message |
thrCmdOutMsg |
THRArrayOnTimeCmdMsgPayload |
thruster command on time output message |
burnExecOutMsg |
DvExecutionDataMsgPayload |
burn execution output message |
User Guide#
The module is first initialized as follows:
moduleConfig = dvExecuteGuidance.dvExecuteGuidanceConfig()
moduleWrap = unitTestSim.setModelDataWrap(moduleConfig)
moduleWrap.modelTag = "dvExecuteGuidance"
moduleConfig.defaultControlPeriod = 0.5
moduleConfig.minTime = 2.0
moduleConfig.maxTime = 10.0
unitTestSim.AddModelToTask(unitTaskName, moduleWrap, moduleConfig)
The input messages are then connected:
moduleConfig.navDataInMsg.subscribeTo(navTransMsg)
moduleConfig.burnDataInMsg.subscribeTo(dvBurnCmdMsg)
Class DvExecuteGuidance#
-
class DvExecuteGuidance : public SysModel#
Top level structure for the execution of a Delta-V maneuver.
Public Functions
-
void reset(uint64_t callTime) override#
This resets the module.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
void updateState(uint64_t callTime) override#
This method takes its own internal variables and creates an output attitude command to use for burn execution. It also flags whether the burn should be happening or not.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
Public Members
[-] navigation input message that includes dv accumulation info
-
ReadFunctor<DvBurnCmdMsgPayload> burnDataInMsg#
[-] commanded burn input message
-
Message<THRArrayOnTimeCmdMsgPayload> thrCmdOutMsg#
[-] thruster command on time output message
-
Message<DvExecutionDataMsgPayload> burnExecOutMsg#
[-] burn execution output message
-
double dvInit[3]#
[m/s] DV reading off the accelerometers at burn start
-
uint32_t burnExecuting#
[-] Flag indicating whether the burn is in progress or not
-
uint32_t burnComplete#
[-] Flag indicating that burn has completed successfully
-
double burnTime#
[s] Burn time to be used for telemetry
-
uint64_t prevCallTime#
[-] Call time register for computing total burn time
-
double minTime#
[s] Minimum count of burn time allowed to elapse
-
double maxTime#
[s] Maximum count of burn time allowed to elapse
-
double defaultControlPeriod#
[s] Default control period used for first call
-
BSKLogger bskLogger = {}#
BSK Logging.
-
void reset(uint64_t callTime) override#