Python Module: stateMerge

Executive Summary

This module combines attitude information from one spacecraft state message with translational information from another spacecraft state message. The merged output is useful when a simulation has separate attitude and center-of-mass state sources, but a downstream navigation module expects a single SCStatesMsgPayload input.

Message Connection Descriptions

The following diagram and table list the module input and output messages.

StateMerge module input and output messages

Module I/O Messages

Msg Variable Name

Msg Type

Description

attStateInMsg

SCStatesMsgPayload

Input spacecraft state message used as the attitude source.

transStateInMsg

SCStatesMsgPayload

Input spacecraft state message used as the translation source.

stateOutMsg

SCStatesMsgPayload

Output spacecraft state message containing merged attitude and translation fields.

Module Assumptions and Limitations

The output attitude fields sigma_BN and omega_BN_B are copied from attStateInMsg. The output translation fields r_BN_N and v_BN_N are populated from transStateInMsg fields r_CN_N and v_CN_N.

User Guide

The module is imported through the standard simulation package:

from Basilisk.simulation import stateMerge

merge = stateMerge.StateMerge()
merge.ModelTag = "stateMerge"

The two state input messages are connected in the usual Basilisk manner:

merge.attStateInMsg.subscribeTo(attStateMsg)
merge.transStateInMsg.subscribeTo(transStateMsg)
simpleNavObject.scStateInMsg.subscribeTo(merge.stateOutMsg)

class stateMerge.StateMerge(*args, **kwargs)[source]

Bases: SysModel

Merge attitude and translation state sources into one spacecraft state.

Variables:
  • attStateInMsg – Attitude-centric spacecraft state input message.

  • transStateInMsg – Translation-centric spacecraft state input message.

  • stateOutMsg – Merged spacecraft state output message.

The merged output is intended for navigation modules that expect both attitude and translation information in a single SCStatesMsgPayload.