cheatah
Struct

space::irbem::Position

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

A position, in frame F.

An aggregate holding exactly one vec3d, so it is the same size, trivially copyable, and passes in registers — the frame tag costs nothing at runtime and everything at compile time.

Template parameters
F

the frame the components are expressed in; see kind_of for what they mean.

Functions

fn radius · 2 overloads
double radius() const#
double radius() const#

Geocentric distance, for a Cartesian frame.

Returns

|v| in Earth radii.

Complexity

O(1).

Allocation

none.

Note

Not constexpr: it takes a square root, and fixarray::norm is a runtime function. Use fixarray::squared_norm(p.v) when a compile-time comparison will do.

fn double latitude() const #

Latitude, for an angular frame.

Returns

degrees, north positive.

Complexity

O(1).

Allocation

none.

fn double longitude() const #

East longitude, for an angular frame.

Returns

degrees, east positive.

Complexity

O(1).

Allocation

none.

Constants & variables

var static Frame frame #

The frame these components are expressed in.

var fixarray::vec3d v #

The components — (x, y, z) in Re, or (radius|altitude, latitude, east longitude).

Zero by default: fixarray::Fixed's defaulted constructor value-initializes, which the DefaultsAreZero test pins down.