Class in Zendir.Classes | Inherits from Software

Declaration

class ROEFormationControllerSoftware;

Description

ROE-based formation flying flight control software module. This module computes the required translational accelerations for a chaser satellite to follow a desired relative trajectory around a target (chief) spacecraft. The trajectory is defined in the Local-Vertical/Local-Horizontal (LVLH) frame and is controlled via feedback on position and velocity errors using a Proportional-Derivative (PD) controller.

The module supports multiple formation flying modes:

  • Perch: Fixed LVLH offset with zero relative velocity
  • Stationary Ellipse: Closed elliptical orbit with no drift
  • Walking Ellipse: Elliptical orbit with along-track drift
  • Teardrop: Asymmetric approach-and-retreat trajectory

Properties

DeclaredDescription
AccelerationCommand_LVLHCurrent acceleration command in LVLH frame [m/s²]. This is a read-onlyproperty that reflects the output of the PD controller.
AlignmentGateAngleMating-axis alignment [deg] that must be met before final closure whenis true.
AlignmentGateRollClocking alignment [deg] that must be met before final closure.Default 180 accepts any roll.
ApproachAccelerationAcceleration/deceleration magnitude [m/s²] for the trapezoidal profile.Only used when MaxApproachSpeed is positive. Defaults to 0.01 if zero.
ApproachPhaseCurrent phase of the trapezoidal approach profile.
ApproachSegmentStartTimeSimulation time [s] when the bar approach segment started, or -1 if not yet started.
BarApproachDurationBar maneuver approach duration [s]. Time from start of approach to final distance.Used for R- or V- BarApproach mode when MaxApproachSpeed is zero (Hermite profile).When MaxApproachSpeed is positive, duration is computed from the trapezoid profile.
BarFinalDistanceFinal approach distance on the R-bar or V-bar in LVLH [m] away from the target. Used for RBarApproach mode;
BarHoldDistanceHold approach distance on the R-bar or V-bar in LVLH [m] away from the target. Used for RBarApproach or VBarApproach mode;
CorridorRadiusMaximum lateral offset [m] from the target port axis allowed before final closure.
DockAfterPerchWhen true in Perch mode, after reaching the PerchOffset and satisfying holdtolerances (and optional PerchHoldDwell), a second approach segment is startedfrom PerchOffset to the origin (0,0,0) for final docking capture.
ForceDeadbandForce deadband [N]. When positive, sets ForceRequest_N to zero if thecommanded force magnitude is below this threshold. Used to quiet thrustersduring coast and hold phases. Zero disables deadband (legacy behavior).
HoldAxisPositionTolerancePosition tolerance [m] for Y and Z (R-bar) or X and Z (V-bar) in LVLH. The approach segment starts only when the chaser is on the bar axis for the mode.
HoldPhaseIntegralMultiplierDuring R-bar or V-bar hold (before approach starts), the integral gain on the axis being nulled(Y for R-bar, X for V-bar) is multiplied by this factor. Values > 1 help the controller achievetighter axis position/velocity tolerances so approach can start with smaller RBarAxisPositionToleranceor VBarAxisPositionTolerance. Has no effect after approach start or in other modes.
HoldVelocityToleranceVelocity magnitude tolerance [m/s]. The approach segment starts only when relative velocity magnitude is within this tolerance (null relative velocity).
In_BodyMassMsgVehicle mass properties message from the chaser spacecraft body.Used to convert acceleration commands to force commands (F = m * a).
In_ChaserEphemerisMsgChaser spacecraft ephemeris message containing position and velocityin the inertial frame. This is the state of the spacecraft beingcontrolled (the chaser).
In_DockingAdapterMsgChaser docking adapter telemetry used for port-relative targeting and alignment gates.
In_FormationFlyingCommandMsgOptional command message for external mode requests (e.g. RPO executive retreat).
In_PlanetStateMsgPlanet state message containing gravitational parameter and otherplanetary constants needed for orbital calculations.
In_SpacecraftStateMsgSpacecraft state message containing attitude (Sigma_BN) for N→B rotation.Auto-resolved from parent spacecraft if not explicitly set.Used to compute body-frame force request for thruster-based actuators.
In_TargetDockingAdapterMsgTarget docking adapter telemetry used for port-relative targeting.
In_TargetEphemerisMsgTarget spacecraft ephemeris message containing position and velocityin the inertial frame. This is the state of the reference spacecraft(the target/chief) that the chaser is maintaining formation with.
InitialPhaseInitial phase angle on the ellipse for ellipse trajectories [rad].Determines the starting point on the relative orbit.
IntegralLimitAnti-windup limit for position error integral [m·s]. Integral is clamped to ±IntegralLimit per component.Higher values allow the integral to correct larger steady-state errors (e.g. along-track on V-bar hold).
IsCoastingReturns true if currently in a coast phase (zero acceleration reference).
KdDerivative gain vector for the PD controller. Each componentcorresponds to the radial (x), along-track (y), and cross-track (z)axes in the LVLH frame. Units: [1/s] = [Hz] (acceleration per velocity).Default values are tuned for stable formation flying control:- Base natural frequency: 20x orbital rate (~0.0216 rad/s for 7000 km orbit)- Along-track (y) uses 2x multiplier to counteract orbital drift- Critical damping (ζ=1.0) for optimal response
KiIntegral gain vector (optional). Use to eliminate steady-state position error;Ki.Y (e.g. 2.5e-4) helps R-bar and V-bar holds reach the desired off-axis position.Use only on axes that need nulling (e.g. Y for R-bar hold); integral on the approachaxis can wind up during the approach segment. Units: [1/s³].
KpProportional gain vector for the PD controller. Each componentcorresponds to the radial (x), along-track (y), and cross-track (z)axes in the LVLH frame. Units: [1/s²] = [Hz/s] (acceleration per distance).Default values are tuned for stable formation flying control:- Base natural frequency: 20x orbital rate (~0.0216 rad/s for 7000 km orbit)- Along-track (y) uses 2x multiplier to counteract orbital drift- Critical damping (ζ=1.0) for optimal response
MaxApproachSpeedMaximum approach speed [m/s]. When positive, a trapezoidal velocity profile(accelerate-coast-brake) is used instead of Hermite. Duration is computedfrom the profile. When zero or negative, legacy Hermite profile is used.
MaxCrossTrackDistanceMaximum cross-track distance for ellipse trajectories (z-axis amplitudein LVLH frame). Used for Stationary Ellipse, Walking Ellipse, andTeardrop modes.
MaxRadialDistanceMaximum radial distance for ellipse trajectories (x-axis amplitudein LVLH frame). Used for Stationary Ellipse, Walking Ellipse, andTeardrop modes.
ModeCurrent formation flying operating mode. This determines whichreference trajectory generator is active.
Out_CommandForceMsgCommand force message output containing the force commandin both inertial (N) and body (B) frames. ForceRequest_N is transformedto inertial frame from LVLH. ForceRequest_B is rotated from N usingthe spacecraft attitude DCM for thruster-based actuators.
Out_FormationFlyingMsgFormation flying status message containing current relative state,reference trajectory, errors, and commanded accelerations.
PerchHoldDwellDwell time [s] at the perch position before starting the second approachto the origin when DockAfterPerch is true. Prevents starting the dock approachon a single-tick position flicker. Zero means no dwell.
PerchOffsetPerch offset position in LVLH frame [m]. Used for Perch mode todefine the fixed position where the chaser should maintain station.
PortRelativeApproachWhen true, the perch target is computed from the target docking adapter axisrather than a static LVLH .
PortStandoffDistanceDistance [m] to hold along the target port axis before final closure.Used when is true and not yet in dock approach.
PositionError_LVLHCurrent position error in LVLH frame [m]. This is a read-onlyproperty computed as reference - current position.
PublishedApproachSegmentStartTimeBar approach segment start time published on .
PublishedBarApproachDurationBar approach duration published on .
RelativePosition_LVLHCurrent relative position in LVLH frame [m]. This is a read-onlyproperty that reflects the computed relative state.
RelativeVelocity_LVLHCurrent relative velocity in LVLH frame [m/s]. This is a read-onlyproperty that reflects the computed relative state.
SemiMajorAxisDifferenceSemi-major axis difference (delta-a) for walking ellipse and teardroptrajectories. This creates the along-track drift. Set to zero forstationary ellipse.
UseHCWFeedforwardWhen true, adds full Clohessy-Wiltshire feedforward at the reference state:a_ff = (-3n²x_ref - 2n·vy_ref, +2n·vx_ref, +n²z_ref) so the controller cancelsnatural drift and coupling and can reach/hold the R-bar and V-bar with tight tolerance.
VelocityError_LVLHCurrent velocity error in LVLH frame [m/s]. This is a read-onlyproperty computed as reference - current velocity.
InheritedDescription
IsEnabledIs true if the object is currently enabled.
NameThe display name or tag of this object.
ParentThe currently attached parent object (if any).

Methods

InheritedDescription
DisableDisable the software componentDerived classes should clear any output messages
EnableEnable the software component
FindParentWithIDReturns an attached parent that satisfies the specified ID.
FindParentWithTypeReturns an attached parent that satisfies the specified type.
FindRootWithIDReturns a root object that satisfies the specified ID.
FindRootWithTypeReturns a root object that satisfies the specified type.