# `Sidereon.SpaceWeather`
[🔗](https://github.com/neilberkman/sidereon-ex/blob/main/lib/sidereon/space_weather.ex#L1)

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.

# `error_reason`

```elixir
@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`

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

# `ap_array_at`

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

# `ap_array_at!`

# `coverage`

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

# `coverage!`

# `load`

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

# `load!`

# `parse`

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

# `parse!`

# `sample_at`

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

# `sample_at!`

# `sample_at_with_policy`

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

# `sample_at_with_policy!`

# `space_weather_at`

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

# `space_weather_at!`

# `to_csv_text`

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

# `to_txt_text`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
