MISR Toolkit  1.5.1
Data Structures | Macros | Typedefs | Enumerations | Functions
MisrUtil.h File Reference
#include <netcdf.h>
#include <MisrError.h>
#include <mfhdf.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

union  MTKt_DataBufferType
 2-dimensional Data Buffer Type Union More...
 
struct  MTKt_DataBuffer
 2-dimensional Data Buffer More...
 
union  MTKt_DataBufferType3D
 3-dimensional Data Buffer Type Union More...
 
struct  MTKt_DataBuffer3D
 3-dimensional Data Buffer More...
 
struct  MTKt_ncvarid
 

Macros

#define MAXDIMS   10
 
#define MAXSTR   80
 
#define MTKd_NDATATYPE   13
 
#define MTKd_DataType
 
#define MTKd_DataSize   { 0, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 4, 8 }
 
#define MTKT_DATABUFFER_INIT   { 0, 0, 0, MTKe_void, MTK_FALSE, {0}, NULL, NULL }
 
#define MTKT_DATABUFFER3D_INIT   { 0, 0, 0, 0, 0, {0}, NULL, NULL }
 
#define EPOCH_DAY   2448988.5
 
#define EPOCH_DAY_FRACTION   0.0003125
 
#define SECONDSperDAY   86400.0
 
#define SECONDSperHOUR   3600.0
 
#define SECONDSperMINUTE   60.0
 
#define MTKd_DATETIME_LEN   28
 
#define LEAP_SECONDS
 

Typedefs

typedef char MTKt_char8
 
typedef unsigned char MTKt_uchar8
 
typedef int8_t MTKt_int8
 
typedef u_int8_t MTKt_uint8
 
typedef int16_t MTKt_int16
 
typedef u_int16_t MTKt_uint16
 
typedef int32_t MTKt_int32
 
typedef u_int32_t MTKt_uint32
 
typedef int64_t MTKt_int64
 
typedef u_int64_t MTKt_uint64
 
typedef float MTKt_float
 
typedef double MTKt_double
 

Enumerations

enum  MTKt_DataType {
  MTKe_void =0,
  MTKe_char8,
  MTKe_uchar8,
  MTKe_int8,
  MTKe_uint8,
  MTKe_int16,
  MTKe_uint16,
  MTKe_int32,
  MTKe_uint32,
  MTKe_int64,
  MTKe_uint64,
  MTKe_float,
  MTKe_double
}
 

Functions

MTKt_status MtkDataBufferAllocate (int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer *databuf)
 Allocate Data Buffer. More...
 
MTKt_status MtkDataBufferAllocate3D (int nblock, int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer3D *databuf)
 Allocate 3-dimensional Data Buffer (a buffer stack) More...
 
MTKt_status MtkDataBufferFree (MTKt_DataBuffer *databuf)
 Free data buffer. More...
 
MTKt_status MtkDataBufferFree3D (MTKt_DataBuffer3D *databuf)
 Free 3-dimensional data buffer (a buffer stack) More...
 
MTKt_status MtkDataBufferImport (int nline, int nsample, MTKt_DataType datatype, void *dataptr, MTKt_DataBuffer *databuf)
 Import Data Buffer. More...
 
MTKt_status MtkHdfToMtkDataTypeConvert (int32 hdf_datatype, MTKt_DataType *datatype)
 Convert HDF data type to MISR Toolkit data type. More...
 
MTKt_status MtkNcToMtkDataTypeConvert (nc_type nc_datatype, MTKt_DataType *datatype)
 
MTKt_status MtkParseFieldname (const char *fieldname, char **basefieldname, int *ndim, int **dimlist)
 Parses extra dimensions from fieldnames. More...
 
MTKt_status MtkStringListFree (int strcnt, char **strlist[])
 Free string list. More...
 
MTKt_status MtkCalToJulian (int y, int m, int d, int h, int mn, int s, double *julian)
 Convert calendar date to Julian date. More...
 
MTKt_status MtkJulianToCal (double jd, int *year, int *month, int *day, int *hour, int *min, int *sec)
 Convert Julian date to calendar date. More...
 
MTKt_status MtkDateTimeToJulian (const char *datetime, double *jd)
 Convert date and time (ISO 8601) to Julian date. More...
 
MTKt_status MtkJulianToDateTime (double jd, char datetime[MTKd_DATETIME_LEN])
 Convert Julian date to date and time (ISO 8601) More...
 
MTKt_status MtkTaiJdToTai (double jdTAI[2], double *secTAI93)
 Convert TAI Julian date to TAI93 time. More...
 
MTKt_status MtkTaiJdToUtcJd (double jdTAI[2], double jdUTC[2])
 Convert TAI Julian date to UTC Julian date. More...
 
MTKt_status MtkTaiToTaiJd (double secTAI93, double jdTAI[2])
 Convert TAI93 to TAI Julian date. More...
 
MTKt_status MtkTaiToUtc (double secTAI93, char utc_datetime[MTKd_DATETIME_LEN])
 Convert TAI93 to UTC. More...
 
MTKt_status MtkUtcJdToTaiJd (double jdUTC[2], double jdTAI[2])
 Convert UTC Julian date to TAI Julian date. More...
 
MTKt_status MtkUtcJdToUtc (double jdUTCin[2], char utc_datetime[MTKd_DATETIME_LEN])
 Convert calendar date to Julian date. More...
 
MTKt_status MtkUtcToTai (char utc_datetime[MTKd_DATETIME_LEN], double *secTAI93)
 Convert UTC to TAI93. More...
 
MTKt_status MtkUtcToUtcJd (char utc_datetime[MTKd_DATETIME_LEN], double jdUTC[2])
 Convert UTC date to UTC Julian date. More...
 
MTKt_status MtkNCVarId (int Ncid, const char *Name, MTKt_ncvarid *Var)
 
char * MtkVersion (void)
 MisrToolkit Version. More...
 

Macro Definition Documentation

◆ EPOCH_DAY

#define EPOCH_DAY   2448988.5

Definition at line 143 of file MisrUtil.h.

◆ EPOCH_DAY_FRACTION

#define EPOCH_DAY_FRACTION   0.0003125

Definition at line 144 of file MisrUtil.h.

◆ LEAP_SECONDS

#define LEAP_SECONDS
Value:
{{ 2441317.5, 10.0 }, /* 1972 JAN 1 =JD 2441317.5 TAI-UTC= 10.0000000 S */ \
{ 2441499.5, 11.0 }, /* 1972 JUL 1 =JD 2441499.5 TAI-UTC= 11.0000000 S */ \
{ 2441683.5, 12.0 }, /* 1973 JAN 1 =JD 2441683.5 TAI-UTC= 12.0000000 S */ \
{ 2442048.5, 13.0 }, /* 1974 JAN 1 =JD 2442048.5 TAI-UTC= 13.0000000 S */ \
{ 2442413.5, 14.0 }, /* 1975 JAN 1 =JD 2442413.5 TAI-UTC= 14.0000000 S */ \
{ 2442778.5, 15.0 }, /* 1976 JAN 1 =JD 2442778.5 TAI-UTC= 15.0000000 S */ \
{ 2443144.5, 16.0 }, /* 1977 JAN 1 =JD 2443144.5 TAI-UTC= 16.0000000 S */ \
{ 2443509.5, 17.0 }, /* 1978 JAN 1 =JD 2443509.5 TAI-UTC= 17.0000000 S */ \
{ 2443874.5, 18.0 }, /* 1979 JAN 1 =JD 2443874.5 TAI-UTC= 18.0000000 S */ \
{ 2444239.5, 19.0 }, /* 1980 JAN 1 =JD 2444239.5 TAI-UTC= 19.0000000 S */ \
{ 2444786.5, 20.0 }, /* 1981 JUL 1 =JD 2444786.5 TAI-UTC= 20.0000000 S */ \
{ 2445151.5, 21.0 }, /* 1982 JUL 1 =JD 2445151.5 TAI-UTC= 21.0000000 S */ \
{ 2445516.5, 22.0 }, /* 1983 JUL 1 =JD 2445516.5 TAI-UTC= 22.0000000 S */ \
{ 2446247.5, 23.0 }, /* 1985 JUL 1 =JD 2446247.5 TAI-UTC= 23.0000000 S */ \
{ 2447161.5, 24.0 }, /* 1988 JAN 1 =JD 2447161.5 TAI-UTC= 24.0000000 S */ \
{ 2447892.5, 25.0 }, /* 1990 JAN 1 =JD 2447892.5 TAI-UTC= 25.0000000 S */ \
{ 2448257.5, 26.0 }, /* 1991 JAN 1 =JD 2448257.5 TAI-UTC= 26.0000000 S */ \
{ 2448804.5, 27.0 }, /* 1992 JUL 1 =JD 2448804.5 TAI-UTC= 27.0000000 S */ \
{ 2449169.5, 28.0 }, /* 1993 JUL 1 =JD 2449169.5 TAI-UTC= 28.0000000 S */ \
{ 2449534.5, 29.0 }, /* 1994 JUL 1 =JD 2449534.5 TAI-UTC= 29.0000000 S */ \
{ 2450083.5, 30.0 }, /* 1996 JAN 1 =JD 2450083.5 TAI-UTC= 30.0000000 S */ \
{ 2450630.5, 31.0 }, /* 1997 JUL 1 =JD 2450630.5 TAI-UTC= 31.0000000 S */ \
{ 2451179.5, 32.0 }, /* 1999 JAN 1 =JD 2451179.5 TAI-UTC= 32.0000000 S */ \
{ 2453736.5, 33.0 }, /* 2006 JAN 1 =JD 2453736.5 TAI-UTC= 33.0000000 S */ \
{ 2454832.5, 34.0 }, /* 2009 JAN 1 =JD 2454832.5 TAI-UTC= 34.0000000 S */ \
{ 2456109.5, 35.0 }, /* 2012 JUL 1 =JD 2456109.5 TAI-UTC= 35.0000000 S */ \
{ 2457204.5, 36.0 }, /* 2015 JUL 1 =JD 2457204.5 TAI-UTC= 36.0000000 S */ \
{ 2457754.5, 37.0 }} /* 2017 JAN 1 =JD 2457754.5 TAI-UTC= 37.0000000 S */

Definition at line 152 of file MisrUtil.h.

◆ MAXDIMS

#define MAXDIMS   10

Definition at line 27 of file MisrUtil.h.

◆ MAXSTR

#define MAXSTR   80

Definition at line 28 of file MisrUtil.h.

◆ MTKd_DataSize

#define MTKd_DataSize   { 0, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 4, 8 }

Definition at line 34 of file MisrUtil.h.

◆ MTKd_DataType

#define MTKd_DataType
Value:
{ "void", "char8", "uchar8", "int8", "uint8", \
"int16", "uint16", "int32", "uint32", \
"int64", "uint64", "float", "double" }

Definition at line 31 of file MisrUtil.h.

◆ MTKd_DATETIME_LEN

#define MTKd_DATETIME_LEN   28

Definition at line 149 of file MisrUtil.h.

◆ MTKd_NDATATYPE

#define MTKd_NDATATYPE   13

Definition at line 30 of file MisrUtil.h.

◆ MTKT_DATABUFFER3D_INIT

#define MTKT_DATABUFFER3D_INIT   { 0, 0, 0, 0, 0, {0}, NULL, NULL }

Definition at line 140 of file MisrUtil.h.

◆ MTKT_DATABUFFER_INIT

#define MTKT_DATABUFFER_INIT   { 0, 0, 0, MTKe_void, MTK_FALSE, {0}, NULL, NULL }

Definition at line 109 of file MisrUtil.h.

◆ SECONDSperDAY

#define SECONDSperDAY   86400.0

Definition at line 145 of file MisrUtil.h.

◆ SECONDSperHOUR

#define SECONDSperHOUR   3600.0

Definition at line 146 of file MisrUtil.h.

◆ SECONDSperMINUTE

#define SECONDSperMINUTE   60.0

Definition at line 147 of file MisrUtil.h.

Typedef Documentation

◆ MTKt_char8

typedef char MTKt_char8

Definition at line 66 of file MisrUtil.h.

◆ MTKt_double

typedef double MTKt_double

Definition at line 77 of file MisrUtil.h.

◆ MTKt_float

typedef float MTKt_float

Definition at line 76 of file MisrUtil.h.

◆ MTKt_int16

typedef int16_t MTKt_int16

Definition at line 70 of file MisrUtil.h.

◆ MTKt_int32

typedef int32_t MTKt_int32

Definition at line 72 of file MisrUtil.h.

◆ MTKt_int64

typedef int64_t MTKt_int64

Definition at line 74 of file MisrUtil.h.

◆ MTKt_int8

typedef int8_t MTKt_int8

Definition at line 68 of file MisrUtil.h.

◆ MTKt_uchar8

typedef unsigned char MTKt_uchar8

Definition at line 67 of file MisrUtil.h.

◆ MTKt_uint16

typedef u_int16_t MTKt_uint16

Definition at line 71 of file MisrUtil.h.

◆ MTKt_uint32

typedef u_int32_t MTKt_uint32

Definition at line 73 of file MisrUtil.h.

◆ MTKt_uint64

typedef u_int64_t MTKt_uint64

Definition at line 75 of file MisrUtil.h.

◆ MTKt_uint8

typedef u_int8_t MTKt_uint8

Definition at line 69 of file MisrUtil.h.

Enumeration Type Documentation

◆ MTKt_DataType

Enumerator
MTKe_void 
MTKe_char8 
MTKe_uchar8 
MTKe_int8 
MTKe_uint8 
MTKe_int16 
MTKe_uint16 
MTKe_int32 
MTKe_uint32 
MTKe_int64 
MTKe_uint64 
MTKe_float 
MTKe_double 

Definition at line 36 of file MisrUtil.h.

Function Documentation

◆ MtkCalToJulian()

MTKt_status MtkCalToJulian ( int  year,
int  month,
int  day,
int  hour,
int  min,
int  sec,
double *  jd 
)

Convert calendar date to Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the calendar date 2002-05-02 02:00:00 to Julian date.
status = MtkCalToJulian(2002, 5, 2, 2, 0, 0, &julian);
Parameters
[in]yearYear
[in]monthMonth
[in]dayDay
[in]hourHour
[in]minMinutes
[in]secSeconds
[out]jdJulian date

Definition at line 61 of file MtkCalToJulian.c.

◆ MtkDataBufferAllocate()

MTKt_status MtkDataBufferAllocate ( int  nline,
int  nsample,
MTKt_DataType  datatype,
MTKt_DataBuffer databuf 
)

Allocate Data Buffer.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we allocate a data buffer with a size of 5 lines by 10 samples of type MTKe_int16
status = MtkDataBufferAllocate(5, 10, MTKe_int16, &databuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by databuf
Parameters
[in]nlineNumber of lines
[in]nsampleNumber of samples
[in]datatypeData Type
[out]databufData Buffer

Definition at line 35 of file MtkDataBufferAllocate.c.

◆ MtkDataBufferAllocate3D()

MTKt_status MtkDataBufferAllocate3D ( int  nblock,
int  nline,
int  nsample,
MTKt_DataType  datatype,
MTKt_DataBuffer3D databuf 
)

Allocate 3-dimensional Data Buffer (a buffer stack)

Returns
MTK_SUCCESS if successful.
Example:
In this example, we allocate a 3-dimensional data buffer with a size of 3 blocks by 5 lines by 10 samples of type MTKe_int16
status = MtkDataBufferAllocate3D(3, 5, 10, MTKe_int16, &databuf);
Note
The caller is responsible for using MtkDataBufferFree3D() to free the memory used by databuf
Parameters
[in]nblockNumber of blocks
[in]nlineNumber of lines
[in]nsampleNumber of samples
[in]datatypeData Type
[out]databufData Buffer

Definition at line 35 of file MtkDataBufferAllocate3D.c.

◆ MtkDataBufferFree()

MTKt_status MtkDataBufferFree ( MTKt_DataBuffer databuf)

Free data buffer.

Returns
MTK_SUCCESS
Example:
In this example, we have a MTKt_DataBuffer called databuf that was previously allocated with MtkDataBufferAllocate() and we wish to free it.
status = MtkDataBufferFree(&databuf);
Parameters
[in,out]databufData Buffer

Definition at line 33 of file MtkDataBufferFree.c.

◆ MtkDataBufferFree3D()

MTKt_status MtkDataBufferFree3D ( MTKt_DataBuffer3D databuf)

Free 3-dimensional data buffer (a buffer stack)

Returns
MTK_SUCCESS
Example:
In this example, we have a MTKt_DataBuffer3D called databuf that was previously allocated with MtkDataBufferAllocate3D() and we wish to free it.
status = MtkDataBufferFree3D(&databuf);
Parameters
[in,out]databufData Buffer

Definition at line 33 of file MtkDataBufferFree3D.c.

◆ MtkDataBufferImport()

MTKt_status MtkDataBufferImport ( int  nline,
int  nsample,
MTKt_DataType  datatype,
void *  dataptr,
MTKt_DataBuffer databuf 
)

Import Data Buffer.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we import an existing data buffer into a data buffer structure with a size of 5 lines by 10 samples of type MTKe_int16
status = MtkDataBufferImport(5, 10, MTKe_int16, dataptr, &databuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by databuf
Parameters
[in]nlineNumber of lines
[in]nsampleNumber of samples
[in]datatypeData Type
[in]dataptrData pointer to payload
[out]databufData Buffer

Definition at line 35 of file MtkDataBufferImport.c.

◆ MtkDateTimeToJulian()

MTKt_status MtkDateTimeToJulian ( const char *  datetime,
double *  jd 
)

Convert date and time (ISO 8601) to Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the date and time 2002-05-02 02:00:00 to Julian date.
status = MtkDateTimeToJulian("2002-05-02T02:00:00Z", &julian);
Parameters
[in]datetimeDate and time (ISO 8601)
[out]jdJulian date

Definition at line 33 of file MtkDateTimeToJulian.c.

◆ MtkHdfToMtkDataTypeConvert()

MTKt_status MtkHdfToMtkDataTypeConvert ( int32  hdf_datatype,
MTKt_DataType datatype 
)

Convert HDF data type to MISR Toolkit data type.

Returns
MISR Toolkit data type

Definition at line 25 of file MtkHdfToMtkDataTypeConvert.c.

◆ MtkJulianToCal()

MTKt_status MtkJulianToCal ( double  jd,
int *  year,
int *  month,
int *  day,
int *  hour,
int *  min,
int *  sec 
)

Convert Julian date to calendar date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the julian date 2453728.27313 to calendar date.
status = MtkJulianToCal(2453728.27313, &year, &month, &day, &hour, &min, &sec);
Note
Julian date must be >= 1721119.5
Parameters
[in]jdJulian date
[out]yearYear
[out]monthMonth
[out]dayDay
[out]hourHour
[out]minMinutes
[out]secSeconds

Definition at line 126 of file MtkJulianToCal.c.

◆ MtkJulianToDateTime()

MTKt_status MtkJulianToDateTime ( double  jd,
char  datetime[MTKd_DATETIME_LEN] 
)

Convert Julian date to date and time (ISO 8601)

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the julian date 2453728.27313 to date and time (ISO 8601).
status = MtkJulianToDateTime(2453728.27313, datetime);
Parameters
[in]jdJulian date
[out]datetimeDate and time (ISO 8601)

Definition at line 34 of file MtkJulianToDateTime.c.

◆ MtkNcToMtkDataTypeConvert()

MTKt_status MtkNcToMtkDataTypeConvert ( nc_type  nc_datatype,
MTKt_DataType datatype 
)

Definition at line 63 of file MtkHdfToMtkDataTypeConvert.c.

◆ MtkNCVarId()

MTKt_status MtkNCVarId ( int  Ncid,
const char *  Name,
MTKt_ncvarid Var 
)

Definition at line 21 of file MtkNCVarId.c.

◆ MtkParseFieldname()

MTKt_status MtkParseFieldname ( const char *  fieldname,
char **  basefieldname,
int *  ndim,
int **  dimlist 
)

Parses extra dimensions from fieldnames.

Returns
Base fieldname, number of extra dimensions and extra dimension list
Parameters
fieldnameField name
basefieldnameBase field name
ndimNumber dimensions
dimlistDimension list

Definition at line 37 of file MtkParseFieldname.c.

◆ MtkStringListFree()

MTKt_status MtkStringListFree ( int  strcnt,
char **  strlist[] 
)

Free string list.

Returns
MTK_SUCCESS
Example:
In this example, we have a string list and a string size such as fieldlist and fieldcnt that was previously allocated with MtkFileGridToFieldList() and we wish to free it.
status = MtkStringListFree(fieldcnt, &fieldlist);
Parameters
[in]strcntString Count
[in,out]strlistString List

Definition at line 33 of file MtkStringListFree.c.

◆ MtkTaiJdToTai()

MTKt_status MtkTaiJdToTai ( double  jdTAI[2],
double *  secTAI93 
)

Convert TAI Julian date to TAI93 time.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert a TAI Julian date to a TAI93 time.
status = MtkTaiJdToTai(jdTAI, &secTAI93);
Parameters
[in]jdTAITAI Julian date
[out]secTAI93TAI93 Time

Definition at line 32 of file MtkTaiJdToTai.c.

◆ MtkTaiJdToUtcJd()

MTKt_status MtkTaiJdToUtcJd ( double  jdTAI[2],
double  jdUTC[2] 
)

Convert TAI Julian date to UTC Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert a TAI Julian date to a UTC Julian date.
status = MtkTaiJdToUtcJd(jdTAI, jdUTC);
Parameters
[in]jdTAITAI Julian date
[out]jdUTCUTC Julian date

Definition at line 32 of file MtkTaiJdToUtcJd.c.

◆ MtkTaiToTaiJd()

MTKt_status MtkTaiToTaiJd ( double  secTAI93,
double  jdTAI[2] 
)

Convert TAI93 to TAI Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from a TAI93 time to a TAI Julian date.
status = MtkTaiToTaiJd(429030246.630996, jdTAI);
Parameters
[in]secTAI93TAI93 Time
[out]jdTAITAI Julian date

Definition at line 33 of file MtkTaiToTaiJd.c.

◆ MtkTaiToUtc()

MTKt_status MtkTaiToUtc ( double  secTAI93,
char  utc_datetime[MTKd_DATETIME_LEN] 
)

Convert TAI93 to UTC.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the TAI93 time to UTC time.
status = MtkTaiToUtc(429030246.630996, utc_datetime);
Parameters
[in]secTAI93TAI93 Time
[out]utc_datetimeUTC Date time

Definition at line 32 of file MtkTaiToUtc.c.

◆ MtkUtcJdToTaiJd()

MTKt_status MtkUtcJdToTaiJd ( double  jdUTC[2],
double  jdTAI[2] 
)

Convert UTC Julian date to TAI Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert a UTC Julian date to a TAI Julian date
status = MtkUtcJdToTaiJd(jdUTC, jdTAI);
Parameters
[in]jdUTCUTC Julian date
[out]jdTAITAI Julian date

Definition at line 32 of file MtkUtcJdToTaiJd.c.

◆ MtkUtcJdToUtc()

MTKt_status MtkUtcJdToUtc ( double  jdUTCin[2],
char  utc_datetime[MTKd_DATETIME_LEN] 
)

Convert calendar date to Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the calendar date 2002-05-02 02:00:00 to Julian date.
status = MtkUtcJdToUtc(2002, 5, 2, 2, 0, 0, &julian);
Parameters
[in]jdUTCinUTC Julian date
[out]utc_datetimeUTC Date time

Definition at line 112 of file MtkUtcJdToUtc.c.

◆ MtkUtcToTai()

MTKt_status MtkUtcToTai ( char  utc_datetime[MTKd_DATETIME_LEN],
double *  secTAI93 
)

Convert UTC to TAI93.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from UTC 2006-08-06T15:04:00.630996Z to TAI93.
status = MtkUtcToTai("2006-08-06T15:04:00.630996Z" &tai93);
Parameters
[in]utc_datetimeUTC Date time
[out]secTAI93TAI Time

Definition at line 32 of file MtkUtcToTai.c.

◆ MtkUtcToUtcJd()

MTKt_status MtkUtcToUtcJd ( char  utc_datetime[MTKd_DATETIME_LEN],
double  jdUTC[2] 
)

Convert UTC date to UTC Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert the UTC date 2006-08-06T15:04:00.630996Z to a UTC Julian date.
status = MtkUtcToUtcJd("2006-08-06T15:04:00.630996Z", jdUTC);
Parameters
[in]utc_datetimeUTC Date time
[out]jdUTCUTC Julian date

Definition at line 46 of file MtkUtcToUtcJd.c.

◆ MtkVersion()

char* MtkVersion ( void  )

MisrToolkit Version.

Returns
version
Example:
In this example, we query MisrToolkit version.
printf("MisrToolkit Version = %s\n", MtkVersion());

Definition at line 31 of file MtkVersion.c.


MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53