ADCS.helpers.animations.godot.timeline module

Timeline content for the 3-D viewer: bookmarks (named moments) and ground sites (whose passes the viewer shows as spans on the timeline).

Both are stored in the vizlog’s scene.json ("timeline"), so a recorded log and a live stream carry the same set.

from ADCS.helpers.animations.godot import timeline as tl
ADCS.helpers.animations.godot.results_to_vizlog(results, "run.vizlog",
    bookmarks=[tl.Bookmark(t_s=840.0, label="detumble done"),
               tl.Bookmark(utc="2026-03-14T12:41:07Z", label="first contact")],
    sites=[tl.GroundSite("Boston", 42.36, -71.06, min_elev_deg=10.0)])

simulate() adds a site for every Coordinate_Goal it was given. ground_passes() computes the passes in Python (the viewer computes the same spans itself, so they also work live).

A pass is the time the spacecraft spends above the site’s min_elev_deg (geodetic elevation, WGS84, no refraction or terrain).

class ADCS.helpers.animations.godot.timeline.Bookmark(t_s=None, utc=None, label='', note='', color='#ffd166')[source]

Bases: object

A named moment, given as seconds since the log’s epoch (t_s) or a UTC time (utc).

Parameters:
  • t_s (float | None)

  • utc (str | None)

  • label (str)

  • note (str)

  • color (str)

color: str = '#ffd166'
label: str = ''
note: str = ''
t_s: float | None = None
utc: str | None = None
class ADCS.helpers.animations.godot.timeline.GroundSite(name, lat_deg, lon_deg, alt_m=0.0, min_elev_deg=10.0, color='#7cc6ff')[source]

Bases: object

A place on the Earth (geodetic WGS84); the timeline shows when the spacecraft is above min_elev_deg.

Parameters:
  • name (str)

  • lat_deg (float)

  • lon_deg (float)

  • alt_m (float)

  • min_elev_deg (float)

  • color (str)

alt_m: float = 0.0
color: str = '#7cc6ff'
lat_deg: float
lon_deg: float
min_elev_deg: float = 10.0
name: str
class ADCS.helpers.animations.godot.timeline.Pass(t_rise, t_set, t_max, max_elev_deg, partial)[source]

Bases: NamedTuple

One pass over a site [s since the epoch]. partial: the log starts or ends inside it.

Parameters:
  • t_rise (float)

  • t_set (float)

  • t_max (float)

  • max_elev_deg (float)

  • partial (bool)

max_elev_deg: float

Alias for field number 3

partial: bool

Alias for field number 4

t_max: float

Alias for field number 2

t_rise: float

Alias for field number 0

t_set: float

Alias for field number 1

ADCS.helpers.animations.godot.timeline.elevation_deg(r_gcrs_km, q_itrs_gcrs, site)[source]

Elevation of the spacecraft seen from a site [deg], from the vizlog’s r_sc and q_itrs_gcrs.

Parameters:
  • r_gcrs_km (ndarray)

  • q_itrs_gcrs (ndarray)

  • site (GroundSite)

Return type:

ndarray

ADCS.helpers.animations.godot.timeline.ground_passes(log, site, run_id='0')[source]

Passes of a site in one run of a vizlog (a VizLog).

Rise and set times are interpolated linearly between rows; the maximum is the highest row (refined with a parabola through its neighbours).

Parameters:
Return type:

List[Pass]

ADCS.helpers.animations.godot.timeline.site_itrs(site)[source]

ITRS position [m] and local vertical (geodetic normal) of a site.

Parameters:

site (GroundSite)

Return type:

tuple

ADCS.helpers.animations.godot.timeline.sites_from_goals(*goals)[source]

Ground sites for the coordinate goals among goals (goals, goal lists or None), unique by position: "target" if there is one, else "target 1", "target 2", … in order of first appearance.

Parameters:

goals (Any)

Return type:

List[GroundSite]

ADCS.helpers.animations.godot.timeline.validate_timeline(bookmarks, sites, t_range=None, utc_to_t_s=None)[source]

Turn bookmarks and sites (objects or dicts) into the scene.json "timeline" entry.

Parameters:
  • t_range (tuple | None) – (t_first, t_last) of the log [s]; bookmarks outside it are rejected (None: not checked, e.g. a live run of unknown length).

  • utc_to_t_s (Callable[[datetime], float] | None) – Converts an aware UTC datetime to seconds since the log’s epoch; needed for bookmarks given as utc.

  • bookmarks (Iterable[Any] | None)

  • sites (Iterable[Any] | None)

Raises:

ValueError – On a bookmark without a time or outside the log, or a site with invalid coordinates or a duplicate name.

Return type:

Dict[str, Any]