UNCLASSIFIED
GeographicTranslator
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Macros
master
geotrans3.7
CCS
src
dtcc
CoordinateSystems
gars
GARS.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef GARS_H
4
#define GARS_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: GARS
8
*
9
* ABSTRACT
10
*
11
* This component provides conversions from Geodetic coordinates (latitude
12
* and longitude in radians) to a GARS coordinate string.
13
*
14
* ERROR HANDLING
15
*
16
* This component checks parameters for valid values. If an invalid value
17
* is found, the error code is combined with the current error code using
18
* the bitwise or. This combining allows multiple error codes to be
19
* returned. The possible error codes are:
20
*
21
* GARS_NO_ERROR : No errors occurred in function
22
* GARS_LAT_ERROR : Latitude outside of valid range
23
* (-90 to 90 degrees)
24
* GARS_LON_ERROR : Longitude outside of valid range
25
* (-180 to 360 degrees)
26
* GARS_STR_ERROR : A GARS string error: string too long,
27
* string too short, invalid numbers/letters
28
* GARS_STR_LAT_ERROR : The latitude part of the GARS string
29
* (fourth and fifth characters) is invalid.
30
* GARS_STR_LON_ERROR : The longitude part of the GARS string
31
* (first three characters) is invalid.
32
* GARS_STR_15_MIN_ERROR : The 15 minute part of the GARS
33
* string is less than 1 or greater than 4.
34
* GARS_STR_5_MIN_ERROR : The 5 minute part of the GARS
35
* string is less than 1 or greater than 9.
36
* GARS_PRECISION_ERROR : The precision must be between 0 and 5
37
* inclusive.
38
*
39
*
40
* REUSE NOTES
41
*
42
* GARS is intended for reuse by any application that performs a
43
* conversion between Geodetic and GARS coordinates.
44
*
45
* REFERENCES
46
*
47
* Further information on GARS can be found in the Reuse Manual.
48
*
49
* GARS originated from :
50
*
51
* http://earth-info.nga.mil/GandG/coordsys/grids/gars.html
52
*
53
*
54
* LICENSES
55
*
56
* None apply to this component.
57
*
58
* RESTRICTIONS
59
*
60
* GARS has no restrictions.
61
*
62
* ENVIRONMENT
63
*
64
* GARS was tested and certified in the following environments:
65
*
66
* 1. Solaris 2.5 with GCC version 2.8.1
67
* 2. Windows XP with MS Visual C++ version 6
68
*
69
* MODIFICATIONS
70
*
71
* Date Description
72
* ---- -----------
73
* 07-10-06 Original Code
74
* 03-02-07 Original C++ Code
75
*/
76
77
78
#include "
CoordinateSystem.h
"
79
80
81
namespace
MSP
82
{
83
namespace
CCS
84
{
85
class
GARSCoordinates;
86
class
GeodeticCoordinates;
87
88
89
/***************************************************************************/
90
/*
91
* DEFINES
92
*/
93
94
class
GARS
:
public
CoordinateSystem
95
{
96
public
:
97
98
GARS
();
99
100
101
GARS
(
const
GARS
&g );
102
103
104
~GARS
(
void
);
105
106
107
GARS
&
operator=
(
const
GARS
&g );
108
109
110
/*
111
* The function convertFromGeodetic converts Geodetic (latitude and longitude in radians)
112
* coordinates to a GARS coordinate string. Precision specifies the
113
* number of digits in the GARS string for latitude and longitude:
114
* 0: 30 minutes (5 characters)
115
* 1: 15 minutes (6 characters)
116
* 2: 5 minutes (7 characters)
117
*
118
* longitude : Longitude in radians. (input)
119
* latitude : Latitude in radians. (input)
120
* precision : Precision specified by the user. (input)
121
* GARSString : GARS coordinate string. (output)
122
*
123
*/
124
125
MSP::CCS::GARSCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates,
long
precision );
126
127
128
/*
129
* The function convertToGeodetic converts a GARS coordinate string to Geodetic (latitude
130
* and longitude in radians) coordinates.
131
*
132
* GARSString : GARS coordinate string. (input)
133
* longitude : Longitude in radians. (output)
134
* latitude : Latitude in radians. (output)
135
*
136
*/
137
138
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::GARSCoordinates
* garsCoordinates );
139
140
};
141
}
142
}
143
144
#endif
145
146
147
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:01 for GeographicTranslator by doxygen 1.8.2