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 Category | Description | Output Messages |
|---|---|---|
| Navigation | Estimates spacecraft position and attitude from sensor data | NavigationTranslationMessage, NavigationAttitudeMessage |
| Pointing | Computes the reference attitude for target alignment | AttitudeReferenceMessage, AttitudeErrorMessage |
| Controller | Computes control torque to achieve the desired attitude | CommandTorqueMessage |
| Mapping | Maps the command torque to actuator-specific commands | Actuator-specific messages |
Available Chains
| Chain | Category | Purpose |
|---|---|---|
| Simple | Navigation | Applies configurable errors to the true spacecraft state |
| Sun Estimation | Navigation | Estimates attitude using sun sensor measurements |
| Inertial | Pointing | Maintains alignment with an inertial reference frame |
| Sun | Pointing | Aligns a body axis toward the sun |
| Velocity | Pointing | Aligns a body axis along the orbital velocity vector |
| Nadir | Pointing | Aligns a body axis toward a celestial body center |
| Ground | Pointing | Aligns a body axis toward a ground location |
| Relative | Pointing | Aligns a body axis toward another spacecraft |
| Dock | Pointing | Aligns the spacecraft for docking approach |
| Idle | Controller | Produces zero torque commands |
| MRP | Controller | Modified Rodrigues Parameter feedback controller |
| Reaction Wheels | Mapping | Distributes torque commands across a reaction wheel array |
| Magnetic Torque Bars | Mapping | Maps torque commands to magnetic torquer dipoles |
| Thrusters | Mapping | Maps torque commands to thruster firings |
Mode Switching
Each chain category exposes a mode property that can be modified at runtime:
NavigationModePointingModeControllerModeMappingMode
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 Message | Source Chain | Contents |
|---|---|---|
Out_NavigationTranslationMsg | Navigation | Position , velocity , velocity accumulation |
Out_NavigationAttitudeMsg | Navigation | Attitude , angular rate , sun direction |
Out_AttitudeReferenceMsg | Pointing | Reference attitude , reference rate , rate derivative |
Out_AttitudeErrorMsg | Pointing | Attitude error , rate error |
Out_CommandTorqueMsg | Controller | Commanded 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.