hydrobricks
Loading...
Searching...
No Matches
TimeConstants.h
1#ifndef HYDROBRICKS_TIME_CONSTANTS_H
2#define HYDROBRICKS_TIME_CONSTANTS_H
3
11namespace TimeConstants {
12
13// Formal definition used in Hydrobricks
14static constexpr double JD_TO_MJD_OFFSET = 2400000.5;
15
16// Seconds per day
17static constexpr double SECONDS_PER_DAY_D = 86400.0;
18static constexpr long long SECONDS_PER_DAY_LL = 86400LL;
19
20// MJD value of Unix epoch (1970-01-01 00:00:00 UTC) with the standard definition
21// JD(1970-01-01 00:00:00) = 2440587.5; 2440587.5 - 2400000.5 = 40587.0
22static constexpr double MJD_UNIX_EPOCH = 40587.0;
23
24} // namespace TimeConstants
25
26using TimeConstants::JD_TO_MJD_OFFSET;
27using TimeConstants::MJD_UNIX_EPOCH;
28using TimeConstants::SECONDS_PER_DAY_D;
29using TimeConstants::SECONDS_PER_DAY_LL;
30
31#endif // HYDROBRICKS_TIME_CONSTANTS_H
Definition TimeConstants.h:11