cheatah
Class

space::irbem::TotalFieldT89

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

IGRF plus Tsyganenko 1989, as a single field.

Satisfies GeoFieldModel, so it drops into trace_invariant and everything above it.

Template parameters
NMAX

the internal field's truncation degree. 10 reproduces IRBEM's own choice, which is what the differential tests run through; 13 is IGRF-14's full published degree.

Functions

fn constexpr TotalFieldT89(const Igrf< NMAX > &internal, const Rotations &rotations, double kp_times_ten) #
Parameters
internal

the internal field, already built for the epoch.

rotations

the epoch's frame rotations — built once, reused for every point.

kp_times_ten

Kp in IRBEM's slot-1 scaling (Kp x 10, nominally 0..90). T89 is Kp-BINNED, not a continuous function of Kp: seven coefficient sets, so values inside one bin give identical fields by construction rather than by approximation.

fn FieldVector< Frame::GEO > evaluate(const Position< Frame::GEO > &p) const #

The total field at a geographic point.

Parameters
p

the position, GEO, Earth radii.

Returns

B_internal + B_external, in GEO, nT. When the external model refuses the point — outside its published validity envelope, or a non-finite input — the INTERNAL field is returned alone rather than a zero or a NaN: the internal field is still the best available answer there, and a trace that hit a NaN would fail hundreds of steps later with no indication of where. Callers who need to know whether the external model contributed ask external_status for the point.

Complexity

One IGRF evaluation, one T89 evaluation, two 3x3 rotations.

Allocation

none.

Unit testIrbemTotalField.SuperposesInternalAndExternal
fn Status external_status(const Position< Frame::GEO > &p) const #

Whether the external model answered at p, and if not, why.

Parameters
p

the position, GEO, Earth radii.

Returns

the external model's status; Status::Ok when it contributed.

Complexity

One T89 evaluation and one rotation.

Allocation

none.

Unit testIrbemTotalField.ReportsWhenTheExternalModelDeclines
fn double kp_times_ten() const #

The activity level this field was built for, in IRBEM's Kp x 10 scaling.

Returns

the value passed to the constructor.

Complexity

O(1).

Allocation

none.

Unit testIrbemTotalField.SuperposesInternalAndExternal
fn const Rotations & rotations() const #

The epoch's frame rotations — what the device staging and any caller mapping frames needs.

Returns

the rotations this field was built with.

Complexity

O(1).

Allocation

none.

Unit testIrbemTotalField.SuperposesInternalAndExternal
fn double g(int n, int m) const #

The internal part's Gauss coefficient g(n, m), in nT.

A superposition has no spherical-harmonic expansion of its own — the external field is not current-free, so no scalar potential exists to expand. What a caller asking g(1, 0) of a total field means, in every use this module has (the dipole moment k0, the trace step sizing, the device staging of the internal part), is the INTERNAL field's coefficient, and that is what this forwards to. Documented here precisely because silently answering a question the physics cannot pose is how a wrong number acquires authority.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

Unit testIrbemTotalField.SuperposesInternalAndExternal
fn double h(int n, int m) const #

The internal part's h(n, m), in nT — see g for why this forwards.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

Unit testIrbemTotalField.SuperposesInternalAndExternal
fn const Igrf< NMAX > & internal() const #

The internal field alone — what dipole_moment and the device staging need, since those are questions about the internal field specifically and a superposition cannot answer them.

Returns

the internal model.

Complexity

O(1).

Allocation

none.

Unit testIrbemTotalField.SuperposesInternalAndExternal

Constants & variables

var static int degree #

The internal part's truncation degree — what generic staging and buffer sizing read, on both this type and Igrf, so M::degree means the same thing for either.

var const Igrf< NMAX > * internal_ #
var const Rotations * rotations_ #
var double kp_times_ten_ #