newnit/length/
astronomical.rs

1//! Astronomical units of length.
2//!
3//! This module contains predefined newtypes for units of length used in
4//! astronomy as defined by the International Astronomical Union ([IAU]).
5//! The base unit is the meter.
6//!
7//! [IAU]: https://www.iau.org/
8
9use super::Length;
10use crate::{Unit, make_unit};
11use newnit_derive::{Length, Unit};
12
13make_unit!(MegaParsec, 3.085_677_581_491_37E+22, Length);
14make_unit!(KiloParsec, 3.085_677_581_491_37E+19, Length);
15make_unit!(Parsec, 3.085_677_581_491_37E+16, Length);
16make_unit!(LightYear, 9.460_730_472_580_8E+15, Length);
17make_unit!(AstronomicalUnit, 1.495_978_707E+11, Length);