mix astro.download_ephemeris (Astro v2.1.1)

Copy Markdown View Source

Downloads the JPL DE440s ephemeris file (de440s.bsp) from NASA's NAIF server and places it in the application's priv directory.

The file is approximately 32 MB and contains Chebyshev polynomial segments for the Sun, Moon, Earth and Earth-Moon Barycenter used by the scan-and-bisect rise/set algorithms.

Usage

$ mix astro.download_ephemeris

If the file already exists, you will be prompted before overwriting. Use the --force flag to skip the prompt:

$ mix astro.download_ephemeris --force

To download to a custom location instead of the default priv directory:

$ mix astro.download_ephemeris --dest /path/to/de440s.bsp

When using --dest, the target directory must already exist. You will also need to configure the ephemeris path in your runtime.exs:

config :astro, ephemeris: "/path/to/de440s.bsp"