MISR Toolkit  1.5.1
Functions
MisrUnitConv.h File Reference
#include <MisrError.h>

Go to the source code of this file.

Functions

MTKt_status MtkDmsToDd (double dms, double *dd)
 Convert packed degrees, minutes, seconds to decimal degrees. More...
 
MTKt_status MtkDdToDms (double dd, double *dms)
 Convert decimal degrees to packed degrees, minutes, seconds. More...
 
MTKt_status MtkDdToRad (double dd, double *rad)
 Convert decimal degrees to radians. More...
 
MTKt_status MtkRadToDd (double rad, double *dd)
 Convert radians to decimal degrees. More...
 
MTKt_status MtkDmsToRad (double dms, double *rad)
 Convert packed degrees, minutes, seconds to Radians. More...
 
MTKt_status MtkRadToDms (double rad, double *dms)
 Convert radians to packed degrees, minutes, seconds. More...
 
MTKt_status MtkDmsToDegMinSec (double dms, int *deg, int *min, double *sec)
 Convert packed degrees, minutes, seconds to unpacked. More...
 
MTKt_status MtkDegMinSecToDms (int deg, int min, double sec, double *dms)
 Convert unpacked Degrees, minutes, seconds to packed. More...
 
MTKt_status MtkDdToDegMinSec (double dd, int *deg, int *min, double *sec)
 Convert decimal degrees to unpacked degrees, minutes, seconds. More...
 
MTKt_status MtkDegMinSecToDd (int deg, int min, double sec, double *dd)
 Convert unpacked degrees, minutes, seconds to decimal degrees. More...
 
MTKt_status MtkRadToDegMinSec (double rad, int *deg, int *min, double *sec)
 Convert radians to unpacked degrees, minutes, seconds. More...
 
MTKt_status MtkDegMinSecToRad (int deg, int min, double sec, double *rad)
 Convert unpacked degrees, minutes, seconds to radians. More...
 

Function Documentation

◆ MtkDdToDegMinSec()

MTKt_status MtkDdToDegMinSec ( double  dd,
int *  deg,
int *  min,
double *  sec 
)

Convert decimal degrees to unpacked degrees, minutes, seconds.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130.08284167 degrees to unpacked degrees, minutes, seconds.
status = MtkDdToDegMinSec(130.08284167, &deg, &min, &sec);
Parameters
[in]ddDecimal degrees
[out]degDegrees
[out]minMinutes
[out]secSeconds

Definition at line 32 of file MtkDdToDegMinSec.c.

◆ MtkDdToDms()

MTKt_status MtkDdToDms ( double  dd,
double *  dms 
)

Convert decimal degrees to packed degrees, minutes, seconds.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130.08284167 degrees to packed degrees, minutes, seconds.
status = MtkDdToDms(130.08284167, &dms);
Parameters
[in]ddDecimal degrees
[out]dmsPacked degrees, minutes, seconds

Definition at line 33 of file MtkDdToDms.c.

◆ MtkDdToRad()

MTKt_status MtkDdToRad ( double  dd,
double *  rad 
)

Convert decimal degrees to radians.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130.08284167 degrees to radians.
status = MtkDdToRad(130.08284167, &rad);
Parameters
[in]ddDecimal degrees
[out]radRadians

Definition at line 38 of file MtkDdToRad.c.

◆ MtkDegMinSecToDd()

MTKt_status MtkDegMinSecToDd ( int  deg,
int  min,
double  sec,
double *  dd 
)

Convert unpacked degrees, minutes, seconds to decimal degrees.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130 degress, 4 minutes, and 58.23 seconds to decimal degrees.
status = MtkDegMinSecToDd(130, 4, 58.23, &dd);
Parameters
[in]degDegrees
[in]minMinutes
[in]secSeconds
[out]ddDecimal degrees

Definition at line 34 of file MtkDegMinSecToDd.c.

◆ MtkDegMinSecToDms()

MTKt_status MtkDegMinSecToDms ( int  deg,
int  min,
double  sec,
double *  dms 
)

Convert unpacked Degrees, minutes, seconds to packed.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130 degress, 4 minutes, and 58.23 seconds to packed degrees, minutes, seconds.
status = MtkDegMinSecToDms(130, 4, 58.23, &dms);
Parameters
[in]degDegrees
[in]minMinutes
[in]secSeconds
[out]dmsPacked degrees, minutes, seconds

Definition at line 35 of file MtkDegMinSecToDms.c.

◆ MtkDegMinSecToRad()

MTKt_status MtkDegMinSecToRad ( int  deg,
int  min,
double  sec,
double *  rad 
)

Convert unpacked degrees, minutes, seconds to radians.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130 degress, 4 minutes, and 58.23 seconds to radians.
status = MtkDegMinSecToRad(130, 4, 58.23, &rad);
Parameters
[in]degDegrees
[in]minMinutes
[in]secSeconds
[out]radRadians

Definition at line 38 of file MtkDegMinSecToRad.c.

◆ MtkDmsToDd()

MTKt_status MtkDmsToDd ( double  dms,
double *  dd 
)

Convert packed degrees, minutes, seconds to decimal degrees.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130004058.23 dms to decimal degrees.
status = MtkDmsToDd(130004058.23, &dd);
Parameters
[in]dmsPacked degrees, minutes, seconds
[out]ddDecimal degrees

Definition at line 33 of file MtkDmsToDd.c.

◆ MtkDmsToDegMinSec()

MTKt_status MtkDmsToDegMinSec ( double  dms,
int *  deg,
int *  min,
double *  sec 
)

Convert packed degrees, minutes, seconds to unpacked.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130004058.23 dms to unpacked degrees, minutes, seconds.
status = MtkDmsToDegMinSec(130004058.23, &deg, &min, &sec);
Parameters
[in]dmsPacked degrees, minutes, seconds
[out]degDegrees
[out]minMinutes
[out]secSeconds

Definition at line 33 of file MtkDmsToDegMinSec.c.

◆ MtkDmsToRad()

MTKt_status MtkDmsToRad ( double  dms,
double *  rad 
)

Convert packed degrees, minutes, seconds to Radians.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 130004058.23 dms to radians.
status = MtkDmsToRad(130004058.23, &rad);
Parameters
[in]dmsPacked degrees, minutes, seconds
[out]radRadians

Definition at line 38 of file MtkDmsToRad.c.

◆ MtkRadToDd()

MTKt_status MtkRadToDd ( double  rad,
double *  dd 
)

Convert radians to decimal degrees.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 2.270373886 radians to decimal degrees.
status = MtkRadToDd(2.270373886, &dd);
Parameters
[in]radRadians
[out]ddDecimal degrees

Definition at line 38 of file MtkRadToDd.c.

◆ MtkRadToDegMinSec()

MTKt_status MtkRadToDegMinSec ( double  rad,
int *  deg,
int *  min,
double *  sec 
)

Convert radians to unpacked degrees, minutes, seconds.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 2.270373886 radians to unpacked degrees, minutes, seconds.
status = MtkRadToDegMinSec(2.270373886, &deg, &min, &sec);
Parameters
[in]radRadians
[out]degDegrees
[out]minMinutes
[out]secSeconds

Definition at line 38 of file MtkRadToDegMinSec.c.

◆ MtkRadToDms()

MTKt_status MtkRadToDms ( double  rad,
double *  dms 
)

Convert radians to packed degrees, minutes, seconds.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert 2.270373886 radians to packed degrees, minutes, seconds.
status = MtkRadToDms(2.270373886, &dms);
Parameters
[in]radRadians
[out]dmsDegrees, minutes, seconds

Definition at line 38 of file MtkRadToDms.c.


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