MISR Toolkit
1.5.1
UnitConv
src
MtkDdToRad.c
Go to the documentation of this file.
1
/*===========================================================================
2
= =
3
= MtkDdToRad =
4
= =
5
=============================================================================
6
7
Jet Propulsion Laboratory
8
MISR
9
MISR Toolkit
10
11
Copyright 2005, California Institute of Technology.
12
ALL RIGHTS RESERVED.
13
U.S. Government Sponsorship acknowledged.
14
15
============================================================================*/
16
17
#include "
MisrUnitConv.h
"
18
#include "
MisrError.h
"
19
/* M_PI is not defined in math.h in Linux unless __USE_BSD is defined */
20
/* and you can define it at the gcc command-line if -ansi is set */
21
#ifndef __USE_BSD
22
# define __USE_BSD
23
#endif
24
#include <math.h>
25
38
MTKt_status
MtkDdToRad
(
39
double
dd,
40
double
*rad )
41
{
42
MTKt_status
status_code;
/* Return status of this function */
43
44
if
(rad == NULL)
45
MTK_ERR_CODE_JUMP
(
MTK_NULLPTR
);
46
47
*rad = dd * (M_PI / 180.0);
48
49
return
MTK_SUCCESS
;
50
51
ERROR_HANDLE:
52
return
status_code;
53
}
MtkDdToRad
MTKt_status MtkDdToRad(double dd, double *rad)
Convert decimal degrees to radians.
Definition:
MtkDdToRad.c:38
MTK_NULLPTR
Definition:
MisrError.h:19
MTK_ERR_CODE_JUMP
#define MTK_ERR_CODE_JUMP(code)
Definition:
MisrError.h:175
MTK_SUCCESS
Definition:
MisrError.h:12
MisrUnitConv.h
MisrError.h
MTKt_status
MTKt_status
Definition:
MisrError.h:11
MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51