Skip to main content

roche/
constants.rs

1// // Offset between JD and MJD
2pub const MJD2JD: f64 = 2400000.5;
3
4// Speed of light, MKS, (exact value)
5pub const C: f64 = 2.99792458e8;
6
7// // Gravitational constant, MKS
8pub const G: f64 = 6.673e-11;
9
10// Planck's constant, MKS
11pub const H: f64 = 6.6262e-34;
12
13// Boltzmann's constant, MKS
14pub const K: f64 = 1.3806e-23;
15
16// // Charge on the electron (magnitude, C)
17pub const E: f64 = 1.602176565e-19;
18
19// // Mass of the electron, kg
20pub const ME: f64 = 9.10956e-31;
21
22// // Mass of the proton, kg
23pub const MP: f64 = 1.67e-27;
24
25// // Stefan-Boltzmann constant, MKS
26pub const SIGMA: f64 = 5.66956e-8;
27
28// // Thomson cross-section, MKS
29pub const SIGMAT: f64 = 6.65e-29;
30
31// // Astronomical unit, metres
32pub const AU: f64 = 1.49597870691e11;
33
34// // Solar luminosity, Watts
35pub const LSUN: f64 = 3.826e26;
36
37// // Solar mass, kg
38pub const MSUN: f64 = 1.989e30;
39
40// // Gravitational parameter of the Sun, SI (m^3 s^-2)
41pub const GMSUN: f64 = 1.32712442099e20;
42
43// // Gravitational parameter of the Sun, AU^3 YR^-2
44pub const GMSUNA: f64 = 39.476927033270655;
45
46// // Gauss' gravitational constant sqrt(G*MSUN), AU^(3/2) day^-1
47pub const KGAUSS: f64 = 0.01720209895;
48
49// // G*MSUN, AU^3 day^-2 (Gauss**2)
50pub const GMGAUSS: f64 = KGAUSS*KGAUSS;
51
52// // Absolute visual magnitude of the Sun
53pub const MVSUN: f64 = 4.75;
54
55// // Parsec, metres
56pub const PC: f64 = 3.085678e16;
57
58// // Solar radius, metres
59pub const RSUN: f64 = 6.9599e8;
60
61// // Effective temperature of the Sun, Kelvin
62pub const TSUN: f64 = 5700.;
63
64// Number of seconds in a day
65pub const DAY: f64 = 86400.;
66
67// // Length of Julian year in seconds
68pub const YEAR: f64 = 365.25*DAY;
69
70// // Integer number of seconds in a day
71pub const IDAY: u32  = 86400;
72
73// // Number of seconds in an hour
74pub const HOUR: f64  = 3600.;
75
76// // Number of seconds in a minute
77pub const MINUTE: f64  = 60.;
78
79// // Pi
80pub const PI: f64 = 3.14159265358979323846264;
81
82// // 2*Pi
83pub const TWOPI: f64 = 2.*PI;
84
85// Ratio FWHM/sigma for a gaussian
86pub const EFAC: f64 = 2.3548200450309493;
87
88// // Wavelength of Halpha, Angstroms
89pub const HALPHA: f64 = 6562.76;
90
91// // Wavelength of Hbeta, Angstroms
92pub const HBETA: f64 = 4861.327;
93
94// // Wavelength of Hgamma, Angstroms
95pub const HGAMMA: f64 = 4340.465;
96
97// // Wavelength of Hgamma, Angstroms
98pub const HDELTA: f64 = 4340.465;