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
sinusoid
Sinusoidal.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef Sinusoidal_H
4
#define Sinusoidal_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: SINUSOIDAL
8
*
9
* ABSTRACT
10
*
11
* This component provides conversions between Geodetic coordinates
12
* (latitude and longitude in radians) and Sinusoid projection coordinates
13
* (easting and northing in meters).
14
*
15
* ERROR HANDLING
16
*
17
* This component checks parameters for valid values. If an invalid value
18
* is found, the error code is combined with the current error code using
19
* the bitwise or. This combining allows multiple error codes to be
20
* returned. The possible error codes are:
21
*
22
* SINU_NO_ERROR : No errors occurred in function
23
* SINU_LAT_ERROR : Latitude outside of valid range
24
* (-90 to 90 degrees)
25
* SINU_LON_ERROR : Longitude outside of valid range
26
* (-180 to 360 degrees)
27
* SINU_EASTING_ERROR : Easting outside of valid range
28
* (False_Easting +/- ~20,000,000 m,
29
* depending on ellipsoid parameters)
30
* SINU_NORTHING_ERROR : Northing outside of valid range
31
* (False_Northing +/- ~10,000,000 m,
32
* depending on ellipsoid parameters)
33
* SINU_CENT_MER_ERROR : Origin longitude outside of valid range
34
* (-180 to 360 degrees)
35
* SINU_A_ERROR : Semi-major axis less than or equal to zero
36
* SINU_INV_F_ERROR : Inverse flattening outside of valid range
37
* (250 to 350)
38
*
39
* REUSE NOTES
40
*
41
* SINUSOIDAL is intended for reuse by any application that performs a
42
* Sinusoid projection or its inverse.
43
*
44
* REFERENCES
45
*
46
* Further information on SINUSOIDAL can be found in the Reuse Manual.
47
*
48
* SINUSOIDAL originated from : U.S. Army Topographic Engineering Center
49
* Geospatial Information Division
50
* 7701 Telegraph Road
51
* Alexandria, VA 22310-3864
52
*
53
* LICENSES
54
*
55
* None apply to this component.
56
*
57
* RESTRICTIONS
58
*
59
* SINUSOIDAL has no restrictions.
60
*
61
* ENVIRONMENT
62
*
63
* SINUSOIDAL was tested and certified in the following environments:
64
*
65
* 1. Solaris 2.5 with GCC, version 2.8.1
66
* 2. Windows 95 with MS Visual C++, version 6
67
*
68
* MODIFICATIONS
69
*
70
* Date Description
71
* ---- -----------
72
* 07-15-99 Original Code
73
* 03-05-07 Original C++ Code
74
*
75
*/
76
77
78
#include "
CoordinateSystem.h
"
79
80
81
namespace
MSP
82
{
83
namespace
CCS
84
{
85
class
MapProjection3Parameters;
86
class
MapProjectionCoordinates;
87
class
GeodeticCoordinates;
88
89
90
/***************************************************************************/
91
/*
92
* DEFINES
93
*/
94
95
class
Sinusoidal
:
public
CoordinateSystem
96
{
97
public
:
98
99
/*
100
* The constructor receives the ellipsoid parameters and
101
* Sinusoidal projection parameters as inputs, and sets the corresponding state
102
* variables. If any errors occur, an exception is thrown with a description
103
* of the error.
104
*
105
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
106
* ellipsoidFlattening : Flattening of ellipsoid (input)
107
* centralMeridian : Longitude in radians at the center of (input)
108
* the projection
109
* falseEasting : A coordinate value in meters assigned to the
110
* central meridian of the projection. (input)
111
* falseNorthing : A coordinate value in meters assigned to the
112
* origin latitude of the projection (input)
113
*/
114
115
Sinusoidal
(
double
ellipsoidSemiMajorAxis,
double
ellipsoidFlattening,
double
centralMeridian,
double
falseEasting,
double
falseNorthing );
116
117
118
Sinusoidal
(
const
Sinusoidal
&s );
119
120
121
~Sinusoidal
(
void
);
122
123
124
Sinusoidal
&
operator=
(
const
Sinusoidal
&s );
125
126
127
/*
128
* The function getParameters returns the current ellipsoid
129
* parameters, and Sinusoidal projection parameters.
130
*
131
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (output)
132
* ellipsoidFlattening : Flattening of ellipsoid (output)
133
* centralMeridian : Longitude in radians at the center of (output)
134
* the projection
135
* falseEasting : A coordinate value in meters assigned to the
136
* central meridian of the projection. (output)
137
* falseNorthing : A coordinate value in meters assigned to the
138
* origin latitude of the projection (output)
139
*/
140
141
MapProjection3Parameters
*
getParameters
()
const
;
142
143
144
/*
145
* The function convertFromGeodetic converts geodetic (latitude and
146
* longitude) coordinates to Sinusoidal projection (easting and northing)
147
* coordinates, according to the current ellipsoid and Sinusoidal projection
148
* parameters. If any errors occur, an exception is thrown with a description
149
* of the error.
150
*
151
* longitude : Longitude (lambda) in radians (input)
152
* latitude : Latitude (phi) in radians (input)
153
* easting : Easting (X) in meters (output)
154
* northing : Northing (Y) in meters (output)
155
*/
156
157
MSP::CCS::MapProjectionCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates );
158
159
160
/*
161
* The function convertToGeodetic converts Sinusoidal projection
162
* (easting and northing) coordinates to geodetic (latitude and longitude)
163
* coordinates, according to the current ellipsoid and Sinusoidal projection
164
* coordinates. If any errors occur, an exception is thrown with a description
165
* of the error.
166
*
167
* easting : Easting (X) in meters (input)
168
* northing : Northing (Y) in meters (input)
169
* longitude : Longitude (lambda) in radians (output)
170
* latitude : Latitude (phi) in radians (output)
171
*/
172
173
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::MapProjectionCoordinates
* mapProjectionCoordinates );
174
175
private
:
176
177
/* Ellipsoid Parameters, default to WGS 84 */
178
double
es2;
/* Eccentricity (0.08181919084262188000) squared */
179
double
es4;
/* es2 * es2 */
180
double
es6;
/* es4 * es2 */
181
double
c0;
/* 1 - es2 / 4.0 - 3.0 * es4 / 64.0 - 5.0 * es6 / 256.0 */
182
double
c1;
/* 3.0 * es2 / 8.0 + 3.0 * es4 / 32.0 + 45.0 * es6 / 1024.0 */
183
double
c2;
/* 15.0 * es4 / 256.0 + 45.0 * es6 / 1024.0 */
184
double
c3;
/* 35.0 * es6 / 3072.0 */
185
double
a0;
/* 3.0 * e1 / 2.0 - 27.0 * e3 / 32.0 */
186
double
a1;
/* 21.0 * e2 / 16.0 - 55.0 * e4 / 32.0 */
187
double
a2;
/* 151.0 * e3 / 96.0 */
188
double
a3;
/* 1097.0 * e4 / 512.0 */
189
190
/* Sinusoid projection Parameters */
191
double
Sinu_Origin_Long;
/* Longitude of origin in radians */
192
double
Sinu_False_Northing;
/* False northing in meters */
193
double
Sinu_False_Easting;
/* False easting in meters */
194
195
/* Maximum variance for easting and northing values for WGS 84. */
196
double
Sinu_Max_Easting;
197
double
Sinu_Min_Easting;
198
double
Sinu_Delta_Northing;
199
200
};
201
}
202
}
203
#endif
204
205
206
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2