Skip to main content

skymath/
lib.rs

1#![doc = include_str!("../README.md")]
2#![warn(missing_docs)]
3
4pub mod angle;
5pub mod constellation;
6mod constellation_data;
7pub mod coords;
8pub mod error;
9pub mod frames;
10#[doc = include_str!("../docs/guide.md")]
11pub mod guide {}
12pub mod moon;
13pub mod observer;
14pub mod sun;
15pub mod time;
16
17// `#[doc(inline)]` puts each item's canonical rustdoc page at the crate root
18// (`skymath/struct.Angle.html`, `skymath/fn.alt_az.html`), matching the
19// re-exported-from-the-root API and the docs.rs links in the README and guide;
20// without it the canonical page lives at the submodule path instead.
21#[doc(inline)]
22pub use angle::{
23    format_dec, format_ra, parse_dec, parse_ra, Angle, ParseMode, Separator, SexaStyle,
24    ARCSEC_PER_RADIAN,
25};
26#[doc(inline)]
27pub use constellation::{constellation, Constellation};
28#[doc(inline)]
29pub use coords::{
30    apply_offset, position_angle, precess, separation, tangent_offset, Epoch, Equatorial,
31    TangentOffset,
32};
33#[doc(inline)]
34pub use error::{Error, Result};
35#[doc(inline)]
36pub use frames::{from_ecliptic, from_galactic, to_ecliptic, to_galactic, Ecliptic, Galactic};
37#[doc(inline)]
38pub use moon::{
39    lunar_separation, moon_avoidance_lorentzian, moon_crossings, moon_distance_km,
40    moon_illumination, moon_phase_angle, moon_position, moon_position_topocentric,
41};
42#[doc(inline)]
43pub use observer::{
44    airmass, alt_az, altitude_crossings, hour_angle, parallactic_angle,
45    refraction_apparent_to_true, refraction_true_to_apparent, transit, CrossingOutcome, Horizontal,
46    Location,
47};
48#[doc(inline)]
49pub use sun::{sun_position, twilight, Twilight, TwilightOutcome};
50#[doc(inline)]
51pub use time::{
52    datetime_to_mjd, format_date_obs, gmst, jd_to_mjd, julian_date, julian_epoch_of, lst,
53    mjd_to_datetime, mjd_to_jd, parse_date_obs,
54};