Module cosmic

Source
Expand description

Provides the solar system planets, and state and ephemerides management.

Re-exports§

pub use crate::cosmic::GuidanceMode;
pub use crate::cosmic::Spacecraft;
pub use crate::errors::NyxError;

Modules§

eclipse
The eclipse module allows finding eclipses and (conversely) visibility between a state and another one (e.g. a planet or the Sun).
efmt
errors
initializers
leap_seconds
ops
parse
prelude

Structs§

Aberration
Represents the aberration correction options in ANISE.
Almanac
An Almanac contains all of the loaded SPICE and ANISE data. It is the context for all computations.
BPlane
Stores a B-Plane
BPlaneTarget
DragData
Duration
Defines generally usable durations for nanosecond precision valid for 32,768 centuries in either direction, and only on 80 bits / 10 octets.
Epoch
Defines a nanosecond-precision Epoch.
File
An object providing access to an open file on the filesystem.
Frame
A Frame uniquely defined by its ephemeris center and orientation. Refer to FrameDetail for frames combined with parameters.
FrameUid
A unique frame reference that only contains enough information to build the actual Frame object. It cannot be used for any computations, is it be used in any structure apart from error structures.
Mass
Defines a spacecraft mass a the sum of the dry (structural) mass and the propellant mass, both in kilogram
MetaAlmanac
A structure to set up an Almanac, with automatic downloading, local storage, checksum checking, and more.
OrbitDual
Orbit defines an orbital state
OrbitPartial
A type which stores the partial of an element
SRPData
Spacecraft
A spacecraft state, composed of its orbit, its masses (dry, prop, extra, all in kg), its SRP configuration, its drag configuration, its thruster configuration, and its guidance mode.
TimeSeries
An iterator of a sequence of evenly spaced Epochs.

Enums§

AstroError
DurationError
Freq
An Enum to convert frequencies to their approximate duration, rounded to the closest nanosecond.
GuidanceMode
HifitimeError
Errors handles all oddities which may occur in this library.
InputOutputError
LengthUnit
Defines the distance units supported by ANISE. This notably allows storing interpolation information from instruments to comets.
MonthName
ParsingError
TimeScale
Enum of the different time systems available
TimeUnit
An Enum to perform time unit conversions.
Unit
An Enum to perform time unit conversions.
Weekday

Constants§

AU
Astronomical unit, in kilometers, according to the IAU.
BDT_REF_EPOCH
BDT(BeiDou): 2005 Dec 31st Midnight BDT (BeiDou) reference epoch is 2005 December 31st UTC at midnight. This time scale is synchronized with UTC. |UTC - TAI| = XX Leap Seconds on that day.
DAYS_GPS_TAI_OFFSET
DAYS_PER_CENTURY
DAYS_PER_CENTURY corresponds to the number of days per century in the Julian calendar.
DAYS_PER_CENTURY_I64
DAYS_PER_CENTURY_U64
DAYS_PER_WEEK
DAYS_PER_WEEK_I64
DAYS_PER_YEAR
DAYS_PER_YEAR corresponds to the number of days per year in the Julian calendar.
DAYS_PER_YEAR_NLD
DAYS_PER_YEAR_NLD corresponds to the number of days per year without leap days.
ET_EPOCH_S
The Ephemeris Time epoch, in seconds
GPST_REF_EPOCH
GST_REF_EPOCH
GST (Galileo) reference epoch is 13 seconds before 1999 August 21 UTC at midnight. |UTC - TAI| = XX Leap Seconds on that day.
J1900_REF_EPOCH
The J1900 reference epoch (1900-01-01 at noon) TAI.
J2000_REF_EPOCH
The J2000 reference epoch (2000-01-01 at midnight) TAI. |UTC - TAI| = XX Leap Seconds on that day.
JD_J1900
Julian date for the J1900 epoch, as per NAIF SPICE.
JD_J2000
Julian date for the J2000 epoch, as per NAIF SPICE.
MJD_J1900
Julian days between 01 Jan 1900 at midnight and the Modified Julian Day at 17 November 1858.
MJD_J2000
Julian days between 01 Jan 2000 at noon and the Modified Julian Day at 17 November 1858.
MJD_OFFSET
Modified Julian Date in seconds as defined here. MJD epoch is Modified Julian Day at 17 November 1858 at midnight.
NAIF_EB
NAIF leap second kernel data for EB used to calculate the eccentric anomaly of the heliocentric orbit of the Earth-Moon barycenter.
NAIF_K
NAIF leap second kernel data used to calculate the difference between ET and TAI.
NAIF_M0
NAIF leap second kernel data for M_0 used to calculate the mean anomaly of the heliocentric orbit of the Earth-Moon barycenter.
NAIF_M1
NAIF leap second kernel data for M_1 used to calculate the mean anomaly of the heliocentric orbit of the Earth-Moon barycenter.
NANOSECONDS_PER_CENTURY
NANOSECONDS_PER_DAY
NANOSECONDS_PER_HOUR
NANOSECONDS_PER_MICROSECOND
NANOSECONDS_PER_MILLISECOND
NANOSECONDS_PER_MINUTE
NANOSECONDS_PER_SECOND
QZSST_REF_EPOCH
QZSS and GPS share the same reference epoch.
SECONDS_BDT_TAI_OFFSET
SECONDS_BDT_TAI_OFFSET_I64
SECONDS_GPS_TAI_OFFSET
SECONDS_GPS_TAI_OFFSET_I64
SECONDS_GST_TAI_OFFSET
SECONDS_GST_TAI_OFFSET_I64
SECONDS_PER_CENTURY
SECONDS_PER_CENTURY defines the number of seconds per century.
SECONDS_PER_DAY
SECONDS_PER_DAY defines the number of seconds per day.
SECONDS_PER_DAY_I64
SECONDS_PER_HOUR
SECONDS_PER_HOUR defines the number of seconds per hour.
SECONDS_PER_MINUTE
SECONDS_PER_MINUTE defines the number of seconds per minute.
SECONDS_PER_SIDEREAL_YEAR
SECONDS_PER_SIDEREAL_YEAR corresponds to the number of seconds per sidereal year from NIST.
SECONDS_PER_TROPICAL_YEAR
SECONDS_PER_TROPICAL_YEAR corresponds to the number of seconds per tropical year from NAIF SPICE.
SECONDS_PER_YEAR
SECONDS_PER_YEAR corresponds to the number of seconds per julian year from NAIF SPICE.
SECONDS_PER_YEAR_I64
SPEED_OF_LIGHT_KM_S
Speed of light in kilometers per second (km/s)
SPEED_OF_LIGHT_M_S
Speed of light in meters per second
STD_GRAVITY
From NIST special publication 330, 2008 edition, in meters per second squared
UNIX_REF_EPOCH
The UNIX reference epoch of 1970-01-01 in TAI duration, accounting only for IERS leap seconds.

Traits§

Frequencies
A trait to automatically convert some primitives to an approximate frequency as a duration, rounded to the closest nanosecond Does not support more than 1 GHz (because max precision of a duration is 1 nanosecond)
FromStr
Parse a value from a string
NAIFSummaryRecord
State
A trait for generate propagation and estimation state. The first parameter is the size of the state, the second is the size of the propagated state including STM and extra items.
TimeTagged
A trait allowing for something to have an epoch
TimeUnits
A trait to automatically convert some primitives to a duration

Functions§

assert_orbit_eq_or_abs
is_gregorian_valid
Returns true if the provided Gregorian date is valid. Leap second days may have 60 seconds.
try_achieve_b_plane
Returns the Delta V (in km/s) needed to achieve the B Plane specified by B dot R and B dot T. If no LTOF target is set, this method will fix VX, VY and VZ successively and use the minimum of those as a seed for the LTOF variation finding. If the 3x3 search is worse than any of the 2x2s, then a 2x2 will be returned. This uses the hyperdual formulation of the Jacobian and will also vary the linearize time of flight (LTOF).

Type Aliases§

BPC
Binary Planetary Constant
Orbit
A helper type alias, but no assumptions are made on the underlying validity of the frame.
SPK
Spacecraft Planetary Kernel