TimeSystem.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 
40 
41 #ifndef GNSSTK_TIMESYSTEM_HPP
42 #define GNSSTK_TIMESYSTEM_HPP
43 
44 #include <iostream>
45 #include <string>
46 #include "EnumIterator.hpp"
47 
48 namespace gnsstk
49 {
51  enum class TimeSystem
52  {
53  // Add new systems BEFORE count, then
54  // add to asString() in TimeSystem.cpp and make parallel
55  // to this enum.
56 
57  // Unknown MUST BE FIRST, and must = 0
58  Unknown = 0,
59  Any,
60  GPS,
61  GLO,
62  GAL,
63  QZS,
64  BDT,
65  IRN,
66  UTC,
67  TAI,
68  TT,
69  TDB,
70  // Last MUST BE LAST
71  Last
72  };
73 
77 
78 
102  double getLeapSeconds(const int yr, const int mon, const double day);
103 
119  const TimeSystem inTS, const TimeSystem outTS,
120  const int year, const int month, const double day);
121 
127  std::ostream& operator<<(std::ostream& os, const TimeSystem ts);
128 
129  namespace StringUtils
130  {
132  std::string asString(TimeSystem ts);
134  TimeSystem asTimeSystem(const std::string& s);
135  }
136 
137 } // end namespace
138 
139 #endif // GNSSTK_TIMESYSTEM_HPP
gnsstk::TimeSystem::TT
@ TT
Terrestrial time (used in IERS conventions)
gnsstk::TimeSystem::Last
@ Last
Used to verify that all items are described at compile time.
example6.day
day
Definition: example6.py:66
example6.year
year
Definition: example6.py:64
gnsstk::TimeSystem::TAI
@ TAI
International Atomic Time.
gnsstk::TimeSystem::Any
@ Any
wildcard; allows comparison with any other type
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::TimeSystemIterator
EnumIterator< TimeSystem, TimeSystem::Unknown, TimeSystem::Last > TimeSystemIterator
Definition: TimeSystem.hpp:76
gnsstk::TimeSystem::Unknown
@ Unknown
unknown time frame; for legacy code compatibility
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::TimeSystem::TDB
@ TDB
Barycentric dynamical time (JPL ephemeris); very near TT.
gnsstk::StringUtils::asTimeSystem
TimeSystem asTimeSystem(const std::string &s)
Convert a string representation of TimeSystem to an enum.
Definition: TimeSystem.cpp:324
gnsstk::TimeSystem::IRN
@ IRN
IRNSS system Time.
gnsstk::TimeSystem::QZS
@ QZS
QZSS system Time.
gnsstk::TimeSystem::GAL
@ GAL
Galileo system time.
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
EnumIterator.hpp
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
gnsstk::TimeSystem::GLO
@ GLO
GLONASS system time (aka UTC(SU))
gnsstk::TimeSystem::UTC
@ UTC
Coordinated Universal Time (e.g., from NTP)
gnsstk::EnumIterator
Definition: EnumIterator.hpp:68
gnsstk::TimeSystem::GPS
@ GPS
GPS system time.
gnsstk::getLeapSeconds
double getLeapSeconds(const int year, const int month, const double day)
Definition: TimeSystem.cpp:53
example6.month
month
Definition: example6.py:65
gnsstk::getTimeSystemCorrection
double getTimeSystemCorrection(const TimeSystem inTS, const TimeSystem outTS, const int year, const int month, const double day)
Definition: TimeSystem.cpp:181
gnsstk::TimeSystem::BDT
@ BDT
BeiDou system Time.


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