Sidereon.GNSS.Ionosphere.SlantPolicy (Sidereon v3.0.0)

Copy Markdown View Source

The three independent policies an IONEX slant-delay evaluation applies.

  • :coverage - :strict refuses a query outside the product's epochs, latitudes or longitudes; :hold holds the nearest map or grid edge and names the miss in the result's held field. Default :strict.

  • :missing_nodes - :strict refuses a query whose interpolation weights a node the product gives as non-available; :renormalize interpolates from the weighted nodes that hold values, their weights renormalized to sum to one, and names every node it interpolated around in the result's degraded field. Default :strict.

  • :mapping - :single_layer applies 1/cos(z') at the shell height whatever the product declares, naming what a product declaring anything but COSZ declares in the result's assumed_mapping field; :declared applies the factor the product's MAPPING FUNCTION defines and refuses the query where that record defines none. Default :single_layer.

The three are independent, and all three status fields can be set on one value.

What is refused

Nothing here falls back to a default for a name it does not recognize:

  • {:invalid_policy_value, field, value} - a choice none of the three fields names.
  • {:unknown_policy_key, key} - a key that is not one of the three. The key is returned as it was given, whatever its type, and no atom is created for it.
  • {:duplicate_policy_key, key} - a keyword list stating one key twice. Collapsing it would silently drop the earlier statement, including an invalid one, so a list that states a key twice is refused whether the two choices agree or not.
  • :bad_slant_policy - an options container that is neither a keyword list nor a plain map.

A key left out takes its documented default.

Summary

Functions

The default policy with :coverage set to :hold.

Builds a policy from opts, which may set any of :coverage, :missing_nodes and :mapping.

The default policy with :missing_nodes set to :renormalize.

The default policy: strict coverage, strict missing nodes, single-layer mapping.

Checks that every field of policy names a choice the binding recognizes.

Types

coverage_choice()

@type coverage_choice() :: :strict | :hold

mapping_choice()

@type mapping_choice() :: :single_layer | :declared

missing_node_choice()

@type missing_node_choice() :: :strict | :renormalize

t()

@type t() :: %Sidereon.GNSS.Ionosphere.SlantPolicy{
  coverage: coverage_choice(),
  mapping: mapping_choice(),
  missing_nodes: missing_node_choice()
}

Functions

hold()

@spec hold() :: t()

The default policy with :coverage set to :hold.

new(opts \\ [])

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

Builds a policy from opts, which may set any of :coverage, :missing_nodes and :mapping.

Returns {:ok, policy}, or one of the refusals the moduledoc lists. A key left out takes its documented default.

renormalize()

@spec renormalize() :: t()

The default policy with :missing_nodes set to :renormalize.

strict()

@spec strict() :: t()

The default policy: strict coverage, strict missing nodes, single-layer mapping.

validate(policy)

@spec validate(t()) :: {:ok, t()} | {:error, term()}

Checks that every field of policy names a choice the binding recognizes.