A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
geo-to-cartesian-test.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 University of Washington
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Benjamin Cizdziel <ben.cizdziel@gmail.com>
18 */
19
20#include <ns3/geographic-positions.h>
21#include <ns3/log.h>
22#include <ns3/test.h>
23
24NS_LOG_COMPONENT_DEFINE("GeoToCartesianTest");
25
26using namespace ns3;
27
28// 10 meter tolerance for testing, which is very small with respect to ECEF
29// Cartesian coordinates on or above earth's surface
30const double TOLERANCE = 10;
31
32const double XSPHERE_MATLAB[216] = {
33 6371000, 1968747.27116279, -5154247.27116279, -5154247.27116279, 1968747.27116279,
34 6371000, 1968747.27116279, 608376.364418605, -1592750, -1592750.00000000,
35 608376.364418605, 1968747.27116279, -5154247.27116279, -1592750, 4169873.63558139,
36 4169873.63558139, -1592750.00000000, -5154247.27116279, -5154247.27116279, -1592750.00000000,
37 4169873.63558139, 4169873.63558140, -1592750.00000000, -5154247.27116279, 1968747.27116279,
38 608376.364418605, -1592750.00000000, -1592750.00000000, 608376.364418604, 1968747.27116279,
39 6371000, 1968747.27116279, -5154247.27116279, -5154247.27116279, 1968747.27116279,
40 6371000, 6371200, 1968809.07456167, -5154409.07456167, -5154409.07456167,
41 1968809.07456166, 6371200, 1968809.07456167, 608395.462719168, -1592800,
42 -1592800.00000000, 608395.462719167, 1968809.07456167, -5154409.07456167, -1592800,
43 4170004.53728083, 4170004.53728083, -1592800.00000000, -5154409.07456167, -5154409.07456167,
44 -1592800, 4170004.53728083, 4170004.53728083, -1592800.00000000, -5154409.07456167,
45 1968809.07456166, 608395.462719167, -1592800.00000000, -1592800.00000000, 608395.462719167,
46 1968809.07456166, 6371200, 1968809.07456167, -5154409.07456167, -5154409.07456167,
47 1968809.07456166, 6371200, 6371400, 1968870.87796054, -5154570.87796054,
48 -5154570.87796054, 1968870.87796054, 6371400, 1968870.87796054, 608414.561019730,
49 -1592850, -1592850.00000000, 608414.561019730, 1968870.87796054, -5154570.87796054,
50 -1592850, 4170135.43898027, 4170135.43898027, -1592850.00000000, -5154570.87796054,
51 -5154570.87796054, -1592850.00000000, 4170135.43898027, 4170135.43898027, -1592850.00000000,
52 -5154570.87796054, 1968870.87796054, 608414.561019730, -1592850.00000000, -1592850.00000000,
53 608414.561019729, 1968870.87796054, 6371400, 1968870.87796054, -5154570.87796054,
54 -5154570.87796054, 1968870.87796054, 6371400, 6371600, 1968932.68135942,
55 -5154732.68135941, -5154732.68135942, 1968932.68135941, 6371600, 1968932.68135942,
56 608433.659320293, -1592900, -1592900.00000000, 608433.659320292, 1968932.68135942,
57 -5154732.68135941, -1592900.00000000, 4170266.34067971, 4170266.34067971, -1592900.00000000,
58 -5154732.68135941, -5154732.68135942, -1592900.00000000, 4170266.34067971, 4170266.34067971,
59 -1592900.00000000, -5154732.68135942, 1968932.68135941, 608433.659320292, -1592900.00000000,
60 -1592900.00000000, 608433.659320292, 1968932.68135941, 6371600, 1968932.68135942,
61 -5154732.68135941, -5154732.68135942, 1968932.68135941, 6371600, 6371800,
62 1968994.48475829, -5154894.48475829, -5154894.48475829, 1968994.48475829, 6371800,
63 1968994.48475829, 608452.757620855, -1592950, -1592950.00000000, 608452.757620855,
64 1968994.48475829, -5154894.48475829, -1592950, 4170397.24237914, 4170397.24237914,
65 -1592950.00000000, -5154894.48475829, -5154894.48475829, -1592950.00000000, 4170397.24237914,
66 4170397.24237915, -1592950.00000000, -5154894.48475829, 1968994.48475829, 608452.757620855,
67 -1592950.00000000, -1592950.00000000, 608452.757620854, 1968994.48475829, 6371800,
68 1968994.48475829, -5154894.48475829, -5154894.48475829, 1968994.48475829, 6371800,
69 6372000, 1969056.28815717, -5155056.28815716, -5155056.28815717, 1969056.28815716,
70 6372000, 1969056.28815717, 608471.855921418, -1593000, -1593000,
71 608471.855921417, 1969056.28815717, -5155056.28815716, -1593000.00000000, 4170528.14407858,
72 4170528.14407858, -1593000.00000000, -5155056.28815716, -5155056.28815717, -1593000.00000000,
73 4170528.14407858, 4170528.14407858, -1593000.00000000, -5155056.28815717, 1969056.28815716,
74 608471.855921417, -1593000.00000000, -1593000.00000000, 608471.855921417, 1969056.28815716,
75 6372000, 1969056.28815717, -5155056.28815716, -5155056.28815717, 1969056.28815716,
76 6372000,
77};
78
79const double YSPHERE_MATLAB[216] = {
80 0,
81 6059181.06531642,
82 3744779.84235535,
83 -3744779.84235535,
84 -6059181.06531642,
85 -1.56044495147356e-09,
86 0,
87 1872389.92117767,
88 1157200.61148054,
89 -1157200.61148054,
90 -1872389.92117767,
91 -4.82204008791920e-10,
92 0,
93 -4901980.45383588,
94 -3029590.53265821,
95 3029590.53265821,
96 4901980.45383588,
97 1.26242648452870e-09,
98 0,
99 -4901980.45383589,
100 -3029590.53265821,
101 3029590.53265821,
102 4901980.45383589,
103 1.26242648452870e-09,
104 0,
105 1872389.92117767,
106 1157200.61148054,
107 -1157200.61148054,
108 -1872389.92117767,
109 -4.82204008791919e-10,
110 0,
111 6059181.06531642,
112 3744779.84235535,
113 -3744779.84235535,
114 -6059181.06531642,
115 -1.56044495147356e-09,
116 0,
117 6059371.27661968,
118 3744897.39940581,
119 -3744897.39940580,
120 -6059371.27661968,
121 -1.56049393734552e-09,
122 0,
123 1872448.69970290,
124 1157236.93860694,
125 -1157236.93860694,
126 -1872448.69970290,
127 -4.82219146258841e-10,
128 0,
129 -4902134.33801274,
130 -3029685.63830984,
131 3029685.63830984,
132 4902134.33801274,
133 1.26246611493160e-09,
134 0,
135 -4902134.33801274,
136 -3029685.63830984,
137 3029685.63830984,
138 4902134.33801274,
139 1.26246611493160e-09,
140 0,
141 1872448.69970290,
142 1157236.93860694,
143 -1157236.93860694,
144 -1872448.69970290,
145 -4.82219146258841e-10,
146 0,
147 6059371.27661968,
148 3744897.39940581,
149 -3744897.39940580,
150 -6059371.27661968,
151 -1.56049393734552e-09,
152 0,
153 6059561.48792294,
154 3745014.95645626,
155 -3745014.95645626,
156 -6059561.48792294,
157 -1.56054292321749e-09,
158 0,
159 1872507.47822813,
160 1157273.26573334,
161 -1157273.26573334,
162 -1872507.47822813,
163 -4.82234283725763e-10,
164 0,
165 -4902288.22218960,
166 -3029780.74396147,
167 3029780.74396147,
168 4902288.22218960,
169 1.26250574533451e-09,
170 0,
171 -4902288.22218960,
172 -3029780.74396147,
173 3029780.74396147,
174 4902288.22218960,
175 1.26250574533451e-09,
176 0,
177 1872507.47822813,
178 1157273.26573334,
179 -1157273.26573334,
180 -1872507.47822813,
181 -4.82234283725763e-10,
182 0,
183 6059561.48792294,
184 3745014.95645626,
185 -3745014.95645626,
186 -6059561.48792294,
187 -1.56054292321749e-09,
188 0,
189 6059751.69922620,
190 3745132.51350672,
191 -3745132.51350672,
192 -6059751.69922620,
193 -1.56059190908946e-09,
194 0,
195 1872566.25675336,
196 1157309.59285974,
197 -1157309.59285974,
198 -1872566.25675336,
199 -4.82249421192685e-10,
200 0,
201 -4902442.10636646,
202 -3029875.84961310,
203 3029875.84961310,
204 4902442.10636646,
205 1.26254537573741e-09,
206 0,
207 -4902442.10636646,
208 -3029875.84961310,
209 3029875.84961310,
210 4902442.10636646,
211 1.26254537573741e-09,
212 0,
213 1872566.25675336,
214 1157309.59285974,
215 -1157309.59285974,
216 -1872566.25675336,
217 -4.82249421192684e-10,
218 0,
219 6059751.69922620,
220 3745132.51350672,
221 -3745132.51350672,
222 -6059751.69922620,
223 -1.56059190908946e-09,
224 0,
225 6059941.91052946,
226 3745250.07055718,
227 -3745250.07055718,
228 -6059941.91052946,
229 -1.56064089496142e-09,
230 0,
231 1872625.03527859,
232 1157345.91998614,
233 -1157345.91998614,
234 -1872625.03527859,
235 -4.82264558659606e-10,
236 0,
237 -4902595.99054332,
238 -3029970.95526473,
239 3029970.95526473,
240 4902595.99054332,
241 1.26258500614032e-09,
242 0,
243 -4902595.99054332,
244 -3029970.95526473,
245 3029970.95526473,
246 4902595.99054332,
247 1.26258500614032e-09,
248 0,
249 1872625.03527859,
250 1157345.91998614,
251 -1157345.91998614,
252 -1872625.03527859,
253 -4.82264558659606e-10,
254 0,
255 6059941.91052946,
256 3745250.07055718,
257 -3745250.07055718,
258 -6059941.91052946,
259 -1.56064089496142e-09,
260 0,
261 6060132.12183272,
262 3745367.62760764,
263 -3745367.62760764,
264 -6060132.12183272,
265 -1.56068988083339e-09,
266 0,
267 1872683.81380382,
268 1157382.24711254,
269 -1157382.24711254,
270 -1872683.81380382,
271 -4.82279696126528e-10,
272 0,
273 -4902749.87472018,
274 -3030066.06091636,
275 3030066.06091636,
276 4902749.87472018,
277 1.26262463654322e-09,
278 0,
279 -4902749.87472018,
280 -3030066.06091636,
281 3030066.06091636,
282 4902749.87472018,
283 1.26262463654322e-09,
284 0,
285 1872683.81380382,
286 1157382.24711254,
287 -1157382.24711254,
288 -1872683.81380382,
289 -4.82279696126528e-10,
290 0,
291 6060132.12183272,
292 3745367.62760764,
293 -3745367.62760764,
294 -6060132.12183272,
295 -1.56068988083339e-09,
296};
297
298const double ZSPHERE_MATLAB[216] = {
299 0,
300 0,
301 0,
302 0,
303 0,
304 0,
305 6059181.06531642,
306 6059181.06531642,
307 6059181.06531642,
308 6059181.06531642,
309 6059181.06531642,
310 6059181.06531642,
311 3744779.84235535,
312 3744779.84235535,
313 3744779.84235535,
314 3744779.84235535,
315 3744779.84235535,
316 3744779.84235535,
317 -3744779.84235535,
318 -3744779.84235535,
319 -3744779.84235535,
320 -3744779.84235535,
321 -3744779.84235535,
322 -3744779.84235535,
323 -6059181.06531642,
324 -6059181.06531642,
325 -6059181.06531642,
326 -6059181.06531642,
327 -6059181.06531642,
328 -6059181.06531642,
329 -1.56044495147356e-09,
330 -1.56044495147356e-09,
331 -1.56044495147356e-09,
332 -1.56044495147356e-09,
333 -1.56044495147356e-09,
334 -1.56044495147356e-09,
335 0,
336 0,
337 0,
338 0,
339 0,
340 0,
341 6059371.27661968,
342 6059371.27661968,
343 6059371.27661968,
344 6059371.27661968,
345 6059371.27661968,
346 6059371.27661968,
347 3744897.39940581,
348 3744897.39940581,
349 3744897.39940581,
350 3744897.39940581,
351 3744897.39940581,
352 3744897.39940581,
353 -3744897.39940580,
354 -3744897.39940580,
355 -3744897.39940580,
356 -3744897.39940580,
357 -3744897.39940580,
358 -3744897.39940580,
359 -6059371.27661968,
360 -6059371.27661968,
361 -6059371.27661968,
362 -6059371.27661968,
363 -6059371.27661968,
364 -6059371.27661968,
365 -1.56049393734552e-09,
366 -1.56049393734552e-09,
367 -1.56049393734552e-09,
368 -1.56049393734552e-09,
369 -1.56049393734552e-09,
370 -1.56049393734552e-09,
371 0,
372 0,
373 0,
374 0,
375 0,
376 0,
377 6059561.48792294,
378 6059561.48792294,
379 6059561.48792294,
380 6059561.48792294,
381 6059561.48792294,
382 6059561.48792294,
383 3745014.95645626,
384 3745014.95645626,
385 3745014.95645626,
386 3745014.95645626,
387 3745014.95645626,
388 3745014.95645626,
389 -3745014.95645626,
390 -3745014.95645626,
391 -3745014.95645626,
392 -3745014.95645626,
393 -3745014.95645626,
394 -3745014.95645626,
395 -6059561.48792294,
396 -6059561.48792294,
397 -6059561.48792294,
398 -6059561.48792294,
399 -6059561.48792294,
400 -6059561.48792294,
401 -1.56054292321749e-09,
402 -1.56054292321749e-09,
403 -1.56054292321749e-09,
404 -1.56054292321749e-09,
405 -1.56054292321749e-09,
406 -1.56054292321749e-09,
407 0,
408 0,
409 0,
410 0,
411 0,
412 0,
413 6059751.69922620,
414 6059751.69922620,
415 6059751.69922620,
416 6059751.69922620,
417 6059751.69922620,
418 6059751.69922620,
419 3745132.51350672,
420 3745132.51350672,
421 3745132.51350672,
422 3745132.51350672,
423 3745132.51350672,
424 3745132.51350672,
425 -3745132.51350672,
426 -3745132.51350672,
427 -3745132.51350672,
428 -3745132.51350672,
429 -3745132.51350672,
430 -3745132.51350672,
431 -6059751.69922620,
432 -6059751.69922620,
433 -6059751.69922620,
434 -6059751.69922620,
435 -6059751.69922620,
436 -6059751.69922620,
437 -1.56059190908946e-09,
438 -1.56059190908946e-09,
439 -1.56059190908946e-09,
440 -1.56059190908946e-09,
441 -1.56059190908946e-09,
442 -1.56059190908946e-09,
443 0,
444 0,
445 0,
446 0,
447 0,
448 0,
449 6059941.91052946,
450 6059941.91052946,
451 6059941.91052946,
452 6059941.91052946,
453 6059941.91052946,
454 6059941.91052946,
455 3745250.07055718,
456 3745250.07055718,
457 3745250.07055718,
458 3745250.07055718,
459 3745250.07055718,
460 3745250.07055718,
461 -3745250.07055718,
462 -3745250.07055718,
463 -3745250.07055718,
464 -3745250.07055718,
465 -3745250.07055718,
466 -3745250.07055718,
467 -6059941.91052946,
468 -6059941.91052946,
469 -6059941.91052946,
470 -6059941.91052946,
471 -6059941.91052946,
472 -6059941.91052946,
473 -1.56064089496142e-09,
474 -1.56064089496142e-09,
475 -1.56064089496142e-09,
476 -1.56064089496142e-09,
477 -1.56064089496142e-09,
478 -1.56064089496142e-09,
479 0,
480 0,
481 0,
482 0,
483 0,
484 0,
485 6060132.12183272,
486 6060132.12183272,
487 6060132.12183272,
488 6060132.12183272,
489 6060132.12183272,
490 6060132.12183272,
491 3745367.62760764,
492 3745367.62760764,
493 3745367.62760764,
494 3745367.62760764,
495 3745367.62760764,
496 3745367.62760764,
497 -3745367.62760764,
498 -3745367.62760764,
499 -3745367.62760764,
500 -3745367.62760764,
501 -3745367.62760764,
502 -3745367.62760764,
503 -6060132.12183272,
504 -6060132.12183272,
505 -6060132.12183272,
506 -6060132.12183272,
507 -6060132.12183272,
508 -6060132.12183272,
509 -1.56068988083339e-09,
510 -1.56068988083339e-09,
511 -1.56068988083339e-09,
512 -1.56068988083339e-09,
513 -1.56068988083339e-09,
514 -1.56068988083339e-09,
515};
516
517const double XGRS80_MATLAB[216] = {
518 6378137, 1970952.72545164, -5160021.22545164, -5160021.22545164, 1970952.72545164,
519 6378137, 1976947.14312992, 610910.264208145, -1599383.83577310, -1599383.83577310,
520 610910.264208145, 1976947.14312992, -5165998.77753988, -1596381.41518003, 4179380.80394997,
521 4179380.80394997, -1596381.41518003, -5165998.77753988, -5165998.77753988, -1596381.41518003,
522 4179380.80394997, 4179380.80394997, -1596381.41518003, -5165998.77753988, 1976947.14312991,
523 610910.264208145, -1599383.83577310, -1599383.83577310, 610910.264208145, 1976947.14312991,
524 6378137, 1970952.72545164, -5160021.22545164, -5160021.22545164, 1970952.72545164,
525 6378137, 6378337, 1971014.52885052, -5160183.02885052, -5160183.02885052,
526 1971014.52885052, 6378337, 1977008.94652879, 610929.362508708, -1599433.83577310,
527 -1599433.83577310, 610929.362508708, 1977008.94652879, -5166160.58093876, -1596431.41518003,
528 4179511.70564940, 4179511.70564940, -1596431.41518003, -5166160.58093876, -5166160.58093876,
529 -1596431.41518003, 4179511.70564940, 4179511.70564940, -1596431.41518003, -5166160.58093876,
530 1977008.94652879, 610929.362508708, -1599433.83577310, -1599433.83577310, 610929.362508707,
531 1977008.94652879, 6378337, 1971014.52885052, -5160183.02885052, -5160183.02885052,
532 1971014.52885052, 6378337, 6378537, 1971076.33224939, -5160344.83224939,
533 -5160344.83224940, 1971076.33224939, 6378537, 1977070.74992767, 610948.460809271,
534 -1599483.83577310, -1599483.83577310, 610948.460809270, 1977070.74992767, -5166322.38433763,
535 -1596481.41518003, 4179642.60734884, 4179642.60734884, -1596481.41518003, -5166322.38433763,
536 -5166322.38433763, -1596481.41518003, 4179642.60734884, 4179642.60734884, -1596481.41518003,
537 -5166322.38433763, 1977070.74992766, 610948.460809270, -1599483.83577310, -1599483.83577310,
538 610948.460809270, 1977070.74992766, 6378537, 1971076.33224939, -5160344.83224939,
539 -5160344.83224940, 1971076.33224939, 6378537, 6378737, 1971138.13564827,
540 -5160506.63564827, -5160506.63564827, 1971138.13564827, 6378737, 1977132.55332654,
541 610967.559109833, -1599533.83577310, -1599533.83577310, 610967.559109833, 1977132.55332654,
542 -5166484.18773651, -1596531.41518003, 4179773.50904828, 4179773.50904828, -1596531.41518003,
543 -5166484.18773651, -5166484.18773651, -1596531.41518003, 4179773.50904828, 4179773.50904828,
544 -1596531.41518003, -5166484.18773651, 1977132.55332654, 610967.559109833, -1599533.83577310,
545 -1599533.83577310, 610967.559109832, 1977132.55332654, 6378737, 1971138.13564827,
546 -5160506.63564827, -5160506.63564827, 1971138.13564827, 6378737, 6378937,
547 1971199.93904714, -5160668.43904714, -5160668.43904714, 1971199.93904714, 6378937,
548 1977194.35672542, 610986.657410395, -1599583.83577310, -1599583.83577310, 610986.657410395,
549 1977194.35672542, -5166645.99113538, -1596581.41518003, 4179904.41074772, 4179904.41074772,
550 -1596581.41518003, -5166645.99113538, -5166645.99113538, -1596581.41518003, 4179904.41074772,
551 4179904.41074772, -1596581.41518003, -5166645.99113538, 1977194.35672541, 610986.657410395,
552 -1599583.83577310, -1599583.83577310, 610986.657410395, 1977194.35672541, 6378937,
553 1971199.93904714, -5160668.43904714, -5160668.43904714, 1971199.93904714, 6378937,
554 6379137, 1971261.74244602, -5160830.24244602, -5160830.24244602, 1971261.74244602,
555 6379137, 1977256.16012429, 611005.755710958, -1599633.83577310, -1599633.83577310,
556 611005.755710958, 1977256.16012429, -5166807.79453425, -1596631.41518003, 4180035.31244715,
557 4180035.31244715, -1596631.41518003, -5166807.79453425, -5166807.79453426, -1596631.41518003,
558 4180035.31244715, 4180035.31244715, -1596631.41518003, -5166807.79453426, 1977256.16012429,
559 611005.755710958, -1599633.83577310, -1599633.83577310, 611005.755710957, 1977256.16012429,
560 6379137, 1971261.74244602, -5160830.24244602, -5160830.24244602, 1971261.74244602,
561 6379137,
562};
563
564const double YGRS80_MATLAB[216] = {
565 0,
566 6065968.75567322,
567 3748974.86570096,
568 -3748974.86570096,
569 -6065968.75567322,
570 -1.56219301231466e-09,
571 0,
572 1880188.46284479,
573 1162020.37529350,
574 -1162020.37529350,
575 -1880188.46284479,
576 -4.84212398183511e-10,
577 0,
578 -4913156.80055210,
579 -3036497.89479889,
580 3036497.89479889,
581 4913156.80055210,
582 1.26530477346267e-09,
583 0,
584 -4913156.80055210,
585 -3036497.89479889,
586 3036497.89479889,
587 4913156.80055210,
588 1.26530477346267e-09,
589 0,
590 1880188.46284479,
591 1162020.37529350,
592 -1162020.37529350,
593 -1880188.46284479,
594 -4.84212398183511e-10,
595 0,
596 6065968.75567322,
597 3748974.86570096,
598 -3748974.86570096,
599 -6065968.75567322,
600 -1.56219301231466e-09,
601 0,
602 6066158.96697648,
603 3749092.42275142,
604 -3749092.42275142,
605 -6066158.96697648,
606 -1.56224199818663e-09,
607 0,
608 1880247.24137002,
609 1162056.70241990,
610 -1162056.70241990,
611 -1880247.24137002,
612 -4.84227535650433e-10,
613 0,
614 -4913310.68472896,
615 -3036593.00045052,
616 3036593.00045051,
617 4913310.68472896,
618 1.26534440386558e-09,
619 0,
620 -4913310.68472896,
621 -3036593.00045052,
622 3036593.00045051,
623 4913310.68472896,
624 1.26534440386558e-09,
625 0,
626 1880247.24137002,
627 1162056.70241990,
628 -1162056.70241990,
629 -1880247.24137002,
630 -4.84227535650433e-10,
631 0,
632 6066158.96697648,
633 3749092.42275142,
634 -3749092.42275142,
635 -6066158.96697648,
636 -1.56224199818663e-09,
637 0,
638 6066349.17827974,
639 3749209.97980188,
640 -3749209.97980187,
641 -6066349.17827974,
642 -1.56229098405859e-09,
643 0,
644 1880306.01989525,
645 1162093.02954630,
646 -1162093.02954630,
647 -1880306.01989525,
648 -4.84242673117355e-10,
649 0,
650 -4913464.56890582,
651 -3036688.10610215,
652 3036688.10610214,
653 4913464.56890582,
654 1.26538403426848e-09,
655 0,
656 -4913464.56890582,
657 -3036688.10610215,
658 3036688.10610215,
659 4913464.56890582,
660 1.26538403426848e-09,
661 0,
662 1880306.01989525,
663 1162093.02954630,
664 -1162093.02954630,
665 -1880306.01989525,
666 -4.84242673117354e-10,
667 0,
668 6066349.17827974,
669 3749209.97980188,
670 -3749209.97980187,
671 -6066349.17827974,
672 -1.56229098405859e-09,
673 0,
674 6066539.38958300,
675 3749327.53685233,
676 -3749327.53685233,
677 -6066539.38958300,
678 -1.56233996993056e-09,
679 0,
680 1880364.79842048,
681 1162129.35667270,
682 -1162129.35667270,
683 -1880364.79842048,
684 -4.84257810584276e-10,
685 0,
686 -4913618.45308268,
687 -3036783.21175378,
688 3036783.21175377,
689 4913618.45308268,
690 1.26542366467138e-09,
691 0,
692 -4913618.45308268,
693 -3036783.21175378,
694 3036783.21175377,
695 4913618.45308268,
696 1.26542366467138e-09,
697 0,
698 1880364.79842048,
699 1162129.35667270,
700 -1162129.35667270,
701 -1880364.79842048,
702 -4.84257810584276e-10,
703 0,
704 6066539.38958300,
705 3749327.53685233,
706 -3749327.53685233,
707 -6066539.38958300,
708 -1.56233996993056e-09,
709 0,
710 6066729.60088626,
711 3749445.09390279,
712 -3749445.09390279,
713 -6066729.60088626,
714 -1.56238895580252e-09,
715 0,
716 1880423.57694571,
717 1162165.68379910,
718 -1162165.68379910,
719 -1880423.57694571,
720 -4.84272948051198e-10,
721 0,
722 -4913772.33725954,
723 -3036878.31740540,
724 3036878.31740540,
725 4913772.33725954,
726 1.26546329507429e-09,
727 0,
728 -4913772.33725954,
729 -3036878.31740541,
730 3036878.31740540,
731 4913772.33725954,
732 1.26546329507429e-09,
733 0,
734 1880423.57694571,
735 1162165.68379910,
736 -1162165.68379910,
737 -1880423.57694571,
738 -4.84272948051198e-10,
739 0,
740 6066729.60088626,
741 3749445.09390279,
742 -3749445.09390279,
743 -6066729.60088626,
744 -1.56238895580252e-09,
745 0,
746 6066919.81218952,
747 3749562.65095325,
748 -3749562.65095325,
749 -6066919.81218952,
750 -1.56243794167449e-09,
751 0,
752 1880482.35547094,
753 1162202.01092550,
754 -1162202.01092550,
755 -1880482.35547094,
756 -4.84288085518120e-10,
757 0,
758 -4913926.22143639,
759 -3036973.42305703,
760 3036973.42305703,
761 4913926.22143639,
762 1.26550292547719e-09,
763 0,
764 -4913926.22143639,
765 -3036973.42305703,
766 3036973.42305703,
767 4913926.22143639,
768 1.26550292547719e-09,
769 0,
770 1880482.35547094,
771 1162202.01092550,
772 -1162202.01092550,
773 -1880482.35547094,
774 -4.84288085518119e-10,
775 0,
776 6066919.81218952,
777 3749562.65095325,
778 -3749562.65095325,
779 -6066919.81218952,
780 -1.56243794167449e-09,
781};
782
783const double ZGRS80_MATLAB[216] = {
784 0,
785 0,
786 0,
787 0,
788 0,
789 0,
790 6043686.27213354,
791 6043686.27213354,
792 6043686.27213354,
793 6043686.27213354,
794 6043686.27213354,
795 6043686.27213354,
796 3728191.67572948,
797 3728191.67572948,
798 3728191.67572948,
799 3728191.67572948,
800 3728191.67572948,
801 3728191.67572948,
802 -3728191.67572948,
803 -3728191.67572948,
804 -3728191.67572948,
805 -3728191.67572948,
806 -3728191.67572948,
807 -3728191.67572948,
808 -6043686.27213354,
809 -6043686.27213354,
810 -6043686.27213354,
811 -6043686.27213354,
812 -6043686.27213354,
813 -6043686.27213354,
814 -1.55173509862111e-09,
815 -1.55173509862111e-09,
816 -1.55173509862111e-09,
817 -1.55173509862111e-09,
818 -1.55173509862111e-09,
819 -1.55173509862111e-09,
820 0,
821 0,
822 0,
823 0,
824 0,
825 0,
826 6043876.48343680,
827 6043876.48343680,
828 6043876.48343680,
829 6043876.48343680,
830 6043876.48343680,
831 6043876.48343680,
832 3728309.23277994,
833 3728309.23277994,
834 3728309.23277994,
835 3728309.23277994,
836 3728309.23277994,
837 3728309.23277994,
838 -3728309.23277994,
839 -3728309.23277994,
840 -3728309.23277994,
841 -3728309.23277994,
842 -3728309.23277994,
843 -3728309.23277994,
844 -6043876.48343680,
845 -6043876.48343680,
846 -6043876.48343680,
847 -6043876.48343680,
848 -6043876.48343680,
849 -6043876.48343680,
850 -1.55178408449307e-09,
851 -1.55178408449307e-09,
852 -1.55178408449307e-09,
853 -1.55178408449307e-09,
854 -1.55178408449307e-09,
855 -1.55178408449307e-09,
856 0,
857 0,
858 0,
859 0,
860 0,
861 0,
862 6044066.69474006,
863 6044066.69474006,
864 6044066.69474006,
865 6044066.69474006,
866 6044066.69474006,
867 6044066.69474006,
868 3728426.78983040,
869 3728426.78983040,
870 3728426.78983040,
871 3728426.78983040,
872 3728426.78983040,
873 3728426.78983040,
874 -3728426.78983040,
875 -3728426.78983040,
876 -3728426.78983040,
877 -3728426.78983040,
878 -3728426.78983040,
879 -3728426.78983040,
880 -6044066.69474006,
881 -6044066.69474006,
882 -6044066.69474006,
883 -6044066.69474006,
884 -6044066.69474006,
885 -6044066.69474006,
886 -1.55183307036504e-09,
887 -1.55183307036504e-09,
888 -1.55183307036504e-09,
889 -1.55183307036504e-09,
890 -1.55183307036504e-09,
891 -1.55183307036504e-09,
892 0,
893 0,
894 0,
895 0,
896 0,
897 0,
898 6044256.90604332,
899 6044256.90604332,
900 6044256.90604332,
901 6044256.90604332,
902 6044256.90604332,
903 6044256.90604332,
904 3728544.34688086,
905 3728544.34688086,
906 3728544.34688086,
907 3728544.34688086,
908 3728544.34688086,
909 3728544.34688086,
910 -3728544.34688086,
911 -3728544.34688086,
912 -3728544.34688086,
913 -3728544.34688086,
914 -3728544.34688086,
915 -3728544.34688086,
916 -6044256.90604332,
917 -6044256.90604332,
918 -6044256.90604332,
919 -6044256.90604332,
920 -6044256.90604332,
921 -6044256.90604332,
922 -1.55188205623700e-09,
923 -1.55188205623700e-09,
924 -1.55188205623700e-09,
925 -1.55188205623700e-09,
926 -1.55188205623700e-09,
927 -1.55188205623700e-09,
928 0,
929 0,
930 0,
931 0,
932 0,
933 0,
934 6044447.11734658,
935 6044447.11734658,
936 6044447.11734658,
937 6044447.11734658,
938 6044447.11734658,
939 6044447.11734658,
940 3728661.90393132,
941 3728661.90393132,
942 3728661.90393132,
943 3728661.90393132,
944 3728661.90393132,
945 3728661.90393132,
946 -3728661.90393132,
947 -3728661.90393132,
948 -3728661.90393132,
949 -3728661.90393132,
950 -3728661.90393132,
951 -3728661.90393132,
952 -6044447.11734658,
953 -6044447.11734658,
954 -6044447.11734658,
955 -6044447.11734658,
956 -6044447.11734658,
957 -6044447.11734658,
958 -1.55193104210897e-09,
959 -1.55193104210897e-09,
960 -1.55193104210897e-09,
961 -1.55193104210897e-09,
962 -1.55193104210897e-09,
963 -1.55193104210897e-09,
964 0,
965 0,
966 0,
967 0,
968 0,
969 0,
970 6044637.32864983,
971 6044637.32864983,
972 6044637.32864983,
973 6044637.32864983,
974 6044637.32864983,
975 6044637.32864983,
976 3728779.46098178,
977 3728779.46098178,
978 3728779.46098178,
979 3728779.46098178,
980 3728779.46098178,
981 3728779.46098178,
982 -3728779.46098177,
983 -3728779.46098177,
984 -3728779.46098177,
985 -3728779.46098177,
986 -3728779.46098177,
987 -3728779.46098177,
988 -6044637.32864983,
989 -6044637.32864983,
990 -6044637.32864983,
991 -6044637.32864983,
992 -6044637.32864983,
993 -6044637.32864983,
994 -1.55198002798094e-09,
995 -1.55198002798094e-09,
996 -1.55198002798094e-09,
997 -1.55198002798094e-09,
998 -1.55198002798094e-09,
999 -1.55198002798094e-09,
1000};
1001
1002const double XWGS84_MATLAB[216] = {
1003 6378137, 1970952.72545164, -5160021.22545164, -5160021.22545164, 1970952.72545164,
1004 6378137, 1976947.14310045, 610910.264199039, -1599383.83574926, -1599383.83574926,
1005 610910.264199039, 1976947.14310045, -5165998.77751058, -1596381.41517097, 4179380.80392626,
1006 4179380.80392626, -1596381.41517097, -5165998.77751058, -5165998.77751058, -1596381.41517097,
1007 4179380.80392626, 4179380.80392626, -1596381.41517097, -5165998.77751058, 1976947.14310045,
1008 610910.264199039, -1599383.83574926, -1599383.83574926, 610910.264199039, 1976947.14310045,
1009 6378137, 1970952.72545164, -5160021.22545164, -5160021.22545164, 1970952.72545164,
1010 6378137, 6378337, 1971014.52885052, -5160183.02885052, -5160183.02885052,
1011 1971014.52885052, 6378337, 1977008.94649932, 610929.362499602, -1599433.83574926,
1012 -1599433.83574926, 610929.362499601, 1977008.94649932, -5166160.58090945, -1596431.41517097,
1013 4179511.70562570, 4179511.70562570, -1596431.41517097, -5166160.58090945, -5166160.58090945,
1014 -1596431.41517097, 4179511.70562570, 4179511.70562570, -1596431.41517097, -5166160.58090945,
1015 1977008.94649932, 610929.362499601, -1599433.83574926, -1599433.83574926, 610929.362499601,
1016 1977008.94649932, 6378337, 1971014.52885052, -5160183.02885052, -5160183.02885052,
1017 1971014.52885052, 6378337, 6378537, 1971076.33224939, -5160344.83224939,
1018 -5160344.83224940, 1971076.33224939, 6378537, 1977070.74989820, 610948.460800164,
1019 -1599483.83574926, -1599483.83574926, 610948.460800164, 1977070.74989820, -5166322.38430833,
1020 -1596481.41517097, 4179642.60732513, 4179642.60732514, -1596481.41517097, -5166322.38430833,
1021 -5166322.38430833, -1596481.41517097, 4179642.60732514, 4179642.60732514, -1596481.41517097,
1022 -5166322.38430833, 1977070.74989820, 610948.460800164, -1599483.83574926, -1599483.83574926,
1023 610948.460800163, 1977070.74989820, 6378537, 1971076.33224939, -5160344.83224939,
1024 -5160344.83224940, 1971076.33224939, 6378537, 6378737, 1971138.13564827,
1025 -5160506.63564827, -5160506.63564827, 1971138.13564827, 6378737, 1977132.55329707,
1026 610967.559100727, -1599533.83574926, -1599533.83574926, 610967.559100726, 1977132.55329707,
1027 -5166484.18770720, -1596531.41517097, 4179773.50902457, 4179773.50902457, -1596531.41517097,
1028 -5166484.18770720, -5166484.18770720, -1596531.41517097, 4179773.50902457, 4179773.50902457,
1029 -1596531.41517097, -5166484.18770720, 1977132.55329707, 610967.559100726, -1599533.83574926,
1030 -1599533.83574926, 610967.559100726, 1977132.55329707, 6378737, 1971138.13564827,
1031 -5160506.63564827, -5160506.63564827, 1971138.13564827, 6378737, 6378937,
1032 1971199.93904714, -5160668.43904714, -5160668.43904714, 1971199.93904714, 6378937,
1033 1977194.35669595, 610986.657401289, -1599583.83574926, -1599583.83574926, 610986.657401289,
1034 1977194.35669595, -5166645.99110608, -1596581.41517097, 4179904.41072401, 4179904.41072401,
1035 -1596581.41517097, -5166645.99110608, -5166645.99110608, -1596581.41517097, 4179904.41072401,
1036 4179904.41072401, -1596581.41517097, -5166645.99110608, 1977194.35669595, 610986.657401289,
1037 -1599583.83574926, -1599583.83574926, 610986.657401288, 1977194.35669595, 6378937,
1038 1971199.93904714, -5160668.43904714, -5160668.43904714, 1971199.93904714, 6378937,
1039 6379137, 1971261.74244602, -5160830.24244602, -5160830.24244602, 1971261.74244602,
1040 6379137, 1977256.16009482, 611005.755701852, -1599633.83574926, -1599633.83574926,
1041 611005.755701851, 1977256.16009482, -5166807.79450495, -1596631.41517097, 4180035.31242345,
1042 4180035.31242345, -1596631.41517097, -5166807.79450495, -5166807.79450495, -1596631.41517097,
1043 4180035.31242345, 4180035.31242345, -1596631.41517097, -5166807.79450495, 1977256.16009482,
1044 611005.755701851, -1599633.83574926, -1599633.83574926, 611005.755701851, 1977256.16009482,
1045 6379137, 1971261.74244602, -5160830.24244602, -5160830.24244602, 1971261.74244602,
1046 6379137,
1047};
1048
1049const double YWGS84_MATLAB[216] = {
1050 0,
1051 6065968.75567322,
1052 3748974.86570096,
1053 -3748974.86570096,
1054 -6065968.75567322,
1055 -1.56219301231466e-09,
1056 0,
1057 1880188.46281677,
1058 1162020.37527618,
1059 -1162020.37527618,
1060 -1880188.46281677,
1061 -4.84212398176294e-10,
1062 0,
1063 -4913156.80052423,
1064 -3036497.89478166,
1065 3036497.89478166,
1066 4913156.80052423,
1067 1.26530477345549e-09,
1068 0,
1069 -4913156.80052423,
1070 -3036497.89478166,
1071 3036497.89478166,
1072 4913156.80052423,
1073 1.26530477345549e-09,
1074 0,
1075 1880188.46281677,
1076 1162020.37527618,
1077 -1162020.37527618,
1078 -1880188.46281677,
1079 -4.84212398176293e-10,
1080 0,
1081 6065968.75567322,
1082 3748974.86570096,
1083 -3748974.86570096,
1084 -6065968.75567322,
1085 -1.56219301231466e-09,
1086 0,
1087 6066158.96697648,
1088 3749092.42275142,
1089 -3749092.42275142,
1090 -6066158.96697648,
1091 -1.56224199818663e-09,
1092 0,
1093 1880247.24134200,
1094 1162056.70240258,
1095 -1162056.70240258,
1096 -1880247.24134200,
1097 -4.84227535643215e-10,
1098 0,
1099 -4913310.68470109,
1100 -3036593.00043329,
1101 3036593.00043329,
1102 4913310.68470109,
1103 1.26534440385840e-09,
1104 0,
1105 -4913310.68470109,
1106 -3036593.00043329,
1107 3036593.00043329,
1108 4913310.68470109,
1109 1.26534440385840e-09,
1110 0,
1111 1880247.24134200,
1112 1162056.70240258,
1113 -1162056.70240258,
1114 -1880247.24134200,
1115 -4.84227535643215e-10,
1116 0,
1117 6066158.96697648,
1118 3749092.42275142,
1119 -3749092.42275142,
1120 -6066158.96697648,
1121 -1.56224199818663e-09,
1122 0,
1123 6066349.17827974,
1124 3749209.97980188,
1125 -3749209.97980187,
1126 -6066349.17827974,
1127 -1.56229098405859e-09,
1128 0,
1129 1880306.01986723,
1130 1162093.02952898,
1131 -1162093.02952898,
1132 -1880306.01986723,
1133 -4.84242673110137e-10,
1134 0,
1135 -4913464.56887795,
1136 -3036688.10608492,
1137 3036688.10608492,
1138 4913464.56887795,
1139 1.26538403426130e-09,
1140 0,
1141 -4913464.56887795,
1142 -3036688.10608492,
1143 3036688.10608492,
1144 4913464.56887795,
1145 1.26538403426130e-09,
1146 0,
1147 1880306.01986722,
1148 1162093.02952898,
1149 -1162093.02952898,
1150 -1880306.01986723,
1151 -4.84242673110137e-10,
1152 0,
1153 6066349.17827974,
1154 3749209.97980188,
1155 -3749209.97980187,
1156 -6066349.17827974,
1157 -1.56229098405859e-09,
1158 0,
1159 6066539.38958300,
1160 3749327.53685233,
1161 -3749327.53685233,
1162 -6066539.38958300,
1163 -1.56233996993056e-09,
1164 0,
1165 1880364.79839246,
1166 1162129.35665538,
1167 -1162129.35665538,
1168 -1880364.79839246,
1169 -4.84257810577059e-10,
1170 0,
1171 -4913618.45305481,
1172 -3036783.21173655,
1173 3036783.21173655,
1174 4913618.45305481,
1175 1.26542366466421e-09,
1176 0,
1177 -4913618.45305481,
1178 -3036783.21173655,
1179 3036783.21173655,
1180 4913618.45305481,
1181 1.26542366466421e-09,
1182 0,
1183 1880364.79839245,
1184 1162129.35665538,
1185 -1162129.35665538,
1186 -1880364.79839245,
1187 -4.84257810577058e-10,
1188 0,
1189 6066539.38958300,
1190 3749327.53685233,
1191 -3749327.53685233,
1192 -6066539.38958300,
1193 -1.56233996993056e-09,
1194 0,
1195 6066729.60088626,
1196 3749445.09390279,
1197 -3749445.09390279,
1198 -6066729.60088626,
1199 -1.56238895580252e-09,
1200 0,
1201 1880423.57691768,
1202 1162165.68378178,
1203 -1162165.68378178,
1204 -1880423.57691768,
1205 -4.84272948043980e-10,
1206 0,
1207 -4913772.33723167,
1208 -3036878.31738818,
1209 3036878.31738818,
1210 4913772.33723167,
1211 1.26546329506711e-09,
1212 0,
1213 -4913772.33723167,
1214 -3036878.31738818,
1215 3036878.31738818,
1216 4913772.33723167,
1217 1.26546329506711e-09,
1218 0,
1219 1880423.57691768,
1220 1162165.68378178,
1221 -1162165.68378178,
1222 -1880423.57691768,
1223 -4.84272948043980e-10,
1224 0,
1225 6066729.60088626,
1226 3749445.09390279,
1227 -3749445.09390279,
1228 -6066729.60088626,
1229 -1.56238895580252e-09,
1230 0,
1231 6066919.81218952,
1232 3749562.65095325,
1233 -3749562.65095325,
1234 -6066919.81218952,
1235 -1.56243794167449e-09,
1236 0,
1237 1880482.35544291,
1238 1162202.01090818,
1239 -1162202.01090818,
1240 -1880482.35544291,
1241 -4.84288085510902e-10,
1242 0,
1243 -4913926.22140853,
1244 -3036973.42303981,
1245 3036973.42303981,
1246 4913926.22140853,
1247 1.26550292547002e-09,
1248 0,
1249 -4913926.22140853,
1250 -3036973.42303981,
1251 3036973.42303981,
1252 4913926.22140853,
1253 1.26550292547002e-09,
1254 0,
1255 1880482.35544291,
1256 1162202.01090818,
1257 -1162202.01090818,
1258 -1880482.35544291,
1259 -4.84288085510902e-10,
1260 0,
1261 6066919.81218952,
1262 3749562.65095325,
1263 -3749562.65095325,
1264 -6066919.81218952,
1265 -1.56243794167449e-09,
1266};
1267
1268const double ZWGS84_MATLAB[216] = {
1269 0,
1270 0,
1271 0,
1272 0,
1273 0,
1274 0,
1275 6043686.27224277,
1276 6043686.27224277,
1277 6043686.27224277,
1278 6043686.27224277,
1279 6043686.27224277,
1280 6043686.27224277,
1281 3728191.67583129,
1282 3728191.67583129,
1283 3728191.67583129,
1284 3728191.67583129,
1285 3728191.67583129,
1286 3728191.67583129,
1287 -3728191.67583129,
1288 -3728191.67583129,
1289 -3728191.67583129,
1290 -3728191.67583129,
1291 -3728191.67583129,
1292 -3728191.67583129,
1293 -6043686.27224277,
1294 -6043686.27224277,
1295 -6043686.27224277,
1296 -6043686.27224277,
1297 -6043686.27224277,
1298 -6043686.27224277,
1299 -1.55173509867228e-09,
1300 -1.55173509867228e-09,
1301 -1.55173509867228e-09,
1302 -1.55173509867228e-09,
1303 -1.55173509867228e-09,
1304 -1.55173509867228e-09,
1305 0,
1306 0,
1307 0,
1308 0,
1309 0,
1310 0,
1311 6043876.48354603,
1312 6043876.48354603,
1313 6043876.48354603,
1314 6043876.48354603,
1315 6043876.48354603,
1316 6043876.48354603,
1317 3728309.23288175,
1318 3728309.23288175,
1319 3728309.23288175,
1320 3728309.23288175,
1321 3728309.23288175,
1322 3728309.23288175,
1323 -3728309.23288175,
1324 -3728309.23288175,
1325 -3728309.23288175,
1326 -3728309.23288175,
1327 -3728309.23288175,
1328 -3728309.23288175,
1329 -6043876.48354603,
1330 -6043876.48354603,
1331 -6043876.48354603,
1332 -6043876.48354603,
1333 -6043876.48354603,
1334 -6043876.48354603,
1335 -1.55178408454425e-09,
1336 -1.55178408454425e-09,
1337 -1.55178408454425e-09,
1338 -1.55178408454425e-09,
1339 -1.55178408454425e-09,
1340 -1.55178408454425e-09,
1341 0,
1342 0,
1343 0,
1344 0,
1345 0,
1346 0,
1347 6044066.69484929,
1348 6044066.69484929,
1349 6044066.69484929,
1350 6044066.69484929,
1351 6044066.69484929,
1352 6044066.69484929,
1353 3728426.78993221,
1354 3728426.78993221,
1355 3728426.78993221,
1356 3728426.78993221,
1357 3728426.78993221,
1358 3728426.78993221,
1359 -3728426.78993221,
1360 -3728426.78993221,
1361 -3728426.78993221,
1362 -3728426.78993221,
1363 -3728426.78993221,
1364 -3728426.78993221,
1365 -6044066.69484929,
1366 -6044066.69484929,
1367 -6044066.69484929,
1368 -6044066.69484929,
1369 -6044066.69484929,
1370 -6044066.69484929,
1371 -1.55183307041621e-09,
1372 -1.55183307041621e-09,
1373 -1.55183307041621e-09,
1374 -1.55183307041621e-09,
1375 -1.55183307041621e-09,
1376 -1.55183307041621e-09,
1377 0,
1378 0,
1379 0,
1380 0,
1381 0,
1382 0,
1383 6044256.90615255,
1384 6044256.90615255,
1385 6044256.90615255,
1386 6044256.90615255,
1387 6044256.90615255,
1388 6044256.90615255,
1389 3728544.34698267,
1390 3728544.34698267,
1391 3728544.34698267,
1392 3728544.34698267,
1393 3728544.34698267,
1394 3728544.34698267,
1395 -3728544.34698267,
1396 -3728544.34698267,
1397 -3728544.34698267,
1398 -3728544.34698267,
1399 -3728544.34698267,
1400 -3728544.34698267,
1401 -6044256.90615255,
1402 -6044256.90615255,
1403 -6044256.90615255,
1404 -6044256.90615255,
1405 -6044256.90615255,
1406 -6044256.90615255,
1407 -1.55188205628818e-09,
1408 -1.55188205628818e-09,
1409 -1.55188205628818e-09,
1410 -1.55188205628818e-09,
1411 -1.55188205628818e-09,
1412 -1.55188205628818e-09,
1413 0,
1414 0,
1415 0,
1416 0,
1417 0,
1418 0,
1419 6044447.11745581,
1420 6044447.11745581,
1421 6044447.11745581,
1422 6044447.11745581,
1423 6044447.11745581,
1424 6044447.11745581,
1425 3728661.90403313,
1426 3728661.90403313,
1427 3728661.90403313,
1428 3728661.90403313,
1429 3728661.90403313,
1430 3728661.90403313,
1431 -3728661.90403313,
1432 -3728661.90403313,
1433 -3728661.90403313,
1434 -3728661.90403313,
1435 -3728661.90403313,
1436 -3728661.90403313,
1437 -6044447.11745581,
1438 -6044447.11745581,
1439 -6044447.11745581,
1440 -6044447.11745581,
1441 -6044447.11745581,
1442 -6044447.11745581,
1443 -1.55193104216015e-09,
1444 -1.55193104216015e-09,
1445 -1.55193104216015e-09,
1446 -1.55193104216015e-09,
1447 -1.55193104216015e-09,
1448 -1.55193104216015e-09,
1449 0,
1450 0,
1451 0,
1452 0,
1453 0,
1454 0,
1455 6044637.32875907,
1456 6044637.32875907,
1457 6044637.32875907,
1458 6044637.32875907,
1459 6044637.32875907,
1460 6044637.32875907,
1461 3728779.46108359,
1462 3728779.46108359,
1463 3728779.46108359,
1464 3728779.46108359,
1465 3728779.46108359,
1466 3728779.46108359,
1467 -3728779.46108358,
1468 -3728779.46108358,
1469 -3728779.46108358,
1470 -3728779.46108358,
1471 -3728779.46108358,
1472 -3728779.46108358,
1473 -6044637.32875907,
1474 -6044637.32875907,
1475 -6044637.32875907,
1476 -6044637.32875907,
1477 -6044637.32875907,
1478 -6044637.32875907,
1479 -1.55198002803211e-09,
1480 -1.55198002803211e-09,
1481 -1.55198002803211e-09,
1482 -1.55198002803211e-09,
1483 -1.55198002803211e-09,
1484 -1.55198002803211e-09,
1485};
1486
1510{
1511 public:
1521 GeoToCartesianTestCase(double latitude,
1522 double longitude,
1523 double altitude,
1525 int i);
1526 ~GeoToCartesianTestCase() override;
1527
1528 private:
1529 void DoRun() override;
1530
1539 static std::string Name(double latitude,
1540 double longitude,
1541 double altitude,
1543 double m_latitude;
1545 double m_altitude;
1547 int m_i;
1548};
1549
1550std::string
1552 double longitude,
1553 double altitude,
1555{
1556 std::ostringstream oss;
1557 oss << "Geo->Cart: "
1558 << "LAT-LON-ALT-SPHEROID = " << latitude << " deg - " << longitude << " deg - " << altitude
1559 << " m - ";
1560 switch (sphType)
1561 {
1563 oss << "SPHERE";
1564 break;
1566 oss << "GRS80";
1567 break;
1569 oss << "WGS84";
1570 break;
1571 };
1572
1573 return oss.str();
1574}
1575
1577 double longitude,
1578 double altitude,
1580 int i)
1581 : TestCase(Name(latitude, longitude, altitude, sphType)),
1582 m_latitude(latitude),
1583 m_longitude(longitude),
1584 m_altitude(altitude),
1585 m_sphType(sphType),
1586 m_i(i)
1587{
1588}
1589
1591{
1592}
1593
1594void
1596{
1599 m_altitude,
1600 m_sphType);
1602 {
1605 TOLERANCE,
1606 "x coordinate (" << cart.x
1607 << ") is incorrect "
1608 "for perfect sphere model in iteration "
1609 << m_i);
1612 TOLERANCE,
1613 "y coordinate (" << cart.y
1614 << ") is incorrect "
1615 "for perfect sphere model in iteration "
1616 << m_i);
1619 TOLERANCE,
1620 "z coordinate (" << cart.z
1621 << ") is incorrect "
1622 "for perfect sphere model in iteration "
1623 << m_i);
1624 }
1626 {
1629 TOLERANCE,
1630 "x coordinate (" << cart.x
1631 << ") is incorrect "
1632 "for GRS80 model in iteration "
1633 << m_i);
1636 TOLERANCE,
1637 "y coordinate (" << cart.y
1638 << ") is incorrect "
1639 "for GRS80 model in iteration "
1640 << m_i);
1643 TOLERANCE,
1644 "z coordinate (" << cart.z
1645 << ") is incorrect "
1646 "for GRS80 model in iteration "
1647 << m_i);
1648 }
1649 else // if m_sphType == GeographicPositions::WGS84
1650 {
1653 TOLERANCE,
1654 "x coordinate (" << cart.x
1655 << ") is incorrect "
1656 "for WGS84 model in iteration "
1657 << m_i);
1660 TOLERANCE,
1661 "y coordinate (" << cart.y
1662 << ") is incorrect "
1663 "for WGS84 model in iteration "
1664 << m_i);
1667 TOLERANCE,
1668 "z coordinate (" << cart.z
1669 << ") is incorrect "
1670 "for WGS84 model in iteration "
1671 << m_i);
1672 }
1673}
1674
1688{
1689 public:
1699 CartesianToGeoTestCase(double latitude,
1700 double longitude,
1701 double altitude,
1703 int i);
1704 ~CartesianToGeoTestCase() override;
1705
1706 private:
1707 void DoRun() override;
1708
1717 static std::string Name(double latitude,
1718 double longitude,
1719 double altitude,
1721 double m_latitude;
1723 double m_altitude;
1725};
1726
1727std::string
1729 double longitude,
1730 double altitude,
1732{
1733 std::ostringstream oss;
1734 oss << "Cart->Geo: "
1735 << "LAT-LON-ALT-SPHEROID = " << latitude << " deg - " << longitude << " deg - " << altitude
1736 << " m - ";
1737 switch (sphType)
1738 {
1740 oss << "SPHERE";
1741 break;
1743 oss << "GRS80";
1744 break;
1746 oss << "WGS84";
1747 break;
1748 };
1749
1750 return oss.str();
1751}
1752
1754 double longitude,
1755 double altitude,
1757 int i)
1758 : TestCase(Name(latitude, longitude, altitude, sphType)),
1759 m_latitude(latitude),
1760 m_longitude(longitude),
1761 m_altitude(altitude),
1762 m_sphType(sphType)
1763{
1764}
1765
1767{
1768}
1769
1770void
1772{
1775 m_altitude,
1776 m_sphType);
1778
1779 // geographic coords are ambiguous due to angular wrapping, convert to
1780 // rectangular for comparison
1781 Vector geocart =
1783
1785 2.5, // minimum passing tolerance (m)
1786 "Double conversion out-of-tolerance: "
1787 << geo << " <> "
1788 << Vector({m_latitude, m_longitude, m_altitude}));
1789}
1790
1797{
1798 public:
1800};
1801
1803 : TestSuite("geo-to-cartesian", Type::UNIT)
1804{
1805 NS_LOG_INFO("creating GeoToCartesianTestSuite");
1806 int i = 0; // iteration number
1807 for (double altitude = 0; altitude <= 1000; altitude += 200)
1808 {
1809 for (double latitude = 0; latitude <= 360; latitude += 72)
1810 {
1811 for (double longitude = 0; longitude <= 360; longitude += 72)
1812 {
1814 longitude,
1815 altitude,
1817 i),
1818 TestCase::Duration::QUICK);
1820 longitude,
1821 altitude,
1823 i),
1824 TestCase::Duration::QUICK);
1825 ++i;
1826 }
1827 }
1828 }
1829 i = 0;
1830 for (double altitude = 0; altitude <= 1000; altitude += 200)
1831 {
1832 for (double latitude = 0; latitude <= 360; latitude += 72)
1833 {
1834 for (double longitude = 0; longitude <= 360; longitude += 72)
1835 {
1837 longitude,
1838 altitude,
1840 i),
1841 TestCase::Duration::QUICK);
1843 longitude,
1844 altitude,
1846 i),
1847 TestCase::Duration::QUICK);
1848 ++i;
1849 }
1850 }
1851 }
1852 i = 0;
1853 for (double altitude = 0; altitude <= 1000; altitude += 200)
1854 {
1855 for (double latitude = 0; latitude <= 360; latitude += 72)
1856 {
1857 for (double longitude = 0; longitude <= 360; longitude += 72)
1858 {
1860 longitude,
1861 altitude,
1863 i),
1864 TestCase::Duration::QUICK);
1866 longitude,
1867 altitude,
1869 i),
1870 TestCase::Duration::QUICK);
1871 ++i;
1872 }
1873 }
1874 }
1875}
1876
Cartesian to Geo Test Case.
CartesianToGeoTestCase(double latitude, double longitude, double altitude, GeographicPositions::EarthSpheroidType sphType, int i)
Constructor.
double m_longitude
longitude (deg)
void DoRun() override
Implementation to actually run this TestCase.
static std::string Name(double latitude, double longitude, double altitude, GeographicPositions::EarthSpheroidType sphType)
Name function.
GeographicPositions::EarthSpheroidType m_sphType
spheroid type
double m_latitude
latitude (deg)
Geo To Cartesian Test Case.
double m_longitude
longitude (deg)
void DoRun() override
Implementation to actually run this TestCase.
GeoToCartesianTestCase(double latitude, double longitude, double altitude, GeographicPositions::EarthSpheroidType sphType, int i)
Constructor.
double m_latitude
latitude (deg)
GeographicPositions::EarthSpheroidType m_sphType
spheroid type
static std::string Name(double latitude, double longitude, double altitude, GeographicPositions::EarthSpheroidType sphType)
Name function.
Geo To Cartesian Test Suite.
EarthSpheroidType
Spheroid model to use for earth: perfect sphere (SPHERE), Geodetic Reference System 1980 (GRS80),...
static Vector GeographicToCartesianCoordinates(double latitude, double longitude, double altitude, EarthSpheroidType sphType)
Converts earth geographic/geodetic coordinates (latitude and longitude in degrees) with a given altit...
static Vector CartesianToGeographicCoordinates(Vector pos, EarthSpheroidType sphType)
Inverse of GeographicToCartesianCoordinates using [1].
encapsulates test code
Definition: test.h:1061
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
A suite of tests to run.
Definition: test.h:1268
Type
Type of test.
Definition: test.h:1275
const double ZSPHERE_MATLAB[216]
const double TOLERANCE
const double YGRS80_MATLAB[216]
const double YWGS84_MATLAB[216]
const double ZWGS84_MATLAB[216]
const double YSPHERE_MATLAB[216]
const double XSPHERE_MATLAB[216]
const double XWGS84_MATLAB[216]
const double ZGRS80_MATLAB[216]
const double XGRS80_MATLAB[216]
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
static GeoToCartesianTestSuite g_GeoToCartesianTestSuite
Static variable for test initialization.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Definition: test.h:338
#define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report and abort if not.
Definition: test.h:751
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double CalculateDistance(const Vector3D &a, const Vector3D &b)
Definition: vector.cc:109
static std::string Name(std::string str, uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t serverReadSize, uint32_t serverWriteSize, uint32_t sourceReadSize, bool useIpv6)
Definition: tcp-test.cc:166