YDSTime_T.cpp
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 
39 #include "YDSTime.hpp"
40 #include "TimeTag.hpp"
41 #include "TestUtil.hpp"
42 #include <iostream>
43 #include <fstream>
44 
45 using namespace gnsstk;
46 using namespace std;
47 
48 class YDSTime_T
49 {
50 public:
51 //=============================================================================
52 // initializationTest ensures the constructors set the values properly
53 //=============================================================================
54  int initializationTest (void)
55  {
56  TestUtil testFramework( "YDSTime", "Constructor", __FILE__, __LINE__ );
57 
58 
59  YDSTime Compare(2008,2,1,TimeSystem::GPS); // Initialize an object
60 
61  //--------------------------------------------------------------------
62  // Were the attributes set to expectation with the explicit
63  // constructor?
64  //--------------------------------------------------------------------
65  testFramework.assert(2008 == Compare.year, "Explicit constructor did not set the year value properly", __LINE__);
66  testFramework.assert(2 == Compare.doy, "Explicit constructor did not set the day value properly", __LINE__);
67  testFramework.assert(1 == Compare.sod, "Explicit constructor did not set the second value properly", __LINE__);
68  testFramework.assert(TimeSystem(2) == Compare.getTimeSystem(), "Explicit constructor did not set the TimeSystem properly", __LINE__);
69 
70 
71  testFramework.changeSourceMethod("Constructor(YDSTime)");
72  YDSTime Copy(Compare); // Initialize the copy constructor
73  //--------------------------------------------------------------------
74  // Were the attributes set to expectation with the copy constructor?
75  //--------------------------------------------------------------------
76  testFramework.assert(2008 == Copy.year, "Copy constructor did not set the year value properly", __LINE__);
77  testFramework.assert(2 == Copy.doy, "Copy constructor did not set the day value properly", __LINE__);
78  testFramework.assert(1 == Copy.sod, "Copy constructor did not set the second value properly", __LINE__);
79  testFramework.assert(TimeSystem(2) == Copy.getTimeSystem(), "Copy constructor did not set the TimeSystem properly", __LINE__);
80 
81 
82  testFramework.changeSourceMethod("OperatorSet");
83  YDSTime Assigned;
84  Assigned = Compare;
85  //--------------------------------------------------------------------
86  // Were the attributes set to expectation with the Set Operator?
87  //--------------------------------------------------------------------
88  testFramework.assert(2008 == Assigned.year, "Set Operator did not set the year value properly", __LINE__);
89  testFramework.assert(2 == Assigned.doy, "Set Operator did not set the day value properly", __LINE__);
90  testFramework.assert(1 == Assigned.sod, "Set Operator did not set the second value properly", __LINE__);
91  testFramework.assert(TimeSystem(2) == Assigned.getTimeSystem(), "Set Operator did not set the TimeSystem properly", __LINE__);
92 
93  return testFramework.countFails();
94  }
95 
96 
97 //=============================================================================
98 // Test will check if YDSTime variable can be set from a map.
99 // Test also implicity tests whether the != operator functions.
100 //=============================================================================
101  int setFromInfoTest (void)
102  {
103  TestUtil testFramework( "YDSTime", "setFromInfo", __FILE__, __LINE__ );
104 
105 
106  YDSTime setFromInfo1;
107  YDSTime setFromInfo2;
108  YDSTime setFromInfo3;
109  YDSTime setFromInfo4;
110  YDSTime setFromInfo5;
111  YDSTime Compare(2008,2,1,TimeSystem::GPS), Compare2(2006,2,1,TimeSystem::GPS);
112  YDSTime Compare3(0,2,1,TimeSystem::GPS);
113 
115  Id['Y'] = "2008";
116  Id['j'] = "2";
117  Id['s'] = "1";
118  Id['P'] = "GPS";
119 
120  //--------------------------------------------------------------------
121  // Does a proper setFromInfo work with all information provided?
122  //--------------------------------------------------------------------
123  testFramework.assert(setFromInfo1.setFromInfo(Id), "setFromInfo experienced an error and returned false", __LINE__);
124  testFramework.assert(Compare == setFromInfo1, "setFromInfo did not set all of the values properly", __LINE__);
125 
126 
127  Id.erase('Y');
128  Id['y'] = "06";
129 
130  //--------------------------------------------------------------------
131  // Does a proper setFromInfo work with 2 digit year?
132  //--------------------------------------------------------------------
133  testFramework.assert(setFromInfo2.setFromInfo(Id), "setFromInfo experienced an error and returned false", __LINE__);
134  testFramework.assert(Compare2 == setFromInfo2, "setFromInfo did not set all of the values properly", __LINE__);
135 
136 
137  // Can we set a three digit year with 'y' option? Answer should be no.
138  Id.erase('y');
139  Id['y'] = "006";
140  //--------------------------------------------------------------------
141  // Can a YDSTime object be set with a 3 digit year? Answer should be no. 'y' option is for 2 digit years.
142  //--------------------------------------------------------------------
143  testFramework.assert(!setFromInfo3.setFromInfo(Id), "setFromInfo allowed a 3 digit year to be set with 'y' option", __LINE__);
144 
145 
146  Id.erase('y');
147  Id['y'] = "2008";
148  //--------------------------------------------------------------------
149  // Does a proper setFromInfo work with 4 digit year labeled as 2 digits?
150  //--------------------------------------------------------------------
151  testFramework.assert(!setFromInfo4.setFromInfo(Id), "setFromInfo experienced an error and returned false", __LINE__);
152 
153 
154  Id.erase('y');
155  //--------------------------------------------------------------------
156  // Can a CivilTime object be set without a year?
157  //--------------------------------------------------------------------
158  testFramework.assert(setFromInfo5.setFromInfo(Id), "setFromInfo experienced an error and returned false", __LINE__);
159  testFramework.assert(setFromInfo5 == Compare3, "setFromInfo did not set all of the values properly", __LINE__);
160 
161  return testFramework.countFails();
162  }
163 
164 
165 //=============================================================================
166 // Test will check if the ways to initialize and set an YDSTime object.
167 // Test also tests whether the comparison operators and isValid method function.
168 //=============================================================================
169  int operatorTest (void)
170  {
171  TestUtil testFramework( "YDSTime", "OperatorEquivalent", __FILE__, __LINE__ );
172 
173 
174  YDSTime Compare(2008,2,1);// Initialize with value
175  YDSTime LessThanYear(2005,2,1);// Initialize with value with a smaller year
176  YDSTime LessThanDOY(2008,1,1);// Initialize with value with a smaller day of year
177  YDSTime LessThanSOD(2008,2,0);// Initialize with value with a smaller second of day
178  YDSTime CompareCopy(Compare); // Initialize with copy constructor
179 
180  //--------------------------------------------------------------------
181  // Does the == Operator function?
182  //--------------------------------------------------------------------
183  testFramework.assert( Compare == CompareCopy, "Equivalence operator found equivalent objects to be not equivalent", __LINE__);
184  testFramework.assert(!(Compare == LessThanYear), "Equivalence operator found different year objects to be equivalent", __LINE__);
185  testFramework.assert(!(Compare == LessThanDOY), "Equivalence operator found different day objects to be equivalent", __LINE__);
186  testFramework.assert(!(Compare == LessThanSOD), "Equivalence operator found different second objects to be equivalent", __LINE__);
187 
188 
189  testFramework.changeSourceMethod("OperatorNotEquivalent");
190  //--------------------------------------------------------------------
191  // Does the != Operator function?
192  //--------------------------------------------------------------------
193  testFramework.assert( Compare != LessThanYear, "Not-equal operator found different year objects to be equivalent", __LINE__);
194  testFramework.assert( Compare != LessThanDOY, "Not-equal operator found different day objects to be equivalent", __LINE__);
195  testFramework.assert( Compare != LessThanSOD, "Not-equal operator found different second objects to be equivalent", __LINE__);
196  testFramework.assert(!(Compare != CompareCopy), "Not-equal operator found equivalent objects to not be equivalent", __LINE__);
197 
198  testFramework.changeSourceMethod("OperatorLessThan");
199  //--------------------------------------------------------------------
200  // Does the < operator function?
201  //--------------------------------------------------------------------
202  testFramework.assert( LessThanYear < Compare, "Less-than operator found less-than year object to not be less than", __LINE__);
203  testFramework.assert( LessThanDOY < Compare, "Less-than operator found less-than day object to not be less than", __LINE__);
204  testFramework.assert( LessThanSOD < Compare, "Less-than operator found less-than second object to not be less than", __LINE__);
205  testFramework.assert(!(Compare < LessThanYear), "Less-than operator found greater-than year object to be less than", __LINE__);
206  testFramework.assert(!(Compare < LessThanDOY), "Less-than operator found greater-than day object to be less than", __LINE__);
207  testFramework.assert(!(Compare < LessThanSOD), "Less-than operator found greater-than second object to be less than", __LINE__);
208  testFramework.assert(!(Compare < CompareCopy), "Less-than operator found equivalent objects to be less than", __LINE__);
209 
210 
211  testFramework.changeSourceMethod("OperatorGreaterThan");
212  //--------------------------------------------------------------------
213  // Does the > operator function?
214  //--------------------------------------------------------------------
215  testFramework.assert(!(LessThanYear > Compare), "Greater-than operator found less-than year object to be greater-than", __LINE__);
216  testFramework.assert(!(LessThanDOY > Compare), "Greater-than operator found less-than day object to be greater-than", __LINE__);
217  testFramework.assert(!(LessThanSOD > Compare), "Greater-than operator found less-than second object to be greater-than", __LINE__);
218  testFramework.assert( Compare > LessThanYear, "Greater-than operator found greater-than year object to not be greater-than", __LINE__);
219  testFramework.assert( Compare > LessThanDOY, "Greater-than operator found greater-than day object to not be greater-than", __LINE__);
220  testFramework.assert( Compare > LessThanSOD, "Greater-than operator found greater-than second object to not be greater-than", __LINE__);
221  testFramework.assert(!(Compare > CompareCopy), "Greater-than operator found equivalent objects to be greater-than", __LINE__);
222 
223 
224  testFramework.changeSourceMethod("OperatorLessThanOrEqualTo");
225  //--------------------------------------------------------------------
226  // Does the <= operator function?
227  //--------------------------------------------------------------------
228  testFramework.assert( LessThanYear <= Compare, "Less-than-or-equal-to operator found less-than year object to not be less-than-or-equal-to", __LINE__);
229  testFramework.assert( LessThanDOY <= Compare, "Less-than-or-equal-to operator found less-than day object to not be less-than-or-equal-to", __LINE__);
230  testFramework.assert( LessThanSOD <= Compare, "Less-than-or-equal-to operator found less-than second object to not be less-than-or-equal-to", __LINE__);
231  testFramework.assert(!(Compare <= LessThanYear), "Less-than-or-equal-to operator found greater-than year object to be less-than-or-equal-to", __LINE__);
232  testFramework.assert(!(Compare <= LessThanDOY), "Less-than-or-equal-to operator found greater-than day object to be less-than-or-equal-to", __LINE__);
233  testFramework.assert(!(Compare <= LessThanSOD), "Less-than-or-equal-to operator found greater-than second object to be less-than-or-equal-to", __LINE__);
234  testFramework.assert( Compare <= CompareCopy, "Less-than-or-equal-to operator found equivalent objects to not be less-than-or-equal-to", __LINE__);
235 
236 
237  testFramework.changeSourceMethod("OperatorGreaterThanOrEqualTo");
238  //--------------------------------------------------------------------
239  // Does the >= operator function?
240  //--------------------------------------------------------------------
241  testFramework.assert(!(LessThanYear >= Compare), "Greater-than-or-equal-to operator found less-than year object to be greater-than-or-equal-to", __LINE__);
242  testFramework.assert(!(LessThanDOY >= Compare), "Greater-than-or-equal-to operator found less-than day object to be greater-than-or-equal-to", __LINE__);
243  testFramework.assert(!(LessThanSOD >= Compare), "Greater-than-or-equal-to operator found less-than second object to be greater-than-or-equal-to", __LINE__);
244  testFramework.assert( Compare >= LessThanYear, "Greater-than-or-equal-to operator found greater-than year object to not be greater-than-or-equal-to", __LINE__);
245  testFramework.assert( Compare >= LessThanDOY, "Greater-than-or-equal-to operator found greater-than day object to not be greater-than-or-equal-to", __LINE__);
246  testFramework.assert( Compare >= LessThanSOD, "Greater-than-or-equal-to operator found greater-than second object to not be greater-than-or-equal-to", __LINE__);
247  testFramework.assert( Compare >= CompareCopy, "Greater-than-or-equal-to operator found equivalent objects to not be greater-than-or-equal-to", __LINE__);
248 
249  return testFramework.countFails();
250  }
251 
252 
253 //=============================================================================
254 // Test will check the reset method.
255 //=============================================================================
256  int resetTest (void)
257  {
258  TestUtil testFramework( "YDSTime", "reset" , __FILE__, __LINE__ );
259 
260 
261  YDSTime Compare(2008,2,1,TimeSystem::GPS); // Initialize an object
262 
263  Compare.reset(); // Reset it
264 
265  //--------------------------------------------------------------------
266  // Were the attributes reset to expectation?
267  //--------------------------------------------------------------------
268  testFramework.assert(TimeSystem(0) == Compare.getTimeSystem(), "reset() did not set the TimeSystem to UNK", __LINE__);
269  testFramework.assert(0 == (int)Compare.year, "reset() did not set the year value to 0", __LINE__);
270  testFramework.assert(0 == (int)Compare.doy, "reset() did not set the doy value to 0", __LINE__);
271  testFramework.assert(0 == (int)Compare.sod, "reset() did not set the sod value to 0", __LINE__);
272 
273  return testFramework.countFails();
274  }
275 
276 
277 //=============================================================================
278 // Test will check converting to/from CommonTime.
279 //=============================================================================
281  {
282  TestUtil testFramework( "YDSTime", "isValid", __FILE__, __LINE__ );
283 
284 
285  YDSTime Compare(2008,2,1,TimeSystem::GPS); // Initialize an object
286  CommonTime Test = Compare.convertToCommonTime(); // Convert to
287 
288  //--------------------------------------------------------------------
289  // Is the time after the BEGINNING_OF_TIME?
290  //--------------------------------------------------------------------
291  testFramework.assert(Compare.convertToCommonTime() > CommonTime::BEGINNING_OF_TIME, "Time provided found to be less than the beginning of time", __LINE__);
292 
293 
294  //--------------------------------------------------------------------
295  // Is the set object valid?
296  //--------------------------------------------------------------------
297  testFramework.assert(Compare.isValid(), "Time provided found to be unable to convert to/from CommonTime", __LINE__);
298 
299 
300  YDSTime Test2;
301  Test2.convertFromCommonTime(Test); // Convert From
302 
303  testFramework.changeSourceMethod("CommonTimeConversion");
304  //--------------------------------------------------------------------
305  // Is the result of conversion the same?
306  //--------------------------------------------------------------------
307  testFramework.assert(Compare.getTimeSystem()== Test2.getTimeSystem(), "TimeSystem provided found to be different after converting to and from CommonTime", __LINE__);
308  testFramework.assert(Test2.year == Compare.year, "Year provided found to be different after converting to and from CommonTime", __LINE__);
309  testFramework.assert(Test2.doy == Compare.doy, "DOY provided found to be different after converting to and from CommonTime", __LINE__);
310  testFramework.assert(Test2.sod == Compare.sod, "SOD provided found to be different after converting to and from CommonTime", __LINE__);
311  return testFramework.countFails();
312  }
313 
314 
315 //=============================================================================
316 // Test will check the TimeSystem comparisons when using the comparison operators.
317 //=============================================================================
318  int timeSystemTest (void)
319  {
320  TestUtil testFramework( "YDSTime", "OperatorEquivalentWithDifferingTimeSystem", __FILE__, __LINE__ );
321 
322 
323  YDSTime GPS1( 2008,2,1,TimeSystem::GPS );
324  YDSTime GPS2( 2005,2,1,TimeSystem::GPS );
325  YDSTime UTC1( 2008,2,1,TimeSystem::UTC );
326  YDSTime UNKNOWN(2008,2,1,TimeSystem::Unknown);
327  YDSTime ANY( 2008,2,1,TimeSystem::Any );
328  YDSTime ANY2( 2005,2,1,TimeSystem::Any );
329 
330  //--------------------------------------------------------------------
331  // Verify differing TimeSystem sets equivalence operator to false
332  // Note that the operator test checks for == in ALL members
333  //--------------------------------------------------------------------
334  testFramework.assert(!(GPS1 == UTC1), "Equivalence operator found objects with differing TimeSystems to be the same", __LINE__);
335  testFramework.assert(GPS1 == ANY, "Differing TimeSystems where one is TimeSystem::Any is not ignored for equals", __LINE__);
336  testFramework.assert(UTC1 == ANY, "Differing TimeSystems where one is TimeSystem::Any is not ignored for equals", __LINE__);
337  testFramework.assert(UNKNOWN == ANY, "Differing TimeSystems where one is TimeSystem::Any is not ignored for equals", __LINE__);
338 
339  testFramework.changeSourceMethod("OperatorNotEquivalentWithDifferingTimeSystem");
340  //--------------------------------------------------------------------
341  // Verify different Time System but same time inequality
342  //--------------------------------------------------------------------
343  testFramework.assert(GPS1 != UTC1, "Equivalent objects with differing TimeSystems are found to be equal", __LINE__);
344  testFramework.assert(GPS1 != UNKNOWN, "Equivalent objects with differing TimeSystems are found to be equal", __LINE__);
345  testFramework.assert(!(GPS1 != ANY), "Equivalent objects with differing TimeSystems where one is TimeSystem::Any are found to be not-equal", __LINE__);
346 
347  testFramework.changeSourceMethod("OperatorLessThanWithDifferingTimeSystem");
348  //--------------------------------------------------------------------
349  // Verify TimeSystem=ANY does not matter in other operator comparisons
350  //--------------------------------------------------------------------
351  testFramework.assert(ANY2 < GPS1, "Less than object with Any TimeSystem is not found to be less than", __LINE__);
352  testFramework.assert(GPS2 < ANY,"Less than object with GPS TimeSystem is not found to be less-than a greater object with Any TimeSystem", __LINE__);
353 
354  testFramework.changeSourceMethod("setTimeSystem");
355  UNKNOWN.setTimeSystem(TimeSystem(2)); // Set the Unknown TimeSystem
356  //--------------------------------------------------------------------
357  // Ensure resetting a Time System changes it
358  //--------------------------------------------------------------------
359  testFramework.assert(UNKNOWN.getTimeSystem()==TimeSystem(2), "setTimeSystem was unable to set the TimeSystem", __LINE__);
360 
361  return testFramework.countFails();
362  }
363 
364 
365 //=============================================================================
366 // Test for the formatted printing of YDSTime objects
367 //=============================================================================
368  int printfTest (void)
369  {
370  TestUtil testFramework( "YDSTime", "printf", __FILE__, __LINE__ );
371 
372 
373  YDSTime GPS1(2008,2,1,TimeSystem::GPS);
374  YDSTime UTC1(2008,2,1,TimeSystem::UTC);
375 
376  //--------------------------------------------------------------------
377  // Verify printed output matches expectation
378  //--------------------------------------------------------------------
379  testFramework.assert(GPS1.printf("%04Y %02y %03j %02s %02P") == (std::string)"2008 08 002 1.000000 GPS", "printf did not output in the proper format", __LINE__);
380  testFramework.assert(UTC1.printf("%04Y %02y %03j %02s %02P") == (std::string)"2008 08 002 1.000000 UTC", "printf did not output in the proper format", __LINE__);
381 
382 
383  //--------------------------------------------------------------------
384  // Verify printed error message matches expectation
385  //--------------------------------------------------------------------
386  testFramework.assert(GPS1.printError("%04Y %02y %03j %02s %02P") == (std::string)"ErrorBadTime ErrorBadTime ErrorBadTime ErrorBadTime ErrorBadTime", "printError did not output in the proper format", __LINE__);
387  testFramework.assert(UTC1.printError("%04Y %02y %03j %02s %02P") == (std::string)"ErrorBadTime ErrorBadTime ErrorBadTime ErrorBadTime ErrorBadTime", "printError did not output in the proper format", __LINE__);
388 
389 
390  return testFramework.countFails();
391  }
392 };
393 
394 int main() // Main function to initialize and run all tests above
395 {
396  int check, errorCounter = 0;
397  YDSTime_T testClass;
398 
399  check = testClass.initializationTest();
400  errorCounter += check;
401 
402  check = testClass.operatorTest();
403  errorCounter += check;
404 
405  check = testClass.setFromInfoTest();
406  errorCounter += check;
407 
408  check = testClass.resetTest();
409  errorCounter += check;
410 
411  check = testClass.timeSystemTest();
412  errorCounter += check;
413 
414  check = testClass.toFromCommonTimeTest();
415  errorCounter += check;
416 
417  check = testClass.printfTest();
418  errorCounter += check;
419 
420  std::cout << "Total Failures for " << __FILE__ << ": " << errorCounter << std::endl;
421 
422  return errorCounter; // Return the total number of errors
423 }
gnsstk::YDSTime::convertFromCommonTime
virtual void convertFromCommonTime(const CommonTime &ct)
Definition: YDSTime.cpp:76
YDSTime_T::resetTest
int resetTest(void)
Definition: YDSTime_T.cpp:256
YDSTime.hpp
gnsstk::YDSTime::printError
virtual std::string printError(const std::string &fmt) const
Definition: YDSTime.cpp:113
YDSTime_T::operatorTest
int operatorTest(void)
Definition: YDSTime_T.cpp:169
gnsstk::TimeTag::setTimeSystem
void setTimeSystem(const TimeSystem &timeSys)
Set method for internal variable timeSystem (enum).
Definition: TimeTag.hpp:165
gnsstk::TestUtil::countFails
int countFails(void)
Definition: TestUtil.hpp:771
YDSTime_T::printfTest
int printfTest(void)
Definition: YDSTime_T.cpp:368
gnsstk::TestUtil::assert
void assert(bool testExpression, const std::string &testMsg, const int lineNumber)
Definition: TestUtil.hpp:607
gnsstk::TimeTag::IdToValue
std::map< char, std::string > IdToValue
Definition: TimeTag.hpp:103
gnsstk::YDSTime
Definition: YDSTime.hpp:58
gnsstk::YDSTime::reset
virtual void reset()
Reset this object to the default state.
Definition: YDSTime.cpp:200
YDSTime_T::toFromCommonTimeTest
int toFromCommonTimeTest(void)
Definition: YDSTime_T.cpp:280
YDSTime_T::setFromInfoTest
int setFromInfoTest(void)
Definition: YDSTime_T.cpp:101
gnsstk::TimeSystem::Any
@ Any
wildcard; allows comparison with any other type
gnsstk::CommonTime::BEGINNING_OF_TIME
static const GNSSTK_EXPORT CommonTime BEGINNING_OF_TIME
earliest representable CommonTime
Definition: CommonTime.hpp:102
gnsstk::TimeSystem::Unknown
@ Unknown
unknown time frame; for legacy code compatibility
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::YDSTime::isValid
virtual bool isValid() const
Returns true if this object's members are valid, false otherwise.
Definition: YDSTime.cpp:189
gnsstk::TestUtil::changeSourceMethod
void changeSourceMethod(const std::string &newMethod)
Definition: TestUtil.hpp:785
YDSTime_T::initializationTest
int initializationTest(void)
Definition: YDSTime_T.cpp:54
TestUtil.hpp
main
int main()
Definition: YDSTime_T.cpp:394
gnsstk::YDSTime::doy
int doy
Definition: YDSTime.hpp:185
gnsstk::YDSTime::year
int year
Definition: YDSTime.hpp:184
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
gnsstk::YDSTime::setFromInfo
virtual bool setFromInfo(const IdToValue &info)
Definition: YDSTime.cpp:138
gnsstk::YDSTime::sod
double sod
Definition: YDSTime.hpp:186
TimeTag.hpp
gnsstk::TimeSystem::UTC
@ UTC
Coordinated Universal Time (e.g., from NTP)
gnsstk::YDSTime::convertToCommonTime
virtual CommonTime convertToCommonTime() const
Definition: YDSTime.cpp:61
YDSTime_T::timeSystemTest
int timeSystemTest(void)
Definition: YDSTime_T.cpp:318
gnsstk::TimeSystem::GPS
@ GPS
GPS system time.
std
Definition: Angle.hpp:142
YDSTime_T
Definition: YDSTime_T.cpp:48
gnsstk::TestUtil
Definition: TestUtil.hpp:265
gnsstk::TimeTag::getTimeSystem
TimeSystem getTimeSystem() const
Obtain time system info (enum).
Definition: TimeTag.hpp:169
gnsstk::YDSTime::printf
virtual std::string printf(const std::string &fmt) const
Definition: YDSTime.cpp:88


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