Unit
-
template<typename Type>
class Unit SBody uses the Geometrized units, in which \(c=G=1\). In addition, the central black hole mass is set to 1.
Public Functions
-
inline Unit(Type mass)
Initialize the unit system.
- Parameters:
mass – mass of the central black hole, in unit of \(M_\odot\)
- Returns:
status
Public Members
-
Type s
Second.
-
Type hr
Hour.
-
Type day
Day.
-
Type yr
Year.
-
Type cm
Centimeter.
-
Type m
Meter.
-
Type km
Kilometer.
-
Type R_sun
Radius of the Sun, \(R_\odot\).
-
Type AU
The astronomical unit.
-
Type mpc
Milliparsec.
-
Type pc
Parsec.
-
Type kpc
Kiloparsec.
-
Type Mpc
Megaparsec.
-
Type Gpc
Gigaparsec.
-
Type M_sun
Mass of the Sun, \(M_\odot\).
-
Type M_earth
Mass of Earth, \(M_\oplus\).
-
Type M_jup
Mass of Jupiter, \(M_\mathrm{jup}\).
-
Type erg
Erg.
-
Type J
Joules.
Public Static Attributes
-
static constexpr Type deg = 1.745329251994329576923690768488612713442871888541728e-2l
Degree, in unit of rad.
-
static constexpr Type min = 2.908882086657215961539484614147687855738119814236213e-4l
Minute of arc, in unit of rad.
-
static constexpr Type sec = 4.8481368110953599358991410235794797595635330237270218e-6l
Second of arc, in unit of rad.
-
static constexpr Type mas = 4.8481368110953599358991410235794797595635330237270218e-9l
Millisecond of arc, in unit of rad.
-
static constexpr Type uas = 4.8481368110953599358991410235794797595635330237270218e-12l
Microsecond of arc, in unit of rad.
-
inline Unit(Type mass)