|
ocssw
V2022
|
#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <math.h>Go to the source code of this file.
Macros | |
| #define | SECONDS_IN_DAY 86400 |
Functions | |
| int | isleap (int year) |
| time_t | gmt_offset (void) |
| double | yds2unix (int16_t year, int16_t day, double secs) |
| double | yds2unix_ (int16_t *year, int16_t *day, double *secs) |
| void | unix2yds (double usec, int16_t *year, int16_t *day, double *secs) |
| char * | unix2ydhmsf (double usec, char zone) |
| double | ymds2unix (int16_t year, int16_t month, int16_t day, double secs) |
| void | unix2ymds (double usec, int16_t *year, int16_t *mon, int16_t *day, double *secs) |
| void | unix2ymdhms (double usec, int16_t *year, int16_t *mon, int16_t *day, int16_t *hour, int16_t *min, double *sec) |
| void | yd2md (int16_t year, int16_t doy, int16_t *month, int16_t *dom) |
| char * | ydhmsf (double dtime, char zone) |
| double | now (void) |
| void | ymdhms2ydmsec (int yy, int mm, int dd, int hh, int mn, int sc, int32_t *year, int32_t *day, int32_t *msec) |
| void | date2ydmsec (char *date, int32_t *year, int32_t *day, int32_t *msec) |
| char * | unix2isodate (double dtime, char zone) |
| double | isodate2unix (const char *isodate) |
| void | isodate2ydmsec (char *date, int32_t *year, int32_t *day, int32_t *msec) |
| void | isodate2ymds (const char *isodate, int16_t *year, int16_t *month, int16_t *day, double *sec) |
| double | zulu2unix (char *zulu) |
| void | addmsec (int32_t *year, int32_t *day, int32_t *msec, int32_t delta) |
| void | get_time (char *pr_time) |
| int | leapseconds_since_1993 (double tai93time) |
| int | leapseconds_since_1993_unix (double unixtime) |
| double | unix_to_tai93 (double unixtime) |
| double | tai93_to_unix (double tai93) |
| double | unix_to_tai58 (double unixtime) |
| double | tai58_to_unix (double tai58) |
| int32_t | jday (int16_t year, int16_t month, int16_t day) |
| int | jdate (int32_t julianDay, int32_t *year, int32_t *dayOfYear) |
| double | yds2tai93 (int16_t iyr, int16_t idy, double sec) |
| int | ccsds_to_yds (uint8_t *cctime, int32_t *iyear, int32_t *iday, double *sec) |
| double | udunits2unix (const char *str) |
| const char * | unix2udunits_c (double unixtime, int hasZ) |
Macro Definition Documentation
◆ SECONDS_IN_DAY
| #define SECONDS_IN_DAY 86400 |
Definition at line 11 of file timeutils.h.
Function Documentation
◆ addmsec()
| void addmsec | ( | int32_t * | year, |
| int32_t * | day, | ||
| int32_t * | msec, | ||
| int32_t | delta | ||
| ) |
◆ ccsds_to_yds()
| int ccsds_to_yds | ( | uint8_t * | cctime, |
| int32_t * | iyear, | ||
| int32_t * | iday, | ||
| double * | sec | ||
| ) |
Definition at line 5 of file ccsds_to_yds.c.
◆ date2ydmsec()
| void date2ydmsec | ( | char * | date, |
| int32_t * | year, | ||
| int32_t * | day, | ||
| int32_t * | msec | ||
| ) |
Definition at line 4 of file date2ydmsec.c.
◆ get_time()
| void get_time | ( | char * | pr_time | ) |
Definition at line 28 of file get_time.c.
◆ gmt_offset()
| time_t gmt_offset | ( | void | ) |
Definition at line 8 of file gmt_offset.c.
◆ isleap()
◆ isodate2unix()
| double isodate2unix | ( | const char * | isodate | ) |
Definition at line 61 of file unix2isodate.c.
◆ isodate2ydmsec()
| void isodate2ydmsec | ( | char * | date, |
| int32_t * | year, | ||
| int32_t * | day, | ||
| int32_t * | msec | ||
| ) |
Definition at line 20 of file date2ydmsec.c.
◆ isodate2ymds()
| void isodate2ymds | ( | const char * | isodate, |
| int16_t * | year, | ||
| int16_t * | month, | ||
| int16_t * | day, | ||
| double * | sec | ||
| ) |
Definition at line 73 of file unix2isodate.c.
◆ jdate()
| int jdate | ( | int32_t | julianDay, |
| int32_t * | year, | ||
| int32_t * | dayOfYear | ||
| ) |
Takes in a julian day and mutates year and doy to contain the gregorian year and day of that gregorian year of that julian day.
- Parameters
-
julianDay The Julian day to be converted year Out-parameter indicating the gregorian year that julianDayis indayOfYear Out-parameter indicating the number of days into the gregorian year that julianDayis.
◆ jday()
| int32_t jday | ( | int16_t | year, |
| int16_t | month, | ||
| int16_t | day | ||
| ) |
Converts a calendar date to the corresponding Julian day starting at noon on the calendar date. Originally implemented by Frederick S. Patt, GSC, November 4 1992. [Van] Flandern and Pulkkinen, Ap. J. Supplement Series 41, November 1979, p. 400.
- Parameters
-
year 4-digit year month 1-12 day 1-31
- Returns
- The astronomical Julian day corresponding to the one starting at noon on the calendar day
◆ leapseconds_since_1993()
| int leapseconds_since_1993 | ( | double | tai93time | ) |
Definition at line 58 of file leapsecond.c.
◆ leapseconds_since_1993_unix()
| int leapseconds_since_1993_unix | ( | double | unixtime | ) |
Definition at line 71 of file leapsecond.c.
◆ now()
| double now | ( | void | ) |
Definition at line 361 of file HISTORY.txt.
◆ tai58_to_unix()
◆ tai93_to_unix()
◆ udunits2unix()
| double udunits2unix | ( | const char * | str | ) |
Definition at line 116 of file udunits2unix.cpp.
◆ unix2isodate()
| char* unix2isodate | ( | double | dtime, |
| char | zone | ||
| ) |
creates a time string "1994-11-05T13:15:30.123Z"
- Parameters
-
dtime unix time as a double zone time zone character 'G'=gmt, 'L'=local
- Returns
- ISO 8601 time string (internal memory)
Definition at line 10 of file unix2isodate.c.
◆ unix2udunits_c()
| const char* unix2udunits_c | ( | double | unixtime, |
| int | hasZ | ||
| ) |
Definition at line 121 of file udunits2unix.cpp.
◆ unix2ydhmsf()
| char* unix2ydhmsf | ( | double | usec, |
| char | zone | ||
| ) |
Definition at line 8 of file unix2ydhmsf.c.
◆ unix2yds()
| void unix2yds | ( | double | usec, |
| int16_t * | year, | ||
| int16_t * | day, | ||
| double * | secs | ||
| ) |
Definition at line 7 of file unix2yds.c.
◆ unix2ymdhms()
| void unix2ymdhms | ( | double | usec, |
| int16_t * | year, | ||
| int16_t * | mon, | ||
| int16_t * | day, | ||
| int16_t * | hour, | ||
| int16_t * | min, | ||
| double * | sec | ||
| ) |
Definition at line 8 of file unix2ymdhms.c.
◆ unix2ymds()
| void unix2ymds | ( | double | usec, |
| int16_t * | year, | ||
| int16_t * | mon, | ||
| int16_t * | day, | ||
| double * | secs | ||
| ) |
Definition at line 8 of file unix2ymds.c.
◆ unix_to_tai58()
◆ unix_to_tai93()
◆ yd2md()
| void yd2md | ( | int16_t | year, |
| int16_t | doy, | ||
| int16_t * | month, | ||
| int16_t * | dom | ||
| ) |
◆ ydhmsf()
◆ yds2tai93()
◆ yds2unix()
| double yds2unix | ( | int16_t | year, |
| int16_t | day, | ||
| double | secs | ||
| ) |
Definition at line 7 of file yds2unix.c.
◆ yds2unix_()
| double yds2unix_ | ( | int16_t * | year, |
| int16_t * | day, | ||
| double * | secs | ||
| ) |
Definition at line 34 of file yds2unix.c.
◆ ymdhms2ydmsec()
| void ymdhms2ydmsec | ( | int | yy, |
| int | mm, | ||
| int | dd, | ||
| int | hh, | ||
| int | mn, | ||
| int | sc, | ||
| int32_t * | year, | ||
| int32_t * | day, | ||
| int32_t * | msec | ||
| ) |
Definition at line 3 of file ydhms2ydmsec.c.
◆ ymds2unix()
| double ymds2unix | ( | int16_t | year, |
| int16_t | month, | ||
| int16_t | day, | ||
| double | secs | ||
| ) |
Definition at line 9 of file ymds2unix.c.
◆ zulu2unix()
| double zulu2unix | ( | char * | zulu | ) |
Definition at line 3 of file zulu2unix.c.


