Space-weather tables for drag and decay inputs.
The parser and lookup policy are implemented in the core NIF. This module reads optional files, owns the Elixir structs, and forwards table operations to the parsed native resource.
Summary
Types
The class of a space-weather row: observed, interpolated by the source
(flux qualifier 2 or 4, or INT in CSV), a day with no flux observation
(flux qualifier 3), daily predicted, or monthly predicted.
Functions
The NRLMSISE-00 Ap history array at epoch_j2000_s under policy, with the
least-trusted row class consulted and the substitutions made.
The non-fatal findings of the parse that built the table: skipped lines
(:skips, each with its line, reason and detail) and warnings (:warnings,
each with its line and kind), such as a row out of date order, which is kept
and sorted into place, a repeated date, of which the first row is kept, or a
declared point count that differs from the rows read.
Types
@type error_reason() :: :unrecognized_format | :not_text | {:malformed, non_neg_integer(), String.t()} | {:before_coverage, float(), float()} | {:after_coverage, float(), float()} | {:missing_data, integer(), integer(), integer(), String.t()} | {:rejected_by_policy, atom(), integer(), integer(), integer()} | {:invalid_epoch, float()} | term()
@type observation_class() ::
:observed
| :interpolated
| :not_observed
| :daily_predicted
| :monthly_predicted
The class of a space-weather row: observed, interpolated by the source
(flux qualifier 2 or 4, or INT in CSV), a day with no flux observation
(flux qualifier 3), daily predicted, or monthly predicted.
@type t() :: %Sidereon.SpaceWeather{handle: reference()}
Functions
@spec ap_array_at(t(), number()) :: {:ok, [float()]} | {:error, error_reason()}
@spec ap_history_at_with_policy( t(), number(), Sidereon.SpaceWeather.Policy.t() | keyword() ) :: {:ok, Sidereon.SpaceWeather.ApHistory.t()} | {:error, error_reason()}
The NRLMSISE-00 Ap history array at epoch_j2000_s under policy, with the
least-trusted row class consulted and the substitutions made.
ap_array_at/2 returns the array alone under the default policy.
@spec coverage(t()) :: {:ok, Sidereon.SpaceWeather.Coverage.t()} | {:error, term()}
The non-fatal findings of the parse that built the table: skipped lines
(:skips, each with its line, reason and detail) and warnings (:warnings,
each with its line and kind), such as a row out of date order, which is kept
and sorted into place, a repeated date, of which the first row is kept, or a
declared point count that differs from the rows read.
@spec parse(binary()) :: {:ok, t()} | {:error, error_reason()}
@spec sample_at(t(), number()) :: {:ok, Sidereon.SpaceWeather.Sample.t()} | {:error, error_reason()}
@spec sample_at_with_policy( t(), number(), Sidereon.SpaceWeather.Policy.t() | keyword() ) :: {:ok, Sidereon.SpaceWeather.Sample.t()} | {:error, error_reason()}
@spec space_weather_at(t(), number()) :: {:ok, Sidereon.Drag.SpaceWeather.t()} | {:error, error_reason()}