65 TUDEF(
"Position",
"Cartesian transformTo");
73 c.
setECEF(-1575232.0141,-4707872.2332, 3993198.4383);
87 TUCSM(
"Geodetic transformTo");
88 d.
setGeodetic(39.000004186778,251.499999999370,1400.009066903964);
102 TUCSM(
"Geocentric transformTo");
103 g.
setGeocentric(38.811958506159,251.499999999370,6371110.627671023800);
117 TUCSM(
"Spherical transformTo");
118 s.
setSpherical(51.188041493841,251.499999999370,6371110.627671023800);
133 std::cout <<
"Exception encountered at: " << testFramework.countTests()
135 <<
"Test method failed" << std::endl;
143 TUDEF(
"Position",
"printf");
148 c.
setECEF(-1575232.0141,-4707872.2332, 3993198.4383);
151 "-1575232.0141 X() (meters)",
152 c.
printf(
"%13.4x X() (meters)"));
154 "-4707872.2332 Y() (meters)",
155 c.
printf(
"%13.4y Y() (meters)"));
157 " 3993198.4383 Z() (meters)",
158 c.
printf(
"%13.4z Z() (meters)"));
160 " -1575.2320 X()/1000 (kilometers)",
161 c.
printf(
"%13.4X X()/1000 (kilometers)"));
163 " -4707.8722 Y()/1000 (kilometers)",
164 c.
printf(
"%13.4Y Y()/1000 (kilometers)"));
166 " 3993.1984 Z()/1000 (kilometers)",
167 c.
printf(
"%13.4Z Z()/1000 (kilometers)"));
169 " 39.000004 geodeticLatitude() (degrees North)",
170 c.
printf(
"%15.6A geodeticLatitude() (degrees North)"));
172 " 38.811959 geocentricLatitude() (degrees North)",
173 c.
printf(
"%15.6a geocentricLatitude() (degrees North)"));
175 " 251.500000 longitude() (degrees East)",
176 c.
printf(
"%15.6L longitude() (degrees East)"));
178 " 251.500000 longitude() (degrees East)",
179 c.
printf(
"%15.6l longitude() (degrees East)"));
181 " 108.500000 longitude() (degrees West)",
182 c.
printf(
"%15.6w longitude() (degrees West)"));
184 " 108.500000 longitude() (degrees West)",
185 c.
printf(
"%15.6W longitude() (degrees West)"));
187 " 51.188041 theta() (degrees)",
188 c.
printf(
"%15.6t theta() (degrees)"));
190 " 0.893400 theta() (radians)",
191 c.
printf(
"%15.6T theta() (radians)"));
193 " 251.500000 phi() (degrees)",
194 c.
printf(
"%15.6p phi() (degrees)"));
196 " 4.389503 phi() (radians)",
197 c.
printf(
"%15.6P phi() (radians)"));
199 " 6371110.6277 radius() meters",
200 c.
printf(
"%13.4r radius() meters"));
202 " 6371.1106 radius()/1000 kilometers",
203 c.
printf(
"%13.4R radius()/1000 kilometers"));
205 " 1400.0091 height() meters",
206 c.
printf(
"%13.4h height() meters"));
208 " 1.4000 height()/1000 kilometers",
209 c.
printf(
"%13.4H height()/1000 kilometers"));
213 std::cout <<
"Exception encountered at: " << testFramework.countTests()
215 <<
"Test method failed" << std::endl;
224 TUDEF(
"Position",
"scan");
229 c.
setECEF(-1575232.0141,-4707872.2332, 3993198.4383);
232 "%A degN %L degE %h m",
233 "%a degN %L degE %r m",
235 "%t deg %p deg %r M"};
236 for(
int i=1; i<5; i++)
256 std::cout <<
"Exception encountered at: " << testFramework.countTests()
258 <<
"Test method failed" << std::endl;
268 TUDEF(
"Position",
"elevationAzimuth");
272 c.
setECEF(-1575232.0141,-4707872.2332, 3993198.4383);
273 s.
setECEF(3*6371110.62767,0,0);
279 std::cout <<
"Exception encountered at: " << testFramework.countTests()
281 <<
"Test method failed" << std::endl;
290 TUDEF(
"Position",
"poleTransform");
334 std::cout <<
"Exception encountered at: " << testFramework.countTests()
336 <<
"Test method failed" << std::endl;
346 TUDEF(
"Position",
"range()");
357 t.
setECEF(300,400,6371610.6277);
362 std::cout <<
"Exception encountered at: " << testFramework.countTests()
364 <<
"Test method failed" << std::endl;
372 TUDEF(
"Position",
"getZenithAngle");
379 double expected = 0.713414;
381 0.84891898361500717218);
395 TUDEF(
"Position",
"getRayPerigee");
411 cerr <<
"radius=" << foo.
radius() <<
" m" << endl;
419 unsigned errorTotal = 0;
431 std::cout <<
"Total Failures for " << __FILE__ <<
": " << errorTotal