Description

The Guidance Computer is a specialized Computer that manages the attitude determination and control software for a spacecraft. It constructs and maintains a software chain sequence consisting of navigation, pointing, controller, and mapping modules. The computer enables runtime switching between different guidance modes without manual software reconfiguration, automatically handling message routing between active chains.


Example Use Cases

  • Mode-Based Operations: Switch between sun-pointing for power generation and nadir-pointing for Earth observation during different mission phases.
  • Simplified GNC Integration: Add a guidance computer to a spacecraft and select chain types without manually constructing the full software stack.
  • Autonomous Guidance: Implement ground-commanded or autonomous mode transitions based on spacecraft state.

Module Implementation

Software Chain Architecture

The guidance computer creates a GuidanceSoftwareChainSequence containing four chain categories that execute sequentially to produce actuator commands from sensor data. Each category can contain multiple chain implementations, but only one chain per category is active at any time.

Chain CategoryDescriptionOutput Messages
NavigationEstimates spacecraft position and attitude from sensor dataNavigationTranslationMessage, NavigationAttitudeMessage
PointingComputes the reference attitude for target alignmentAttitudeReferenceMessage, AttitudeErrorMessage
ControllerComputes control torque to achieve the desired attitudeCommandTorqueMessage
MappingMaps the command torque to actuator-specific commandsActuator-specific messages

Available Chains

ChainCategoryPurpose
SimpleNavigationApplies configurable errors to the true spacecraft state
Sun EstimationNavigationEstimates attitude using sun sensor measurements
InertialPointingMaintains alignment with an inertial reference frame
SunPointingAligns a body axis toward the sun
VelocityPointingAligns a body axis along the orbital velocity vector
NadirPointingAligns a body axis toward a celestial body center
GroundPointingAligns a body axis toward a ground location
RelativePointingAligns a body axis toward another spacecraft
DockPointingAligns the spacecraft for docking approach
IdleControllerProduces zero torque commands
MRPControllerModified Rodrigues Parameter feedback controller
Reaction WheelsMappingDistributes torque commands across a reaction wheel array
Magnetic Torque BarsMappingMaps torque commands to magnetic torquer dipoles
ThrustersMappingMaps torque commands to thruster firings

Mode Switching

Each chain category exposes a mode property that can be modified at runtime:

  • NavigationMode
  • PointingMode
  • ControllerMode
  • MappingMode

When a mode property changes, the guidance computer disables the previous chain and enables the new chain. Message routing between adjacent chain categories is automatically updated so that output messages from the newly activated chain connect to the appropriate downstream consumers.

Message Routing

The guidance computer maintains consolidated output messages for each stage of the guidance pipeline. These messages are updated each simulation step by copying data from the currently active chain:

Output MessageSource ChainContents
Out_NavigationTranslationMsgNavigationPosition , velocity , velocity accumulation
Out_NavigationAttitudeMsgNavigationAttitude , angular rate , sun direction
Out_AttitudeReferenceMsgPointingReference attitude , reference rate , rate derivative
Out_AttitudeErrorMsgPointingAttitude error , rate error
Out_CommandTorqueMsgControllerCommanded torque in body frame

This architecture allows external modules to subscribe to the consolidated output messages without needing to track which specific chain is currently active.

Computer State Integration

The guidance software sequence lifecycle is tied to the computer state:

  • Running State: The sequence is enabled when the computer transitions to running, allowing all active chains to execute.
  • Shutdown State: The sequence is disabled when the computer shuts down, halting chain execution.

The LoadSoftware method initializes all chains in reverse order (mapping, controller, pointing, navigation) to ensure message connections are established correctly before execution begins.


Assumptions/Limitations

  • Only one chain per category can be active at any time.
  • All chains within a category must produce compatible output messages for downstream consumers.
  • Chain-specific parameters are configured through dedicated accessor methods on the guidance computer.
  • The computer must reach the running state before software chains will execute.
  • Mode changes take effect on the next simulation update, not instantaneously.