spacecraftReconfig#
Executive Summary#
The primary purpose of this module is to schedule burn timing and attitude for spacecraft formation reconfiguration. Basic idea is described in section 14.8.3 of Analytical Mechanics of Space Systems. Based on keplerian dynamics, formation reconfiguration from one initial orbital element difference to target orbital element difference is scheduled so that reconfiguration is completed in one orbit period.
In addition to formation control algorithm described in the textbook, some extensions and improvements are included in
this module.
First, this module assumes that deputy spacecraft has one-axis thrusters. Therefore, attitude control is also necessary
along with burn at certain period. When burn timing is approaching, target attitude is output as attRefOutMsg
.
Otherwise, and if attRefInMsg
(which is optional) is set, the reference message is output as attRefOutMsg
.
Second, if \(\delta a\) is not zero, drift of \(\delta M\) occurs. This module can take this drift into consideration
. Therefore, this module can achieve formation reconfiguration in orbital period.
Third, in general three-time burn is necessary for reconfiguration. Two of them occur at perigee and apogee each.
The other burn timing varies depending on necessary change of orbital element difference.
In some cases, this burn timing can be close to perigee or apogee. In these cases, two burns are integrated into one burn.
Parameter attControlTime is used to check whether this integration is necessary or not.
Message Connection Descriptions#
The following table lists all the module input and output messages. The module msg variable name 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 |
---|---|---|
chiefTransInMsg |
NavTransMsgPayload |
chief’s position and velocity input message |
deputyTransInMsg |
NavTransMsgPayload |
deputy’s position and velocity input message |
thrustConfigInMsg |
THRArrayConfigMsgPayload |
deputy’s thruster configuration input message |
attRefInMsg |
AttRefMsgPayload |
(optional) deputy’s reference attitude input message. If set, then the deputy will point along this reference attitude unless it must point the thrusters in a control direction. |
vehicleConfigInMsg |
VehicleConfigMsgPayload |
deputy’s vehicle configuration input message |
attRefOutMsg |
AttRefMsgPayload |
deputy’s target attitude output message |
onTimeOutMsg |
THRArrayOnTimeCmdMsgPayload |
The deputy’s thruster’s on time output message |
burnArrayInfoOutMsg |
ReconfigBurnArrayInfoMsgPayload |
deputy’s scheduled burns info output message |
Module Assumptions and Limitations#
This module uses classic orbital element, so this module cannot be applied to near-circular or near-equatorial orbits.
Too long or too short attControlTime may result in control error.
Impulsive maneuvers are approximated by steady thrust of a certain period.
User Guide#
This module requires the following variables to be set as parameters:
attControlTime
time [s] necessary to control one attitude to another attitudemu
gravitational constant for a central body in m^3/s^2targetClassicOED
desired orbital element difference.
For targetClassicOED
, normalized semi major axis must be used.
Class SpacecraftReconfig#
-
class SpacecraftReconfig : public SysModel#
Data structure for the MRP feedback attitude control routine.
Public Functions
-
void reset(uint64_t callTime) override#
This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values. The local copy of the message output buffer should be cleared.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
void updateState(uint64_t callTime) override#
Add a description of what this main Update() routine does for this module
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
based on burn schedule, this function creates a message of reference attitude and thruster on time
- Parameters:
chiefTransMsgBuffer – chief’s position and velocity
deputyTransMsgBuffer – deputy’s position and velocity
attRefInMsgBuffer – target attitude
thrustConfigMsgBuffer – thruster’s config information
vehicleConfigMsgBuffer – deputy’s vehicle config information
attRefOutMsgBuffer – target attitude
thrustOnMsgBuffer – thruster on time
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The Basilisk module identifier
- Returns:
void
-
void ScheduleDV(ClassicElements oe_c, ClassicElements oe_d, THRArrayConfigMsgPayload thrustConfigMsgBuffer, VehicleConfigMsgPayload vehicleConfigMsgBuffer)#
This function is used to sort an array of spacecraftReconfigConfigBurnInfo in ascending order.
- Parameters:
oe_c – chief’s orbital element
oe_d – deputy’s orbital element
thrustConfigMsgBuffer –
vehicleConfigMsgBuffer – deputy’s vehicle config information
- Returns:
void
Public Members
-
ReadFunctor<NavTransMsgPayload> chiefTransInMsg#
chief orbit input msg
-
ReadFunctor<NavTransMsgPayload> deputyTransInMsg#
deputy orbit input msg
-
ReadFunctor<THRArrayConfigMsgPayload> thrustConfigInMsg#
THR configuration input msg.
-
ReadFunctor<AttRefMsgPayload> attRefInMsg#
nominal attitude reference input msg
-
ReadFunctor<VehicleConfigMsgPayload> vehicleConfigInMsg#
deputy vehicle config msg
-
Message<AttRefMsgPayload> attRefOutMsg#
attitude reference output msg
-
Message<THRArrayOnTimeCmdMsgPayload> onTimeOutMsg#
THR on-time output msg.
-
Message<ReconfigBurnArrayInfoMsgPayload> burnArrayInfoOutMsg#
array of burn info output msg
-
double mu#
[m^3/s^2] gravity constant of planet being orbited
-
double attControlTime#
[s] attitude control margin time (time necessary to change sc’s attitude)
-
double targetClassicOED[6]#
target classic orital element difference, SMA should be normalized
-
double resetPeriod#
[s] burn scheduling reset period
-
double tCurrent#
[s] timer
-
uint64_t prevCallTime#
[ns]
-
uint8_t thrustOnFlag#
thrust control
-
int attRefInIsLinked#
flag if the attitude reference input message is linked
-
ReconfigBurnArrayInfoMsgPayload burnArrayInfoOutMsgBuffer#
msg buffer for burn array info
-
BSKLogger bskLogger = {}#
BSK Logging.
-
void reset(uint64_t callTime) override#