MISR Toolkit
1.5.1
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
All
Typedefs
+
Data Structures
Data Structures
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
_
a
b
c
d
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
y
z
+
Enumerations
a
b
c
f
g
h
j
m
n
p
r
t
v
y
+
Enumerator
a
b
c
d
f
g
h
i
j
k
m
n
o
r
s
t
u
v
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
Util
src
MtkTaiToTaiJd.c
Go to the documentation of this file.
1
/*===========================================================================
2
= =
3
= MtkTaiToTaiJd =
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
#include <math.h>
20
33
MTKt_status
MtkTaiToTaiJd
(
34
double
secTAI93,
35
double
jdTAI[2] )
36
{
37
double
dayFraction;
38
39
dayFraction = fmod(secTAI93,
SECONDSperDAY
);
40
jdTAI[0] =
EPOCH_DAY
+ ((secTAI93 - dayFraction) /
SECONDSperDAY
);
41
jdTAI[1] = dayFraction /
SECONDSperDAY
+
EPOCH_DAY_FRACTION
;
42
43
if
(jdTAI[1] >= 1.0)
44
{
45
jdTAI[0] += 1.0;
46
jdTAI[1] -= 1.0;
47
}
48
else
if
(jdTAI[1] < 0)
49
{
50
jdTAI[0] -= 1.0;
51
jdTAI[1] += 1.0;
52
}
53
54
return
MTK_SUCCESS
;
55
}
SECONDSperDAY
#define SECONDSperDAY
Definition:
MisrUtil.h:145
MTK_SUCCESS
Definition:
MisrError.h:12
MisrError.h
MisrUtil.h
MTKt_status
MTKt_status
Definition:
MisrError.h:11
MtkTaiToTaiJd
MTKt_status MtkTaiToTaiJd(double secTAI93, double jdTAI[2])
Convert TAI93 to TAI Julian date.
Definition:
MtkTaiToTaiJd.c:33
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