EphCore.Ephemeris.Kernels (eph_core v0.1.0)

Copy Markdown View Source

Resolves on-disk paths for the ephemeris, time, nutation, and star data files.

No data is bundled with the package. Everything is resolved under base_dir/0: :kernel_base_dir when set, otherwise $PWD/priv if baseline files are there, else the compiled :eph_core priv directory.

config :eph_core, kernel_base_dir: "/var/eph_core/data"

Releases and other non-project working directories must set :kernel_base_dir. See the README for how to download or generate each file.

Summary

Functions

Returns the base directory for kernel files.

Raises if the baseline kernel files required to boot EphCore are missing.

Functions

base_dir()

Returns the base directory for kernel files.

Uses the configured :kernel_base_dir from application env. When unset, prefers $PWD/priv if baseline files exist there (Hex/Mix consumer after mix eph.download_kernels), otherwise :code.priv_dir(:eph_core) (path-dep and Livebook installs that copy project priv/).

Note: This must be a runtime function call, not a module attribute, because kernel_base_dir is configured at runtime in releases via runtime.exs.

kernel_path(filename)

nutation_path(filename)

require_baseline!()

Raises if the baseline kernel files required to boot EphCore are missing.

Hipparcos stars and asteroid SPKs are optional and are not checked here.

spk_path(filename)

stars_path(filename)

time_path(filename)