Astro

Library to help working with SPICE and ERFA libraries

Installation

It is a bit more complicated then normal lib so pay attention:

  def deps do
    [
      ...
      {:ex_astro, "~> 0.2"},
      ...
    ]
  end
mix astro.kernels

Time API

Astro.Time represents Julian Dates as two-part tuples {jd1, jd2} rather than a single float. This follows ERFA/SOFA conventions and preserves much more precision for time-scale conversions.

iex> jd = Astro.Time.to_julian_date(~N[2000-01-01 12:00:00])
iex> jd
{2451544.5, 0.5}
iex> Astro.Time.day2sec(jd)
0.0