EphCore.SnapshotPipeline (eph_core v0.1.0)

Copy Markdown View Source

Main pipeline for computing celestial body positions from a given location and time.

The pipeline processes in stages:

  1. Intent validation
  2. Astronomical time conversion (shared context)
  3. Earth orientation (shared context)
  4. Observer position (shared context)
  5. Per-body: solar system positions, line of sight, sky positions
  6. Per-body: motion (optional)
  7. Manifest packaging

Per-body stages can run in parallel for improved performance when computing multiple targets.

Summary

Functions

Compute sky positions for celestial bodies from a given location and time.

Functions

observe(datetime, location, bodies, opts \\ [])

Compute sky positions for celestial bodies from a given location and time.

Returns {:ok, %EphCore.SnapshotPipeline.Observation{}}, or {:error, %Ecto.Changeset{}} if the request fails validation in EphCore.SnapshotPipeline.Intent.

Options

Each option below is a map; omitted sub-keys keep their defaults.

  • :models:delta_t (:iers:approximate), :earth_orientation
    (:gmst:gast), :earth (:wgs84), :ecliptic_frame

    (:true_of_date | :mean_of_date | :j2000).

  • :corrections:light_time and :aberration (both false by default). Setting both enables the apparent-geocentric path, which adds apparent_geocentric_* fields to each body. :precession_nutation is a legacy flag; nutation is always applied for date-based ecliptic frames.
  • :motion:enabled (default true) and :dt_minutes (default 30), the half-window for the central-difference longitude rate.
  • :geometry:ring_samples (default 24, 0 to skip) for the celestial-sphere ring arcs.
  • :parallel — force per-body parallelism on or off. Defaults to true when at least 3 bodies are requested.

Examples

# Topocentric geometric (default)
{:ok, observation} = observe(datetime, location, [:sun, :moon])

# Apparent geocentric, matching published almanac positions
{:ok, observation} =
  observe(datetime, location, [:neptune],
    corrections: %{aberration: true, light_time: true}
  )