EphCore.Stars.Position (eph_core v0.1.0)

Copy Markdown View Source

Fixed-star position computation from Hipparcos catalog records.

Applies proper motion, converts to ecliptic and equatorial-of-date coordinates, and optionally projects to local altitude/azimuth.

For large N, prefer compute_many/3 — it builds the per-epoch precession/ nutation matrix (and observer local basis) once and reuses them across stars.

Summary

Functions

Computes the full sky position of a catalog star at the given Julian Date (TT).

Computes positions for many catalog stars at one epoch.

Types

observer()

@type observer() :: %{lat_deg: float(), lon_deg: float(), height_m: float()}

result()

@type result() :: %{
  ecliptic_lon_deg: float(),
  ecliptic_lat_deg: float(),
  ra_deg: float(),
  dec_deg: float(),
  altitude_deg: float() | nil,
  azimuth_deg: float() | nil,
  magnitude: float(),
  name: String.t() | nil,
  hip: integer()
}

star_record()

@type star_record() :: EphCore.Stars.Catalog.star_record()

Functions

compute(star, jd_tt, opts \\ [])

@spec compute(star_record(), float(), keyword()) :: result()

Computes the full sky position of a catalog star at the given Julian Date (TT).

Options

  • :observer%{lat_deg:, lon_deg:, height_m:} for alt/az (optional)
  • :lst_deg — local sidereal time in degrees, required with :observer for alt/az

compute_many(stars, jd_tt, opts \\ [])

@spec compute_many([star_record()], float(), keyword()) :: [result()]

Computes positions for many catalog stars at one epoch.

Shares the IAU 2006/2000A true-of-date precession/nutation matrix (and, when alt/az is requested, the observer local basis) across the whole list — the honest N-star path. compute/3 is unchanged for single-star callers.

Options

  • :observer / :lst_deg — same as compute/3
  • :parallel — when true, process stars in chunks via Task.async_stream (default false). Chunk count defaults to schedulers_online * 4.
  • :chunk_count — override the number of parallel chunks