TimeConstants.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
41 
42 #ifndef GNSSTK_TIMECONSTANTS_HPP
43 #define GNSSTK_TIMECONSTANTS_HPP
44 
45 namespace gnsstk
46 {
48 
49 
51  const double MJD_TO_JD = 2400000.5;
53  const long MJD_JDAY = 2400001L;
55  const long UNIX_MJD = 40587L;
56 
58  const long HALFWEEK = 302400L;
60  const long FULLWEEK = 604800L;
61 
63  const long SEC_PER_DAY = 86400L;
65  const double DAY_PER_SEC = 1.0/SEC_PER_DAY;
66 
68  const long MS_PER_SEC = 1000L;
70  const double SEC_PER_MS = 1.0/MS_PER_SEC;
71 
75  const double DAY_PER_MS = 1.0/MS_PER_DAY;
76 
77  // system-specific constants
78 
79  // GPS -------------------------------------------
81  const double GPS_EPOCH_JD = 2444244.5;
83  const long GPS_EPOCH_MJD = 44244L;
85  const long GPS_WEEK_PER_EPOCH = 1024L;
86 
88  const long ZCOUNT_PER_DAY = 57600L;
90  const double DAY_PER_ZCOUNT = 1.0/ZCOUNT_PER_DAY;
92  const long ZCOUNT_PER_WEEK = 403200L;
94  const double WEEK_PER_ZCOUNT = 1.0/ZCOUNT_PER_WEEK;
96  const long ZCOUNT_PER_MINUTE = 40;
98  const long ZCOUNT_PER_HOUR = 2400;
99 
100  // GAL -------------------------------------------
102  const double GAL_EPOCH_JD = 2451412.5;
104  const long GAL_EPOCH_MJD = 51412L;
106  const long GAL_WEEK_PER_EPOCH = 4096L;
107 
108  // QZS -------------------------------------------
110  const double QZS_EPOCH_JD = 2444244.5;
112  const long QZS_EPOCH_MJD = 44244L;
114  const long QZS_WEEK_PER_EPOCH = 65535L; // effectively no rollover
115 
116  // BDS -------------------------------------------
118  const double BDS_EPOCH_JD = 2453736.5;
120  const long BDS_EPOCH_MJD = 53736L;
122  const long BDS_WEEK_PER_EPOCH = 8192L;
123 
124  // IRN -------------------------------------------
126  const double IRN_EPOCH_JD = 2451412.5;
128  const long IRN_EPOCH_MJD = 51412L;
130  const long IRN_WEEK_PER_EPOCH = 1024L;
131 
132  // GLO -------------------------------------------
134  const double GLO_EPOCH_JD = 2450082.5;
136  const long GLO_EPOCH_MJD = 50083;
137 
139 
140 } // namespace
141 
142 #endif // GNSSTK_TIMECONSTANTS_HPP
gnsstk::BDS_WEEK_PER_EPOCH
const long BDS_WEEK_PER_EPOCH
Weeks per BDS Epoch.
Definition: TimeConstants.hpp:122
gnsstk::GAL_EPOCH_JD
const double GAL_EPOCH_JD
'Julian day' of GAL epoch (Aug 22 1999)
Definition: TimeConstants.hpp:102
gnsstk::IRN_EPOCH_MJD
const long IRN_EPOCH_MJD
Modified Julian Date of BDS epoch (Aug 22, 1999).
Definition: TimeConstants.hpp:128
gnsstk::HALFWEEK
const long HALFWEEK
Seconds per half week.
Definition: TimeConstants.hpp:58
gnsstk::SEC_PER_DAY
const long SEC_PER_DAY
Seconds per day.
Definition: TimeConstants.hpp:63
gnsstk::MS_PER_DAY
const long MS_PER_DAY
Milliseconds in a day.
Definition: TimeConstants.hpp:73
gnsstk::FULLWEEK
const long FULLWEEK
Seconds per whole week.
Definition: TimeConstants.hpp:60
gnsstk::GAL_WEEK_PER_EPOCH
const long GAL_WEEK_PER_EPOCH
Weeks per GAL Epoch.
Definition: TimeConstants.hpp:106
gnsstk::IRN_EPOCH_JD
const double IRN_EPOCH_JD
'Julian day' of IRN epoch (Aug 22, 1999).
Definition: TimeConstants.hpp:126
gnsstk::ZCOUNT_PER_HOUR
const long ZCOUNT_PER_HOUR
Z-counts per hour.
Definition: TimeConstants.hpp:98
gnsstk::SEC_PER_MS
const double SEC_PER_MS
Seconds per millisecond.
Definition: TimeConstants.hpp:70
gnsstk::MJD_JDAY
const long MJD_JDAY
'Julian day' offset from MJD
Definition: TimeConstants.hpp:53
gnsstk::QZS_WEEK_PER_EPOCH
const long QZS_WEEK_PER_EPOCH
Weeks per QZS Epoch.
Definition: TimeConstants.hpp:114
gnsstk::GLO_EPOCH_MJD
const long GLO_EPOCH_MJD
Modified Julian Date of GLONASS epoch (Jan. 1, 1996).
Definition: TimeConstants.hpp:136
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::MJD_TO_JD
const double MJD_TO_JD
Add this offset to convert Modified Julian Date to Julian Date.
Definition: TimeConstants.hpp:51
gnsstk::MS_PER_SEC
const long MS_PER_SEC
Milliseconds in a second.
Definition: TimeConstants.hpp:68
gnsstk::UNIX_MJD
const long UNIX_MJD
Modified Julian Date of UNIX epoch (Jan. 1, 1970).
Definition: TimeConstants.hpp:55
gnsstk::GPS_EPOCH_MJD
const long GPS_EPOCH_MJD
Modified Julian Date of GPS epoch (Jan. 6, 1980).
Definition: TimeConstants.hpp:83
gnsstk::DAY_PER_ZCOUNT
const double DAY_PER_ZCOUNT
Days in a Zcount.
Definition: TimeConstants.hpp:90
gnsstk::BDS_EPOCH_JD
const double BDS_EPOCH_JD
'Julian day' of BDS epoch (Jan. 1, 2006).
Definition: TimeConstants.hpp:118
gnsstk::BDS_EPOCH_MJD
const long BDS_EPOCH_MJD
Modified Julian Date of BDS epoch (Jan. 1, 2006).
Definition: TimeConstants.hpp:120
gnsstk::DAY_PER_SEC
const double DAY_PER_SEC
Days per second.
Definition: TimeConstants.hpp:65
gnsstk::GAL_EPOCH_MJD
const long GAL_EPOCH_MJD
Modified Julian Date of GAL epoch (Aug 22 1999)
Definition: TimeConstants.hpp:104
gnsstk::ZCOUNT_PER_DAY
const long ZCOUNT_PER_DAY
Zcounts in a day.
Definition: TimeConstants.hpp:88
gnsstk::QZS_EPOCH_MJD
const long QZS_EPOCH_MJD
Modified Julian Date of QZS epoch (Jan. 1, 1980).
Definition: TimeConstants.hpp:112
gnsstk::IRN_WEEK_PER_EPOCH
const long IRN_WEEK_PER_EPOCH
Weeks per BDS Epoch.
Definition: TimeConstants.hpp:130
gnsstk::ZCOUNT_PER_WEEK
const long ZCOUNT_PER_WEEK
Zcounts in a week.
Definition: TimeConstants.hpp:92
gnsstk::DAY_PER_MS
const double DAY_PER_MS
Days per milliseconds.
Definition: TimeConstants.hpp:75
gnsstk::GPS_WEEK_PER_EPOCH
const long GPS_WEEK_PER_EPOCH
Weeks per GPS Epoch.
Definition: TimeConstants.hpp:85
gnsstk::QZS_EPOCH_JD
const double QZS_EPOCH_JD
'Julian day' of QZS epoch (Jan. 1, 1980).
Definition: TimeConstants.hpp:110
gnsstk::WEEK_PER_ZCOUNT
const double WEEK_PER_ZCOUNT
Weeks in a Zcount.
Definition: TimeConstants.hpp:94
gnsstk::ZCOUNT_PER_MINUTE
const long ZCOUNT_PER_MINUTE
Z-counts per minute.
Definition: TimeConstants.hpp:96
gnsstk::GPS_EPOCH_JD
const double GPS_EPOCH_JD
'Julian day' of GPS epoch (Jan. 6, 1980).
Definition: TimeConstants.hpp:81
gnsstk::GLO_EPOCH_JD
const double GLO_EPOCH_JD
'Julian day' of GLONASS epoch (Jan. 1, 1996).
Definition: TimeConstants.hpp:134


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:42