Angelus.Spice.Server (Angelus v0.0.2)

Copy Markdown View Source

GenServer that owns the native spice_worker Port and serializes SPICE calls.

Summary

Functions

Returns a specification to start this module under a supervisor.

Loads validated kernel paths into the native worker.

Returns metadata for the currently loaded kernel set, if any.

Starts the named SPICE server process.

Returns native SPICE state data for a resolved SPICE target string.

Converts a UTC datetime to SPICE ephemeris time through the native worker.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

load_kernels(paths, opts)

@spec load_kernels(
  [String.t()],
  keyword()
) :: {:ok, map()} | {:error, term()}

Loads validated kernel paths into the native worker.

metadata()

@spec metadata() :: {:ok, map() | nil}

Returns metadata for the currently loaded kernel set, if any.

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()

Starts the named SPICE server process.

state(target, et, opts)

@spec state(String.t(), float(), keyword()) :: {:ok, map()} | {:error, term()}

Returns native SPICE state data for a resolved SPICE target string.

utc_to_et(datetime)

@spec utc_to_et(DateTime.t()) :: {:ok, float()} | {:error, term()}

Converts a UTC datetime to SPICE ephemeris time through the native worker.