UNCLASSIFIED

GeographicTranslator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Spherical.h
Go to the documentation of this file.
1 // CLASSIFICATION: UNCLASSIFIED
2 /***************************************************************************/
3 /* RSC IDENTIFIER: SPHERICAL
4  *
5  * ABSTRACT
6  *
7  * This component provides conversions between Geodetic coordinates (latitude,
8  * longitude in radians and height in meters) and Spherical coordinates
9  * (lat, lon, radius).
10  *
11  * REFERENCES
12  *
13  *
14  *
15  *
16  * LICENSES
17  * None apply to this component.
18  *
19  * MODIFICATIONS
20  *
21  * Date Description
22  * ---- ------------
23  * 03-25-19 Original Code
24  *
25  */
26 #ifndef GTS_SPHERICAL_H
27 #define GTS_SPHERICAL_H
28 
29 #include "DtccApi.h"
30 #include "CoordinateSystem.h"
31 #include "Geocentric.h"
32 
33 namespace MSP
34 {
35  namespace CCS
36  {
37  class CartesianCoordinates;
38  class GeodeticCoordinates;
39  class SphericalCoordinates;
40 
42  {
43  public:
44 
45  /*
46  * The constructor receives the ellipsoid parameters
47  * as inputs and sets the corresponding state variables.
48  *
49  * ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
50  * ellipsoidFlattening : Flattening of ellipse. (input)
51  */
52  Spherical(double ellipsoidSemiMajorAxis, double ellipsoidFlattening);
53  Spherical(const Spherical &g);
54 
55  ~Spherical(void);
56 
57  /*
58  * The function convertFromGeodetic converts geodetic coordinates
59  * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z)
60  * according to the current ellipsoid parameters.
61  *
62  * geodeticCoordinate : Coordinate to convert from (input)
63  *
64  */
65  MSP::CCS::SphericalCoordinates* convertFromGeodetic(
66  const MSP::CCS::GeodeticCoordinates* geodeticCoordinate);
67 
68  /*
69  * The function convertToGeodetic converts geocentric
70  * coordiantes (X, Y, Z) to geodetic coordinates (latitude, longitude
71  * and height), according to the current ellipsoid parameters.
72  *
73  * SphericalCoordinate : Spherical coordinate to convert from (input)
74  *
75  */
76  MSP::CCS::GeodeticCoordinates* convertToGeodetic(
77  MSP::CCS::SphericalCoordinates* sphericalCoordinate);
78 
79  protected:
80 
81  void sphericalToGeocentric(
82  const double longitude,
83  const double latitude,
84  const double radius,
85  double &x,
86  double &y,
87  double &z) const;
88 
89  void geocentricToSpherical(
90  const double x,
91  const double y,
92  const double z,
93  double &longitude,
94  double &latitude,
95  double &radius) const;
96  };
97  }
98 }
99 
100 #endif
#define MSP_DTCC_API
Definition: DtccApi.h:32