Sidereon.SpaceWeather (Sidereon v0.31.2)

Copy Markdown View Source

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

error_reason()

@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()

t()

@type t() :: %Sidereon.SpaceWeather{handle: reference()}

Functions

ap_array_at(space_weather, epoch_j2000_s)

@spec ap_array_at(t(), number()) :: {:ok, [float()]} | {:error, error_reason()}

ap_array_at!(table, epoch_j2000_s)

coverage(space_weather)

@spec coverage(t()) :: {:ok, Sidereon.SpaceWeather.Coverage.t()} | {:error, term()}

coverage!(table)

load(path)

@spec load(String.t()) :: {:ok, t()} | {:error, term()}

load!(path)

parse(bytes)

@spec parse(binary()) :: {:ok, t()} | {:error, error_reason()}

parse!(bytes)

sample_at(space_weather, epoch_j2000_s)

@spec sample_at(t(), number()) ::
  {:ok, Sidereon.SpaceWeather.Sample.t()} | {:error, error_reason()}

sample_at!(table, epoch_j2000_s)

sample_at_with_policy(space_weather, epoch_j2000_s, policy)

@spec sample_at_with_policy(
  t(),
  number(),
  Sidereon.SpaceWeather.Policy.t() | keyword()
) ::
  {:ok, Sidereon.SpaceWeather.Sample.t()} | {:error, error_reason()}

sample_at_with_policy!(table, epoch_j2000_s, policy)

space_weather_at(space_weather, epoch_j2000_s)

@spec space_weather_at(t(), number()) ::
  {:ok, Sidereon.Drag.SpaceWeather.t()} | {:error, error_reason()}

space_weather_at!(table, epoch_j2000_s)

to_csv_text(space_weather)

@spec to_csv_text(t()) :: {:ok, String.t()} | {:error, term()}

to_txt_text(space_weather)

@spec to_txt_text(t()) :: {:ok, String.t()} | {:error, term()}