cheatah
Class

space::irbem::TotalFieldOpq

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

IGRF plus Olson & Pfitzer (1977), as a single field — the TotalFieldT89 shape without the activity level, because this model has none.

Satisfies GeoFieldModel, so it drops into trace_invariant, make_lstar and everything above them. The tilt fold is done ONCE, at construction, and the sine and cosine with it: a trace evaluates the field thousands of times per line, and refolding 172 coefficient pairs at each of them would cost more than the series itself.

Beyond 15 R_E the external part is the published zero, so a trace that leaves the model's region simply continues in the internal field — which is the published model's own behaviour and differs from IRBEM's wrapper, which refuses the whole field there. Inside the belts, where every drift shell this library traces lives, the two agree to the internal field's standard.

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.

Unit testIrbemOpq.TotalFieldSuperposesInternalAndExternal IrbemOpq.LstarRunsThroughTheTotalField

Functions

fn TotalFieldOpq(const Igrf< NMAX > &internal, const Rotations &rotations) #
Parameters
internal

the internal field, already built for the epoch.

rotations

the epoch's frame rotations — built once, reused for every point; their dipole_tilt_deg is the tilt the fold and the rotations use.

Complexity

O(1) — one fold, sin, cos.

Allocation

none.

Unit testIrbemOpq.TotalFieldSuperposesInternalAndExternal
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 — a non-finite input or a radius inside the Earth — the INTERNAL field is returned alone rather than a zero or a NaN; beyond 15 R_E the external part is the published zero and the sum is again the internal field. external_status says which.

Complexity

One IGRF evaluation, one OP-77 evaluation, two 3x3 rotations.

Allocation

none.

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

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

Parameters
p

the position, GEO, Earth radii.

Returns

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

Complexity

One rotation and one envelope check.

Allocation

none.

Unit testIrbemOpq.TotalFieldReportsWhenTheExternalModelDeclines
fn const Rotations & rotations() const #

The epoch's frame rotations — what any caller mapping frames needs.

Returns

the rotations this field was built with.

Complexity

O(1).

Allocation

none.

Unit testIrbemOpq.TotalFieldSuperposesInternalAndExternal
fn double g(int n, int m) const #

The internal part's Gauss coefficient g(n, m), in nT — the INTERNAL field's, for the same reason TotalFieldT89::g forwards: a superposition with a non-potential part has no expansion of its own, and every caller asking (the dipole moment, the trace step sizing) means the internal one.

Parameters
n

the degree.

m

the order.

Returns

the internal part's coefficient.

Complexity

O(1).

Allocation

none.

Unit testIrbemOpq.TotalFieldSuperposesInternalAndExternal
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 testIrbemOpq.TotalFieldSuperposesInternalAndExternal
fn const Igrf< NMAX > & internal() const #

The internal field alone — what dipole_moment and any device staging need.

Returns

the internal model.

Complexity

O(1).

Allocation

none.

Unit testIrbemOpq.TotalFieldSuperposesInternalAndExternal
fn const OpqParameters< double > & parameters() const #

The folded external coefficients this field evaluates with — exposed so a differential harness can run the bare series through the same numbers the trace sees.

Returns

the parameter set folded at construction.

Complexity

O(1).

Allocation

none.

Unit testIrbemOpq.TotalFieldSuperposesInternalAndExternal

Constants & variables

var static int degree #

The internal part's truncation degree — what generic staging and buffer sizing read.

var const Igrf< NMAX > * internal_ #
var const Rotations * rotations_ #
var double tilt_rad_ #
var double sin_tilt_ #
var double cos_tilt_ #
var OpqParameters< double > par_ #