cheatah
Struct

space::irbem::MeadPositionFold

cheatah-space v0.1.0-alpha — Biome Standard 0.6.5-alpha

The batch's position caveat, accumulated one point at a time.

The same device as T89PositionFold and for the same reason: one Status for N points can only be the worst of them, and computing that honestly must not cost a second pass over 100 MB of positions. The Mead-Fairfield envelope is a radius band, monotone, so the smallest and largest r^2 decide the batch and no per-point sqrt is paid.

Unit testIrbemMead.BatchReportsTheSameEnvelopeTheScalarLaneDoes

Functions

fn void add(const Position< Frame::GSM > &p) #

Fold one position in.

Parameters
p

the position, GSM, in Earth radii.

Complexity

O(1) — one fused radius, three comparisons, no sqrt.

Allocation

none.

Unit testIrbemMead.BatchReportsTheSameEnvelopeTheScalarLaneDoes
fn Status verdict() const #

What the batch's positions say about the model's envelope.

Returns

Status::DomainError when any point is not finite or is inside the Earth, Status::OutOfValidityRange when any point is beyond the published r <= 17 R_E, otherwise Status::Ok.

Complexity

O(1) — two square roots and two envelope lookups for the whole batch.

Allocation

none.

Unit testIrbemMead.BatchReportsTheSameEnvelopeTheScalarLaneDoes

Constants & variables

var double r2_lo #

The smallest r^2 seen, R_E^2; +inf until the first point.

var double r2_hi #

The largest r^2 seen, R_E^2; zero until the first point.

var double x_lo #

The smallest GSM x seen, R_E; +inf until the first point.

The envelope publishes no x bound, but check_position reads one, so it is folded for the same two lookups.

var bool finite #

False once any point has had a non-finite coordinate — a NaN radius compares false against everything and would otherwise slip through both extremes.