MISR Toolkit
1.5.1
Util
src
MtkTaiJdToTai.c
Go to the documentation of this file.
1
/*===========================================================================
2
= =
3
= MtkTaiJdToTai =
4
= =
5
=============================================================================
6
7
Jet Propulsion Laboratory
8
MISR
9
MISR Toolkit
10
11
Copyright 2006, California Institute of Technology.
12
ALL RIGHTS RESERVED.
13
U.S. Government Sponsorship acknowledged.
14
15
============================================================================*/
16
17
#include "
MisrUtil.h
"
18
#include "
MisrError.h
"
19
32
MTKt_status
MtkTaiJdToTai
(
33
double
jdTAI[2],
34
double
*secTAI93 )
35
{
36
MTKt_status
status_code;
/* Return code of this function */
37
38
if
(secTAI93 == NULL)
39
MTK_ERR_CODE_JUMP
(
MTK_NULLPTR
);
40
41
*secTAI93 = (jdTAI[0] -
EPOCH_DAY
) *
SECONDSperDAY
+
42
(jdTAI[1] -
EPOCH_DAY_FRACTION
) *
SECONDSperDAY
;
43
44
return
MTK_SUCCESS
;
45
46
ERROR_HANDLE:
47
return
status_code;
48
}
MTK_NULLPTR
Definition:
MisrError.h:19
SECONDSperDAY
#define SECONDSperDAY
Definition:
MisrUtil.h:145
MTK_ERR_CODE_JUMP
#define MTK_ERR_CODE_JUMP(code)
Definition:
MisrError.h:175
MTK_SUCCESS
Definition:
MisrError.h:12
MtkTaiJdToTai
MTKt_status MtkTaiJdToTai(double jdTAI[2], double *secTAI93)
Convert TAI Julian date to TAI93 time.
Definition:
MtkTaiJdToTai.c:32
MisrError.h
MisrUtil.h
MTKt_status
MTKt_status
Definition:
MisrError.h:11
EPOCH_DAY
#define EPOCH_DAY
Definition:
MisrUtil.h:143
EPOCH_DAY_FRACTION
#define EPOCH_DAY_FRACTION
Definition:
MisrUtil.h:144
MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52