UNCLASSIFIED

GeographicTranslator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
GeodeticCoordinates.cpp
Go to the documentation of this file.
1 // CLASSIFICATION: UNCLASSIFIED
2 
3 #include <string.h>
4 #include "GeodeticCoordinates.h"
5 
6 
7 using namespace MSP::CCS;
8 
9 
11  CoordinateTuple( CoordinateType::geodetic ),
12  _longitude( 0 ),
13  _latitude( 0 ),
14  _height( 0 )
15 {
16 }
17 
18 
20  CoordinateTuple( _coordinateType ),
21  _longitude( 0 ),
22  _latitude( 0 ),
23  _height( 0 )
24 {
25 }
26 
27 
28 GeodeticCoordinates::GeodeticCoordinates( CoordinateType::Enum _coordinateType, double __longitude, double __latitude, double __height ) :
29  CoordinateTuple( _coordinateType ),
30  _longitude( __longitude ),
31  _latitude( __latitude ),
32  _height( __height )
33 {
34 }
35 
36 
37 GeodeticCoordinates::GeodeticCoordinates( CoordinateType::Enum _coordinateType, const char* __warningMessage, double __longitude, double __latitude, double __height ) :
38  CoordinateTuple( _coordinateType ),
39  _longitude( __longitude ),
40  _latitude( __latitude ),
41  _height( __height )
42 {
43  int length = strlen( __warningMessage );
44  strncpy( _warningMessage, __warningMessage, length );
45  _warningMessage[ length ] = '\0';
46 }
47 
48 
50 {
52 
53  _longitude = gc._longitude;
54  _latitude = gc._latitude;
55  _height = gc._height;
56 
57  int length = strlen( gc._warningMessage );
58  strncpy( _warningMessage, gc._warningMessage, length );
59  _warningMessage[ length ] = '\0';
60 }
61 
62 
64 {
65  _longitude = 0;
66  _latitude = 0;
67  _height = 0;
68 }
69 
70 
72 {
73  if( this != &gc )
74  {
76 
77  _longitude = gc._longitude;
78  _latitude = gc._latitude;
79  _height = gc._height;
80 
81  int length = strlen( gc._warningMessage );
82  strncpy( _warningMessage, gc._warningMessage, length );
83  _warningMessage[ length ] = '\0';
84  }
85 
86  return *this;
87 }
88 
89 
90 void GeodeticCoordinates::set( double __longitude, double __latitude, double __height )
91 {
92  _longitude = __longitude;
93  _latitude = __latitude;
94  _height = __height;
95 }
96 
97 
98 void GeodeticCoordinates::setLongitude( double __longitude )
99 {
100  _longitude = __longitude;
101 }
102 
103 
104 void GeodeticCoordinates::setLatitude( double __latitude )
105 {
106  _latitude = __latitude;
107 }
108 
109 
110 void GeodeticCoordinates::setHeight( double __height )
111 {
112  _height = __height;
113 }
114 
115 
117 {
118  return _longitude;
119 }
120 
121 
123 {
124  return _latitude;
125 }
126 
127 
129 {
130  return _height;
131 }
132 
133 // CLASSIFICATION: UNCLASSIFIED