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 */
void dist_dir(struct location *start_loc, struct location *dest_loc, float *distance, float *angle, char *compass)
struct ordinates code_ords(struct location loc)
struct location decode_ords(struct ordinates ord)
signed long int get_location(struct location *loc)
unsigned char hemisphere
Definition: geographic.h:31
unsigned long int minute
Definition: geographic.h:29
unsigned long int second
Definition: geographic.h:30
unsigned long int degree
Definition: geographic.h:28
struct location_unit longitude
Definition: geographic.h:37
struct location_unit latitude
Definition: geographic.h:36
signed long int lat_ord
Definition: geographic.h:22
signed long int long_ord
Definition: geographic.h:23