Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
UTCTime constructors are broken #26
The UTCTime class is supposed to allow construction from a tuple of year/month/day/hour/minute/second, but the implementation does not appear to actually use those values at all. For example, the following initialization (taken from UTCTime::test()):
Looking at the implementation of these constructors (in https://github.com/SGL-UT/GPSTk/blob/master/ext/lib/Geodyn/UTCTime.hpp), there appear to be CivilTime and YDSTime objects created, but these don't appear to have any influence on the internal state of the construted UTCTime instance.
Am I not using these constructors correctly, or do they not work as intended?
I think you are supposed to use CivilTime class for that, it allows to do exactly the same things, and is part of the core library.
UTCTime appears to be somewhat of a work-in-progress. Fixing this issue by itself is easy enough, but does it have a point? We could be scratching the surface of a hornet nest here.
Thanks for the pointer to CivilTime.
I agree that fixing UTCTime should be very straightforward.
I really hope that fixing code that is already part of the documented part of the library, and which clearly does not behave sensibly in a very simple use case, would not disturb any hornets!