OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
time_str.c
Go to the documentation of this file.
1 #include <stdio.h>
2 
3 int time_str(short year, short jday, int millisec, char *time)
4 /*******************************************************************
5 
6  time_str
7 
8  purpose: Make the time string from year, day and millisec
9 
10  Returns type: int 0 if OK, -1 if error writing to the time string
11 
12  Parameters: (in calling order)
13  Type Name I/O Description
14  ---- ---- --- -----------
15  short year I year
16  short jday I day of year
17  int millisec I time of day in milliseconds
18  char * time O string with time in form:
19  YYYYDDDHHMMSSFFF Note that
20  time should be created with
21  at least 17 characters
22 
23  Modification history:
24  Programmer Date Description of change
25  ---------- ---- ---------------------
26  W. Robinson 13-Apr-2004 Original development
27 
28  *******************************************************************/ {
29  int sec, msec, min, hr;
30 
31  /*
32  * Break apart the millisecs to hours, mins, secs and fraction
33  */
34  sec = millisec / 1000;
35  msec = millisec - sec * 1000;
36  min = sec / 60;
37  sec = sec - min * 60;
38  hr = min / 60;
39  min = min - hr * 60;
40  /*
41  * fill the string
42  */
43  if ((sprintf(time, "%04d%03d%02d%02d%02d%03d", year, jday, hr,
44  min, sec, msec)) != 16)
45  return -1;
46  return 0;
47 }
These are used to scale the SD before writing it to the HDF4 file The default is and which means the product is not scaled at all Since the product is usually stored as a float inside of this is a way to write the float out as a integer l2prod min
int32 * msec
Definition: l1_czcs_hdf.c:31
int32_t jday(int16_t i, int16_t j, int16_t k)
Definition: jday.c:4
int time_str(short year, short jday, int millisec, char *time)
Definition: time_str.c:3
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start time
Definition: HISTORY.txt:248