ADCS.helpers.animations.godot.overlays module

Overlay descriptors for the 3-D viewer: vectors, axes, sensor cones, tracks, target lines and labels drawn over the scene.

Overlays are declared here and stored in the vizlog’s scene.json ("overlays"), so a recorded log and a live stream carry the same set. The viewer only draws what is described; it never decides what to show. Build them with the classes below or take default_overlays().

from ADCS.helpers.animations.godot import overlays as ov
ADCS.helpers.animations.godot.results_to_vizlog(results, "run.vizlog", overlays=[
    ov.Arrow("tau_act_body", label="control torque", color="#ff8c1a"),
    ov.Arrow("@sun", label="Sun", scale="fixed_px", px=90, color="#ffe066"),
    ov.SensorCone("startracker0"),
    ov.OrbitTrack(past_s=5400, future_s=1800),
])

Vector sources: a channel name (3 values per row; its frame in the manifest says BODY or GCRS) or a derived vector: @sun (spacecraft to Sun), @nadir, @velocity, @boresight:<name> (a named body boresight).

Arrow lengths: physical (units_per_m channel units per metre), fixed_px (constant on screen) or log (px_min at ref, growing by px_per_decade per factor of 10, up to px_max).

class ADCS.helpers.animations.godot.overlays.Arrow(source, label=None, color='#ff8c1a', scale='log', ref=None, px_min=24.0, px_max=180.0, px_per_decade=40.0, px=90.0, units_per_m=None, width_px=3.0, on_top=True, visible=True, id=None)[source]

Bases: _Overlay

A vector drawn from the spacecraft’s centre of mass.

Parameters:
  • source (str)

  • label (str | None)

  • color (str)

  • scale (str)

  • ref (float | None)

  • px_min (float)

  • px_max (float)

  • px_per_decade (float)

  • px (float)

  • units_per_m (float | None)

  • width_px (float)

  • on_top (bool)

  • visible (bool)

  • id (str | None)

TYPE = 'arrow'
color: str = '#ff8c1a'
id: str | None = None
label: str | None = None
on_top: bool = True
px: float = 90.0
px_max: float = 180.0
px_min: float = 24.0
px_per_decade: float = 40.0
ref: float | None = None
scale: str = 'log'
source: str
units_per_m: float | None = None
visible: bool = True
width_px: float = 3.0
class ADCS.helpers.animations.godot.overlays.GroundTrack(track='ground', past_s=5400.0, future_s=1800.0, color='#ffd27f', width_px=2.0, samples=600, visible=True, id=None)[source]

Bases: _Overlay

The sub-satellite path on the Earth’s surface (moves with the Earth).

Parameters:
  • track (str)

  • past_s (float)

  • future_s (float)

  • color (str)

  • width_px (float)

  • samples (int)

  • visible (bool)

  • id (str | None)

TYPE = 'polyline'
color: str = '#ffd27f'
future_s: float = 1800.0
id: str | None = None
past_s: float = 5400.0
samples: int = 600
track: str = 'ground'
visible: bool = True
width_px: float = 2.0
class ADCS.helpers.animations.godot.overlays.Label(text='', offset_px=<factory>, color='#ffffff', visible=True, id=None)[source]

Bases: _Overlay

Text pinned to the spacecraft.

Parameters:
  • text (str)

  • offset_px (Sequence[float])

  • color (str)

  • visible (bool)

  • id (str | None)

TYPE = 'label'
color: str = '#ffffff'
id: str | None = None
offset_px: Sequence[float]
text: str = ''
visible: bool = True
class ADCS.helpers.animations.godot.overlays.OrbitTrack(track='orbit', past_s=5400.0, future_s=1800.0, color='#9fd3ff', width_px=2.0, samples=600, visible=True, id=None)[source]

Bases: _Overlay

The spacecraft’s path in GCRS around the current time.

Parameters:
  • track (str)

  • past_s (float)

  • future_s (float)

  • color (str)

  • width_px (float)

  • samples (int)

  • visible (bool)

  • id (str | None)

TYPE = 'polyline'
color: str = '#9fd3ff'
future_s: float = 1800.0
id: str | None = None
past_s: float = 5400.0
samples: int = 600
track: str = 'orbit'
visible: bool = True
width_px: float = 2.0
class ADCS.helpers.animations.godot.overlays.SensorCone(sensor='', length_px=140.0, color='#66ccff', opacity=0.25, visible=True, id=None)[source]

Bases: _Overlay

A sensor’s field of view (half-angle and boresight from scene.json).

Parameters:
  • sensor (str)

  • length_px (float)

  • color (str)

  • opacity (float)

  • visible (bool)

  • id (str | None)

TYPE = 'cone'
color: str = '#66ccff'
id: str | None = None
length_px: float = 140.0
opacity: float = 0.25
sensor: str = ''
visible: bool = True
class ADCS.helpers.animations.godot.overlays.TargetLine(color='#7CFC00', length_px=220.0, width_px=2.0, visible=True, id=None)[source]

Bases: _Overlay

From the spacecraft toward the active pointing target (target_kind/target channels).

Parameters:
  • color (str)

  • length_px (float)

  • width_px (float)

  • visible (bool)

  • id (str | None)

TYPE = 'target_line'
color: str = '#7CFC00'
id: str | None = None
length_px: float = 220.0
visible: bool = True
width_px: float = 2.0
class ADCS.helpers.animations.godot.overlays.Triad(frame='body', px=70.0, on_top=True, visible=True, id=None)[source]

Bases: _Overlay

Three axes (X red, Y green, Z blue) at the spacecraft: body, LVLH or GCRS.

Parameters:
  • frame (str)

  • px (float)

  • on_top (bool)

  • visible (bool)

  • id (str | None)

TYPE = 'triad'
frame: str = 'body'
id: str | None = None
on_top: bool = True
px: float = 70.0
visible: bool = True
ADCS.helpers.animations.godot.overlays.default_overlays(channels, scene, ref=None)[source]

A sensible set for what the log contains: goal and boresight directions start visible, while axes, other vectors, sensor cones and tracks are available to enable from the viewer’s layer controls.

Parameters:
  • ref (Dict[str, float] | None) – Optional {channel: magnitude} for log-scaled arrows (e.g. the 10th percentile of each channel’s norm), so small values stay visible.

  • channels (Dict[str, Any])

  • scene (Dict[str, Any])

Return type:

List[_Overlay]

ADCS.helpers.animations.godot.overlays.validate_overlays(overlays, channels, scene)[source]

Turn overlays (objects or dicts) into JSON descriptors and check them against the log’s channels and scene.

Parameters:
  • channels (Dict[str, Any]) – {name: {"width", "frame", ...}} of the log.

  • overlays (Iterable[Any])

  • scene (Dict[str, Any])

Raises:

ValueError – On an unknown type, source, frame, scale or sensor.

Return type:

List[Dict[str, Any]]