MISR Toolkit  1.5.1
MtkRadToDegMinSec.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkRadToDegMinSec =
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 
39  double rad,
40  int *deg,
41  int *min,
42  double *sec )
43 {
44  MTKt_status status_code; /* Return status of this function */
45  MTKt_status status; /* Return status */
46  double dd; /* Decimal degrees */
47 
48  if (deg == NULL || min == NULL || sec == NULL)
50 
51  dd = rad / (M_PI / 180.0);
52 
53  status = MtkDdToDegMinSec( dd, deg, min, sec );
54  MTK_ERR_COND_JUMP(status);
55 
56  return status;
57 
58 ERROR_HANDLE:
59  return status_code;
60 }
#define MTK_ERR_CODE_JUMP(code)
Definition: MisrError.h:175
MTKt_status MtkDdToDegMinSec(double dd, int *deg, int *min, double *sec)
Convert decimal degrees to unpacked degrees, minutes, seconds.
#define MTK_ERR_COND_JUMP(code)
Definition: MisrError.h:188
MTKt_status
Definition: MisrError.h:11
MTKt_status MtkRadToDegMinSec(double rad, int *deg, int *min, double *sec)
Convert radians to unpacked degrees, minutes, seconds.
HDFFCLIBAPI void * min

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