struct

Kozai::SGP4::Satellite

Inherits Struct < Value < Object

A satellite initialised from an element set and ready to propagate.

Construction does all the work that depends only on the elements; each #propagate call then depends only on its time argument. Nothing is cached or carried between calls, so propagating to a thousand times in any order gives the same thousand answers as propagating to them one at a time in sequence.

This is a struct so that arrays of satellites are contiguous and no step of a pass search touches the heap.

Constructors

new(elements : TLE::Elements, gravity : GravityModel = GravityModel.wgs72, ops_mode : OpsMode = OpsMode::Afspc)

Initialises a satellite from an element set.

gravity and ops_mode have exactly one correct pair of values for ordinary use, which are the defaults. See GravityModel and OpsMode for why they are nonetheless spelled out.

Source

Instance methods

apogee

Apogee altitude at epoch, in earth radii above the surface.

Source
deep_space?

Whether the deep-space branch applies.

Source
elements

The element set this was built from.

Source
epoch_days_since_1949

Days from 1949 December 31 at 00:00 UTC to the element set epoch.

NOTE: this odd-looking reference instant is the one the deep-space routines are written around, inherited from the original implementation.

Source
epoch_jd

Julian date of the element set epoch.

Source
gravity

Gravitational constants in use.

Source
init_error

Error detected while initialising, if any.

A satellite that fails here will fail at every time; the elements themselves are unusable.

Source
julian_date_at(minutes_from_epoch : Float64) : Float64

Julian date minutes_from_epoch after the epoch.

Source
mean_motion

Mean motion after removal of the Kozai correction, in radians per minute.

Source
minutes_from_epoch(time : Time) : Float64

Minutes from the element set epoch to time.

Source
ops_mode

Which interpretation of the model is in use.

Source
perigee

Perigee altitude at epoch, in earth radii above the surface.

Source
propagate(minutes_from_epoch : Float64) : State

Propagates to minutes_from_epoch, which may be negative.

This is a pure function of the satellite and the argument. It performs no allocation, which spec/allocation_spec.cr verifies, because a week of pass predictions over a full catalogue runs to millions of calls.

Source
propagate_at(time : Time) : State

Propagates to an absolute instant.

Source
semi_major_axis

Semi-major axis at epoch, in earth radii.

Source
time_at(minutes_from_epoch : Float64) : Time

The instant minutes_from_epoch after the epoch.

The inverse of #minutes_from_epoch, used to report the result of a search that ran in minutes back as a wall-clock time.

Source