# `Sidereon.GNSS.Antex`
[🔗](https://github.com/neilberkman/sidereon-ex/blob/main/lib/sidereon/gnss/antex.ex#L1)

Parser and lookup helpers for ANTEX 1.4 receiver and satellite antenna blocks.

The ANTEX parser, satellite validity lookup, and PCO/PCV interpolation live in
the Rust GNSS core. This module preserves Sidereon' public structs and API shape.

# `parse_error`

```elixir
@type parse_error() :: {:error, term()}
```

# `t`

```elixir
@type t() :: %Sidereon.GNSS.Antex{
  antennas: %{optional(String.t()) =&gt; Sidereon.GNSS.Antex.Antenna.t()},
  handle: term()
}
```

# `antenna`

```elixir
@spec antenna(t(), String.t()) :: Sidereon.GNSS.Antex.Antenna.t() | nil
```

Return an antenna by its `TYPE / SERIAL` key.

# `encode`

```elixir
@spec encode(t()) :: String.t()
```

Serialize a parsed ANTEX product back to ANTEX 1.4 text.

Round-trips with `parse/1`: re-parsing the output yields an equal product. The
serializer works on the full parsed product held alongside the decoded
antennas, so multi-interval antenna blocks are re-emitted, not just the
latest-wins view exposed by `antenna/2`.

# `load`

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

Load and parse an ANTEX file from `path`.

# `load!`

```elixir
@spec load!(String.t()) :: t()
```

Like `load/1` but raises on failure.

# `parse`

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

Parse ANTEX text already in memory.

# `pco`

```elixir
@spec pco(Sidereon.GNSS.Antex.Antenna.t(), String.t()) ::
  {:ok, {float(), float(), float()}} | {:error, :unknown_frequency}
```

Frequency-dependent PCO (north/east/up in meters).

# `pco!`

```elixir
@spec pco!(Sidereon.GNSS.Antex.Antenna.t(), String.t()) :: {float(), float(), float()}
```

Like `pco/2` but raises on unknown frequency.

# `pcv`

```elixir
@spec pcv(Sidereon.GNSS.Antex.Antenna.t(), String.t(), float(), float() | nil) ::
  {:ok, float()} | {:error, :unknown_frequency}
```

Frequency-dependent phase-center variation in meters.

Interpolation is linear in zenith and azimuth. Azimuth is optional: when not
given (or when the antenna has no azimuth-dependent rows), the NOAZI row is
used.

# `pcv!`

```elixir
@spec pcv!(Sidereon.GNSS.Antex.Antenna.t(), String.t(), float(), float() | nil) ::
  float()
```

Like `pcv/4` but raises on unknown frequency.

# `satellite_antenna`

```elixir
@spec satellite_antenna(t(), String.t(), NaiveDateTime.t()) ::
  Sidereon.GNSS.Antex.Antenna.t() | nil
```

Return the satellite antenna block for PRN `prn` (e.g. `"G05"`) valid at the
given epoch, or `nil` if none.

---

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