MISR Toolkit  1.5.1
MtkDdToDegMinSec.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkDdToDegMinSec =
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 
33  double dd,
34  int *deg,
35  int *min,
36  double *sec )
37 {
38  MTKt_status status_code; /* Retrun status of this function */
39  MTKt_status status; /* Return status */
40  double dms; /* Packed degrees, minutes seconds */
41 
42  if (deg == NULL || min == NULL || sec == NULL)
44 
45  status = MtkDdToDms(dd, &dms);
46  MTK_ERR_COND_JUMP(status);
47 
48  status = MtkDmsToDegMinSec(dms, deg, min, sec);
49  MTK_ERR_COND_JUMP(status);
50 
51  return MTK_SUCCESS;
52 
53 ERROR_HANDLE:
54  return status_code;
55 }
#define MTK_ERR_CODE_JUMP(code)
Definition: MisrError.h:175
MTKt_status MtkDmsToDegMinSec(double dms, int *deg, int *min, double *sec)
Convert packed degrees, minutes, seconds to unpacked.
MTKt_status MtkDdToDms(double dd, double *dms)
Convert decimal degrees to packed degrees, minutes, seconds.
Definition: MtkDdToDms.c:33
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
HDFFCLIBAPI void * min

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