Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
oel_hdf4
liboli
ias_geo_find_min.c
Go to the documentation of this file.
1
/****************************************************************************
2
NAME: ias_geo_find_min
3
4
PURPOSE: Extracts min portions of an angle.
5
6
RETURNS: void
7
8
ALGORITHM DESCRIPTION:
9
Extract minute portion of angle
10
Return
11
12
*****************************************************************************/
13
#include <math.h>
14
#include "
ias_geo.h
"
15
16
void
ias_geo_find_min
17
(
18
double
angle,
/* I: Angle in total degrees */
19
int
*minute
/* O: Minute portion of the angle */
20
)
21
{
22
double
sec;
/* Seconds portion of angle */
23
24
angle =
fabs
(angle);
25
angle -= (
int
)angle;
26
*minute = (
int
) (angle * 60.0);
27
sec = ((angle * 60.0) - *minute) * 60.0;
28
if
(sec > 60.0)
29
(*minute)++;
30
if
(*minute >= 60)
31
*minute -= 60;
32
}
ias_geo.h
MDN.parameters.int
int
Definition:
parameters.py:18
fabs
#define fabs(a)
Definition:
misc.h:93
ias_geo_find_min
void ias_geo_find_min(double angle, int *minute)
Definition:
ias_geo_find_min.c:17