OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
addmsec.c
Go to the documentation of this file.
1 #include <timeutils.h>
2 
3 void addmsec(int32_t *year, int32_t *day, int32_t *msec, int32_t delta) {
4  int16_t year1, day1;
5  double sec1, unixTime;
6 
7  unixTime = yds2unix(*year, *day, *msec / 1000.0) + delta / 1000.0;
8  unix2yds(unixTime, &year1, &day1, &sec1);
9  *year = year1;
10  *day = day1;
11  *msec = sec1 * 1000.0;
12 }
13 
14 
15 
int32_t day
double yds2unix(int16_t year, int16_t day, double secs)
Definition: yds2unix.c:7
int32 * msec
Definition: l1_czcs_hdf.c:31
void addmsec(int32_t *year, int32_t *day, int32_t *msec, int32_t delta)
Definition: addmsec.c:3
const double delta
void unix2yds(double usec, short *year, short *day, double *secs)