Encapsulate the day-in-space for orbital mechanics computations.
More...
#include <Plan13.h>
|
| DateTime (int year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t seconds) |
| Constructor to initialize to a calendar date and clock time. More...
|
|
| DateTime (bool setToNow=false) |
| Default constructor with the option to initialzie to current time. More...
|
|
| DateTime (const DateTime &)=default |
|
DateTime & | operator= (const DateTime &source)=default |
|
void | settime (int year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t seconds) |
| Set the DateTime from calendar date and clock time. More...
|
|
std::tuple< int, uint, uint, uint, uint, uint > | gettime () const |
| Compute the calendar date and clock time. More...
|
|
time_t | mktime () const |
|
bool | operator< (const DateTime &rhs) const |
|
bool | operator> (const DateTime &rhs) const |
|
DateTime | operator+ (long seconds) |
|
DateTime & | operator+= (long seconds) |
|
DateTime | operator+ (double days) |
|
DateTime & | operator+= (double days) |
|
double | operator- (const DateTime &rhs) const |
|
void | userNow () |
|
std::ostream & | print_on (std::ostream &os) const |
|
|
static long | fnday (long year, uint8_t month, uint8_t day) |
| Compute the day-in-space give the calendar year, month and day. More...
|
|
static std::tuple< int, uint8_t, uint8_t > | fndate (long dt) |
| Compute the calendar date from the day-in-space. More...
|
|
Encapsulate the day-in-space for orbital mechanics computations.
◆ DateTime() [1/2]
DateTime::DateTime |
( |
int |
year, |
|
|
uint8_t |
month, |
|
|
uint8_t |
day, |
|
|
uint8_t |
hour, |
|
|
uint8_t |
minute, |
|
|
uint8_t |
seconds |
|
) |
| |
|
inline |
Constructor to initialize to a calendar date and clock time.
- Parameters
-
year | |
month | |
day | |
hour | |
minute | |
seconds | |
◆ DateTime() [2/2]
DateTime::DateTime |
( |
bool |
setToNow = false | ) |
|
|
inlineexplicit |
Default constructor with the option to initialzie to current time.
- Parameters
-
setToNow | if true, initialize to the current time. |
◆ fndate()
std::tuple< int, uint8_t, uint8_t > DateTime::fndate |
( |
long |
dt | ) |
|
|
static |
Compute the calendar date from the day-in-space.
- Parameters
-
- Returns
- a tuple with the calendar year, month, day
◆ fnday()
long DateTime::fnday |
( |
long |
year, |
|
|
uint8_t |
month, |
|
|
uint8_t |
day |
|
) |
| |
|
static |
Compute the day-in-space give the calendar year, month and day.
- Parameters
-
- Returns
- the day-in-space
◆ gettime()
std::tuple< int, uint, uint, uint, uint, uint > DateTime::gettime |
( |
| ) |
const |
Compute the calendar date and clock time.
- Returns
- a tuple with year, month, day, hour, minute, seconds
◆ settime()
void DateTime::settime |
( |
int |
year, |
|
|
uint8_t |
month, |
|
|
uint8_t |
day, |
|
|
uint8_t |
hour, |
|
|
uint8_t |
minute, |
|
|
uint8_t |
seconds |
|
) |
| |
Set the DateTime from calendar date and clock time.
- Parameters
-
year | |
month | |
day | |
hour | |
minute | |
seconds | |
The documentation for this class was generated from the following files: