Skip to main content

Overview

The navigation aggregate module (navAggregate) combines up to MAX_AGG_NAV_MSG (10) attitude navigation messages and up to 10 translational navigation messages into a single NavAttMsg and NavTransMsg output. You select the source index for each navigation quantity independently, which lets you pick the best sensor for position, velocity, attitude, rate, and accumulated delta-v separately. The module is located at src/fswAlgorithms/transDetermination/navAggregate and imported as:
from Basilisk.fswAlgorithms import navAggregate
nav = navAggregate.NavAggregateData()

Configuration parameters

Source-selection indices

Each index selects which input slot (0-based) provides that quantity to the output message.
attIdx
uint32_t
Index of the input NavAttMsg to use for the inertial MRP attitude.
nav.attIdx = 0
rateIdx
uint32_t
Index of the input NavAttMsg to use for the angular-rate component.
nav.rateIdx = 0
posIdx
uint32_t
Index of the input NavTransMsg to use for inertial position.
nav.posIdx = 0
velIdx
uint32_t
Index of the input NavTransMsg to use for inertial velocity.
nav.velIdx = 0
dvIdx
uint32_t
Index of the input NavTransMsg to use for accumulated delta-v.
nav.dvIdx = 0
sunIdx
uint32_t
Index of the input NavAttMsg to use for the sun-pointing vector.
nav.sunIdx = 0
attTimeIdx
uint32_t
Index of the attitude message whose timestamp stamps the attitude output.
transTimeIdx
uint32_t
Index of the translational message whose timestamp stamps the translational output.

Message counts

attMsgCount
uint32_t
Total number of attitude navigation input messages connected (max 10).
transMsgCount
uint32_t
Total number of translational navigation input messages connected (max 10).

Input messages

attMsgs[i].navAttInMsg
NavAttMsg_C
Attitude navigation input slot i. Carries inertial attitude (MRP), body angular rate, and sun direction in body frame.
nav.attMsgs[0].navAttInMsg.subscribeTo(attNavMsg)
transMsgs[i].navTransInMsg
NavTransMsg_C
Translational navigation input slot i. Carries inertial position, velocity, and accumulated delta-v.
nav.transMsgs[0].navTransInMsg.subscribeTo(transNavMsg)

Output messages

navAttOutMsg
NavAttMsg_C
Blended attitude navigation output. Contains MRP attitude, angular rate, and sun vector assembled from the selected source slots.
navTransOutMsg
NavTransMsg_C
Blended translational navigation output. Contains position, velocity, and accumulated delta-v assembled from the selected source slots.

Full setup example

from Basilisk.fswAlgorithms import navAggregate
from Basilisk.utilities import SimulationBaseClass, macros

scSim = SimulationBaseClass.SimBaseClass()
scSim.CreateNewProcess("fswProc")
scSim.CreateNewTask("fswTask", macros.sec2nano(0.5))

nav = navAggregate.NavAggregateData()
nav.ModelTag      = "navAggregate"

# Connect one attitude and one translational nav message
nav.attMsgs[0].navAttInMsg.subscribeTo(attNavMsg)
nav.transMsgs[0].navTransInMsg.subscribeTo(transNavMsg)
nav.attMsgCount   = 1
nav.transMsgCount = 1

# Use slot 0 for all quantities
nav.attIdx  = 0
nav.rateIdx = 0
nav.posIdx  = 0
nav.velIdx  = 0
nav.dvIdx   = 0
nav.sunIdx  = 0
nav.attTimeIdx   = 0
nav.transTimeIdx = 0

scSim.AddModelToTask("fswTask", nav)

Build docs developers (and LLMs) love