Mapper
geographic.h
Go to the documentation of this file.
1
/* geographic.h
2
* contains the geographic database constants, structure definitions,
3
and prototypes. Wayne Martin - CNRFC 09/24/91 */
4
5
#ifndef _geographich
6
#define _geographich
7
8
/* Constants */
9
#define NO_ORD 2147483647L
10
#define MAX_LAT_DEG 90L
11
#define MAX_LON_DEG 180L
12
#define MAX_MINUTE 60L
13
#define MAX_SECOND 60L
14
#define MIN 060.000
15
#define SEC 3600.00
16
#define MAGIC_NUM 5000.00
17
18
/* In the HYDROMET database, the geographic location of a sensor is
19
stored by latitude and longitude ordinates. Each ordinate pair represents
20
a unique number that has degrees, minutes, and seconds folded into it. */
21
struct
ordinates
{
22
signed
long
int
lat_ord
;
23
signed
long
int
long_ord
;
24
};
25
26
/* Structure which contains the component parts of latitude and longitude. */
27
struct
location_unit
{
28
unsigned
long
int
degree
;
29
unsigned
long
int
minute
;
30
unsigned
long
int
second
;
31
unsigned
char
hemisphere
;
32
};
33
34
/* Location defined by latitude and longitude. */
35
struct
location
{
36
struct
location_unit
latitude
;
37
struct
location_unit
longitude
;
38
};
39
40
/* function prototypes */
41
struct
ordinates
code_ords
(struct
location
loc);
42
struct
location
decode_ords
(struct
ordinates
ord);
43
signed
long
int
get_location
(
struct
location
*loc);
44
void
dist_dir
(
struct
location
*start_loc,
struct
location
*dest_loc,
45
float
*distance,
float
*angle,
char
*compass);
46
47
#endif
/* _geographich */
dist_dir
void dist_dir(struct location *start_loc, struct location *dest_loc, float *distance, float *angle, char *compass)
code_ords
struct ordinates code_ords(struct location loc)
decode_ords
struct location decode_ords(struct ordinates ord)
get_location
signed long int get_location(struct location *loc)
location_unit
Definition:
geographic.h:27
location_unit::hemisphere
unsigned char hemisphere
Definition:
geographic.h:31
location_unit::minute
unsigned long int minute
Definition:
geographic.h:29
location_unit::second
unsigned long int second
Definition:
geographic.h:30
location_unit::degree
unsigned long int degree
Definition:
geographic.h:28
location
Definition:
geographic.h:35
location::longitude
struct location_unit longitude
Definition:
geographic.h:37
location::latitude
struct location_unit latitude
Definition:
geographic.h:36
ordinates
Definition:
geographic.h:21
ordinates::lat_ord
signed long int lat_ord
Definition:
geographic.h:22
ordinates::long_ord
signed long int long_ord
Definition:
geographic.h:23
Generated by
1.9.1