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

Encounter geometry helpers for conjunction assessment.

This module builds the relative frame used by collision-probability
calculations and projects states and covariance into the encounter plane.

It is the geometry layer beneath `Sidereon.Collision`.

The encounter-frame construction and covariance projection are implemented in
the `sidereon-core` core; this module marshals inputs across the NIF and
rebuilds the public `%Sidereon.Encounter.Frame{}` shape.

# `vec3`

```elixir
@type vec3() :: {float(), float(), float()}
```

# `encounter_plane_covariance`

```elixir
@spec encounter_plane_covariance(Sidereon.Encounter.Frame.t(), [[float()]]) :: [
  [float()]
]
```

Project a 3x3 ECI covariance matrix into the 2D encounter plane (x, z).

# `frame`

```elixir
@spec frame(vec3(), vec3(), vec3(), vec3()) ::
  {:ok, Sidereon.Encounter.Frame.t()} | {:error, String.t()}
```

Build an orthonormal encounter frame from two objects' states.

Returns `{:ok, %Frame{}}` or `{:error, reason}`.

---

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