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.
This download is optional. A compact ephemeris covering 1900–2100 ships with the library, so it is needed only for dates outside that range — the full kernel covers 1849–2150. Once downloaded it takes precedence over the bundled ephemeris automatically.
To build a compact ephemeris over some other span of years instead,
see mix astro.build_ephemeris.
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"