source: trunk/FACT++/erfa/src/t_erfa_c.c@ 18403

Last change on this file since 18403 was 18348, checked in by tbretz, 9 years ago
File size: 216.7 KB
Line 
1#include <stdio.h>
2#include <erfa.h>
3
4static int verbose = 0;
5
6/*
7** - - - - - - - - -
8** t _ e r f a _ c
9** - - - - - - - - -
10**
11** Validate the ERFA C functions.
12**
13** Each ERFA function is at least called and a usually quite basic test
14** is performed. Successful completion is signalled by a confirming
15** message. Failure of a given function or group of functions results
16** in error messages.
17**
18** All messages go to stdout.
19**
20** This revision: 2015 January 30
21**
22*/
23
24static void viv(int ival, int ivalok,
25 const char *func, const char *test, int *status)
26/*
27** - - - -
28** v i v
29** - - - -
30**
31** Validate an integer result.
32**
33** Internal function used by t_erfa_c program.
34**
35** Given:
36** ival int value computed by function under test
37** ivalok int correct value
38** func char[] name of function under test
39** test char[] name of individual test
40**
41** Given and returned:
42** status int set to TRUE if test fails
43**
44** This revision: 2013 August 7
45*/
46{
47 if (ival != ivalok) {
48 *status = 1;
49 printf("%s failed: %s want %d got %d\n",
50 func, test, ivalok, ival);
51 } else if (verbose) {
52 printf("%s passed: %s want %d got %d\n",
53 func, test, ivalok, ival);
54 }
55
56}
57
58static void vvd(double val, double valok, double dval,
59 const char *func, const char *test, int *status)
60/*
61** - - - -
62** v v d
63** - - - -
64**
65** Validate a double result.
66**
67** Internal function used by t_erfa_c program.
68**
69** Given:
70** val double value computed by function under test
71** valok double expected value
72** dval double maximum allowable error
73** func char[] name of function under test
74** test char[] name of individual test
75**
76** Given and returned:
77** status int set to TRUE if test fails
78**
79** This revision: 2013 August 7
80*/
81{
82 double a, f; /* absolute and fractional error */
83
84
85 a = val - valok;
86 if (fabs(a) > dval) {
87 f = fabs(valok / a);
88 *status = 1;
89 printf("%s failed: %s want %.20g got %.20g (1/%.3g)\n",
90 func, test, valok, val, f);
91 } else if (verbose) {
92 printf("%s passed: %s want %.20g got %.20g\n",
93 func, test, valok, val);
94 }
95
96}
97
98static void t_a2af(int *status)
99/*
100** - - - - - - -
101** t _ a 2 a f
102** - - - - - - -
103**
104** Test eraA2af function.
105**
106** Returned:
107** status int FALSE = success, TRUE = fail
108**
109** Called: eraA2af, viv
110**
111** This revision: 2013 August 7
112*/
113{
114 int idmsf[4];
115 char s;
116
117
118 eraA2af(4, 2.345, &s, idmsf);
119
120 viv(s, '+', "eraA2af", "s", status);
121
122 viv(idmsf[0], 134, "eraA2af", "0", status);
123 viv(idmsf[1], 21, "eraA2af", "1", status);
124 viv(idmsf[2], 30, "eraA2af", "2", status);
125 viv(idmsf[3], 9706, "eraA2af", "3", status);
126
127}
128
129static void t_a2tf(int *status)
130/*
131** - - - - - - -
132** t _ a 2 t f
133** - - - - - - -
134**
135** Test eraA2tf function.
136**
137** Returned:
138** status int FALSE = success, TRUE = fail
139**
140** Called: eraA2tf, viv
141**
142** This revision: 2013 August 7
143*/
144{
145 int ihmsf[4];
146 char s;
147
148
149 eraA2tf(4, -3.01234, &s, ihmsf);
150
151 viv((int)s, '-', "eraA2tf", "s", status);
152
153 viv(ihmsf[0], 11, "eraA2tf", "0", status);
154 viv(ihmsf[1], 30, "eraA2tf", "1", status);
155 viv(ihmsf[2], 22, "eraA2tf", "2", status);
156 viv(ihmsf[3], 6484, "eraA2tf", "3", status);
157
158}
159
160static void t_ab(int *status)
161/*
162** - - - - -
163** t _ a b
164** - - - - -
165**
166** Test eraAb function.
167**
168** Returned:
169** status int FALSE = success, TRUE = fail
170**
171** Called: eraAb, vvd
172**
173** This revision: 2013 October 1
174*/
175{
176 double pnat[3], v[3], s, bm1, ppr[3];
177
178
179 pnat[0] = -0.76321968546737951;
180 pnat[1] = -0.60869453983060384;
181 pnat[2] = -0.21676408580639883;
182 v[0] = 2.1044018893653786e-5;
183 v[1] = -8.9108923304429319e-5;
184 v[2] = -3.8633714797716569e-5;
185 s = 0.99980921395708788;
186 bm1 = 0.99999999506209258;
187
188 eraAb(pnat, v, s, bm1, ppr);
189
190 vvd(ppr[0], -0.7631631094219556269, 1e-12, "eraAb", "1", status);
191 vvd(ppr[1], -0.6087553082505590832, 1e-12, "eraAb", "2", status);
192 vvd(ppr[2], -0.2167926269368471279, 1e-12, "eraAb", "3", status);
193
194}
195
196static void t_af2a(int *status)
197/*
198** - - - - - - -
199** t _ a f 2 a
200** - - - - - - -
201**
202** Test eraAf2a function.
203**
204** Returned:
205** status int FALSE = success, TRUE = fail
206**
207** Called: eraAf2a, viv
208**
209** This revision: 2013 August 7
210*/
211{
212 double a;
213 int j;
214
215
216 j = eraAf2a('-', 45, 13, 27.2, &a);
217
218 vvd(a, -0.7893115794313644842, 1e-12, "eraAf2a", "a", status);
219 viv(j, 0, "eraAf2a", "j", status);
220
221}
222
223static void t_anp(int *status)
224/*
225** - - - - - -
226** t _ a n p
227** - - - - - -
228**
229** Test eraAnp function.
230**
231** Returned:
232** status int FALSE = success, TRUE = fail
233**
234** Called: eraAnp, vvd
235**
236** This revision: 2013 August 7
237*/
238{
239 vvd(eraAnp(-0.1), 6.183185307179586477, 1e-12, "eraAnp", "", status);
240}
241
242static void t_anpm(int *status)
243/*
244** - - - - - - -
245** t _ a n p m
246** - - - - - - -
247**
248** Test eraAnpm function.
249**
250** Returned:
251** status int FALSE = success, TRUE = fail
252**
253** Called: eraAnpm, vvd
254**
255** This revision: 2013 August 7
256*/
257{
258 vvd(eraAnpm(-4.0), 2.283185307179586477, 1e-12, "eraAnpm", "", status);
259}
260
261static void t_apcg(int *status)
262/*
263** - - - - - - -
264** t _ a p c g
265** - - - - - - -
266**
267** Test eraApcg function.
268**
269** Returned:
270** status int FALSE = success, TRUE = fail
271**
272** Called: eraApcg, vvd
273**
274** This revision: 2013 October 3
275*/
276{
277 double date1, date2, ebpv[2][3], ehp[3];
278 eraASTROM astrom;
279
280
281 date1 = 2456165.5;
282 date2 = 0.401182685;
283 ebpv[0][0] = 0.901310875;
284 ebpv[0][1] = -0.417402664;
285 ebpv[0][2] = -0.180982288;
286 ebpv[1][0] = 0.00742727954;
287 ebpv[1][1] = 0.0140507459;
288 ebpv[1][2] = 0.00609045792;
289 ehp[0] = 0.903358544;
290 ehp[1] = -0.415395237;
291 ehp[2] = -0.180084014;
292
293 eraApcg(date1, date2, ebpv, ehp, &astrom);
294
295 vvd(astrom.pmt, 12.65133794027378508, 1e-11,
296 "eraApcg", "pmt", status);
297 vvd(astrom.eb[0], 0.901310875, 1e-12,
298 "eraApcg", "eb(1)", status);
299 vvd(astrom.eb[1], -0.417402664, 1e-12,
300 "eraApcg", "eb(2)", status);
301 vvd(astrom.eb[2], -0.180982288, 1e-12,
302 "eraApcg", "eb(3)", status);
303 vvd(astrom.eh[0], 0.8940025429324143045, 1e-12,
304 "eraApcg", "eh(1)", status);
305 vvd(astrom.eh[1], -0.4110930268679817955, 1e-12,
306 "eraApcg", "eh(2)", status);
307 vvd(astrom.eh[2], -0.1782189004872870264, 1e-12,
308 "eraApcg", "eh(3)", status);
309 vvd(astrom.em, 1.010465295811013146, 1e-12,
310 "eraApcg", "em", status);
311 vvd(astrom.v[0], 0.4289638897813379954e-4, 1e-16,
312 "eraApcg", "v(1_", status);
313 vvd(astrom.v[1], 0.8115034021720941898e-4, 1e-16,
314 "eraApcg", "v(2)", status);
315 vvd(astrom.v[2], 0.3517555123437237778e-4, 1e-16,
316 "eraApcg", "v(3)", status);
317 vvd(astrom.bm1, 0.9999999951686013336, 1e-12,
318 "eraApcg", "bm1", status);
319 vvd(astrom.bpn[0][0], 1.0, 0.0,
320 "eraApcg", "bpn(1,1)", status);
321 vvd(astrom.bpn[1][0], 0.0, 0.0,
322 "eraApcg", "bpn(2,1)", status);
323 vvd(astrom.bpn[2][0], 0.0, 0.0,
324 "eraApcg", "bpn(3,1)", status);
325 vvd(astrom.bpn[0][1], 0.0, 0.0,
326 "eraApcg", "bpn(1,2)", status);
327 vvd(astrom.bpn[1][1], 1.0, 0.0,
328 "eraApcg", "bpn(2,2)", status);
329 vvd(astrom.bpn[2][1], 0.0, 0.0,
330 "eraApcg", "bpn(3,2)", status);
331 vvd(astrom.bpn[0][2], 0.0, 0.0,
332 "eraApcg", "bpn(1,3)", status);
333 vvd(astrom.bpn[1][2], 0.0, 0.0,
334 "eraApcg", "bpn(2,3)", status);
335 vvd(astrom.bpn[2][2], 1.0, 0.0,
336 "eraApcg", "bpn(3,3)", status);
337
338}
339
340static void t_apcg13(int *status)
341/*
342** - - - - - - - - -
343** t _ a p c g 1 3
344** - - - - - - - - -
345**
346** Test eraApcg13 function.
347**
348** Returned:
349** status int FALSE = success, TRUE = fail
350**
351** Called: eraApcg13, vvd
352**
353** This revision: 2013 October 3
354*/
355{
356 double date1, date2;
357 eraASTROM astrom;
358
359
360 date1 = 2456165.5;
361 date2 = 0.401182685;
362
363 eraApcg13(date1, date2, &astrom);
364
365 vvd(astrom.pmt, 12.65133794027378508, 1e-11,
366 "eraApcg13", "pmt", status);
367 vvd(astrom.eb[0], 0.9013108747340644755, 1e-12,
368 "eraApcg13", "eb(1)", status);
369 vvd(astrom.eb[1], -0.4174026640406119957, 1e-12,
370 "eraApcg13", "eb(2)", status);
371 vvd(astrom.eb[2], -0.1809822877867817771, 1e-12,
372 "eraApcg13", "eb(3)", status);
373 vvd(astrom.eh[0], 0.8940025429255499549, 1e-12,
374 "eraApcg13", "eh(1)", status);
375 vvd(astrom.eh[1], -0.4110930268331896318, 1e-12,
376 "eraApcg13", "eh(2)", status);
377 vvd(astrom.eh[2], -0.1782189006019749850, 1e-12,
378 "eraApcg13", "eh(3)", status);
379 vvd(astrom.em, 1.010465295964664178, 1e-12,
380 "eraApcg13", "em", status);
381 vvd(astrom.v[0], 0.4289638897157027528e-4, 1e-16,
382 "eraApcg13", "v(1)", status);
383 vvd(astrom.v[1], 0.8115034002544663526e-4, 1e-16,
384 "eraApcg13", "v(2)", status);
385 vvd(astrom.v[2], 0.3517555122593144633e-4, 1e-16,
386 "eraApcg13", "v(3)", status);
387 vvd(astrom.bm1, 0.9999999951686013498, 1e-12,
388 "eraApcg13", "bm1", status);
389 vvd(astrom.bpn[0][0], 1.0, 0.0,
390 "eraApcg13", "bpn(1,1)", status);
391 vvd(astrom.bpn[1][0], 0.0, 0.0,
392 "eraApcg13", "bpn(2,1)", status);
393 vvd(astrom.bpn[2][0], 0.0, 0.0,
394 "eraApcg13", "bpn(3,1)", status);
395 vvd(astrom.bpn[0][1], 0.0, 0.0,
396 "eraApcg13", "bpn(1,2)", status);
397 vvd(astrom.bpn[1][1], 1.0, 0.0,
398 "eraApcg13", "bpn(2,2)", status);
399 vvd(astrom.bpn[2][1], 0.0, 0.0,
400 "eraApcg13", "bpn(3,2)", status);
401 vvd(astrom.bpn[0][2], 0.0, 0.0,
402 "eraApcg13", "bpn(1,3)", status);
403 vvd(astrom.bpn[1][2], 0.0, 0.0,
404 "eraApcg13", "bpn(2,3)", status);
405 vvd(astrom.bpn[2][2], 1.0, 0.0,
406 "eraApcg13", "bpn(3,3)", status);
407
408}
409
410static void t_apci(int *status)
411/*
412** - - - - - - -
413** t _ a p c i
414** - - - - - - -
415**
416** Test eraApci function.
417**
418** Returned:
419** status int FALSE = success, TRUE = fail
420**
421** Called: eraApci, vvd
422**
423** This revision: 2013 October 3
424*/
425{
426 double date1, date2, ebpv[2][3], ehp[3], x, y, s;
427 eraASTROM astrom;
428
429
430 date1 = 2456165.5;
431 date2 = 0.401182685;
432 ebpv[0][0] = 0.901310875;
433 ebpv[0][1] = -0.417402664;
434 ebpv[0][2] = -0.180982288;
435 ebpv[1][0] = 0.00742727954;
436 ebpv[1][1] = 0.0140507459;
437 ebpv[1][2] = 0.00609045792;
438 ehp[0] = 0.903358544;
439 ehp[1] = -0.415395237;
440 ehp[2] = -0.180084014;
441 x = 0.0013122272;
442 y = -2.92808623e-5;
443 s = 3.05749468e-8;
444
445 eraApci(date1, date2, ebpv, ehp, x, y, s, &astrom);
446
447 vvd(astrom.pmt, 12.65133794027378508, 1e-11,
448 "eraApci", "pmt", status);
449 vvd(astrom.eb[0], 0.901310875, 1e-12,
450 "eraApci", "eb(1)", status);
451 vvd(astrom.eb[1], -0.417402664, 1e-12,
452 "eraApci", "eb(2)", status);
453 vvd(astrom.eb[2], -0.180982288, 1e-12,
454 "eraApci", "eb(3)", status);
455 vvd(astrom.eh[0], 0.8940025429324143045, 1e-12,
456 "eraApci", "eh(1)", status);
457 vvd(astrom.eh[1], -0.4110930268679817955, 1e-12,
458 "eraApci", "eh(2)", status);
459 vvd(astrom.eh[2], -0.1782189004872870264, 1e-12,
460 "eraApci", "eh(3)", status);
461 vvd(astrom.em, 1.010465295811013146, 1e-12,
462 "eraApci", "em", status);
463 vvd(astrom.v[0], 0.4289638897813379954e-4, 1e-16,
464 "eraApci", "v(1)", status);
465 vvd(astrom.v[1], 0.8115034021720941898e-4, 1e-16,
466 "eraApci", "v(2)", status);
467 vvd(astrom.v[2], 0.3517555123437237778e-4, 1e-16,
468 "eraApci", "v(3)", status);
469 vvd(astrom.bm1, 0.9999999951686013336, 1e-12,
470 "eraApci", "bm1", status);
471 vvd(astrom.bpn[0][0], 0.9999991390295159156, 1e-12,
472 "eraApci", "bpn(1,1)", status);
473 vvd(astrom.bpn[1][0], 0.4978650072505016932e-7, 1e-12,
474 "eraApci", "bpn(2,1)", status);
475 vvd(astrom.bpn[2][0], 0.1312227200000000000e-2, 1e-12,
476 "eraApci", "bpn(3,1)", status);
477 vvd(astrom.bpn[0][1], -0.1136336653771609630e-7, 1e-12,
478 "eraApci", "bpn(1,2)", status);
479 vvd(astrom.bpn[1][1], 0.9999999995713154868, 1e-12,
480 "eraApci", "bpn(2,2)", status);
481 vvd(astrom.bpn[2][1], -0.2928086230000000000e-4, 1e-12,
482 "eraApci", "bpn(3,2)", status);
483 vvd(astrom.bpn[0][2], -0.1312227200895260194e-2, 1e-12,
484 "eraApci", "bpn(1,3)", status);
485 vvd(astrom.bpn[1][2], 0.2928082217872315680e-4, 1e-12,
486 "eraApci", "bpn(2,3)", status);
487 vvd(astrom.bpn[2][2], 0.9999991386008323373, 1e-12,
488 "eraApci", "bpn(3,3)", status);
489
490}
491
492static void t_apci13(int *status)
493/*
494** - - - - - - - - -
495** t _ a p c i 1 3
496** - - - - - - - - -
497**
498** Test eraApci13 function.
499**
500** Returned:
501** status int FALSE = success, TRUE = fail
502**
503** Called: eraApci13, vvd
504**
505** This revision: 2013 October 3
506*/
507{
508 double date1, date2, eo;
509 eraASTROM astrom;
510
511
512 date1 = 2456165.5;
513 date2 = 0.401182685;
514
515 eraApci13(date1, date2, &astrom, &eo);
516
517 vvd(astrom.pmt, 12.65133794027378508, 1e-11,
518 "eraApci13", "pmt", status);
519 vvd(astrom.eb[0], 0.9013108747340644755, 1e-12,
520 "eraApci13", "eb(1)", status);
521 vvd(astrom.eb[1], -0.4174026640406119957, 1e-12,
522 "eraApci13", "eb(2)", status);
523 vvd(astrom.eb[2], -0.1809822877867817771, 1e-12,
524 "eraApci13", "eb(3)", status);
525 vvd(astrom.eh[0], 0.8940025429255499549, 1e-12,
526 "eraApci13", "eh(1)", status);
527 vvd(astrom.eh[1], -0.4110930268331896318, 1e-12,
528 "eraApci13", "eh(2)", status);
529 vvd(astrom.eh[2], -0.1782189006019749850, 1e-12,
530 "eraApci13", "eh(3)", status);
531 vvd(astrom.em, 1.010465295964664178, 1e-12,
532 "eraApci13", "em", status);
533 vvd(astrom.v[0], 0.4289638897157027528e-4, 1e-16,
534 "eraApci13", "v(1)", status);
535 vvd(astrom.v[1], 0.8115034002544663526e-4, 1e-16,
536 "eraApci13", "v(2)", status);
537 vvd(astrom.v[2], 0.3517555122593144633e-4, 1e-16,
538 "eraApci13", "v(3)", status);
539 vvd(astrom.bm1, 0.9999999951686013498, 1e-12,
540 "eraApci13", "bm1", status);
541 vvd(astrom.bpn[0][0], 0.9999992060376761710, 1e-12,
542 "eraApci13", "bpn(1,1)", status);
543 vvd(astrom.bpn[1][0], 0.4124244860106037157e-7, 1e-12,
544 "eraApci13", "bpn(2,1)", status);
545 vvd(astrom.bpn[2][0], 0.1260128571051709670e-2, 1e-12,
546 "eraApci13", "bpn(3,1)", status);
547 vvd(astrom.bpn[0][1], -0.1282291987222130690e-7, 1e-12,
548 "eraApci13", "bpn(1,2)", status);
549 vvd(astrom.bpn[1][1], 0.9999999997456835325, 1e-12,
550 "eraApci13", "bpn(2,2)", status);
551 vvd(astrom.bpn[2][1], -0.2255288829420524935e-4, 1e-12,
552 "eraApci13", "bpn(3,2)", status);
553 vvd(astrom.bpn[0][2], -0.1260128571661374559e-2, 1e-12,
554 "eraApci13", "bpn(1,3)", status);
555 vvd(astrom.bpn[1][2], 0.2255285422953395494e-4, 1e-12,
556 "eraApci13", "bpn(2,3)", status);
557 vvd(astrom.bpn[2][2], 0.9999992057833604343, 1e-12,
558 "eraApci13", "bpn(3,3)", status);
559 vvd(eo, -0.2900618712657375647e-2, 1e-12,
560 "eraApci13", "eo", status);
561
562}
563
564static void t_apco(int *status)
565/*
566** - - - - - - -
567** t _ a p c o
568** - - - - - - -
569**
570** Test eraApco function.
571**
572** Returned:
573** status int FALSE = success, TRUE = fail
574**
575** Called: eraApco, vvd
576**
577** This revision: 2013 October 3
578*/
579{
580 double date1, date2, ebpv[2][3], ehp[3], x, y, s,
581 theta, elong, phi, hm, xp, yp, sp, refa, refb;
582 eraASTROM astrom;
583
584
585 date1 = 2456384.5;
586 date2 = 0.970031644;
587 ebpv[0][0] = -0.974170438;
588 ebpv[0][1] = -0.211520082;
589 ebpv[0][2] = -0.0917583024;
590 ebpv[1][0] = 0.00364365824;
591 ebpv[1][1] = -0.0154287319;
592 ebpv[1][2] = -0.00668922024;
593 ehp[0] = -0.973458265;
594 ehp[1] = -0.209215307;
595 ehp[2] = -0.0906996477;
596 x = 0.0013122272;
597 y = -2.92808623e-5;
598 s = 3.05749468e-8;
599 theta = 3.14540971;
600 elong = -0.527800806;
601 phi = -1.2345856;
602 hm = 2738.0;
603 xp = 2.47230737e-7;
604 yp = 1.82640464e-6;
605 sp = -3.01974337e-11;
606 refa = 0.000201418779;
607 refb = -2.36140831e-7;
608
609 eraApco(date1, date2, ebpv, ehp, x, y, s,
610 theta, elong, phi, hm, xp, yp, sp,
611 refa, refb, &astrom);
612
613 vvd(astrom.pmt, 13.25248468622587269, 1e-11,
614 "eraApco", "pmt", status);
615 vvd(astrom.eb[0], -0.9741827110630897003, 1e-12,
616 "eraApco", "eb(1)", status);
617 vvd(astrom.eb[1], -0.2115130190135014340, 1e-12,
618 "eraApco", "eb(2)", status);
619 vvd(astrom.eb[2], -0.09179840186968295686, 1e-12,
620 "eraApco", "eb(3)", status);
621 vvd(astrom.eh[0], -0.9736425571689670428, 1e-12,
622 "eraApco", "eh(1)", status);
623 vvd(astrom.eh[1], -0.2092452125848862201, 1e-12,
624 "eraApco", "eh(2)", status);
625 vvd(astrom.eh[2], -0.09075578152261439954, 1e-12,
626 "eraApco", "eh(3)", status);
627 vvd(astrom.em, 0.9998233241710617934, 1e-12,
628 "eraApco", "em", status);
629 vvd(astrom.v[0], 0.2078704985147609823e-4, 1e-16,
630 "eraApco", "v(1)", status);
631 vvd(astrom.v[1], -0.8955360074407552709e-4, 1e-16,
632 "eraApco", "v(2)", status);
633 vvd(astrom.v[2], -0.3863338980073114703e-4, 1e-16,
634 "eraApco", "v(3)", status);
635 vvd(astrom.bm1, 0.9999999950277561600, 1e-12,
636 "eraApco", "bm1", status);
637 vvd(astrom.bpn[0][0], 0.9999991390295159156, 1e-12,
638 "eraApco", "bpn(1,1)", status);
639 vvd(astrom.bpn[1][0], 0.4978650072505016932e-7, 1e-12,
640 "eraApco", "bpn(2,1)", status);
641 vvd(astrom.bpn[2][0], 0.1312227200000000000e-2, 1e-12,
642 "eraApco", "bpn(3,1)", status);
643 vvd(astrom.bpn[0][1], -0.1136336653771609630e-7, 1e-12,
644 "eraApco", "bpn(1,2)", status);
645 vvd(astrom.bpn[1][1], 0.9999999995713154868, 1e-12,
646 "eraApco", "bpn(2,2)", status);
647 vvd(astrom.bpn[2][1], -0.2928086230000000000e-4, 1e-12,
648 "eraApco", "bpn(3,2)", status);
649 vvd(astrom.bpn[0][2], -0.1312227200895260194e-2, 1e-12,
650 "eraApco", "bpn(1,3)", status);
651 vvd(astrom.bpn[1][2], 0.2928082217872315680e-4, 1e-12,
652 "eraApco", "bpn(2,3)", status);
653 vvd(astrom.bpn[2][2], 0.9999991386008323373, 1e-12,
654 "eraApco", "bpn(3,3)", status);
655 vvd(astrom.along, -0.5278008060301974337, 1e-12,
656 "eraApco", "along", status);
657 vvd(astrom.xpl, 0.1133427418174939329e-5, 1e-17,
658 "eraApco", "xpl", status);
659 vvd(astrom.ypl, 0.1453347595745898629e-5, 1e-17,
660 "eraApco", "ypl", status);
661 vvd(astrom.sphi, -0.9440115679003211329, 1e-12,
662 "eraApco", "sphi", status);
663 vvd(astrom.cphi, 0.3299123514971474711, 1e-12,
664 "eraApco", "cphi", status);
665 vvd(astrom.diurab, 0, 0,
666 "eraApco", "diurab", status);
667 vvd(astrom.eral, 2.617608903969802566, 1e-12,
668 "eraApco", "eral", status);
669 vvd(astrom.refa, 0.2014187790000000000e-3, 1e-15,
670 "eraApco", "refa", status);
671 vvd(astrom.refb, -0.2361408310000000000e-6, 1e-18,
672 "eraApco", "refb", status);
673
674}
675
676static void t_apco13(int *status)
677/*
678** - - - - - - - - -
679** t _ a p c o 1 3
680** - - - - - - - - -
681**
682** Test eraApco13 function.
683**
684** Returned:
685** status int FALSE = success, TRUE = fail
686**
687** Called: eraApco13, vvd, viv
688**
689** This revision: 2013 October 4
690*/
691{
692 double utc1, utc2, dut1, elong, phi, hm, xp, yp,
693 phpa, tc, rh, wl, eo;
694 eraASTROM astrom;
695 int j;
696
697
698 utc1 = 2456384.5;
699 utc2 = 0.969254051;
700 dut1 = 0.1550675;
701 elong = -0.527800806;
702 phi = -1.2345856;
703 hm = 2738.0;
704 xp = 2.47230737e-7;
705 yp = 1.82640464e-6;
706 phpa = 731.0;
707 tc = 12.8;
708 rh = 0.59;
709 wl = 0.55;
710
711 j = eraApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
712 phpa, tc, rh, wl, &astrom, &eo);
713
714 vvd(astrom.pmt, 13.25248468622475727, 1e-11,
715 "eraApco13", "pmt", status);
716 vvd(astrom.eb[0], -0.9741827107321449445, 1e-12,
717 "eraApco13", "eb(1)", status);
718 vvd(astrom.eb[1], -0.2115130190489386190, 1e-12,
719 "eraApco13", "eb(2)", status);
720 vvd(astrom.eb[2], -0.09179840189515518726, 1e-12,
721 "eraApco13", "eb(3)", status);
722 vvd(astrom.eh[0], -0.9736425572586866640, 1e-12,
723 "eraApco13", "eh(1)", status);
724 vvd(astrom.eh[1], -0.2092452121602867431, 1e-12,
725 "eraApco13", "eh(2)", status);
726 vvd(astrom.eh[2], -0.09075578153903832650, 1e-12,
727 "eraApco13", "eh(3)", status);
728 vvd(astrom.em, 0.9998233240914558422, 1e-12,
729 "eraApco13", "em", status);
730 vvd(astrom.v[0], 0.2078704986751370303e-4, 1e-16,
731 "eraApco13", "v(1)", status);
732 vvd(astrom.v[1], -0.8955360100494469232e-4, 1e-16,
733 "eraApco13", "v(2)", status);
734 vvd(astrom.v[2], -0.3863338978840051024e-4, 1e-16,
735 "eraApco13", "v(3)", status);
736 vvd(astrom.bm1, 0.9999999950277561368, 1e-12,
737 "eraApco13", "bm1", status);
738 vvd(astrom.bpn[0][0], 0.9999991390295147999, 1e-12,
739 "eraApco13", "bpn(1,1)", status);
740 vvd(astrom.bpn[1][0], 0.4978650075315529277e-7, 1e-12,
741 "eraApco13", "bpn(2,1)", status);
742 vvd(astrom.bpn[2][0], 0.001312227200850293372, 1e-12,
743 "eraApco13", "bpn(3,1)", status);
744 vvd(astrom.bpn[0][1], -0.1136336652812486604e-7, 1e-12,
745 "eraApco13", "bpn(1,2)", status);
746 vvd(astrom.bpn[1][1], 0.9999999995713154865, 1e-12,
747 "eraApco13", "bpn(2,2)", status);
748 vvd(astrom.bpn[2][1], -0.2928086230975367296e-4, 1e-12,
749 "eraApco13", "bpn(3,2)", status);
750 vvd(astrom.bpn[0][2], -0.001312227201745553566, 1e-12,
751 "eraApco13", "bpn(1,3)", status);
752 vvd(astrom.bpn[1][2], 0.2928082218847679162e-4, 1e-12,
753 "eraApco13", "bpn(2,3)", status);
754 vvd(astrom.bpn[2][2], 0.9999991386008312212, 1e-12,
755 "eraApco13", "bpn(3,3)", status);
756 vvd(astrom.along, -0.5278008060301974337, 1e-12,
757 "eraApco13", "along", status);
758 vvd(astrom.xpl, 0.1133427418174939329e-5, 1e-17,
759 "eraApco13", "xpl", status);
760 vvd(astrom.ypl, 0.1453347595745898629e-5, 1e-17,
761 "eraApco13", "ypl", status);
762 vvd(astrom.sphi, -0.9440115679003211329, 1e-12,
763 "eraApco13", "sphi", status);
764 vvd(astrom.cphi, 0.3299123514971474711, 1e-12,
765 "eraApco13", "cphi", status);
766 vvd(astrom.diurab, 0, 0,
767 "eraApco13", "diurab", status);
768 vvd(astrom.eral, 2.617608909189066140, 1e-12,
769 "eraApco13", "eral", status);
770 vvd(astrom.refa, 0.2014187785940396921e-3, 1e-15,
771 "eraApco13", "refa", status);
772 vvd(astrom.refb, -0.2361408314943696227e-6, 1e-18,
773 "eraApco13", "refb", status);
774 vvd(eo, -0.003020548354802412839, 1e-14,
775 "eraApco13", "eo", status);
776 viv(j, 0, "eraApco13", "j", status);
777
778}
779
780static void t_apcs(int *status)
781/*
782** - - - - - - -
783** t _ a p c s
784** - - - - - - -
785**
786** Test eraApcs function.
787**
788** Returned:
789** status int FALSE = success, TRUE = fail
790**
791** Called: eraApcs, vvd
792**
793** This revision: 2013 October 3
794*/
795{
796 double date1, date2, pv[2][3], ebpv[2][3], ehp[3];
797 eraASTROM astrom;
798
799
800 date1 = 2456384.5;
801 date2 = 0.970031644;
802 pv[0][0] = -1836024.09;
803 pv[0][1] = 1056607.72;
804 pv[0][2] = -5998795.26;
805 pv[1][0] = -77.0361767;
806 pv[1][1] = -133.310856;
807 pv[1][2] = 0.0971855934;
808 ebpv[0][0] = -0.974170438;
809 ebpv[0][1] = -0.211520082;
810 ebpv[0][2] = -0.0917583024;
811 ebpv[1][0] = 0.00364365824;
812 ebpv[1][1] = -0.0154287319;
813 ebpv[1][2] = -0.00668922024;
814 ehp[0] = -0.973458265;
815 ehp[1] = -0.209215307;
816 ehp[2] = -0.0906996477;
817
818 eraApcs(date1, date2, pv, ebpv, ehp, &astrom);
819
820 vvd(astrom.pmt, 13.25248468622587269, 1e-11,
821 "eraApcs", "pmt", status);
822 vvd(astrom.eb[0], -0.9741827110630456169, 1e-12,
823 "eraApcs", "eb(1)", status);
824 vvd(astrom.eb[1], -0.2115130190136085494, 1e-12,
825 "eraApcs", "eb(2)", status);
826 vvd(astrom.eb[2], -0.09179840186973175487, 1e-12,
827 "eraApcs", "eb(3)", status);
828 vvd(astrom.eh[0], -0.9736425571689386099, 1e-12,
829 "eraApcs", "eh(1)", status);
830 vvd(astrom.eh[1], -0.2092452125849967195, 1e-12,
831 "eraApcs", "eh(2)", status);
832 vvd(astrom.eh[2], -0.09075578152266466572, 1e-12,
833 "eraApcs", "eh(3)", status);
834 vvd(astrom.em, 0.9998233241710457140, 1e-12,
835 "eraApcs", "em", status);
836 vvd(astrom.v[0], 0.2078704985513566571e-4, 1e-16,
837 "eraApcs", "v(1)", status);
838 vvd(astrom.v[1], -0.8955360074245006073e-4, 1e-16,
839 "eraApcs", "v(2)", status);
840 vvd(astrom.v[2], -0.3863338980073572719e-4, 1e-16,
841 "eraApcs", "v(3)", status);
842 vvd(astrom.bm1, 0.9999999950277561601, 1e-12,
843 "eraApcs", "bm1", status);
844 vvd(astrom.bpn[0][0], 1, 0,
845 "eraApcs", "bpn(1,1)", status);
846 vvd(astrom.bpn[1][0], 0, 0,
847 "eraApcs", "bpn(2,1)", status);
848 vvd(astrom.bpn[2][0], 0, 0,
849 "eraApcs", "bpn(3,1)", status);
850 vvd(astrom.bpn[0][1], 0, 0,
851 "eraApcs", "bpn(1,2)", status);
852 vvd(astrom.bpn[1][1], 1, 0,
853 "eraApcs", "bpn(2,2)", status);
854 vvd(astrom.bpn[2][1], 0, 0,
855 "eraApcs", "bpn(3,2)", status);
856 vvd(astrom.bpn[0][2], 0, 0,
857 "eraApcs", "bpn(1,3)", status);
858 vvd(astrom.bpn[1][2], 0, 0,
859 "eraApcs", "bpn(2,3)", status);
860 vvd(astrom.bpn[2][2], 1, 0,
861 "eraApcs", "bpn(3,3)", status);
862
863}
864
865static void t_apcs13(int *status)
866/*
867** - - - - - - - - -
868** t _ a p c s 1 3
869** - - - - - - - - -
870**
871** Test eraApcs13 function.
872**
873** Returned:
874** status int FALSE = success, TRUE = fail
875**
876** Called: eraApcs13, vvd
877**
878** This revision: 2013 October 3
879*/
880{
881 double date1, date2, pv[2][3];
882 eraASTROM astrom;
883
884
885 date1 = 2456165.5;
886 date2 = 0.401182685;
887 pv[0][0] = -6241497.16;
888 pv[0][1] = 401346.896;
889 pv[0][2] = -1251136.04;
890 pv[1][0] = -29.264597;
891 pv[1][1] = -455.021831;
892 pv[1][2] = 0.0266151194;
893
894 eraApcs13(date1, date2, pv, &astrom);
895
896 vvd(astrom.pmt, 12.65133794027378508, 1e-11,
897 "eraApcs13", "pmt", status);
898 vvd(astrom.eb[0], 0.9012691529023298391, 1e-12,
899 "eraApcs13", "eb(1)", status);
900 vvd(astrom.eb[1], -0.4173999812023068781, 1e-12,
901 "eraApcs13", "eb(2)", status);
902 vvd(astrom.eb[2], -0.1809906511146821008, 1e-12,
903 "eraApcs13", "eb(3)", status);
904 vvd(astrom.eh[0], 0.8939939101759726824, 1e-12,
905 "eraApcs13", "eh(1)", status);
906 vvd(astrom.eh[1], -0.4111053891734599955, 1e-12,
907 "eraApcs13", "eh(2)", status);
908 vvd(astrom.eh[2], -0.1782336880637689334, 1e-12,
909 "eraApcs13", "eh(3)", status);
910 vvd(astrom.em, 1.010428384373318379, 1e-12,
911 "eraApcs13", "em", status);
912 vvd(astrom.v[0], 0.4279877278327626511e-4, 1e-16,
913 "eraApcs13", "v(1)", status);
914 vvd(astrom.v[1], 0.7963255057040027770e-4, 1e-16,
915 "eraApcs13", "v(2)", status);
916 vvd(astrom.v[2], 0.3517564000441374759e-4, 1e-16,
917 "eraApcs13", "v(3)", status);
918 vvd(astrom.bm1, 0.9999999952947981330, 1e-12,
919 "eraApcs13", "bm1", status);
920 vvd(astrom.bpn[0][0], 1, 0,
921 "eraApcs13", "bpn(1,1)", status);
922 vvd(astrom.bpn[1][0], 0, 0,
923 "eraApcs13", "bpn(2,1)", status);
924 vvd(astrom.bpn[2][0], 0, 0,
925 "eraApcs13", "bpn(3,1)", status);
926 vvd(astrom.bpn[0][1], 0, 0,
927 "eraApcs13", "bpn(1,2)", status);
928 vvd(astrom.bpn[1][1], 1, 0,
929 "eraApcs13", "bpn(2,2)", status);
930 vvd(astrom.bpn[2][1], 0, 0,
931 "eraApcs13", "bpn(3,2)", status);
932 vvd(astrom.bpn[0][2], 0, 0,
933 "eraApcs13", "bpn(1,3)", status);
934 vvd(astrom.bpn[1][2], 0, 0,
935 "eraApcs13", "bpn(2,3)", status);
936 vvd(astrom.bpn[2][2], 1, 0,
937 "eraApcs13", "bpn(3,3)", status);
938
939}
940
941static void t_aper(int *status)
942/*
943** - - - - - - -
944** t _ a p e r
945** - - - - - - -
946*
947** Test eraAper function.
948*
949** Returned:
950** status int FALSE = success, TRUE = fail
951*
952** Called: eraAper, vvd
953*
954** This revision: 2013 October 3
955*/
956{
957 double theta;
958 eraASTROM astrom;
959
960
961 astrom.along = 1.234;
962 theta = 5.678;
963
964 eraAper(theta, &astrom);
965
966 vvd(astrom.eral, 6.912000000000000000, 1e-12,
967 "eraAper", "pmt", status);
968
969}
970
971static void t_aper13(int *status)
972/*
973** - - - - - - - - -
974** t _ a p e r 1 3
975** - - - - - - - - -
976**
977** Test eraAper13 function.
978**
979** Returned:
980** status int FALSE = success, TRUE = fail
981**
982** Called: eraAper13, vvd
983**
984** This revision: 2013 October 3
985*/
986{
987 double ut11, ut12;
988 eraASTROM astrom;
989
990
991 astrom.along = 1.234;
992 ut11 = 2456165.5;
993 ut12 = 0.401182685;
994
995 eraAper13(ut11, ut12, &astrom);
996
997 vvd(astrom.eral, 3.316236661789694933, 1e-12,
998 "eraAper13", "pmt", status);
999
1000}
1001
1002static void t_apio(int *status)
1003/*
1004** - - - - - - -
1005** t _ a p i o
1006** - - - - - - -
1007**
1008** Test eraApio function.
1009**
1010** Returned:
1011** status int FALSE = success, TRUE = fail
1012**
1013** Called: eraApio, vvd
1014**
1015** This revision: 2013 October 3
1016*/
1017{
1018 double sp, theta, elong, phi, hm, xp, yp, refa, refb;
1019 eraASTROM astrom;
1020
1021
1022 sp = -3.01974337e-11;
1023 theta = 3.14540971;
1024 elong = -0.527800806;
1025 phi = -1.2345856;
1026 hm = 2738.0;
1027 xp = 2.47230737e-7;
1028 yp = 1.82640464e-6;
1029 refa = 0.000201418779;
1030 refb = -2.36140831e-7;
1031
1032 eraApio(sp, theta, elong, phi, hm, xp, yp, refa, refb, &astrom);
1033
1034 vvd(astrom.along, -0.5278008060301974337, 1e-12,
1035 "eraApio", "along", status);
1036 vvd(astrom.xpl, 0.1133427418174939329e-5, 1e-17,
1037 "eraApio", "xpl", status);
1038 vvd(astrom.ypl, 0.1453347595745898629e-5, 1e-17,
1039 "eraApio", "ypl", status);
1040 vvd(astrom.sphi, -0.9440115679003211329, 1e-12,
1041 "eraApio", "sphi", status);
1042 vvd(astrom.cphi, 0.3299123514971474711, 1e-12,
1043 "eraApio", "cphi", status);
1044 vvd(astrom.diurab, 0.5135843661699913529e-6, 1e-12,
1045 "eraApio", "diurab", status);
1046 vvd(astrom.eral, 2.617608903969802566, 1e-12,
1047 "eraApio", "eral", status);
1048 vvd(astrom.refa, 0.2014187790000000000e-3, 1e-15,
1049 "eraApio", "refa", status);
1050 vvd(astrom.refb, -0.2361408310000000000e-6, 1e-18,
1051 "eraApio", "refb", status);
1052
1053}
1054
1055static void t_apio13(int *status)
1056/*
1057** - - - - - - - - -
1058** t _ a p i o 1 3
1059** - - - - - - - - -
1060**
1061** Test eraApio13 function.
1062**
1063** Returned:
1064** status int FALSE = success, TRUE = fail
1065**
1066** Called: eraApio13, vvd, viv
1067**
1068** This revision: 2013 October 4
1069*/
1070{
1071 double utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl;
1072 int j;
1073 eraASTROM astrom;
1074
1075
1076 utc1 = 2456384.5;
1077 utc2 = 0.969254051;
1078 dut1 = 0.1550675;
1079 elong = -0.527800806;
1080 phi = -1.2345856;
1081 hm = 2738.0;
1082 xp = 2.47230737e-7;
1083 yp = 1.82640464e-6;
1084 phpa = 731.0;
1085 tc = 12.8;
1086 rh = 0.59;
1087 wl = 0.55;
1088
1089 j = eraApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
1090 phpa, tc, rh, wl, &astrom);
1091
1092 vvd(astrom.along, -0.5278008060301974337, 1e-12,
1093 "eraApio13", "along", status);
1094 vvd(astrom.xpl, 0.1133427418174939329e-5, 1e-17,
1095 "eraApio13", "xpl", status);
1096 vvd(astrom.ypl, 0.1453347595745898629e-5, 1e-17,
1097 "eraApio13", "ypl", status);
1098 vvd(astrom.sphi, -0.9440115679003211329, 1e-12,
1099 "eraApio13", "sphi", status);
1100 vvd(astrom.cphi, 0.3299123514971474711, 1e-12,
1101 "eraApio13", "cphi", status);
1102 vvd(astrom.diurab, 0.5135843661699913529e-6, 1e-12,
1103 "eraApio13", "diurab", status);
1104 vvd(astrom.eral, 2.617608909189066140, 1e-12,
1105 "eraApio13", "eral", status);
1106 vvd(astrom.refa, 0.2014187785940396921e-3, 1e-15,
1107 "eraApio13", "refa", status);
1108 vvd(astrom.refb, -0.2361408314943696227e-6, 1e-18,
1109 "eraApio13", "refb", status);
1110 viv(j, 0, "eraApio13", "j", status);
1111
1112}
1113
1114static void t_atci13(int *status)
1115/*
1116** - - - - - - - - -
1117** t _ a t c i 1 3
1118** - - - - - - - - -
1119**
1120** Test eraAtci13 function.
1121**
1122** Returned:
1123** status int FALSE = success, TRUE = fail
1124**
1125** Called: eraAtci13, vvd
1126**
1127** This revision: 2013 October 3
1128*/
1129{
1130 double rc, dc, pr, pd, px, rv, date1, date2, ri, di, eo;
1131
1132
1133 rc = 2.71;
1134 dc = 0.174;
1135 pr = 1e-5;
1136 pd = 5e-6;
1137 px = 0.1;
1138 rv = 55.0;
1139 date1 = 2456165.5;
1140 date2 = 0.401182685;
1141
1142 eraAtci13(rc, dc, pr, pd, px, rv, date1, date2, &ri, &di, &eo);
1143
1144 vvd(ri, 2.710121572969038991, 1e-12,
1145 "eraAtci13", "ri", status);
1146 vvd(di, 0.1729371367218230438, 1e-12,
1147 "eraAtci13", "di", status);
1148 vvd(eo, -0.002900618712657375647, 1e-14,
1149 "eraAtci13", "eo", status);
1150
1151}
1152
1153static void t_atciq(int *status)
1154/*
1155** - - - - - - - -
1156** t _ a t c i q
1157** - - - - - - - -
1158**
1159** Test eraAtciq function.
1160**
1161** Returned:
1162** status int FALSE = success, TRUE = fail
1163**
1164** Called: eraApci13, eraAtciq, vvd
1165**
1166** This revision: 2013 October 3
1167*/
1168{
1169 double date1, date2, eo, rc, dc, pr, pd, px, rv, ri, di;
1170 eraASTROM astrom;
1171
1172 date1 = 2456165.5;
1173 date2 = 0.401182685;
1174 eraApci13(date1, date2, &astrom, &eo);
1175 rc = 2.71;
1176 dc = 0.174;
1177 pr = 1e-5;
1178 pd = 5e-6;
1179 px = 0.1;
1180 rv = 55.0;
1181
1182 eraAtciq(rc, dc, pr, pd, px, rv, &astrom, &ri, &di);
1183
1184 vvd(ri, 2.710121572969038991, 1e-12, "eraAtciq", "ri", status);
1185 vvd(di, 0.1729371367218230438, 1e-12, "eraAtciq", "di", status);
1186
1187}
1188
1189static void t_atciqn(int *status)
1190/*
1191** - - - - - - - - -
1192** t _ a t c i q n
1193** - - - - - - - - -
1194**
1195** Test eraAtciqn function.
1196**
1197** Returned:
1198** status int FALSE = success, TRUE = fail
1199**
1200** Called: eraApci13, eraAtciqn, vvd
1201**
1202** This revision: 2013 October 3
1203*/
1204{
1205 eraLDBODY b[3];
1206 double date1, date2, eo, rc, dc, pr, pd, px, rv, ri, di;
1207 eraASTROM astrom;
1208
1209 date1 = 2456165.5;
1210 date2 = 0.401182685;
1211 eraApci13(date1, date2, &astrom, &eo);
1212 rc = 2.71;
1213 dc = 0.174;
1214 pr = 1e-5;
1215 pd = 5e-6;
1216 px = 0.1;
1217 rv = 55.0;
1218 b[0].bm = 0.00028574;
1219 b[0].dl = 3e-10;
1220 b[0].pv[0][0] = -7.81014427;
1221 b[0].pv[0][1] = -5.60956681;
1222 b[0].pv[0][2] = -1.98079819;
1223 b[0].pv[1][0] = 0.0030723249;
1224 b[0].pv[1][1] = -0.00406995477;
1225 b[0].pv[1][2] = -0.00181335842;
1226 b[1].bm = 0.00095435;
1227 b[1].dl = 3e-9;
1228 b[1].pv[0][0] = 0.738098796;
1229 b[1].pv[0][1] = 4.63658692;
1230 b[1].pv[0][2] = 1.9693136;
1231 b[1].pv[1][0] = -0.00755816922;
1232 b[1].pv[1][1] = 0.00126913722;
1233 b[1].pv[1][2] = 0.000727999001;
1234 b[2].bm = 1.0;
1235 b[2].dl = 6e-6;
1236 b[2].pv[0][0] = -0.000712174377;
1237 b[2].pv[0][1] = -0.00230478303;
1238 b[2].pv[0][2] = -0.00105865966;
1239 b[2].pv[1][0] = 6.29235213e-6;
1240 b[2].pv[1][1] = -3.30888387e-7;
1241 b[2].pv[1][2] = -2.96486623e-7;
1242
1243 eraAtciqn ( rc, dc, pr, pd, px, rv, &astrom, 3, b, &ri, &di);
1244
1245 vvd(ri, 2.710122008105325582, 1e-12, "eraAtciqn", "ri", status);
1246 vvd(di, 0.1729371916491459122, 1e-12, "eraAtciqn", "di", status);
1247
1248}
1249
1250static void t_atciqz(int *status)
1251/*
1252** - - - - - - - - -
1253** t _ a t c i q z
1254** - - - - - - - - -
1255**
1256** Test eraAtciqz function.
1257**
1258** Returned:
1259** status int FALSE = success, TRUE = fail
1260**
1261** Called: eraApci13, eraAtciqz, vvd
1262**
1263** This revision: 2013 October 3
1264*/
1265{
1266 double date1, date2, eo, rc, dc, ri, di;
1267 eraASTROM astrom;
1268
1269
1270 date1 = 2456165.5;
1271 date2 = 0.401182685;
1272 eraApci13(date1, date2, &astrom, &eo);
1273 rc = 2.71;
1274 dc = 0.174;
1275
1276 eraAtciqz(rc, dc, &astrom, &ri, &di);
1277
1278 vvd(ri, 2.709994899247599271, 1e-12, "eraAtciqz", "ri", status);
1279 vvd(di, 0.1728740720983623469, 1e-12, "eraAtciqz", "di", status);
1280
1281}
1282
1283static void t_atco13(int *status)
1284/*
1285** - - - - - - - - -
1286** t _ a t c o 1 3
1287** - - - - - - - - -
1288**
1289** Test eraAtco13 function.
1290**
1291** Returned:
1292** status int FALSE = success, TRUE = fail
1293**
1294** Called: eraAtco13, vvd, viv
1295**
1296** This revision: 2013 October 4
1297*/
1298{
1299 double rc, dc, pr, pd, px, rv, utc1, utc2, dut1,
1300 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1301 aob, zob, hob, dob, rob, eo;
1302 int j;
1303
1304
1305 rc = 2.71;
1306 dc = 0.174;
1307 pr = 1e-5;
1308 pd = 5e-6;
1309 px = 0.1;
1310 rv = 55.0;
1311 utc1 = 2456384.5;
1312 utc2 = 0.969254051;
1313 dut1 = 0.1550675;
1314 elong = -0.527800806;
1315 phi = -1.2345856;
1316 hm = 2738.0;
1317 xp = 2.47230737e-7;
1318 yp = 1.82640464e-6;
1319 phpa = 731.0;
1320 tc = 12.8;
1321 rh = 0.59;
1322 wl = 0.55;
1323
1324 j = eraAtco13(rc, dc, pr, pd, px, rv,
1325 utc1, utc2, dut1, elong, phi, hm, xp, yp,
1326 phpa, tc, rh, wl,
1327 &aob, &zob, &hob, &dob, &rob, &eo);
1328
1329 vvd(aob, 0.09251774485358230653, 1e-12, "eraAtco13", "aob", status);
1330 vvd(zob, 1.407661405256767021, 1e-12, "eraAtco13", "zob", status);
1331 vvd(hob, -0.09265154431403157925, 1e-12, "eraAtco13", "hob", status);
1332 vvd(dob, 0.1716626560075591655, 1e-12, "eraAtco13", "dob", status);
1333 vvd(rob, 2.710260453503097719, 1e-12, "eraAtco13", "rob", status);
1334 vvd(eo, -0.003020548354802412839, 1e-14, "eraAtco13", "eo", status);
1335 viv(j, 0, "eraAtco13", "j", status);
1336
1337}
1338
1339static void t_atic13(int *status)
1340/*
1341** - - - - - - - - -
1342** t _ a t i c 1 3
1343** - - - - - - - - -
1344**
1345** Test eraAtic13 function.
1346**
1347** Returned:
1348** status int FALSE = success, TRUE = fail
1349**
1350** Called: eraAtic13, vvd
1351**
1352** This revision: 2013 October 3
1353*/
1354{
1355 double ri, di, date1, date2, rc, dc, eo;
1356
1357
1358 ri = 2.710121572969038991;
1359 di = 0.1729371367218230438;
1360 date1 = 2456165.5;
1361 date2 = 0.401182685;
1362
1363 eraAtic13(ri, di, date1, date2, &rc, &dc, &eo);
1364
1365 vvd(rc, 2.710126504531374930, 1e-12, "eraAtic13", "rc", status);
1366 vvd(dc, 0.1740632537628342320, 1e-12, "eraAtic13", "dc", status);
1367 vvd(eo, -0.002900618712657375647, 1e-14, "eraAtic13", "eo", status);
1368
1369}
1370
1371static void t_aticq(int *status)
1372/*
1373** - - - - - - - -
1374** t _ a t i c q
1375** - - - - - - - -
1376**
1377** Test eraAticq function.
1378**
1379** Returned:
1380** status int FALSE = success, TRUE = fail
1381**
1382** Called: eraApci13, eraAticq, vvd
1383**
1384** This revision: 2013 October 3
1385*/
1386{
1387 double date1, date2, eo, ri, di, rc, dc;
1388 eraASTROM astrom;
1389
1390
1391 date1 = 2456165.5;
1392 date2 = 0.401182685;
1393 eraApci13(date1, date2, &astrom, &eo);
1394 ri = 2.710121572969038991;
1395 di = 0.1729371367218230438;
1396
1397 eraAticq(ri, di, &astrom, &rc, &dc);
1398
1399 vvd(rc, 2.710126504531374930, 1e-12, "eraAticq", "rc", status);
1400 vvd(dc, 0.1740632537628342320, 1e-12, "eraAticq", "dc", status);
1401
1402}
1403
1404static void t_aticqn(int *status)
1405/*
1406** - - - - - - - - -
1407** t _ a t i c q n
1408** - - - - - - - - -
1409**
1410** Test eraAticqn function.
1411**
1412** Returned:
1413** status int FALSE = success, TRUE = fail
1414**
1415** Called: eraApci13, eraAticqn, vvd
1416**
1417** This revision: 2013 October 3
1418*/
1419{
1420 double date1, date2, eo, ri, di, rc, dc;
1421 eraLDBODY b[3];
1422 eraASTROM astrom;
1423
1424
1425 date1 = 2456165.5;
1426 date2 = 0.401182685;
1427 eraApci13(date1, date2, &astrom, &eo);
1428 ri = 2.709994899247599271;
1429 di = 0.1728740720983623469;
1430 b[0].bm = 0.00028574;
1431 b[0].dl = 3e-10;
1432 b[0].pv[0][0] = -7.81014427;
1433 b[0].pv[0][1] = -5.60956681;
1434 b[0].pv[0][2] = -1.98079819;
1435 b[0].pv[1][0] = 0.0030723249;
1436 b[0].pv[1][1] = -0.00406995477;
1437 b[0].pv[1][2] = -0.00181335842;
1438 b[1].bm = 0.00095435;
1439 b[1].dl = 3e-9;
1440 b[1].pv[0][0] = 0.738098796;
1441 b[1].pv[0][1] = 4.63658692;
1442 b[1].pv[0][2] = 1.9693136;
1443 b[1].pv[1][0] = -0.00755816922;
1444 b[1].pv[1][1] = 0.00126913722;
1445 b[1].pv[1][2] = 0.000727999001;
1446 b[2].bm = 1.0;
1447 b[2].dl = 6e-6;
1448 b[2].pv[0][0] = -0.000712174377;
1449 b[2].pv[0][1] = -0.00230478303;
1450 b[2].pv[0][2] = -0.00105865966;
1451 b[2].pv[1][0] = 6.29235213e-6;
1452 b[2].pv[1][1] = -3.30888387e-7;
1453 b[2].pv[1][2] = -2.96486623e-7;
1454
1455 eraAticqn(ri, di, &astrom, 3, b, &rc, &dc);
1456
1457 vvd(rc, 2.709999575032685412, 1e-12, "eraAtciqn", "rc", status);
1458 vvd(dc, 0.1739999656317778034, 1e-12, "eraAtciqn", "dc", status);
1459
1460}
1461
1462static void t_atio13(int *status)
1463/*
1464** - - - - - - - - -
1465** t _ a t i o 1 3
1466** - - - - - - - - -
1467**
1468** Test eraAtio13 function.
1469**
1470** Returned:
1471** status int FALSE = success, TRUE = fail
1472**
1473** Called: eraAtio13, vvd, viv
1474**
1475** This revision: 2013 October 3
1476*/
1477{
1478 double ri, di, utc1, utc2, dut1, elong, phi, hm, xp, yp,
1479 phpa, tc, rh, wl, aob, zob, hob, dob, rob;
1480 int j;
1481
1482
1483 ri = 2.710121572969038991;
1484 di = 0.1729371367218230438;
1485 utc1 = 2456384.5;
1486 utc2 = 0.969254051;
1487 dut1 = 0.1550675;
1488 elong = -0.527800806;
1489 phi = -1.2345856;
1490 hm = 2738.0;
1491 xp = 2.47230737e-7;
1492 yp = 1.82640464e-6;
1493 phpa = 731.0;
1494 tc = 12.8;
1495 rh = 0.59;
1496 wl = 0.55;
1497
1498 j = eraAtio13(ri, di, utc1, utc2, dut1, elong, phi, hm,
1499 xp, yp, phpa, tc, rh, wl,
1500 &aob, &zob, &hob, &dob, &rob);
1501
1502 vvd(aob, 0.09233952224794989993, 1e-12, "eraAtio13", "aob", status);
1503 vvd(zob, 1.407758704513722461, 1e-12, "eraAtio13", "zob", status);
1504 vvd(hob, -0.09247619879782006106, 1e-12, "eraAtio13", "hob", status);
1505 vvd(dob, 0.1717653435758265198, 1e-12, "eraAtio13", "dob", status);
1506 vvd(rob, 2.710085107986886201, 1e-12, "eraAtio13", "rob", status);
1507 viv(j, 0, "eraAtio13", "j", status);
1508
1509}
1510
1511static void t_atioq(int *status)
1512/*
1513** - - - - - - - -
1514** t _ a t i o q
1515** - - - - - - - -
1516**
1517** Test eraAtioq function.
1518**
1519** Returned:
1520** status int FALSE = success, TRUE = fail
1521**
1522** Called: eraApio13, eraAtioq, vvd, viv
1523**
1524** This revision: 2013 October 4
1525*/
1526{
1527 double utc1, utc2, dut1, elong, phi, hm, xp, yp,
1528 phpa, tc, rh, wl, ri, di, aob, zob, hob, dob, rob;
1529 eraASTROM astrom;
1530
1531
1532 utc1 = 2456384.5;
1533 utc2 = 0.969254051;
1534 dut1 = 0.1550675;
1535 elong = -0.527800806;
1536 phi = -1.2345856;
1537 hm = 2738.0;
1538 xp = 2.47230737e-7;
1539 yp = 1.82640464e-6;
1540 phpa = 731.0;
1541 tc = 12.8;
1542 rh = 0.59;
1543 wl = 0.55;
1544 (void) eraApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
1545 phpa, tc, rh, wl, &astrom);
1546 ri = 2.710121572969038991;
1547 di = 0.1729371367218230438;
1548
1549 eraAtioq(ri, di, &astrom, &aob, &zob, &hob, &dob, &rob);
1550
1551 vvd(aob, 0.09233952224794989993, 1e-12, "eraAtioq", "aob", status);
1552 vvd(zob, 1.407758704513722461, 1e-12, "eraAtioq", "zob", status);
1553 vvd(hob, -0.09247619879782006106, 1e-12, "eraAtioq", "hob", status);
1554 vvd(dob, 0.1717653435758265198, 1e-12, "eraAtioq", "dob", status);
1555 vvd(rob, 2.710085107986886201, 1e-12, "eraAtioq", "rob", status);
1556
1557}
1558
1559static void t_atoc13(int *status)
1560/*
1561** - - - - - - - - -
1562** t _ a t o c 1 3
1563** - - - - - - - - -
1564**
1565** Test eraAtoc13 function.
1566**
1567** Returned:
1568** status int FALSE = success, TRUE = fail
1569**
1570** Called: eraAtoc13, vvd, viv
1571**
1572** This revision: 2013 October 3
1573*/
1574{
1575 double utc1, utc2, dut1,
1576 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1577 ob1, ob2, rc, dc;
1578 int j;
1579
1580
1581 utc1 = 2456384.5;
1582 utc2 = 0.969254051;
1583 dut1 = 0.1550675;
1584 elong = -0.527800806;
1585 phi = -1.2345856;
1586 hm = 2738.0;
1587 xp = 2.47230737e-7;
1588 yp = 1.82640464e-6;
1589 phpa = 731.0;
1590 tc = 12.8;
1591 rh = 0.59;
1592 wl = 0.55;
1593
1594 ob1 = 2.710085107986886201;
1595 ob2 = 0.1717653435758265198;
1596 j = eraAtoc13 ( "R", ob1, ob2, utc1, utc2, dut1,
1597 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1598 &rc, &dc);
1599 vvd(rc, 2.709956744661000609, 1e-12, "eraAtoc13", "R/rc", status);
1600 vvd(dc, 0.1741696500895398562, 1e-12, "eraAtoc13", "R/dc", status);
1601 viv(j, 0, "eraAtoc13", "R/j", status);
1602
1603 ob1 = -0.09247619879782006106;
1604 ob2 = 0.1717653435758265198;
1605 j = eraAtoc13 ( "H", ob1, ob2, utc1, utc2, dut1,
1606 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1607 &rc, &dc);
1608 vvd(rc, 2.709956744661000609, 1e-12, "eraAtoc13", "H/rc", status);
1609 vvd(dc, 0.1741696500895398562, 1e-12, "eraAtoc13", "H/dc", status);
1610 viv(j, 0, "eraAtoc13", "H/j", status);
1611
1612 ob1 = 0.09233952224794989993;
1613 ob2 = 1.407758704513722461;
1614 j = eraAtoc13 ( "A", ob1, ob2, utc1, utc2, dut1,
1615 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1616 &rc, &dc);
1617 vvd(rc, 2.709956744661000609, 1e-12, "eraAtoc13", "A/rc", status);
1618 vvd(dc, 0.1741696500895398565, 1e-12, "eraAtoc13", "A/dc", status);
1619 viv(j, 0, "eraAtoc13", "A/j", status);
1620
1621}
1622
1623static void t_atoi13(int *status)
1624/*
1625** - - - - - - - - -
1626** t _ a t o i 1 3
1627** - - - - - - - - -
1628**
1629** Test eraAtoi13 function.
1630**
1631** Returned:
1632** status int FALSE = success, TRUE = fail
1633**
1634** Called: eraAtoi13, vvd, viv
1635**
1636** This revision: 2013 October 3
1637*/
1638{
1639 double utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1640 ob1, ob2, ri, di;
1641 int j;
1642
1643
1644 utc1 = 2456384.5;
1645 utc2 = 0.969254051;
1646 dut1 = 0.1550675;
1647 elong = -0.527800806;
1648 phi = -1.2345856;
1649 hm = 2738.0;
1650 xp = 2.47230737e-7;
1651 yp = 1.82640464e-6;
1652 phpa = 731.0;
1653 tc = 12.8;
1654 rh = 0.59;
1655 wl = 0.55;
1656
1657 ob1 = 2.710085107986886201;
1658 ob2 = 0.1717653435758265198;
1659 j = eraAtoi13 ( "R", ob1, ob2, utc1, utc2, dut1,
1660 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1661 &ri, &di);
1662 vvd(ri, 2.710121574449135955, 1e-12, "eraAtoi13", "R/ri", status);
1663 vvd(di, 0.1729371839114567725, 1e-12, "eraAtoi13", "R/di", status);
1664 viv(j, 0, "eraAtoi13", "R/J", status);
1665
1666 ob1 = -0.09247619879782006106;
1667 ob2 = 0.1717653435758265198;
1668 j = eraAtoi13 ( "H", ob1, ob2, utc1, utc2, dut1,
1669 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1670 &ri, &di);
1671 vvd(ri, 2.710121574449135955, 1e-12, "eraAtoi13", "H/ri", status);
1672 vvd(di, 0.1729371839114567725, 1e-12, "eraAtoi13", "H/di", status);
1673 viv(j, 0, "eraAtoi13", "H/J", status);
1674
1675 ob1 = 0.09233952224794989993;
1676 ob2 = 1.407758704513722461;
1677 j = eraAtoi13 ( "A", ob1, ob2, utc1, utc2, dut1,
1678 elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1679 &ri, &di);
1680 vvd(ri, 2.710121574449135955, 1e-12, "eraAtoi13", "A/ri", status);
1681 vvd(di, 0.1729371839114567728, 1e-12, "eraAtoi13", "A/di", status);
1682 viv(j, 0, "eraAtoi13", "A/J", status);
1683
1684}
1685
1686static void t_atoiq(int *status)
1687/*
1688** - - - - - - - -
1689** t _ a t o i q
1690** - - - - - - - -
1691*
1692** Test eraAtoiq function.
1693*
1694** Returned:
1695** status int FALSE = success, TRUE = fail
1696*
1697** Called: eraApio13, eraAtoiq, vvd
1698*
1699** This revision: 2013 October 4
1700*/
1701{
1702 double utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl,
1703 ob1, ob2, ri, di;
1704 eraASTROM astrom;
1705
1706
1707 utc1 = 2456384.5;
1708 utc2 = 0.969254051;
1709 dut1 = 0.1550675;
1710 elong = -0.527800806;
1711 phi = -1.2345856;
1712 hm = 2738.0;
1713 xp = 2.47230737e-7;
1714 yp = 1.82640464e-6;
1715 phpa = 731.0;
1716 tc = 12.8;
1717 rh = 0.59;
1718 wl = 0.55;
1719 (void) eraApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
1720 phpa, tc, rh, wl, &astrom);
1721
1722 ob1 = 2.710085107986886201;
1723 ob2 = 0.1717653435758265198;
1724 eraAtoiq("R", ob1, ob2, &astrom, &ri, &di);
1725 vvd(ri, 2.710121574449135955, 1e-12,
1726 "eraAtoiq", "R/ri", status);
1727 vvd(di, 0.1729371839114567725, 1e-12,
1728 "eraAtoiq", "R/di", status);
1729
1730 ob1 = -0.09247619879782006106;
1731 ob2 = 0.1717653435758265198;
1732 eraAtoiq("H", ob1, ob2, &astrom, &ri, &di);
1733 vvd(ri, 2.710121574449135955, 1e-12,
1734 "eraAtoiq", "H/ri", status);
1735 vvd(di, 0.1729371839114567725, 1e-12,
1736 "eraAtoiq", "H/di", status);
1737
1738 ob1 = 0.09233952224794989993;
1739 ob2 = 1.407758704513722461;
1740 eraAtoiq("A", ob1, ob2, &astrom, &ri, &di);
1741 vvd(ri, 2.710121574449135955, 1e-12,
1742 "eraAtoiq", "A/ri", status);
1743 vvd(di, 0.1729371839114567728, 1e-12,
1744 "eraAtoiq", "A/di", status);
1745
1746}
1747
1748static void t_bi00(int *status)
1749/*
1750** - - - - - - -
1751** t _ b i 0 0
1752** - - - - - - -
1753**
1754** Test eraBi00 function.
1755**
1756** Returned:
1757** status int FALSE = success, TRUE = fail
1758**
1759** Called: eraBi00, vvd
1760**
1761** This revision: 2013 August 7
1762*/
1763{
1764 double dpsibi, depsbi, dra;
1765
1766 eraBi00(&dpsibi, &depsbi, &dra);
1767
1768 vvd(dpsibi, -0.2025309152835086613e-6, 1e-12,
1769 "eraBi00", "dpsibi", status);
1770 vvd(depsbi, -0.3306041454222147847e-7, 1e-12,
1771 "eraBi00", "depsbi", status);
1772 vvd(dra, -0.7078279744199225506e-7, 1e-12,
1773 "eraBi00", "dra", status);
1774}
1775
1776static void t_bp00(int *status)
1777/*
1778** - - - - - - -
1779** t _ b p 0 0
1780** - - - - - - -
1781**
1782** Test eraBp00 function.
1783**
1784** Returned:
1785** status int FALSE = success, TRUE = fail
1786**
1787** Called: eraBp00, vvd
1788**
1789** This revision: 2013 August 7
1790*/
1791{
1792 double rb[3][3], rp[3][3], rbp[3][3];
1793
1794
1795 eraBp00(2400000.5, 50123.9999, rb, rp, rbp);
1796
1797 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
1798 "eraBp00", "rb11", status);
1799 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
1800 "eraBp00", "rb12", status);
1801 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
1802 "eraBp00", "rb13", status);
1803 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
1804 "eraBp00", "rb21", status);
1805 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
1806 "eraBp00", "rb22", status);
1807 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
1808 "eraBp00", "rb23", status);
1809 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
1810 "eraBp00", "rb31", status);
1811 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
1812 "eraBp00", "rb32", status);
1813 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
1814 "eraBp00", "rb33", status);
1815
1816 vvd(rp[0][0], 0.9999995504864048241, 1e-12,
1817 "eraBp00", "rp11", status);
1818 vvd(rp[0][1], 0.8696113836207084411e-3, 1e-14,
1819 "eraBp00", "rp12", status);
1820 vvd(rp[0][2], 0.3778928813389333402e-3, 1e-14,
1821 "eraBp00", "rp13", status);
1822 vvd(rp[1][0], -0.8696113818227265968e-3, 1e-14,
1823 "eraBp00", "rp21", status);
1824 vvd(rp[1][1], 0.9999996218879365258, 1e-12,
1825 "eraBp00", "rp22", status);
1826 vvd(rp[1][2], -0.1690679263009242066e-6, 1e-14,
1827 "eraBp00", "rp23", status);
1828 vvd(rp[2][0], -0.3778928854764695214e-3, 1e-14,
1829 "eraBp00", "rp31", status);
1830 vvd(rp[2][1], -0.1595521004195286491e-6, 1e-14,
1831 "eraBp00", "rp32", status);
1832 vvd(rp[2][2], 0.9999999285984682756, 1e-12,
1833 "eraBp00", "rp33", status);
1834
1835 vvd(rbp[0][0], 0.9999995505175087260, 1e-12,
1836 "eraBp00", "rbp11", status);
1837 vvd(rbp[0][1], 0.8695405883617884705e-3, 1e-14,
1838 "eraBp00", "rbp12", status);
1839 vvd(rbp[0][2], 0.3779734722239007105e-3, 1e-14,
1840 "eraBp00", "rbp13", status);
1841 vvd(rbp[1][0], -0.8695405990410863719e-3, 1e-14,
1842 "eraBp00", "rbp21", status);
1843 vvd(rbp[1][1], 0.9999996219494925900, 1e-12,
1844 "eraBp00", "rbp22", status);
1845 vvd(rbp[1][2], -0.1360775820404982209e-6, 1e-14,
1846 "eraBp00", "rbp23", status);
1847 vvd(rbp[2][0], -0.3779734476558184991e-3, 1e-14,
1848 "eraBp00", "rbp31", status);
1849 vvd(rbp[2][1], -0.1925857585832024058e-6, 1e-14,
1850 "eraBp00", "rbp32", status);
1851 vvd(rbp[2][2], 0.9999999285680153377, 1e-12,
1852 "eraBp00", "rbp33", status);
1853}
1854
1855static void t_bp06(int *status)
1856/*
1857** - - - - - - -
1858** t _ b p 0 6
1859** - - - - - - -
1860**
1861** Test eraBp06 function.
1862**
1863** Returned:
1864** status int FALSE = success, TRUE = fail
1865**
1866** Called: eraBp06, vvd
1867**
1868** This revision: 2013 August 7
1869*/
1870{
1871 double rb[3][3], rp[3][3], rbp[3][3];
1872
1873
1874 eraBp06(2400000.5, 50123.9999, rb, rp, rbp);
1875
1876 vvd(rb[0][0], 0.9999999999999942497, 1e-12,
1877 "eraBp06", "rb11", status);
1878 vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
1879 "eraBp06", "rb12", status);
1880 vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
1881 "eraBp06", "rb13", status);
1882 vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
1883 "eraBp06", "rb21", status);
1884 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
1885 "eraBp06", "rb22", status);
1886 vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
1887 "eraBp06", "rb23", status);
1888 vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
1889 "eraBp06", "rb31", status);
1890 vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
1891 "eraBp06", "rb32", status);
1892 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
1893 "eraBp06", "rb33", status);
1894
1895 vvd(rp[0][0], 0.9999995504864960278, 1e-12,
1896 "eraBp06", "rp11", status);
1897 vvd(rp[0][1], 0.8696112578855404832e-3, 1e-14,
1898 "eraBp06", "rp12", status);
1899 vvd(rp[0][2], 0.3778929293341390127e-3, 1e-14,
1900 "eraBp06", "rp13", status);
1901 vvd(rp[1][0], -0.8696112560510186244e-3, 1e-14,
1902 "eraBp06", "rp21", status);
1903 vvd(rp[1][1], 0.9999996218880458820, 1e-12,
1904 "eraBp06", "rp22", status);
1905 vvd(rp[1][2], -0.1691646168941896285e-6, 1e-14,
1906 "eraBp06", "rp23", status);
1907 vvd(rp[2][0], -0.3778929335557603418e-3, 1e-14,
1908 "eraBp06", "rp31", status);
1909 vvd(rp[2][1], -0.1594554040786495076e-6, 1e-14,
1910 "eraBp06", "rp32", status);
1911 vvd(rp[2][2], 0.9999999285984501222, 1e-12,
1912 "eraBp06", "rp33", status);
1913
1914 vvd(rbp[0][0], 0.9999995505176007047, 1e-12,
1915 "eraBp06", "rbp11", status);
1916 vvd(rbp[0][1], 0.8695404617348208406e-3, 1e-14,
1917 "eraBp06", "rbp12", status);
1918 vvd(rbp[0][2], 0.3779735201865589104e-3, 1e-14,
1919 "eraBp06", "rbp13", status);
1920 vvd(rbp[1][0], -0.8695404723772031414e-3, 1e-14,
1921 "eraBp06", "rbp21", status);
1922 vvd(rbp[1][1], 0.9999996219496027161, 1e-12,
1923 "eraBp06", "rbp22", status);
1924 vvd(rbp[1][2], -0.1361752497080270143e-6, 1e-14,
1925 "eraBp06", "rbp23", status);
1926 vvd(rbp[2][0], -0.3779734957034089490e-3, 1e-14,
1927 "eraBp06", "rbp31", status);
1928 vvd(rbp[2][1], -0.1924880847894457113e-6, 1e-14,
1929 "eraBp06", "rbp32", status);
1930 vvd(rbp[2][2], 0.9999999285679971958, 1e-12,
1931 "eraBp06", "rbp33", status);
1932}
1933
1934static void t_bpn2xy(int *status)
1935/*
1936** - - - - - - - - -
1937** t _ b p n 2 x y
1938** - - - - - - - - -
1939**
1940** Test eraBpn2xy function.
1941**
1942** Returned:
1943** status int FALSE = success, TRUE = fail
1944**
1945** Called: eraBpn2xy, vvd
1946**
1947** This revision: 2013 August 7
1948*/
1949{
1950 double rbpn[3][3], x, y;
1951
1952
1953 rbpn[0][0] = 9.999962358680738e-1;
1954 rbpn[0][1] = -2.516417057665452e-3;
1955 rbpn[0][2] = -1.093569785342370e-3;
1956
1957 rbpn[1][0] = 2.516462370370876e-3;
1958 rbpn[1][1] = 9.999968329010883e-1;
1959 rbpn[1][2] = 4.006159587358310e-5;
1960
1961 rbpn[2][0] = 1.093465510215479e-3;
1962 rbpn[2][1] = -4.281337229063151e-5;
1963 rbpn[2][2] = 9.999994012499173e-1;
1964
1965 eraBpn2xy(rbpn, &x, &y);
1966
1967 vvd(x, 1.093465510215479e-3, 1e-12, "eraBpn2xy", "x", status);
1968 vvd(y, -4.281337229063151e-5, 1e-12, "eraBpn2xy", "y", status);
1969
1970}
1971
1972static void t_c2i00a(int *status)
1973/*
1974** - - - - - - - - -
1975** t _ c 2 i 0 0 a
1976** - - - - - - - - -
1977**
1978** Test eraC2i00a function.
1979**
1980** Returned:
1981** status int FALSE = success, TRUE = fail
1982**
1983** Called: eraC2i00a, vvd
1984**
1985** This revision: 2013 August 7
1986*/
1987{
1988 double rc2i[3][3];
1989
1990
1991 eraC2i00a(2400000.5, 53736.0, rc2i);
1992
1993 vvd(rc2i[0][0], 0.9999998323037165557, 1e-12,
1994 "eraC2i00a", "11", status);
1995 vvd(rc2i[0][1], 0.5581526348992140183e-9, 1e-12,
1996 "eraC2i00a", "12", status);
1997 vvd(rc2i[0][2], -0.5791308477073443415e-3, 1e-12,
1998 "eraC2i00a", "13", status);
1999
2000 vvd(rc2i[1][0], -0.2384266227870752452e-7, 1e-12,
2001 "eraC2i00a", "21", status);
2002 vvd(rc2i[1][1], 0.9999999991917405258, 1e-12,
2003 "eraC2i00a", "22", status);
2004 vvd(rc2i[1][2], -0.4020594955028209745e-4, 1e-12,
2005 "eraC2i00a", "23", status);
2006
2007 vvd(rc2i[2][0], 0.5791308472168152904e-3, 1e-12,
2008 "eraC2i00a", "31", status);
2009 vvd(rc2i[2][1], 0.4020595661591500259e-4, 1e-12,
2010 "eraC2i00a", "32", status);
2011 vvd(rc2i[2][2], 0.9999998314954572304, 1e-12,
2012 "eraC2i00a", "33", status);
2013
2014}
2015
2016static void t_c2i00b(int *status)
2017/*
2018** - - - - - - - - -
2019** t _ c 2 i 0 0 b
2020** - - - - - - - - -
2021**
2022** Test eraC2i00b function.
2023**
2024** Returned:
2025** status int FALSE = success, TRUE = fail
2026**
2027** Called: eraC2i00b, vvd
2028**
2029** This revision: 2013 August 7
2030*/
2031{
2032 double rc2i[3][3];
2033
2034
2035 eraC2i00b(2400000.5, 53736.0, rc2i);
2036
2037 vvd(rc2i[0][0], 0.9999998323040954356, 1e-12,
2038 "eraC2i00b", "11", status);
2039 vvd(rc2i[0][1], 0.5581526349131823372e-9, 1e-12,
2040 "eraC2i00b", "12", status);
2041 vvd(rc2i[0][2], -0.5791301934855394005e-3, 1e-12,
2042 "eraC2i00b", "13", status);
2043
2044 vvd(rc2i[1][0], -0.2384239285499175543e-7, 1e-12,
2045 "eraC2i00b", "21", status);
2046 vvd(rc2i[1][1], 0.9999999991917574043, 1e-12,
2047 "eraC2i00b", "22", status);
2048 vvd(rc2i[1][2], -0.4020552974819030066e-4, 1e-12,
2049 "eraC2i00b", "23", status);
2050
2051 vvd(rc2i[2][0], 0.5791301929950208873e-3, 1e-12,
2052 "eraC2i00b", "31", status);
2053 vvd(rc2i[2][1], 0.4020553681373720832e-4, 1e-12,
2054 "eraC2i00b", "32", status);
2055 vvd(rc2i[2][2], 0.9999998314958529887, 1e-12,
2056 "eraC2i00b", "33", status);
2057
2058}
2059
2060static void t_c2i06a(int *status)
2061/*
2062** - - - - - - - - -
2063** t _ c 2 i 0 6 a
2064** - - - - - - - - -
2065**
2066** Test eraC2i06a function.
2067**
2068** Returned:
2069** status int FALSE = success, TRUE = fail
2070**
2071** Called: eraC2i06a, vvd
2072**
2073** This revision: 2013 August 7
2074*/
2075{
2076 double rc2i[3][3];
2077
2078
2079 eraC2i06a(2400000.5, 53736.0, rc2i);
2080
2081 vvd(rc2i[0][0], 0.9999998323037159379, 1e-12,
2082 "eraC2i06a", "11", status);
2083 vvd(rc2i[0][1], 0.5581121329587613787e-9, 1e-12,
2084 "eraC2i06a", "12", status);
2085 vvd(rc2i[0][2], -0.5791308487740529749e-3, 1e-12,
2086 "eraC2i06a", "13", status);
2087
2088 vvd(rc2i[1][0], -0.2384253169452306581e-7, 1e-12,
2089 "eraC2i06a", "21", status);
2090 vvd(rc2i[1][1], 0.9999999991917467827, 1e-12,
2091 "eraC2i06a", "22", status);
2092 vvd(rc2i[1][2], -0.4020579392895682558e-4, 1e-12,
2093 "eraC2i06a", "23", status);
2094
2095 vvd(rc2i[2][0], 0.5791308482835292617e-3, 1e-12,
2096 "eraC2i06a", "31", status);
2097 vvd(rc2i[2][1], 0.4020580099454020310e-4, 1e-12,
2098 "eraC2i06a", "32", status);
2099 vvd(rc2i[2][2], 0.9999998314954628695, 1e-12,
2100 "eraC2i06a", "33", status);
2101
2102}
2103
2104static void t_c2ibpn(int *status)
2105/*
2106** - - - - - - - - -
2107** t _ c 2 i b p n
2108** - - - - - - - - -
2109**
2110** Test eraC2ibpn function.
2111**
2112** Returned:
2113** status int FALSE = success, TRUE = fail
2114**
2115** Called: eraC2ibpn, vvd
2116**
2117** This revision: 2013 August 7
2118*/
2119{
2120 double rbpn[3][3], rc2i[3][3];
2121
2122
2123 rbpn[0][0] = 9.999962358680738e-1;
2124 rbpn[0][1] = -2.516417057665452e-3;
2125 rbpn[0][2] = -1.093569785342370e-3;
2126
2127 rbpn[1][0] = 2.516462370370876e-3;
2128 rbpn[1][1] = 9.999968329010883e-1;
2129 rbpn[1][2] = 4.006159587358310e-5;
2130
2131 rbpn[2][0] = 1.093465510215479e-3;
2132 rbpn[2][1] = -4.281337229063151e-5;
2133 rbpn[2][2] = 9.999994012499173e-1;
2134
2135 eraC2ibpn(2400000.5, 50123.9999, rbpn, rc2i);
2136
2137 vvd(rc2i[0][0], 0.9999994021664089977, 1e-12,
2138 "eraC2ibpn", "11", status);
2139 vvd(rc2i[0][1], -0.3869195948017503664e-8, 1e-12,
2140 "eraC2ibpn", "12", status);
2141 vvd(rc2i[0][2], -0.1093465511383285076e-2, 1e-12,
2142 "eraC2ibpn", "13", status);
2143
2144 vvd(rc2i[1][0], 0.5068413965715446111e-7, 1e-12,
2145 "eraC2ibpn", "21", status);
2146 vvd(rc2i[1][1], 0.9999999990835075686, 1e-12,
2147 "eraC2ibpn", "22", status);
2148 vvd(rc2i[1][2], 0.4281334246452708915e-4, 1e-12,
2149 "eraC2ibpn", "23", status);
2150
2151 vvd(rc2i[2][0], 0.1093465510215479000e-2, 1e-12,
2152 "eraC2ibpn", "31", status);
2153 vvd(rc2i[2][1], -0.4281337229063151000e-4, 1e-12,
2154 "eraC2ibpn", "32", status);
2155 vvd(rc2i[2][2], 0.9999994012499173103, 1e-12,
2156 "eraC2ibpn", "33", status);
2157
2158}
2159
2160static void t_c2ixy(int *status)
2161/*
2162** - - - - - - - -
2163** t _ c 2 i x y
2164** - - - - - - - -
2165**
2166** Test eraC2ixy function.
2167**
2168** Returned:
2169** status int FALSE = success, TRUE = fail
2170**
2171** Called: eraC2ixy, vvd
2172**
2173** This revision: 2013 August 7
2174*/
2175{
2176 double x, y, rc2i[3][3];
2177
2178
2179 x = 0.5791308486706011000e-3;
2180 y = 0.4020579816732961219e-4;
2181
2182 eraC2ixy(2400000.5, 53736, x, y, rc2i);
2183
2184 vvd(rc2i[0][0], 0.9999998323037157138, 1e-12,
2185 "eraC2ixy", "11", status);
2186 vvd(rc2i[0][1], 0.5581526349032241205e-9, 1e-12,
2187 "eraC2ixy", "12", status);
2188 vvd(rc2i[0][2], -0.5791308491611263745e-3, 1e-12,
2189 "eraC2ixy", "13", status);
2190
2191 vvd(rc2i[1][0], -0.2384257057469842953e-7, 1e-12,
2192 "eraC2ixy", "21", status);
2193 vvd(rc2i[1][1], 0.9999999991917468964, 1e-12,
2194 "eraC2ixy", "22", status);
2195 vvd(rc2i[1][2], -0.4020579110172324363e-4, 1e-12,
2196 "eraC2ixy", "23", status);
2197
2198 vvd(rc2i[2][0], 0.5791308486706011000e-3, 1e-12,
2199 "eraC2ixy", "31", status);
2200 vvd(rc2i[2][1], 0.4020579816732961219e-4, 1e-12,
2201 "eraC2ixy", "32", status);
2202 vvd(rc2i[2][2], 0.9999998314954627590, 1e-12,
2203 "eraC2ixy", "33", status);
2204
2205}
2206
2207static void t_c2ixys(int *status)
2208/*
2209** - - - - - - - - -
2210** t _ c 2 i x y s
2211** - - - - - - - - -
2212**
2213** Test eraC2ixys function.
2214**
2215** Returned:
2216** status int FALSE = success, TRUE = fail
2217**
2218** Called: eraC2ixys, vvd
2219**
2220** This revision: 2013 August 7
2221*/
2222{
2223 double x, y, s, rc2i[3][3];
2224
2225
2226 x = 0.5791308486706011000e-3;
2227 y = 0.4020579816732961219e-4;
2228 s = -0.1220040848472271978e-7;
2229
2230 eraC2ixys(x, y, s, rc2i);
2231
2232 vvd(rc2i[0][0], 0.9999998323037157138, 1e-12,
2233 "eraC2ixys", "11", status);
2234 vvd(rc2i[0][1], 0.5581984869168499149e-9, 1e-12,
2235 "eraC2ixys", "12", status);
2236 vvd(rc2i[0][2], -0.5791308491611282180e-3, 1e-12,
2237 "eraC2ixys", "13", status);
2238
2239 vvd(rc2i[1][0], -0.2384261642670440317e-7, 1e-12,
2240 "eraC2ixys", "21", status);
2241 vvd(rc2i[1][1], 0.9999999991917468964, 1e-12,
2242 "eraC2ixys", "22", status);
2243 vvd(rc2i[1][2], -0.4020579110169668931e-4, 1e-12,
2244 "eraC2ixys", "23", status);
2245
2246 vvd(rc2i[2][0], 0.5791308486706011000e-3, 1e-12,
2247 "eraC2ixys", "31", status);
2248 vvd(rc2i[2][1], 0.4020579816732961219e-4, 1e-12,
2249 "eraC2ixys", "32", status);
2250 vvd(rc2i[2][2], 0.9999998314954627590, 1e-12,
2251 "eraC2ixys", "33", status);
2252
2253}
2254
2255static void t_c2s(int *status)
2256/*
2257** - - - - - -
2258** t _ c 2 s
2259** - - - - - -
2260**
2261** Test eraC2s function.
2262**
2263** Returned:
2264** status int FALSE = success, TRUE = fail
2265**
2266** Called: eraC2s, vvd
2267**
2268** This revision: 2013 August 7
2269*/
2270{
2271 double p[3], theta, phi;
2272
2273
2274 p[0] = 100.0;
2275 p[1] = -50.0;
2276 p[2] = 25.0;
2277
2278 eraC2s(p, &theta, &phi);
2279
2280 vvd(theta, -0.4636476090008061162, 1e-14, "eraC2s", "theta", status);
2281 vvd(phi, 0.2199879773954594463, 1e-14, "eraC2s", "phi", status);
2282
2283}
2284
2285static void t_c2t00a(int *status)
2286/*
2287** - - - - - - - - -
2288** t _ c 2 t 0 0 a
2289** - - - - - - - - -
2290**
2291** Test eraC2t00a function.
2292**
2293** Returned:
2294** status int FALSE = success, TRUE = fail
2295**
2296** Called: eraC2t00a, vvd
2297**
2298** This revision: 2013 August 7
2299*/
2300{
2301 double tta, ttb, uta, utb, xp, yp, rc2t[3][3];
2302
2303
2304 tta = 2400000.5;
2305 uta = 2400000.5;
2306 ttb = 53736.0;
2307 utb = 53736.0;
2308 xp = 2.55060238e-7;
2309 yp = 1.860359247e-6;
2310
2311 eraC2t00a(tta, ttb, uta, utb, xp, yp, rc2t);
2312
2313 vvd(rc2t[0][0], -0.1810332128307182668, 1e-12,
2314 "eraC2t00a", "11", status);
2315 vvd(rc2t[0][1], 0.9834769806938457836, 1e-12,
2316 "eraC2t00a", "12", status);
2317 vvd(rc2t[0][2], 0.6555535638688341725e-4, 1e-12,
2318 "eraC2t00a", "13", status);
2319
2320 vvd(rc2t[1][0], -0.9834768134135984552, 1e-12,
2321 "eraC2t00a", "21", status);
2322 vvd(rc2t[1][1], -0.1810332203649520727, 1e-12,
2323 "eraC2t00a", "22", status);
2324 vvd(rc2t[1][2], 0.5749801116141056317e-3, 1e-12,
2325 "eraC2t00a", "23", status);
2326
2327 vvd(rc2t[2][0], 0.5773474014081406921e-3, 1e-12,
2328 "eraC2t00a", "31", status);
2329 vvd(rc2t[2][1], 0.3961832391770163647e-4, 1e-12,
2330 "eraC2t00a", "32", status);
2331 vvd(rc2t[2][2], 0.9999998325501692289, 1e-12,
2332 "eraC2t00a", "33", status);
2333
2334}
2335
2336static void t_c2t00b(int *status)
2337/*
2338** - - - - - - - - -
2339** t _ c 2 t 0 0 b
2340** - - - - - - - - -
2341**
2342** Test eraC2t00b function.
2343**
2344** Returned:
2345** status int FALSE = success, TRUE = fail
2346**
2347** Called: eraC2t00b, vvd
2348**
2349** This revision: 2013 August 7
2350*/
2351{
2352 double tta, ttb, uta, utb, xp, yp, rc2t[3][3];
2353
2354
2355 tta = 2400000.5;
2356 uta = 2400000.5;
2357 ttb = 53736.0;
2358 utb = 53736.0;
2359 xp = 2.55060238e-7;
2360 yp = 1.860359247e-6;
2361
2362 eraC2t00b(tta, ttb, uta, utb, xp, yp, rc2t);
2363
2364 vvd(rc2t[0][0], -0.1810332128439678965, 1e-12,
2365 "eraC2t00b", "11", status);
2366 vvd(rc2t[0][1], 0.9834769806913872359, 1e-12,
2367 "eraC2t00b", "12", status);
2368 vvd(rc2t[0][2], 0.6555565082458415611e-4, 1e-12,
2369 "eraC2t00b", "13", status);
2370
2371 vvd(rc2t[1][0], -0.9834768134115435923, 1e-12,
2372 "eraC2t00b", "21", status);
2373 vvd(rc2t[1][1], -0.1810332203784001946, 1e-12,
2374 "eraC2t00b", "22", status);
2375 vvd(rc2t[1][2], 0.5749793922030017230e-3, 1e-12,
2376 "eraC2t00b", "23", status);
2377
2378 vvd(rc2t[2][0], 0.5773467471863534901e-3, 1e-12,
2379 "eraC2t00b", "31", status);
2380 vvd(rc2t[2][1], 0.3961790411549945020e-4, 1e-12,
2381 "eraC2t00b", "32", status);
2382 vvd(rc2t[2][2], 0.9999998325505635738, 1e-12,
2383 "eraC2t00b", "33", status);
2384
2385}
2386
2387static void t_c2t06a(int *status)
2388/*
2389** - - - - - - - - -
2390** t _ c 2 t 0 6 a
2391** - - - - - - - - -
2392**
2393** Test eraC2t06a function.
2394**
2395** Returned:
2396** status int FALSE = success, TRUE = fail
2397**
2398** Called: eraC2t06a, vvd
2399**
2400** This revision: 2013 August 7
2401*/
2402{
2403 double tta, ttb, uta, utb, xp, yp, rc2t[3][3];
2404
2405
2406 tta = 2400000.5;
2407 uta = 2400000.5;
2408 ttb = 53736.0;
2409 utb = 53736.0;
2410 xp = 2.55060238e-7;
2411 yp = 1.860359247e-6;
2412
2413 eraC2t06a(tta, ttb, uta, utb, xp, yp, rc2t);
2414
2415 vvd(rc2t[0][0], -0.1810332128305897282, 1e-12,
2416 "eraC2t06a", "11", status);
2417 vvd(rc2t[0][1], 0.9834769806938592296, 1e-12,
2418 "eraC2t06a", "12", status);
2419 vvd(rc2t[0][2], 0.6555550962998436505e-4, 1e-12,
2420 "eraC2t06a", "13", status);
2421
2422 vvd(rc2t[1][0], -0.9834768134136214897, 1e-12,
2423 "eraC2t06a", "21", status);
2424 vvd(rc2t[1][1], -0.1810332203649130832, 1e-12,
2425 "eraC2t06a", "22", status);
2426 vvd(rc2t[1][2], 0.5749800844905594110e-3, 1e-12,
2427 "eraC2t06a", "23", status);
2428
2429 vvd(rc2t[2][0], 0.5773474024748545878e-3, 1e-12,
2430 "eraC2t06a", "31", status);
2431 vvd(rc2t[2][1], 0.3961816829632690581e-4, 1e-12,
2432 "eraC2t06a", "32", status);
2433 vvd(rc2t[2][2], 0.9999998325501747785, 1e-12,
2434 "eraC2t06a", "33", status);
2435
2436}
2437
2438static void t_c2tcio(int *status)
2439/*
2440** - - - - - - - - -
2441** t _ c 2 t c i o
2442** - - - - - - - - -
2443**
2444** Test eraC2tcio function.
2445**
2446** Returned:
2447** status int FALSE = success, TRUE = fail
2448**
2449** Called: eraC2tcio, vvd
2450**
2451** This revision: 2013 August 7
2452*/
2453{
2454 double rc2i[3][3], era, rpom[3][3], rc2t[3][3];
2455
2456
2457 rc2i[0][0] = 0.9999998323037164738;
2458 rc2i[0][1] = 0.5581526271714303683e-9;
2459 rc2i[0][2] = -0.5791308477073443903e-3;
2460
2461 rc2i[1][0] = -0.2384266227524722273e-7;
2462 rc2i[1][1] = 0.9999999991917404296;
2463 rc2i[1][2] = -0.4020594955030704125e-4;
2464
2465 rc2i[2][0] = 0.5791308472168153320e-3;
2466 rc2i[2][1] = 0.4020595661593994396e-4;
2467 rc2i[2][2] = 0.9999998314954572365;
2468
2469 era = 1.75283325530307;
2470
2471 rpom[0][0] = 0.9999999999999674705;
2472 rpom[0][1] = -0.1367174580728847031e-10;
2473 rpom[0][2] = 0.2550602379999972723e-6;
2474
2475 rpom[1][0] = 0.1414624947957029721e-10;
2476 rpom[1][1] = 0.9999999999982694954;
2477 rpom[1][2] = -0.1860359246998866338e-5;
2478
2479 rpom[2][0] = -0.2550602379741215275e-6;
2480 rpom[2][1] = 0.1860359247002413923e-5;
2481 rpom[2][2] = 0.9999999999982369658;
2482
2483
2484 eraC2tcio(rc2i, era, rpom, rc2t);
2485
2486 vvd(rc2t[0][0], -0.1810332128307110439, 1e-12,
2487 "eraC2tcio", "11", status);
2488 vvd(rc2t[0][1], 0.9834769806938470149, 1e-12,
2489 "eraC2tcio", "12", status);
2490 vvd(rc2t[0][2], 0.6555535638685466874e-4, 1e-12,
2491 "eraC2tcio", "13", status);
2492
2493 vvd(rc2t[1][0], -0.9834768134135996657, 1e-12,
2494 "eraC2tcio", "21", status);
2495 vvd(rc2t[1][1], -0.1810332203649448367, 1e-12,
2496 "eraC2tcio", "22", status);
2497 vvd(rc2t[1][2], 0.5749801116141106528e-3, 1e-12,
2498 "eraC2tcio", "23", status);
2499
2500 vvd(rc2t[2][0], 0.5773474014081407076e-3, 1e-12,
2501 "eraC2tcio", "31", status);
2502 vvd(rc2t[2][1], 0.3961832391772658944e-4, 1e-12,
2503 "eraC2tcio", "32", status);
2504 vvd(rc2t[2][2], 0.9999998325501691969, 1e-12,
2505 "eraC2tcio", "33", status);
2506
2507}
2508
2509static void t_c2teqx(int *status)
2510/*
2511** - - - - - - - - -
2512** t _ c 2 t e q x
2513** - - - - - - - - -
2514**
2515** Test eraC2teqx function.
2516**
2517** Returned:
2518** status int FALSE = success, TRUE = fail
2519**
2520** Called: eraC2teqx, vvd
2521**
2522** This revision: 2013 August 7
2523*/
2524{
2525 double rbpn[3][3], gst, rpom[3][3], rc2t[3][3];
2526
2527
2528 rbpn[0][0] = 0.9999989440476103608;
2529 rbpn[0][1] = -0.1332881761240011518e-2;
2530 rbpn[0][2] = -0.5790767434730085097e-3;
2531
2532 rbpn[1][0] = 0.1332858254308954453e-2;
2533 rbpn[1][1] = 0.9999991109044505944;
2534 rbpn[1][2] = -0.4097782710401555759e-4;
2535
2536 rbpn[2][0] = 0.5791308472168153320e-3;
2537 rbpn[2][1] = 0.4020595661593994396e-4;
2538 rbpn[2][2] = 0.9999998314954572365;
2539
2540 gst = 1.754166138040730516;
2541
2542 rpom[0][0] = 0.9999999999999674705;
2543 rpom[0][1] = -0.1367174580728847031e-10;
2544 rpom[0][2] = 0.2550602379999972723e-6;
2545
2546 rpom[1][0] = 0.1414624947957029721e-10;
2547 rpom[1][1] = 0.9999999999982694954;
2548 rpom[1][2] = -0.1860359246998866338e-5;
2549
2550 rpom[2][0] = -0.2550602379741215275e-6;
2551 rpom[2][1] = 0.1860359247002413923e-5;
2552 rpom[2][2] = 0.9999999999982369658;
2553
2554 eraC2teqx(rbpn, gst, rpom, rc2t);
2555
2556 vvd(rc2t[0][0], -0.1810332128528685730, 1e-12,
2557 "eraC2teqx", "11", status);
2558 vvd(rc2t[0][1], 0.9834769806897685071, 1e-12,
2559 "eraC2teqx", "12", status);
2560 vvd(rc2t[0][2], 0.6555535639982634449e-4, 1e-12,
2561 "eraC2teqx", "13", status);
2562
2563 vvd(rc2t[1][0], -0.9834768134095211257, 1e-12,
2564 "eraC2teqx", "21", status);
2565 vvd(rc2t[1][1], -0.1810332203871023800, 1e-12,
2566 "eraC2teqx", "22", status);
2567 vvd(rc2t[1][2], 0.5749801116126438962e-3, 1e-12,
2568 "eraC2teqx", "23", status);
2569
2570 vvd(rc2t[2][0], 0.5773474014081539467e-3, 1e-12,
2571 "eraC2teqx", "31", status);
2572 vvd(rc2t[2][1], 0.3961832391768640871e-4, 1e-12,
2573 "eraC2teqx", "32", status);
2574 vvd(rc2t[2][2], 0.9999998325501691969, 1e-12,
2575 "eraC2teqx", "33", status);
2576
2577}
2578
2579static void t_c2tpe(int *status)
2580/*
2581** - - - - - - - -
2582** t _ c 2 t p e
2583** - - - - - - - -
2584**
2585** Test eraC2tpe function.
2586**
2587** Returned:
2588** status int FALSE = success, TRUE = fail
2589**
2590** Called: eraC2tpe, vvd
2591**
2592** This revision: 2013 August 7
2593*/
2594{
2595 double tta, ttb, uta, utb, dpsi, deps, xp, yp, rc2t[3][3];
2596
2597
2598 tta = 2400000.5;
2599 uta = 2400000.5;
2600 ttb = 53736.0;
2601 utb = 53736.0;
2602 deps = 0.4090789763356509900;
2603 dpsi = -0.9630909107115582393e-5;
2604 xp = 2.55060238e-7;
2605 yp = 1.860359247e-6;
2606
2607 eraC2tpe(tta, ttb, uta, utb, dpsi, deps, xp, yp, rc2t);
2608
2609 vvd(rc2t[0][0], -0.1813677995763029394, 1e-12,
2610 "eraC2tpe", "11", status);
2611 vvd(rc2t[0][1], 0.9023482206891683275, 1e-12,
2612 "eraC2tpe", "12", status);
2613 vvd(rc2t[0][2], -0.3909902938641085751, 1e-12,
2614 "eraC2tpe", "13", status);
2615
2616 vvd(rc2t[1][0], -0.9834147641476804807, 1e-12,
2617 "eraC2tpe", "21", status);
2618 vvd(rc2t[1][1], -0.1659883635434995121, 1e-12,
2619 "eraC2tpe", "22", status);
2620 vvd(rc2t[1][2], 0.7309763898042819705e-1, 1e-12,
2621 "eraC2tpe", "23", status);
2622
2623 vvd(rc2t[2][0], 0.1059685430673215247e-2, 1e-12,
2624 "eraC2tpe", "31", status);
2625 vvd(rc2t[2][1], 0.3977631855605078674, 1e-12,
2626 "eraC2tpe", "32", status);
2627 vvd(rc2t[2][2], 0.9174875068792735362, 1e-12,
2628 "eraC2tpe", "33", status);
2629
2630}
2631
2632static void t_c2txy(int *status)
2633/*
2634** - - - - - - - -
2635** t _ c 2 t x y
2636** - - - - - - - -
2637**
2638** Test eraC2txy function.
2639**
2640** Returned:
2641** status int FALSE = success, TRUE = fail
2642**
2643** Called: eraC2txy, vvd
2644**
2645** This revision: 2013 August 7
2646*/
2647{
2648 double tta, ttb, uta, utb, x, y, xp, yp, rc2t[3][3];
2649
2650
2651 tta = 2400000.5;
2652 uta = 2400000.5;
2653 ttb = 53736.0;
2654 utb = 53736.0;
2655 x = 0.5791308486706011000e-3;
2656 y = 0.4020579816732961219e-4;
2657 xp = 2.55060238e-7;
2658 yp = 1.860359247e-6;
2659
2660 eraC2txy(tta, ttb, uta, utb, x, y, xp, yp, rc2t);
2661
2662 vvd(rc2t[0][0], -0.1810332128306279253, 1e-12,
2663 "eraC2txy", "11", status);
2664 vvd(rc2t[0][1], 0.9834769806938520084, 1e-12,
2665 "eraC2txy", "12", status);
2666 vvd(rc2t[0][2], 0.6555551248057665829e-4, 1e-12,
2667 "eraC2txy", "13", status);
2668
2669 vvd(rc2t[1][0], -0.9834768134136142314, 1e-12,
2670 "eraC2txy", "21", status);
2671 vvd(rc2t[1][1], -0.1810332203649529312, 1e-12,
2672 "eraC2txy", "22", status);
2673 vvd(rc2t[1][2], 0.5749800843594139912e-3, 1e-12,
2674 "eraC2txy", "23", status);
2675
2676 vvd(rc2t[2][0], 0.5773474028619264494e-3, 1e-12,
2677 "eraC2txy", "31", status);
2678 vvd(rc2t[2][1], 0.3961816546911624260e-4, 1e-12,
2679 "eraC2txy", "32", status);
2680 vvd(rc2t[2][2], 0.9999998325501746670, 1e-12,
2681 "eraC2txy", "33", status);
2682
2683}
2684
2685static void t_cal2jd(int *status)
2686/*
2687** - - - - - - - - -
2688** t _ c a l 2 j d
2689** - - - - - - - - -
2690**
2691** Test eraCal2jd function.
2692**
2693** Returned:
2694** status int FALSE = success, TRUE = fail
2695**
2696** Called: eraCal2jd, vvd, viv
2697**
2698** This revision: 2013 August 7
2699*/
2700{
2701 int j;
2702 double djm0, djm;
2703
2704
2705 j = eraCal2jd(2003, 06, 01, &djm0, &djm);
2706
2707 vvd(djm0, 2400000.5, 0.0, "eraCal2jd", "djm0", status);
2708 vvd(djm, 52791.0, 0.0, "eraCal2jd", "djm", status);
2709
2710 viv(j, 0, "eraCal2jd", "j", status);
2711
2712}
2713
2714static void t_cp(int *status)
2715/*
2716** - - - - -
2717** t _ c p
2718** - - - - -
2719**
2720** Test eraCp function.
2721**
2722** Returned:
2723** status int FALSE = success, TRUE = fail
2724**
2725** Called: eraCp, vvd
2726**
2727** This revision: 2013 August 7
2728*/
2729{
2730 double p[3], c[3];
2731
2732
2733 p[0] = 0.3;
2734 p[1] = 1.2;
2735 p[2] = -2.5;
2736
2737 eraCp(p, c);
2738
2739 vvd(c[0], 0.3, 0.0, "eraCp", "1", status);
2740 vvd(c[1], 1.2, 0.0, "eraCp", "2", status);
2741 vvd(c[2], -2.5, 0.0, "eraCp", "3", status);
2742}
2743
2744static void t_cpv(int *status)
2745/*
2746** - - - - - -
2747** t _ c p v
2748** - - - - - -
2749**
2750** Test eraCpv function.
2751**
2752** Returned:
2753** status int FALSE = success, TRUE = fail
2754**
2755** Called: eraCpv, vvd
2756**
2757** This revision: 2013 August 7
2758*/
2759{
2760 double pv[2][3], c[2][3];
2761
2762
2763 pv[0][0] = 0.3;
2764 pv[0][1] = 1.2;
2765 pv[0][2] = -2.5;
2766
2767 pv[1][0] = -0.5;
2768 pv[1][1] = 3.1;
2769 pv[1][2] = 0.9;
2770
2771 eraCpv(pv, c);
2772
2773 vvd(c[0][0], 0.3, 0.0, "eraCpv", "p1", status);
2774 vvd(c[0][1], 1.2, 0.0, "eraCpv", "p2", status);
2775 vvd(c[0][2], -2.5, 0.0, "eraCpv", "p3", status);
2776
2777 vvd(c[1][0], -0.5, 0.0, "eraCpv", "v1", status);
2778 vvd(c[1][1], 3.1, 0.0, "eraCpv", "v2", status);
2779 vvd(c[1][2], 0.9, 0.0, "eraCpv", "v3", status);
2780
2781}
2782
2783static void t_cr(int *status)
2784/*
2785** - - - - -
2786** t _ c r
2787** - - - - -
2788**
2789** Test eraCr function.
2790**
2791** Returned:
2792** status int FALSE = success, TRUE = fail
2793**
2794** Called: eraCr, vvd
2795**
2796** This revision: 2013 August 7
2797*/
2798{
2799 double r[3][3], c[3][3];
2800
2801
2802 r[0][0] = 2.0;
2803 r[0][1] = 3.0;
2804 r[0][2] = 2.0;
2805
2806 r[1][0] = 3.0;
2807 r[1][1] = 2.0;
2808 r[1][2] = 3.0;
2809
2810 r[2][0] = 3.0;
2811 r[2][1] = 4.0;
2812 r[2][2] = 5.0;
2813
2814 eraCr(r, c);
2815
2816 vvd(c[0][0], 2.0, 0.0, "eraCr", "11", status);
2817 vvd(c[0][1], 3.0, 0.0, "eraCr", "12", status);
2818 vvd(c[0][2], 2.0, 0.0, "eraCr", "13", status);
2819
2820 vvd(c[1][0], 3.0, 0.0, "eraCr", "21", status);
2821 vvd(c[1][1], 2.0, 0.0, "eraCr", "22", status);
2822 vvd(c[1][2], 3.0, 0.0, "eraCr", "23", status);
2823
2824 vvd(c[2][0], 3.0, 0.0, "eraCr", "31", status);
2825 vvd(c[2][1], 4.0, 0.0, "eraCr", "32", status);
2826 vvd(c[2][2], 5.0, 0.0, "eraCr", "33", status);
2827}
2828
2829static void t_d2dtf(int *status )
2830/*
2831** - - - - - - - -
2832** t _ d 2 d t f
2833** - - - - - - - -
2834**
2835** Test eraD2dtf function.
2836**
2837** Returned:
2838** status int FALSE = success, TRUE = fail
2839**
2840** Called: eraD2dtf, viv
2841**
2842** This revision: 2013 August 7
2843*/
2844{
2845 int j, iy, im, id, ihmsf[4];
2846
2847
2848 j = eraD2dtf("UTC", 5, 2400000.5, 49533.99999, &iy, &im, &id, ihmsf);
2849
2850 viv(iy, 1994, "eraD2dtf", "y", status);
2851 viv(im, 6, "eraD2dtf", "mo", status);
2852 viv(id, 30, "eraD2dtf", "d", status);
2853 viv(ihmsf[0], 23, "eraD2dtf", "h", status);
2854 viv(ihmsf[1], 59, "eraD2dtf", "m", status);
2855 viv(ihmsf[2], 60, "eraD2dtf", "s", status);
2856 viv(ihmsf[3], 13599, "eraD2dtf", "f", status);
2857 viv(j, 0, "eraD2dtf", "j", status);
2858
2859}
2860
2861static void t_d2tf(int *status)
2862/*
2863** - - - - - - -
2864** t _ d 2 t f
2865** - - - - - - -
2866**
2867** Test eraD2tf function.
2868**
2869** Returned:
2870** status int FALSE = success, TRUE = fail
2871**
2872** Called: eraD2tf, viv, vvd
2873**
2874** This revision: 2013 August 7
2875*/
2876{
2877 int ihmsf[4];
2878 char s;
2879
2880
2881 eraD2tf(4, -0.987654321, &s, ihmsf);
2882
2883 viv((int)s, '-', "eraD2tf", "s", status);
2884
2885 viv(ihmsf[0], 23, "eraD2tf", "0", status);
2886 viv(ihmsf[1], 42, "eraD2tf", "1", status);
2887 viv(ihmsf[2], 13, "eraD2tf", "2", status);
2888 viv(ihmsf[3], 3333, "eraD2tf", "3", status);
2889
2890}
2891
2892static void t_dat(int *status)
2893/*
2894** - - - - - -
2895** t _ d a t
2896** - - - - - -
2897**
2898** Test eraDat function.
2899**
2900** Returned:
2901** status int FALSE = success, TRUE = fail
2902**
2903** Called: eraDat, vvd, viv
2904**
2905** This revision: 2015 January 30
2906*/
2907{
2908 int j;
2909 double deltat;
2910
2911
2912 j = eraDat(2003, 6, 1, 0.0, &deltat);
2913
2914 vvd(deltat, 32.0, 0.0, "eraDat", "d1", status);
2915 viv(j, 0, "eraDat", "j1", status);
2916
2917 j = eraDat(2008, 1, 17, 0.0, &deltat);
2918
2919 vvd(deltat, 33.0, 0.0, "eraDat", "d2", status);
2920 viv(j, 0, "eraDat", "j2", status);
2921
2922 j = eraDat(2015, 9, 1, 0.0, &deltat);
2923
2924 vvd(deltat, 36.0, 0.0, "eraDat", "d3", status);
2925 viv(j, 0, "eraDat", "j3", status);
2926
2927}
2928
2929static void t_dtdb(int *status)
2930/*
2931** - - - - - - -
2932** t _ d t d b
2933** - - - - - - -
2934**
2935** Test eraDtdb function.
2936**
2937** Returned:
2938** status int FALSE = success, TRUE = fail
2939**
2940** Called: eraDtdb, vvd
2941**
2942** This revision: 2013 August 7
2943*/
2944{
2945 double dtdb;
2946
2947
2948 dtdb = eraDtdb(2448939.5, 0.123, 0.76543, 5.0123, 5525.242, 3190.0);
2949
2950 vvd(dtdb, -0.1280368005936998991e-2, 1e-15, "eraDtdb", "", status);
2951
2952}
2953
2954static void t_dtf2d(int *status)
2955/*
2956** - - - - - - - -
2957** t _ d t f 2 d
2958** - - - - - - - -
2959**
2960** Test eraDtf2d function.
2961**
2962** Returned:
2963** status int FALSE = success, TRUE = fail
2964**
2965** Called: eraDtf2d, vvd, viv
2966**
2967** This revision: 2013 August 7
2968*/
2969{
2970 double u1, u2;
2971 int j;
2972
2973
2974 j = eraDtf2d("UTC", 1994, 6, 30, 23, 59, 60.13599, &u1, &u2);
2975
2976 vvd(u1+u2, 2449534.49999, 1e-6, "eraDtf2d", "u", status);
2977 viv(j, 0, "eraDtf2d", "j", status);
2978
2979}
2980
2981static void t_ee00(int *status)
2982/*
2983** - - - - - - -
2984** t _ e e 0 0
2985** - - - - - - -
2986**
2987** Test eraEe00 function.
2988**
2989** Returned:
2990** status int FALSE = success, TRUE = fail
2991**
2992** Called: eraEe00, vvd
2993**
2994** This revision: 2013 August 7
2995*/
2996{
2997 double epsa, dpsi, ee;
2998
2999
3000 epsa = 0.4090789763356509900;
3001 dpsi = -0.9630909107115582393e-5;
3002
3003 ee = eraEe00(2400000.5, 53736.0, epsa, dpsi);
3004
3005 vvd(ee, -0.8834193235367965479e-5, 1e-18, "eraEe00", "", status);
3006
3007}
3008
3009static void t_ee00a(int *status)
3010/*
3011** - - - - - - - -
3012** t _ e e 0 0 a
3013** - - - - - - - -
3014**
3015** Test eraEe00a function.
3016**
3017** Returned:
3018** status int FALSE = success, TRUE = fail
3019**
3020** Called: eraEe00a, vvd
3021**
3022** This revision: 2013 August 7
3023*/
3024{
3025 double ee;
3026
3027
3028 ee = eraEe00a(2400000.5, 53736.0);
3029
3030 vvd(ee, -0.8834192459222588227e-5, 1e-18, "eraEe00a", "", status);
3031
3032}
3033
3034static void t_ee00b(int *status)
3035/*
3036** - - - - - - - -
3037** t _ e e 0 0 b
3038** - - - - - - - -
3039**
3040** Test eraEe00b function.
3041**
3042** Returned:
3043** status int FALSE = success, TRUE = fail
3044**
3045** Called: eraEe00b, vvd
3046**
3047** This revision: 2013 August 7
3048*/
3049{
3050 double ee;
3051
3052
3053 ee = eraEe00b(2400000.5, 53736.0);
3054
3055 vvd(ee, -0.8835700060003032831e-5, 1e-18, "eraEe00b", "", status);
3056
3057}
3058
3059static void t_ee06a(int *status)
3060/*
3061** - - - - - - - -
3062** t _ e e 0 6 a
3063** - - - - - - - -
3064**
3065** Test eraEe06a function.
3066**
3067** Returned:
3068** status int FALSE = success, TRUE = fail
3069**
3070** Called: eraEe06a, vvd
3071**
3072** This revision: 2013 August 7
3073*/
3074{
3075 double ee;
3076
3077
3078 ee = eraEe06a(2400000.5, 53736.0);
3079
3080 vvd(ee, -0.8834195072043790156e-5, 1e-15, "eraEe06a", "", status);
3081}
3082
3083static void t_eect00(int *status)
3084/*
3085** - - - - - - - - -
3086** t _ e e c t 0 0
3087** - - - - - - - - -
3088**
3089** Test eraEect00 function.
3090**
3091** Returned:
3092** status int FALSE = success, TRUE = fail
3093**
3094** Called: eraEect00, vvd
3095**
3096** This revision: 2013 August 7
3097*/
3098{
3099 double eect;
3100
3101
3102 eect = eraEect00(2400000.5, 53736.0);
3103
3104 vvd(eect, 0.2046085004885125264e-8, 1e-20, "eraEect00", "", status);
3105
3106}
3107
3108static void t_eform(int *status)
3109/*
3110** - - - - - - - -
3111** t _ e f o r m
3112** - - - - - - - -
3113**
3114** Test eraEform function.
3115**
3116** Returned:
3117** status int FALSE = success, TRUE = fail
3118**
3119** Called: eraEform, viv, vvd
3120**
3121** This revision: 2013 August 7
3122*/
3123{
3124 int j;
3125 double a, f;
3126
3127 j = eraEform(0, &a, &f);
3128
3129 viv(j, -1, "eraEform", "j0", status);
3130
3131 j = eraEform(ERFA_WGS84, &a, &f);
3132
3133 viv(j, 0, "eraEform", "j1", status);
3134 vvd(a, 6378137.0, 1e-10, "eraEform", "a1", status);
3135 vvd(f, 0.0033528106647474807, 1e-18, "eraEform", "f1", status);
3136
3137 j = eraEform(ERFA_GRS80, &a, &f);
3138
3139 viv(j, 0, "eraEform", "j2", status);
3140 vvd(a, 6378137.0, 1e-10, "eraEform", "a2", status);
3141 vvd(f, 0.0033528106811823189, 1e-18, "eraEform", "f2", status);
3142
3143 j = eraEform(ERFA_WGS72, &a, &f);
3144
3145 viv(j, 0, "eraEform", "j2", status);
3146 vvd(a, 6378135.0, 1e-10, "eraEform", "a3", status);
3147 vvd(f, 0.0033527794541675049, 1e-18, "eraEform", "f3", status);
3148
3149 j = eraEform(4, &a, &f);
3150 viv(j, -1, "eraEform", "j3", status);
3151}
3152
3153static void t_eo06a(int *status)
3154/*
3155** - - - - - - - -
3156** t _ e o 0 6 a
3157** - - - - - - - -
3158**
3159** Test eraEo06a function.
3160**
3161** Returned:
3162** status int FALSE = success, TRUE = fail
3163**
3164** Called: eraEo06a, vvd
3165**
3166** This revision: 2013 August 7
3167*/
3168{
3169 double eo;
3170
3171
3172 eo = eraEo06a(2400000.5, 53736.0);
3173
3174 vvd(eo, -0.1332882371941833644e-2, 1e-15, "eraEo06a", "", status);
3175
3176}
3177
3178static void t_eors(int *status)
3179/*
3180** - - - - - - -
3181** t _ e o r s
3182** - - - - - - -
3183**
3184** Test eraEors function.
3185**
3186** Returned:
3187** status int FALSE = success, TRUE = fail
3188**
3189** Called: eraEors, vvd
3190**
3191** This revision: 2013 August 7
3192*/
3193{
3194 double rnpb[3][3], s, eo;
3195
3196
3197 rnpb[0][0] = 0.9999989440476103608;
3198 rnpb[0][1] = -0.1332881761240011518e-2;
3199 rnpb[0][2] = -0.5790767434730085097e-3;
3200
3201 rnpb[1][0] = 0.1332858254308954453e-2;
3202 rnpb[1][1] = 0.9999991109044505944;
3203 rnpb[1][2] = -0.4097782710401555759e-4;
3204
3205 rnpb[2][0] = 0.5791308472168153320e-3;
3206 rnpb[2][1] = 0.4020595661593994396e-4;
3207 rnpb[2][2] = 0.9999998314954572365;
3208
3209 s = -0.1220040848472271978e-7;
3210
3211 eo = eraEors(rnpb, s);
3212
3213 vvd(eo, -0.1332882715130744606e-2, 1e-14, "eraEors", "", status);
3214
3215}
3216
3217static void t_epb(int *status)
3218/*
3219** - - - - - -
3220** t _ e p b
3221** - - - - - -
3222**
3223** Test eraEpb function.
3224**
3225** Returned:
3226** status int FALSE = success, TRUE = fail
3227**
3228** Called: eraEpb, vvd
3229**
3230** This revision: 2013 August 7
3231*/
3232{
3233 double epb;
3234
3235
3236 epb = eraEpb(2415019.8135, 30103.18648);
3237
3238 vvd(epb, 1982.418424159278580, 1e-12, "eraEpb", "", status);
3239
3240}
3241
3242static void t_epb2jd(int *status)
3243/*
3244** - - - - - - - - -
3245** t _ e p b 2 j d
3246** - - - - - - - - -
3247**
3248** Test eraEpb2jd function.
3249**
3250** Returned:
3251** status int FALSE = success, TRUE = fail
3252**
3253** Called: eraEpb2jd, vvd
3254**
3255** This revision: 2013 August 7
3256*/
3257{
3258 double epb, djm0, djm;
3259
3260
3261 epb = 1957.3;
3262
3263 eraEpb2jd(epb, &djm0, &djm);
3264
3265 vvd(djm0, 2400000.5, 1e-9, "eraEpb2jd", "djm0", status);
3266 vvd(djm, 35948.1915101513, 1e-9, "eraEpb2jd", "mjd", status);
3267
3268}
3269
3270static void t_epj(int *status)
3271/*
3272** - - - - - -
3273** t _ e p j
3274** - - - - - -
3275**
3276** Test eraEpj function.
3277**
3278** Returned:
3279** status int FALSE = success, TRUE = fail
3280**
3281** Called: eraEpj, vvd
3282**
3283** This revision: 2013 August 7
3284*/
3285{
3286 double epj;
3287
3288
3289 epj = eraEpj(2451545, -7392.5);
3290
3291 vvd(epj, 1979.760438056125941, 1e-12, "eraEpj", "", status);
3292
3293}
3294
3295static void t_epj2jd(int *status)
3296/*
3297** - - - - - - - - -
3298** t _ e p j 2 j d
3299** - - - - - - - - -
3300**
3301** Test eraEpj2jd function.
3302**
3303** Returned:
3304** status int FALSE = success, TRUE = fail
3305**
3306** Called: eraEpj2jd, vvd
3307**
3308** This revision: 2013 August 7
3309*/
3310{
3311 double epj, djm0, djm;
3312
3313
3314 epj = 1996.8;
3315
3316 eraEpj2jd(epj, &djm0, &djm);
3317
3318 vvd(djm0, 2400000.5, 1e-9, "eraEpj2jd", "djm0", status);
3319 vvd(djm, 50375.7, 1e-9, "eraEpj2jd", "mjd", status);
3320
3321}
3322
3323static void t_epv00(int *status)
3324/*
3325** - - - - - - - -
3326** t _ e p v 0 0
3327** - - - - - - - -
3328**
3329** Test eraEpv00 function.
3330**
3331** Returned:
3332** status int FALSE = success, TRUE = fail
3333**
3334** Called: eraEpv00, vvd, viv
3335**
3336** This revision: 2013 August 7
3337*/
3338{
3339 double pvh[2][3], pvb[2][3];
3340 int j;
3341
3342
3343 j = eraEpv00(2400000.5, 53411.52501161, pvh, pvb);
3344
3345 vvd(pvh[0][0], -0.7757238809297706813, 1e-14,
3346 "eraEpv00", "ph(x)", status);
3347 vvd(pvh[0][1], 0.5598052241363340596, 1e-14,
3348 "eraEpv00", "ph(y)", status);
3349 vvd(pvh[0][2], 0.2426998466481686993, 1e-14,
3350 "eraEpv00", "ph(z)", status);
3351
3352 vvd(pvh[1][0], -0.1091891824147313846e-1, 1e-15,
3353 "eraEpv00", "vh(x)", status);
3354 vvd(pvh[1][1], -0.1247187268440845008e-1, 1e-15,
3355 "eraEpv00", "vh(y)", status);
3356 vvd(pvh[1][2], -0.5407569418065039061e-2, 1e-15,
3357 "eraEpv00", "vh(z)", status);
3358
3359 vvd(pvb[0][0], -0.7714104440491111971, 1e-14,
3360 "eraEpv00", "pb(x)", status);
3361 vvd(pvb[0][1], 0.5598412061824171323, 1e-14,
3362 "eraEpv00", "pb(y)", status);
3363 vvd(pvb[0][2], 0.2425996277722452400, 1e-14,
3364 "eraEpv00", "pb(z)", status);
3365
3366 vvd(pvb[1][0], -0.1091874268116823295e-1, 1e-15,
3367 "eraEpv00", "vb(x)", status);
3368 vvd(pvb[1][1], -0.1246525461732861538e-1, 1e-15,
3369 "eraEpv00", "vb(y)", status);
3370 vvd(pvb[1][2], -0.5404773180966231279e-2, 1e-15,
3371 "eraEpv00", "vb(z)", status);
3372
3373 viv(j, 0, "eraEpv00", "j", status);
3374
3375}
3376
3377static void t_eqeq94(int *status)
3378/*
3379** - - - - - - - - -
3380** t _ e q e q 9 4
3381** - - - - - - - - -
3382**
3383** Test eraEqeq94 function.
3384**
3385** Returned:
3386** status int FALSE = success, TRUE = fail
3387**
3388** Called: eraEqeq94, vvd
3389**
3390** This revision: 2013 August 7
3391*/
3392{
3393 double eqeq;
3394
3395
3396 eqeq = eraEqeq94(2400000.5, 41234.0);
3397
3398 vvd(eqeq, 0.5357758254609256894e-4, 1e-17, "eraEqeq94", "", status);
3399
3400}
3401
3402static void t_era00(int *status)
3403/*
3404** - - - - - - - -
3405** t _ e r a 0 0
3406** - - - - - - - -
3407**
3408** Test eraEra00 function.
3409**
3410** Returned:
3411** status int FALSE = success, TRUE = fail
3412**
3413** Called: eraEra00, vvd
3414**
3415** This revision: 2013 August 7
3416*/
3417{
3418 double era00;
3419
3420
3421 era00 = eraEra00(2400000.5, 54388.0);
3422
3423 vvd(era00, 0.4022837240028158102, 1e-12, "eraEra00", "", status);
3424
3425}
3426
3427static void t_fad03(int *status)
3428/*
3429** - - - - - - - -
3430** t _ f a d 0 3
3431** - - - - - - - -
3432**
3433** Test eraFad03 function.
3434**
3435** Returned:
3436** status int FALSE = success, TRUE = fail
3437**
3438** Called: eraFad03, vvd
3439**
3440** This revision: 2013 August 7
3441*/
3442{
3443 vvd(eraFad03(0.80), 1.946709205396925672, 1e-12,
3444 "eraFad03", "", status);
3445}
3446
3447static void t_fae03(int *status)
3448/*
3449** - - - - - - - -
3450** t _ f a e 0 3
3451** - - - - - - - -
3452**
3453** Test eraFae03 function.
3454**
3455** Returned:
3456** status int FALSE = success, TRUE = fail
3457**
3458** Called: eraFae03, vvd
3459**
3460** This revision: 2013 August 7
3461*/
3462{
3463 vvd(eraFae03(0.80), 1.744713738913081846, 1e-12,
3464 "eraFae03", "", status);
3465}
3466
3467static void t_faf03(int *status)
3468/*
3469** - - - - - - - -
3470** t _ f a f 0 3
3471** - - - - - - - -
3472**
3473** Test eraFaf03 function.
3474**
3475** Returned:
3476** status int FALSE = success, TRUE = fail
3477**
3478** Called: eraFaf03, vvd
3479**
3480** This revision: 2013 August 7
3481*/
3482{
3483 vvd(eraFaf03(0.80), 0.2597711366745499518, 1e-12,
3484 "eraFaf03", "", status);
3485}
3486
3487static void t_faju03(int *status)
3488/*
3489** - - - - - - - - -
3490** t _ f a j u 0 3
3491** - - - - - - - - -
3492**
3493** Test eraFaju03 function.
3494**
3495** Returned:
3496** status int FALSE = success, TRUE = fail
3497**
3498** Called: eraFaju03, vvd
3499**
3500** This revision: 2013 August 7
3501*/
3502{
3503 vvd(eraFaju03(0.80), 5.275711665202481138, 1e-12,
3504 "eraFaju03", "", status);
3505}
3506
3507static void t_fal03(int *status)
3508/*
3509** - - - - - - - -
3510** t _ f a l 0 3
3511** - - - - - - - -
3512**
3513** Test eraFal03 function.
3514**
3515** Returned:
3516** status int FALSE = success, TRUE = fail
3517**
3518** Called: eraFal03, vvd
3519**
3520** This revision: 2013 August 7
3521*/
3522{
3523 vvd(eraFal03(0.80), 5.132369751108684150, 1e-12,
3524 "eraFal03", "", status);
3525}
3526
3527static void t_falp03(int *status)
3528/*
3529** - - - - - - - - -
3530** t _ f a l p 0 3
3531** - - - - - - - - -
3532**
3533** Test eraFalp03 function.
3534**
3535** Returned:
3536** status int FALSE = success, TRUE = fail
3537**
3538** Called: eraFalp03, vvd
3539**
3540** This revision: 2013 August 7
3541*/
3542{
3543 vvd(eraFalp03(0.80), 6.226797973505507345, 1e-12,
3544 "eraFalp03", "", status);
3545}
3546
3547static void t_fama03(int *status)
3548/*
3549** - - - - - - - - -
3550** t _ f a m a 0 3
3551** - - - - - - - - -
3552**
3553** Test eraFama03 function.
3554**
3555** Returned:
3556** status int FALSE = success, TRUE = fail
3557**
3558** Called: eraFama03, vvd
3559**
3560** This revision: 2013 August 7
3561*/
3562{
3563 vvd(eraFama03(0.80), 3.275506840277781492, 1e-12,
3564 "eraFama03", "", status);
3565}
3566
3567static void t_fame03(int *status)
3568/*
3569** - - - - - - - - -
3570** t _ f a m e 0 3
3571** - - - - - - - - -
3572**
3573** Test eraFame03 function.
3574**
3575** Returned:
3576** status int FALSE = success, TRUE = fail
3577**
3578** Called: eraFame03, vvd
3579**
3580** This revision: 2013 August 7
3581*/
3582{
3583 vvd(eraFame03(0.80), 5.417338184297289661, 1e-12,
3584 "eraFame03", "", status);
3585}
3586
3587static void t_fane03(int *status)
3588/*
3589** - - - - - - - - -
3590** t _ f a n e 0 3
3591** - - - - - - - - -
3592**
3593** Test eraFane03 function.
3594**
3595** Returned:
3596** status int FALSE = success, TRUE = fail
3597**
3598** Called: eraFane03, vvd
3599**
3600** This revision: 2013 August 7
3601*/
3602{
3603 vvd(eraFane03(0.80), 2.079343830860413523, 1e-12,
3604 "eraFane03", "", status);
3605}
3606
3607static void t_faom03(int *status)
3608/*
3609** - - - - - - - - -
3610** t _ f a o m 0 3
3611** - - - - - - - - -
3612**
3613** Test eraFaom03 function.
3614**
3615** Returned:
3616** status int FALSE = success, TRUE = fail
3617**
3618** Called: eraFaom03, vvd
3619**
3620** This revision: 2013 August 7
3621*/
3622{
3623 vvd(eraFaom03(0.80), -5.973618440951302183, 1e-12,
3624 "eraFaom03", "", status);
3625}
3626
3627static void t_fapa03(int *status)
3628/*
3629** - - - - - - - - -
3630** t _ f a p a 0 3
3631** - - - - - - - - -
3632**
3633** Test eraFapa03 function.
3634**
3635** Returned:
3636** status int FALSE = success, TRUE = fail
3637**
3638** Called: eraFapa03, vvd
3639**
3640** This revision: 2013 August 7
3641*/
3642{
3643 vvd(eraFapa03(0.80), 0.1950884762240000000e-1, 1e-12,
3644 "eraFapa03", "", status);
3645}
3646
3647static void t_fasa03(int *status)
3648/*
3649** - - - - - - - - -
3650** t _ f a s a 0 3
3651** - - - - - - - - -
3652**
3653** Test eraFasa03 function.
3654**
3655** Returned:
3656** status int FALSE = success, TRUE = fail
3657**
3658** Called: eraFasa03, vvd
3659**
3660** This revision: 2013 August 7
3661*/
3662{
3663 vvd(eraFasa03(0.80), 5.371574539440827046, 1e-12,
3664 "eraFasa03", "", status);
3665}
3666
3667static void t_faur03(int *status)
3668/*
3669** - - - - - - - - -
3670** t _ f a u r 0 3
3671** - - - - - - - - -
3672**
3673** Test eraFaur03 function.
3674**
3675** Returned:
3676** status int FALSE = success, TRUE = fail
3677**
3678** Called: eraFaur03, vvd
3679**
3680** This revision: 2013 August 7
3681*/
3682{
3683 vvd(eraFaur03(0.80), 5.180636450180413523, 1e-12,
3684 "eraFaur03", "", status);
3685}
3686
3687static void t_fave03(int *status)
3688/*
3689** - - - - - - - - -
3690** t _ f a v e 0 3
3691** - - - - - - - - -
3692**
3693** Test eraFave03 function.
3694**
3695** Returned:
3696** status int FALSE = success, TRUE = fail
3697**
3698** Called: eraFave03, vvd
3699**
3700** This revision: 2013 August 7
3701*/
3702{
3703 vvd(eraFave03(0.80), 3.424900460533758000, 1e-12,
3704 "eraFave03", "", status);
3705}
3706
3707static void t_fk52h(int *status)
3708/*
3709** - - - - - - - -
3710** t _ f k 5 2 h
3711** - - - - - - - -
3712**
3713** Test eraFk52h function.
3714**
3715** Returned:
3716** status int FALSE = success, TRUE = fail
3717**
3718** Called: eraFk52h, vvd
3719**
3720** This revision: 2013 August 7
3721*/
3722{
3723 double r5, d5, dr5, dd5, px5, rv5, rh, dh, drh, ddh, pxh, rvh;
3724
3725
3726 r5 = 1.76779433;
3727 d5 = -0.2917517103;
3728 dr5 = -1.91851572e-7;
3729 dd5 = -5.8468475e-6;
3730 px5 = 0.379210;
3731 rv5 = -7.6;
3732
3733 eraFk52h(r5, d5, dr5, dd5, px5, rv5,
3734 &rh, &dh, &drh, &ddh, &pxh, &rvh);
3735
3736 vvd(rh, 1.767794226299947632, 1e-14,
3737 "eraFk52h", "ra", status);
3738 vvd(dh, -0.2917516070530391757, 1e-14,
3739 "eraFk52h", "dec", status);
3740 vvd(drh, -0.19618741256057224e-6,1e-19,
3741 "eraFk52h", "dr5", status);
3742 vvd(ddh, -0.58459905176693911e-5, 1e-19,
3743 "eraFk52h", "dd5", status);
3744 vvd(pxh, 0.37921, 1e-14,
3745 "eraFk52h", "px", status);
3746 vvd(rvh, -7.6000000940000254, 1e-11,
3747 "eraFk52h", "rv", status);
3748
3749}
3750
3751static void t_fk5hip(int *status)
3752/*
3753** - - - - - - - - -
3754** t _ f k 5 h i p
3755** - - - - - - - - -
3756**
3757** Test eraFk5hip function.
3758**
3759** Returned:
3760** status int FALSE = success, TRUE = fail
3761**
3762** Called: eraFk5hip, vvd
3763**
3764** This revision: 2013 August 7
3765*/
3766{
3767 double r5h[3][3], s5h[3];
3768
3769
3770 eraFk5hip(r5h, s5h);
3771
3772 vvd(r5h[0][0], 0.9999999999999928638, 1e-14,
3773 "eraFk5hip", "11", status);
3774 vvd(r5h[0][1], 0.1110223351022919694e-6, 1e-17,
3775 "eraFk5hip", "12", status);
3776 vvd(r5h[0][2], 0.4411803962536558154e-7, 1e-17,
3777 "eraFk5hip", "13", status);
3778 vvd(r5h[1][0], -0.1110223308458746430e-6, 1e-17,
3779 "eraFk5hip", "21", status);
3780 vvd(r5h[1][1], 0.9999999999999891830, 1e-14,
3781 "eraFk5hip", "22", status);
3782 vvd(r5h[1][2], -0.9647792498984142358e-7, 1e-17,
3783 "eraFk5hip", "23", status);
3784 vvd(r5h[2][0], -0.4411805033656962252e-7, 1e-17,
3785 "eraFk5hip", "31", status);
3786 vvd(r5h[2][1], 0.9647792009175314354e-7, 1e-17,
3787 "eraFk5hip", "32", status);
3788 vvd(r5h[2][2], 0.9999999999999943728, 1e-14,
3789 "eraFk5hip", "33", status);
3790 vvd(s5h[0], -0.1454441043328607981e-8, 1e-17,
3791 "eraFk5hip", "s1", status);
3792 vvd(s5h[1], 0.2908882086657215962e-8, 1e-17,
3793 "eraFk5hip", "s2", status);
3794 vvd(s5h[2], 0.3393695767766751955e-8, 1e-17,
3795 "eraFk5hip", "s3", status);
3796
3797}
3798
3799static void t_fk5hz(int *status)
3800/*
3801** - - - - - - - -
3802** t _ f k 5 h z
3803** - - - - - - - -
3804**
3805** Test eraFk5hz function.
3806**
3807** Returned:
3808** status int FALSE = success, TRUE = fail
3809**
3810** Called: eraFk5hz, vvd
3811**
3812** This revision: 2013 August 7
3813*/
3814{
3815 double r5, d5, rh, dh;
3816
3817
3818 r5 = 1.76779433;
3819 d5 = -0.2917517103;
3820
3821 eraFk5hz(r5, d5, 2400000.5, 54479.0, &rh, &dh);
3822
3823 vvd(rh, 1.767794191464423978, 1e-12, "eraFk5hz", "ra", status);
3824 vvd(dh, -0.2917516001679884419, 1e-12, "eraFk5hz", "dec", status);
3825
3826}
3827
3828static void t_fw2m(int *status)
3829/*
3830** - - - - - - -
3831** t _ f w 2 m
3832** - - - - - - -
3833**
3834** Test eraFw2m function.
3835**
3836** Returned:
3837** status int FALSE = success, TRUE = fail
3838**
3839** Called: eraFw2m, vvd
3840**
3841** This revision: 2013 August 7
3842*/
3843{
3844 double gamb, phib, psi, eps, r[3][3];
3845
3846
3847 gamb = -0.2243387670997992368e-5;
3848 phib = 0.4091014602391312982;
3849 psi = -0.9501954178013015092e-3;
3850 eps = 0.4091014316587367472;
3851
3852 eraFw2m(gamb, phib, psi, eps, r);
3853
3854 vvd(r[0][0], 0.9999995505176007047, 1e-12,
3855 "eraFw2m", "11", status);
3856 vvd(r[0][1], 0.8695404617348192957e-3, 1e-12,
3857 "eraFw2m", "12", status);
3858 vvd(r[0][2], 0.3779735201865582571e-3, 1e-12,
3859 "eraFw2m", "13", status);
3860
3861 vvd(r[1][0], -0.8695404723772016038e-3, 1e-12,
3862 "eraFw2m", "21", status);
3863 vvd(r[1][1], 0.9999996219496027161, 1e-12,
3864 "eraFw2m", "22", status);
3865 vvd(r[1][2], -0.1361752496887100026e-6, 1e-12,
3866 "eraFw2m", "23", status);
3867
3868 vvd(r[2][0], -0.3779734957034082790e-3, 1e-12,
3869 "eraFw2m", "31", status);
3870 vvd(r[2][1], -0.1924880848087615651e-6, 1e-12,
3871 "eraFw2m", "32", status);
3872 vvd(r[2][2], 0.9999999285679971958, 1e-12,
3873 "eraFw2m", "33", status);
3874
3875}
3876
3877static void t_fw2xy(int *status)
3878/*
3879** - - - - - - - -
3880** t _ f w 2 x y
3881** - - - - - - - -
3882**
3883** Test eraFw2xy function.
3884**
3885** Returned:
3886** status int FALSE = success, TRUE = fail
3887**
3888** Called: eraFw2xy, vvd
3889**
3890** This revision: 2013 August 7
3891*/
3892{
3893 double gamb, phib, psi, eps, x, y;
3894
3895
3896 gamb = -0.2243387670997992368e-5;
3897 phib = 0.4091014602391312982;
3898 psi = -0.9501954178013015092e-3;
3899 eps = 0.4091014316587367472;
3900
3901 eraFw2xy(gamb, phib, psi, eps, &x, &y);
3902
3903 vvd(x, -0.3779734957034082790e-3, 1e-14, "eraFw2xy", "x", status);
3904 vvd(y, -0.1924880848087615651e-6, 1e-14, "eraFw2xy", "y", status);
3905
3906}
3907
3908static void t_g2icrs(int *status)
3909/*
3910** - - - - - - - - -
3911** t _ g 2 i c r s
3912** - - - - - - - - -
3913**
3914** Test eraG2icrs function.
3915**
3916** Returned:
3917** status int FALSE = success, TRUE = fail
3918**
3919** Called: eraG2icrs, vvd
3920**
3921** This revision: 2015 January 30
3922*/
3923{
3924 double dl, db, dr, dd;
3925
3926
3927 dl = 5.5850536063818546461558105;
3928 db = -0.7853981633974483096156608;
3929 eraG2icrs (dl, db, &dr, &dd);
3930 vvd(dr, 5.9338074302227188048671, 1e-14, "eraG2icrs", "R", status);
3931 vvd(dd, -1.1784870613579944551541, 1e-14, "eraG2icrs", "D", status);
3932 }
3933
3934static void t_gc2gd(int *status)
3935/*
3936** - - - - - - - -
3937** t _ g c 2 g d
3938** - - - - - - - -
3939**
3940** Test eraGc2gd function.
3941**
3942** Returned:
3943** status int FALSE = success, TRUE = fail
3944**
3945** Called: eraGc2gd, viv, vvd
3946**
3947** This revision: 2013 August 7
3948*/
3949{
3950 int j;
3951 double xyz[] = {2e6, 3e6, 5.244e6};
3952 double e, p, h;
3953
3954 j = eraGc2gd(0, xyz, &e, &p, &h);
3955
3956 viv(j, -1, "eraGc2gd", "j0", status);
3957
3958 j = eraGc2gd(ERFA_WGS84, xyz, &e, &p, &h);
3959
3960 viv(j, 0, "eraGc2gd", "j1", status);
3961 vvd(e, 0.98279372324732907, 1e-14, "eraGc2gd", "e1", status);
3962 vvd(p, 0.97160184819075459, 1e-14, "eraGc2gd", "p1", status);
3963 vvd(h, 331.41724614260599, 1e-8, "eraGc2gd", "h1", status);
3964
3965 j = eraGc2gd(ERFA_GRS80, xyz, &e, &p, &h);
3966
3967 viv(j, 0, "eraGc2gd", "j2", status);
3968 vvd(e, 0.98279372324732907, 1e-14, "eraGc2gd", "e2", status);
3969 vvd(p, 0.97160184820607853, 1e-14, "eraGc2gd", "p2", status);
3970 vvd(h, 331.41731754844348, 1e-8, "eraGc2gd", "h2", status);
3971
3972 j = eraGc2gd(ERFA_WGS72, xyz, &e, &p, &h);
3973
3974 viv(j, 0, "eraGc2gd", "j3", status);
3975 vvd(e, 0.98279372324732907, 1e-14, "eraGc2gd", "e3", status);
3976 vvd(p, 0.97160181811015119, 1e-14, "eraGc2gd", "p3", status);
3977 vvd(h, 333.27707261303181, 1e-8, "eraGc2gd", "h3", status);
3978
3979 j = eraGc2gd(4, xyz, &e, &p, &h);
3980
3981 viv(j, -1, "eraGc2gd", "j4", status);
3982}
3983
3984static void t_gc2gde(int *status)
3985/*
3986** - - - - - - - - -
3987** t _ g c 2 g d e
3988** - - - - - - - - -
3989**
3990** Test eraGc2gde function.
3991**
3992** Returned:
3993** status int FALSE = success, TRUE = fail
3994**
3995** Called: eraGc2gde, viv, vvd
3996**
3997** This revision: 2013 August 7
3998*/
3999{
4000 int j;
4001 double a = 6378136.0, f = 0.0033528;
4002 double xyz[] = {2e6, 3e6, 5.244e6};
4003 double e, p, h;
4004
4005 j = eraGc2gde(a, f, xyz, &e, &p, &h);
4006
4007 viv(j, 0, "eraGc2gde", "j", status);
4008 vvd(e, 0.98279372324732907, 1e-14, "eraGc2gde", "e", status);
4009 vvd(p, 0.97160183775704115, 1e-14, "eraGc2gde", "p", status);
4010 vvd(h, 332.36862495764397, 1e-8, "eraGc2gde", "h", status);
4011}
4012
4013static void t_gd2gc(int *status)
4014/*
4015** - - - - - - - -
4016** t _ g d 2 g c
4017** - - - - - - - -
4018**
4019** Test eraGd2gc function.
4020**
4021** Returned:
4022** status int FALSE = success, TRUE = fail
4023**
4024** Called: eraGd2gc, viv, vvd
4025**
4026** This revision: 2013 August 7
4027*/
4028{
4029 int j;
4030 double e = 3.1, p = -0.5, h = 2500.0;
4031 double xyz[3];
4032
4033 j = eraGd2gc(0, e, p, h, xyz);
4034
4035 viv(j, -1, "eraGd2gc", "j0", status);
4036
4037 j = eraGd2gc(ERFA_WGS84, e, p, h, xyz);
4038
4039 viv(j, 0, "eraGd2gc", "j1", status);
4040 vvd(xyz[0], -5599000.5577049947, 1e-7, "eraGd2gc", "0/1", status);
4041 vvd(xyz[1], 233011.67223479203, 1e-7, "eraGd2gc", "1/1", status);
4042 vvd(xyz[2], -3040909.4706983363, 1e-7, "eraGd2gc", "2/1", status);
4043
4044 j = eraGd2gc(ERFA_GRS80, e, p, h, xyz);
4045
4046 viv(j, 0, "eraGd2gc", "j2", status);
4047 vvd(xyz[0], -5599000.5577260984, 1e-7, "eraGd2gc", "0/2", status);
4048 vvd(xyz[1], 233011.6722356703, 1e-7, "eraGd2gc", "1/2", status);
4049 vvd(xyz[2], -3040909.4706095476, 1e-7, "eraGd2gc", "2/2", status);
4050
4051 j = eraGd2gc(ERFA_WGS72, e, p, h, xyz);
4052
4053 viv(j, 0, "eraGd2gc", "j3", status);
4054 vvd(xyz[0], -5598998.7626301490, 1e-7, "eraGd2gc", "0/3", status);
4055 vvd(xyz[1], 233011.5975297822, 1e-7, "eraGd2gc", "1/3", status);
4056 vvd(xyz[2], -3040908.6861467111, 1e-7, "eraGd2gc", "2/3", status);
4057
4058 j = eraGd2gc(4, e, p, h, xyz);
4059
4060 viv(j, -1, "eraGd2gc", "j4", status);
4061}
4062
4063static void t_gd2gce(int *status)
4064/*
4065** - - - - - - - - -
4066** t _ g d 2 g c e
4067** - - - - - - - - -
4068**
4069** Test eraGd2gce function.
4070**
4071** Returned:
4072** status int FALSE = success, TRUE = fail
4073**
4074** Called: eraGd2gce, viv, vvd
4075**
4076** This revision: 2013 August 7
4077*/
4078{
4079 int j;
4080 double a = 6378136.0, f = 0.0033528;
4081 double e = 3.1, p = -0.5, h = 2500.0;
4082 double xyz[3];
4083
4084 j = eraGd2gce(a, f, e, p, h, xyz);
4085
4086 viv(j, 0, "eraGd2gce", "j", status);
4087 vvd(xyz[0], -5598999.6665116328, 1e-7, "eraGd2gce", "0", status);
4088 vvd(xyz[1], 233011.63514630572, 1e-7, "eraGd2gce", "1", status);
4089 vvd(xyz[2], -3040909.0517314132, 1e-7, "eraGd2gce", "2", status);
4090}
4091
4092static void t_gmst00(int *status)
4093/*
4094** - - - - - - - - -
4095** t _ g m s t 0 0
4096** - - - - - - - - -
4097**
4098** Test eraGmst00 function.
4099**
4100** Returned:
4101** status int FALSE = success, TRUE = fail
4102**
4103** Called: eraGmst00, vvd
4104**
4105** This revision: 2013 August 7
4106*/
4107{
4108 double theta;
4109
4110
4111 theta = eraGmst00(2400000.5, 53736.0, 2400000.5, 53736.0);
4112
4113 vvd(theta, 1.754174972210740592, 1e-12, "eraGmst00", "", status);
4114
4115}
4116
4117static void t_gmst06(int *status)
4118/*
4119** - - - - - - - - -
4120** t _ g m s t 0 6
4121** - - - - - - - - -
4122**
4123** Test eraGmst06 function.
4124**
4125** Returned:
4126** status int FALSE = success, TRUE = fail
4127**
4128** Called: eraGmst06, vvd
4129**
4130** This revision: 2013 August 7
4131*/
4132{
4133 double theta;
4134
4135
4136 theta = eraGmst06(2400000.5, 53736.0, 2400000.5, 53736.0);
4137
4138 vvd(theta, 1.754174971870091203, 1e-12, "eraGmst06", "", status);
4139
4140}
4141
4142static void t_gmst82(int *status)
4143/*
4144** - - - - - - - - -
4145** t _ g m s t 8 2
4146** - - - - - - - - -
4147**
4148** Test eraGmst82 function.
4149**
4150** Returned:
4151** status int FALSE = success, TRUE = fail
4152**
4153** Called: eraGmst82, vvd
4154**
4155** This revision: 2013 August 7
4156*/
4157{
4158 double theta;
4159
4160
4161 theta = eraGmst82(2400000.5, 53736.0);
4162
4163 vvd(theta, 1.754174981860675096, 1e-12, "eraGmst82", "", status);
4164
4165}
4166
4167static void t_gst00a(int *status)
4168/*
4169** - - - - - - - - -
4170** t _ g s t 0 0 a
4171** - - - - - - - - -
4172**
4173** Test eraGst00a function.
4174**
4175** Returned:
4176** status int FALSE = success, TRUE = fail
4177**
4178** Called: eraGst00a, vvd
4179**
4180** This revision: 2013 August 7
4181*/
4182{
4183 double theta;
4184
4185
4186 theta = eraGst00a(2400000.5, 53736.0, 2400000.5, 53736.0);
4187
4188 vvd(theta, 1.754166138018281369, 1e-12, "eraGst00a", "", status);
4189
4190}
4191
4192static void t_gst00b(int *status)
4193/*
4194** - - - - - - - - -
4195** t _ g s t 0 0 b
4196** - - - - - - - - -
4197**
4198** Test eraGst00b function.
4199**
4200** Returned:
4201** status int FALSE = success, TRUE = fail
4202**
4203** Called: eraGst00b, vvd
4204**
4205** This revision: 2013 August 7
4206*/
4207{
4208 double theta;
4209
4210
4211 theta = eraGst00b(2400000.5, 53736.0);
4212
4213 vvd(theta, 1.754166136510680589, 1e-12, "eraGst00b", "", status);
4214
4215}
4216
4217static void t_gst06(int *status)
4218/*
4219** - - - - - - - -
4220** t _ g s t 0 6
4221** - - - - - - - -
4222**
4223** Test eraGst06 function.
4224**
4225** Returned:
4226** status int FALSE = success, TRUE = fail
4227**
4228** Called: eraGst06, vvd
4229**
4230** This revision: 2013 August 7
4231*/
4232{
4233 double rnpb[3][3], theta;
4234
4235
4236 rnpb[0][0] = 0.9999989440476103608;
4237 rnpb[0][1] = -0.1332881761240011518e-2;
4238 rnpb[0][2] = -0.5790767434730085097e-3;
4239
4240 rnpb[1][0] = 0.1332858254308954453e-2;
4241 rnpb[1][1] = 0.9999991109044505944;
4242 rnpb[1][2] = -0.4097782710401555759e-4;
4243
4244 rnpb[2][0] = 0.5791308472168153320e-3;
4245 rnpb[2][1] = 0.4020595661593994396e-4;
4246 rnpb[2][2] = 0.9999998314954572365;
4247
4248 theta = eraGst06(2400000.5, 53736.0, 2400000.5, 53736.0, rnpb);
4249
4250 vvd(theta, 1.754166138018167568, 1e-12, "eraGst06", "", status);
4251
4252}
4253
4254static void t_gst06a(int *status)
4255/*
4256** - - - - - - - - -
4257** t _ g s t 0 6 a
4258** - - - - - - - - -
4259**
4260** Test eraGst06a function.
4261**
4262** Returned:
4263** status int FALSE = success, TRUE = fail
4264**
4265** Called: eraGst06a, vvd
4266**
4267** This revision: 2013 August 7
4268*/
4269{
4270 double theta;
4271
4272
4273 theta = eraGst06a(2400000.5, 53736.0, 2400000.5, 53736.0);
4274
4275 vvd(theta, 1.754166137675019159, 1e-12, "eraGst06a", "", status);
4276
4277}
4278
4279static void t_gst94(int *status)
4280/*
4281** - - - - - - - -
4282** t _ g s t 9 4
4283** - - - - - - - -
4284**
4285** Test eraGst94 function.
4286**
4287** Returned:
4288** status int FALSE = success, TRUE = fail
4289**
4290** Called: eraGst94, vvd
4291**
4292** This revision: 2013 August 7
4293*/
4294{
4295 double theta;
4296
4297
4298 theta = eraGst94(2400000.5, 53736.0);
4299
4300 vvd(theta, 1.754166136020645203, 1e-12, "eraGst94", "", status);
4301
4302}
4303
4304static void t_icrs2g(int *status)
4305/*
4306** - - - - - - - - -
4307** t _ i c r s 2 g
4308** - - - - - - - - -
4309**
4310** Test eraIcrs2g function.
4311**
4312** Returned:
4313** status int FALSE = success, TRUE = fail
4314**
4315** Called: eraIcrs2g, vvd
4316**
4317** This revision: 2015 January 30
4318*/
4319{
4320 double dr, dd, dl, db;
4321
4322 dr = 5.9338074302227188048671087;
4323 dd = -1.1784870613579944551540570;
4324 eraIcrs2g (dr, dd, &dl, &db);
4325 vvd(dl, 5.5850536063818546461558, 1e-14, "eraIcrs2g", "L", status);
4326 vvd(db, -0.7853981633974483096157, 1e-14, "eraIcrs2g", "B", status);
4327 }
4328
4329static void t_h2fk5(int *status)
4330/*
4331** - - - - - - - -
4332** t _ h 2 f k 5
4333** - - - - - - - -
4334**
4335** Test eraH2fk5 function.
4336**
4337** Returned:
4338** status int FALSE = success, TRUE = fail
4339**
4340** Called: eraH2fk5, vvd
4341**
4342** This revision: 2013 August 7
4343*/
4344{
4345 double rh, dh, drh, ddh, pxh, rvh, r5, d5, dr5, dd5, px5, rv5;
4346
4347
4348 rh = 1.767794352;
4349 dh = -0.2917512594;
4350 drh = -2.76413026e-6;
4351 ddh = -5.92994449e-6;
4352 pxh = 0.379210;
4353 rvh = -7.6;
4354
4355 eraH2fk5(rh, dh, drh, ddh, pxh, rvh,
4356 &r5, &d5, &dr5, &dd5, &px5, &rv5);
4357
4358 vvd(r5, 1.767794455700065506, 1e-13,
4359 "eraH2fk5", "ra", status);
4360 vvd(d5, -0.2917513626469638890, 1e-13,
4361 "eraH2fk5", "dec", status);
4362 vvd(dr5, -0.27597945024511204e-5, 1e-18,
4363 "eraH2fk5", "dr5", status);
4364 vvd(dd5, -0.59308014093262838e-5, 1e-18,
4365 "eraH2fk5", "dd5", status);
4366 vvd(px5, 0.37921, 1e-13,
4367 "eraH2fk5", "px", status);
4368 vvd(rv5, -7.6000001309071126, 1e-10,
4369 "eraH2fk5", "rv", status);
4370
4371}
4372
4373static void t_hfk5z(int *status)
4374/*
4375** - - - - - - - -
4376** t _ h f k 5 z
4377** - - - - - - - -
4378**
4379** Test eraHfk5z function.
4380**
4381** Returned:
4382** status int FALSE = success, TRUE = fail
4383**
4384** Called: eraHfk5z, vvd
4385**
4386** This revision: 2013 August 7
4387*/
4388{
4389 double rh, dh, r5, d5, dr5, dd5;
4390
4391
4392
4393 rh = 1.767794352;
4394 dh = -0.2917512594;
4395
4396 eraHfk5z(rh, dh, 2400000.5, 54479.0, &r5, &d5, &dr5, &dd5);
4397
4398 vvd(r5, 1.767794490535581026, 1e-13,
4399 "eraHfk5z", "ra", status);
4400 vvd(d5, -0.2917513695320114258, 1e-14,
4401 "eraHfk5z", "dec", status);
4402 vvd(dr5, 0.4335890983539243029e-8, 1e-22,
4403 "eraHfk5z", "dr5", status);
4404 vvd(dd5, -0.8569648841237745902e-9, 1e-23,
4405 "eraHfk5z", "dd5", status);
4406
4407}
4408
4409static void t_ir(int *status)
4410/*
4411** - - - - -
4412** t _ i r
4413** - - - - -
4414**
4415** Test eraIr function.
4416**
4417** Returned:
4418** status int FALSE = success, TRUE = fail
4419**
4420** Called: eraIr, vvd
4421**
4422** This revision: 2013 August 7
4423*/
4424{
4425 double r[3][3];
4426
4427
4428 r[0][0] = 2.0;
4429 r[0][1] = 3.0;
4430 r[0][2] = 2.0;
4431
4432 r[1][0] = 3.0;
4433 r[1][1] = 2.0;
4434 r[1][2] = 3.0;
4435
4436 r[2][0] = 3.0;
4437 r[2][1] = 4.0;
4438 r[2][2] = 5.0;
4439
4440 eraIr(r);
4441
4442 vvd(r[0][0], 1.0, 0.0, "eraIr", "11", status);
4443 vvd(r[0][1], 0.0, 0.0, "eraIr", "12", status);
4444 vvd(r[0][2], 0.0, 0.0, "eraIr", "13", status);
4445
4446 vvd(r[1][0], 0.0, 0.0, "eraIr", "21", status);
4447 vvd(r[1][1], 1.0, 0.0, "eraIr", "22", status);
4448 vvd(r[1][2], 0.0, 0.0, "eraIr", "23", status);
4449
4450 vvd(r[2][0], 0.0, 0.0, "eraIr", "31", status);
4451 vvd(r[2][1], 0.0, 0.0, "eraIr", "32", status);
4452 vvd(r[2][2], 1.0, 0.0, "eraIr", "33", status);
4453
4454}
4455
4456static void t_jd2cal(int *status)
4457/*
4458** - - - - - - - - -
4459** t _ j d 2 c a l
4460** - - - - - - - - -
4461**
4462** Test eraJd2cal function.
4463**
4464** Returned:
4465** status int FALSE = success, TRUE = fail
4466**
4467** Called: eraJd2cal, viv, vvd
4468**
4469** This revision: 2013 August 7
4470*/
4471{
4472 double dj1, dj2, fd;
4473 int iy, im, id, j;
4474
4475
4476 dj1 = 2400000.5;
4477 dj2 = 50123.9999;
4478
4479 j = eraJd2cal(dj1, dj2, &iy, &im, &id, &fd);
4480
4481 viv(iy, 1996, "eraJd2cal", "y", status);
4482 viv(im, 2, "eraJd2cal", "m", status);
4483 viv(id, 10, "eraJd2cal", "d", status);
4484 vvd(fd, 0.9999, 1e-7, "eraJd2cal", "fd", status);
4485 viv(j, 0, "eraJd2cal", "j", status);
4486
4487}
4488
4489static void t_jdcalf(int *status)
4490/*
4491** - - - - - - - - -
4492** t _ j d c a l f
4493** - - - - - - - - -
4494**
4495** Test eraJdcalf function.
4496**
4497** Returned:
4498** status int FALSE = success, TRUE = fail
4499**
4500** Called: eraJdcalf, viv
4501**
4502** This revision: 2013 August 7
4503*/
4504{
4505 double dj1, dj2;
4506 int iydmf[4], j;
4507
4508
4509 dj1 = 2400000.5;
4510 dj2 = 50123.9999;
4511
4512 j = eraJdcalf(4, dj1, dj2, iydmf);
4513
4514 viv(iydmf[0], 1996, "eraJdcalf", "y", status);
4515 viv(iydmf[1], 2, "eraJdcalf", "m", status);
4516 viv(iydmf[2], 10, "eraJdcalf", "d", status);
4517 viv(iydmf[3], 9999, "eraJdcalf", "f", status);
4518
4519 viv(j, 0, "eraJdcalf", "j", status);
4520
4521}
4522
4523static void t_ld(int *status)
4524/*
4525** - - - - -
4526** t _ l d
4527** - - - - -
4528**
4529** Test eraLd function.
4530**
4531** Returned:
4532** status int FALSE = success, TRUE = fail
4533**
4534** Called: eraLd, vvd
4535*
4536** This revision: 2013 October 2
4537*/
4538{
4539 double bm, p[3], q[3], e[3], em, dlim, p1[3];
4540
4541
4542 bm = 0.00028574;
4543 p[0] = -0.763276255;
4544 p[1] = -0.608633767;
4545 p[2] = -0.216735543;
4546 q[0] = -0.763276255;
4547 q[1] = -0.608633767;
4548 q[2] = -0.216735543;
4549 e[0] = 0.76700421;
4550 e[1] = 0.605629598;
4551 e[2] = 0.211937094;
4552 em = 8.91276983;
4553 dlim = 3e-10;
4554
4555 eraLd(bm, p, q, e, em, dlim, p1);
4556
4557 vvd(p1[0], -0.7632762548968159627, 1e-12,
4558 "eraLd", "1", status);
4559 vvd(p1[1], -0.6086337670823762701, 1e-12,
4560 "eraLd", "2", status);
4561 vvd(p1[2], -0.2167355431320546947, 1e-12,
4562 "eraLd", "3", status);
4563
4564}
4565
4566static void t_ldn(int *status)
4567/*
4568** - - - - - -
4569** t _ l d n
4570** - - - - - -
4571**
4572** Test eraLdn function.
4573**
4574** Returned:
4575** status int FALSE = success, TRUE = fail
4576**
4577** Called: eraLdn, vvd
4578**
4579** This revision: 2013 October 2
4580*/
4581{
4582 int n;
4583 eraLDBODY b[3];
4584 double ob[3], sc[3], sn[3];
4585
4586
4587 n = 3;
4588 b[0].bm = 0.00028574;
4589 b[0].dl = 3e-10;
4590 b[0].pv[0][0] = -7.81014427;
4591 b[0].pv[0][1] = -5.60956681;
4592 b[0].pv[0][2] = -1.98079819;
4593 b[0].pv[1][0] = 0.0030723249;
4594 b[0].pv[1][1] = -0.00406995477;
4595 b[0].pv[1][2] = -0.00181335842;
4596 b[1].bm = 0.00095435;
4597 b[1].dl = 3e-9;
4598 b[1].pv[0][0] = 0.738098796;
4599 b[1].pv[0][1] = 4.63658692;
4600 b[1].pv[0][2] = 1.9693136;
4601 b[1].pv[1][0] = -0.00755816922;
4602 b[1].pv[1][1] = 0.00126913722;
4603 b[1].pv[1][2] = 0.000727999001;
4604 b[2].bm = 1.0;
4605 b[2].dl = 6e-6;
4606 b[2].pv[0][0] = -0.000712174377;
4607 b[2].pv[0][1] = -0.00230478303;
4608 b[2].pv[0][2] = -0.00105865966;
4609 b[2].pv[1][0] = 6.29235213e-6;
4610 b[2].pv[1][1] = -3.30888387e-7;
4611 b[2].pv[1][2] = -2.96486623e-7;
4612 ob[0] = -0.974170437;
4613 ob[1] = -0.2115201;
4614 ob[2] = -0.0917583114;
4615 sc[0] = -0.763276255;
4616 sc[1] = -0.608633767;
4617 sc[2] = -0.216735543;
4618
4619 eraLdn(n, b, ob, sc, sn);
4620
4621 vvd(sn[0], -0.7632762579693333866, 1e-12,
4622 "eraLdn", "1", status);
4623 vvd(sn[1], -0.6086337636093002660, 1e-12,
4624 "eraLdn", "2", status);
4625 vvd(sn[2], -0.2167355420646328159, 1e-12,
4626 "eraLdn", "3", status);
4627
4628}
4629
4630static void t_ldsun(int *status)
4631/*
4632** - - - - - - - -
4633** t _ l d s u n
4634** - - - - - - - -
4635**
4636** Test eraLdsun function.
4637**
4638** Returned:
4639** status int FALSE = success, TRUE = fail
4640**
4641** Called: eraLdsun, vvd
4642**
4643** This revision: 2013 October 2
4644*/
4645{
4646 double p[3], e[3], em, p1[3];
4647
4648
4649 p[0] = -0.763276255;
4650 p[1] = -0.608633767;
4651 p[2] = -0.216735543;
4652 e[0] = -0.973644023;
4653 e[1] = -0.20925523;
4654 e[2] = -0.0907169552;
4655 em = 0.999809214;
4656
4657 eraLdsun(p, e, em, p1);
4658
4659 vvd(p1[0], -0.7632762580731413169, 1e-12,
4660 "eraLdsun", "1", status);
4661 vvd(p1[1], -0.6086337635262647900, 1e-12,
4662 "eraLdsun", "2", status);
4663 vvd(p1[2], -0.2167355419322321302, 1e-12,
4664 "eraLdsun", "3", status);
4665
4666}
4667
4668static void t_num00a(int *status)
4669/*
4670** - - - - - - - - -
4671** t _ n u m 0 0 a
4672** - - - - - - - - -
4673**
4674** Test eraNum00a function.
4675**
4676** Returned:
4677** status int FALSE = success, TRUE = fail
4678**
4679** Called: eraNum00a, vvd
4680**
4681** This revision: 2013 August 7
4682*/
4683{
4684 double rmatn[3][3];
4685
4686
4687 eraNum00a(2400000.5, 53736.0, rmatn);
4688
4689 vvd(rmatn[0][0], 0.9999999999536227949, 1e-12,
4690 "eraNum00a", "11", status);
4691 vvd(rmatn[0][1], 0.8836238544090873336e-5, 1e-12,
4692 "eraNum00a", "12", status);
4693 vvd(rmatn[0][2], 0.3830835237722400669e-5, 1e-12,
4694 "eraNum00a", "13", status);
4695
4696 vvd(rmatn[1][0], -0.8836082880798569274e-5, 1e-12,
4697 "eraNum00a", "21", status);
4698 vvd(rmatn[1][1], 0.9999999991354655028, 1e-12,
4699 "eraNum00a", "22", status);
4700 vvd(rmatn[1][2], -0.4063240865362499850e-4, 1e-12,
4701 "eraNum00a", "23", status);
4702
4703 vvd(rmatn[2][0], -0.3831194272065995866e-5, 1e-12,
4704 "eraNum00a", "31", status);
4705 vvd(rmatn[2][1], 0.4063237480216291775e-4, 1e-12,
4706 "eraNum00a", "32", status);
4707 vvd(rmatn[2][2], 0.9999999991671660338, 1e-12,
4708 "eraNum00a", "33", status);
4709
4710}
4711
4712static void t_num00b(int *status)
4713/*
4714** - - - - - - - - -
4715** t _ n u m 0 0 b
4716** - - - - - - - - -
4717**
4718** Test eraNum00b function.
4719**
4720** Returned:
4721** status int FALSE = success, TRUE = fail
4722**
4723** Called: eraNum00b, vvd
4724**
4725** This revision: 2013 August 7
4726*/
4727{
4728 double rmatn[3][3];
4729
4730 eraNum00b(2400000.5, 53736, rmatn);
4731
4732 vvd(rmatn[0][0], 0.9999999999536069682, 1e-12,
4733 "eraNum00b", "11", status);
4734 vvd(rmatn[0][1], 0.8837746144871248011e-5, 1e-12,
4735 "eraNum00b", "12", status);
4736 vvd(rmatn[0][2], 0.3831488838252202945e-5, 1e-12,
4737 "eraNum00b", "13", status);
4738
4739 vvd(rmatn[1][0], -0.8837590456632304720e-5, 1e-12,
4740 "eraNum00b", "21", status);
4741 vvd(rmatn[1][1], 0.9999999991354692733, 1e-12,
4742 "eraNum00b", "22", status);
4743 vvd(rmatn[1][2], -0.4063198798559591654e-4, 1e-12,
4744 "eraNum00b", "23", status);
4745
4746 vvd(rmatn[2][0], -0.3831847930134941271e-5, 1e-12,
4747 "eraNum00b", "31", status);
4748 vvd(rmatn[2][1], 0.4063195412258168380e-4, 1e-12,
4749 "eraNum00b", "32", status);
4750 vvd(rmatn[2][2], 0.9999999991671806225, 1e-12,
4751 "eraNum00b", "33", status);
4752
4753}
4754
4755static void t_num06a(int *status)
4756/*
4757** - - - - - - - - -
4758** t _ n u m 0 6 a
4759** - - - - - - - - -
4760**
4761** Test eraNum06a function.
4762**
4763** Returned:
4764** status int FALSE = success, TRUE = fail
4765**
4766** Called: eraNum06a, vvd
4767**
4768** This revision: 2013 August 7
4769*/
4770{
4771 double rmatn[3][3];
4772
4773 eraNum06a(2400000.5, 53736, rmatn);
4774
4775 vvd(rmatn[0][0], 0.9999999999536227668, 1e-12,
4776 "eraNum06a", "11", status);
4777 vvd(rmatn[0][1], 0.8836241998111535233e-5, 1e-12,
4778 "eraNum06a", "12", status);
4779 vvd(rmatn[0][2], 0.3830834608415287707e-5, 1e-12,
4780 "eraNum06a", "13", status);
4781
4782 vvd(rmatn[1][0], -0.8836086334870740138e-5, 1e-12,
4783 "eraNum06a", "21", status);
4784 vvd(rmatn[1][1], 0.9999999991354657474, 1e-12,
4785 "eraNum06a", "22", status);
4786 vvd(rmatn[1][2], -0.4063240188248455065e-4, 1e-12,
4787 "eraNum06a", "23", status);
4788
4789 vvd(rmatn[2][0], -0.3831193642839398128e-5, 1e-12,
4790 "eraNum06a", "31", status);
4791 vvd(rmatn[2][1], 0.4063236803101479770e-4, 1e-12,
4792 "eraNum06a", "32", status);
4793 vvd(rmatn[2][2], 0.9999999991671663114, 1e-12,
4794 "eraNum06a", "33", status);
4795
4796}
4797
4798static void t_numat(int *status)
4799/*
4800** - - - - - - - -
4801** t _ n u m a t
4802** - - - - - - - -
4803**
4804** Test eraNumat function.
4805**
4806** Returned:
4807** status int FALSE = success, TRUE = fail
4808**
4809** Called: eraNumat, vvd
4810**
4811** This revision: 2013 August 7
4812*/
4813{
4814 double epsa, dpsi, deps, rmatn[3][3];
4815
4816
4817 epsa = 0.4090789763356509900;
4818 dpsi = -0.9630909107115582393e-5;
4819 deps = 0.4063239174001678826e-4;
4820
4821 eraNumat(epsa, dpsi, deps, rmatn);
4822
4823 vvd(rmatn[0][0], 0.9999999999536227949, 1e-12,
4824 "eraNumat", "11", status);
4825 vvd(rmatn[0][1], 0.8836239320236250577e-5, 1e-12,
4826 "eraNumat", "12", status);
4827 vvd(rmatn[0][2], 0.3830833447458251908e-5, 1e-12,
4828 "eraNumat", "13", status);
4829
4830 vvd(rmatn[1][0], -0.8836083657016688588e-5, 1e-12,
4831 "eraNumat", "21", status);
4832 vvd(rmatn[1][1], 0.9999999991354654959, 1e-12,
4833 "eraNumat", "22", status);
4834 vvd(rmatn[1][2], -0.4063240865361857698e-4, 1e-12,
4835 "eraNumat", "23", status);
4836
4837 vvd(rmatn[2][0], -0.3831192481833385226e-5, 1e-12,
4838 "eraNumat", "31", status);
4839 vvd(rmatn[2][1], 0.4063237480216934159e-4, 1e-12,
4840 "eraNumat", "32", status);
4841 vvd(rmatn[2][2], 0.9999999991671660407, 1e-12,
4842 "eraNumat", "33", status);
4843
4844}
4845
4846static void t_nut00a(int *status)
4847/*
4848** - - - - - - - - -
4849** t _ n u t 0 0 a
4850** - - - - - - - - -
4851**
4852** Test eraNut00a function.
4853**
4854** Returned:
4855** status int FALSE = success, TRUE = fail
4856**
4857** Called: eraNut00a, vvd
4858**
4859** This revision: 2013 August 7
4860*/
4861{
4862 double dpsi, deps;
4863
4864
4865 eraNut00a(2400000.5, 53736.0, &dpsi, &deps);
4866
4867 vvd(dpsi, -0.9630909107115518431e-5, 1e-13,
4868 "eraNut00a", "dpsi", status);
4869 vvd(deps, 0.4063239174001678710e-4, 1e-13,
4870 "eraNut00a", "deps", status);
4871
4872}
4873
4874static void t_nut00b(int *status)
4875/*
4876** - - - - - - - - -
4877** t _ n u t 0 0 b
4878** - - - - - - - - -
4879**
4880** Test eraNut00b function.
4881**
4882** Returned:
4883** status int FALSE = success, TRUE = fail
4884**
4885** Called: eraNut00b, vvd
4886**
4887** This revision: 2013 August 7
4888*/
4889{
4890 double dpsi, deps;
4891
4892
4893 eraNut00b(2400000.5, 53736.0, &dpsi, &deps);
4894
4895 vvd(dpsi, -0.9632552291148362783e-5, 1e-13,
4896 "eraNut00b", "dpsi", status);
4897 vvd(deps, 0.4063197106621159367e-4, 1e-13,
4898 "eraNut00b", "deps", status);
4899
4900}
4901
4902static void t_nut06a(int *status)
4903/*
4904** - - - - - - - - -
4905** t _ n u t 0 6 a
4906** - - - - - - - - -
4907**
4908** Test eraNut06a function.
4909**
4910** Returned:
4911** status int FALSE = success, TRUE = fail
4912**
4913** Called: eraNut06a, vvd
4914**
4915** This revision: 2013 August 7
4916*/
4917{
4918 double dpsi, deps;
4919
4920
4921 eraNut06a(2400000.5, 53736.0, &dpsi, &deps);
4922
4923 vvd(dpsi, -0.9630912025820308797e-5, 1e-13,
4924 "eraNut06a", "dpsi", status);
4925 vvd(deps, 0.4063238496887249798e-4, 1e-13,
4926 "eraNut06a", "deps", status);
4927
4928}
4929
4930static void t_nut80(int *status)
4931/*
4932** - - - - - - - -
4933** t _ n u t 8 0
4934** - - - - - - - -
4935**
4936** Test eraNut80 function.
4937**
4938** Returned:
4939** status int FALSE = success, TRUE = fail
4940**
4941** Called: eraNut80, vvd
4942**
4943** This revision: 2013 August 7
4944*/
4945{
4946 double dpsi, deps;
4947
4948
4949 eraNut80(2400000.5, 53736.0, &dpsi, &deps);
4950
4951 vvd(dpsi, -0.9643658353226563966e-5, 1e-13,
4952 "eraNut80", "dpsi", status);
4953 vvd(deps, 0.4060051006879713322e-4, 1e-13,
4954 "eraNut80", "deps", status);
4955
4956}
4957
4958static void t_nutm80(int *status)
4959/*
4960** - - - - - - - - -
4961** t _ n u t m 8 0
4962** - - - - - - - - -
4963**
4964** Test eraNutm80 function.
4965**
4966** Returned:
4967** status int FALSE = success, TRUE = fail
4968**
4969** Called: eraNutm80, vvd
4970**
4971** This revision: 2013 August 7
4972*/
4973{
4974 double rmatn[3][3];
4975
4976
4977 eraNutm80(2400000.5, 53736.0, rmatn);
4978
4979 vvd(rmatn[0][0], 0.9999999999534999268, 1e-12,
4980 "eraNutm80", "11", status);
4981 vvd(rmatn[0][1], 0.8847935789636432161e-5, 1e-12,
4982 "eraNutm80", "12", status);
4983 vvd(rmatn[0][2], 0.3835906502164019142e-5, 1e-12,
4984 "eraNutm80", "13", status);
4985
4986 vvd(rmatn[1][0], -0.8847780042583435924e-5, 1e-12,
4987 "eraNutm80", "21", status);
4988 vvd(rmatn[1][1], 0.9999999991366569963, 1e-12,
4989 "eraNutm80", "22", status);
4990 vvd(rmatn[1][2], -0.4060052702727130809e-4, 1e-12,
4991 "eraNutm80", "23", status);
4992
4993 vvd(rmatn[2][0], -0.3836265729708478796e-5, 1e-12,
4994 "eraNutm80", "31", status);
4995 vvd(rmatn[2][1], 0.4060049308612638555e-4, 1e-12,
4996 "eraNutm80", "32", status);
4997 vvd(rmatn[2][2], 0.9999999991684415129, 1e-12,
4998 "eraNutm80", "33", status);
4999
5000}
5001
5002static void t_obl06(int *status)
5003/*
5004** - - - - - - - -
5005** t _ o b l 0 6
5006** - - - - - - - -
5007**
5008** Test eraObl06 function.
5009**
5010** Returned:
5011** status int FALSE = success, TRUE = fail
5012**
5013** Called: eraObl06, vvd
5014**
5015** This revision: 2013 August 7
5016*/
5017{
5018 vvd(eraObl06(2400000.5, 54388.0), 0.4090749229387258204, 1e-14,
5019 "eraObl06", "", status);
5020}
5021
5022static void t_obl80(int *status)
5023/*
5024** - - - - - - - -
5025** t _ o b l 8 0
5026** - - - - - - - -
5027**
5028** Test eraObl80 function.
5029**
5030** Returned:
5031** status int FALSE = success, TRUE = fail
5032**
5033** Called: eraObl80, vvd
5034**
5035** This revision: 2013 August 7
5036*/
5037{
5038 double eps0;
5039
5040
5041 eps0 = eraObl80(2400000.5, 54388.0);
5042
5043 vvd(eps0, 0.4090751347643816218, 1e-14, "eraObl80", "", status);
5044
5045}
5046
5047static void t_p06e(int *status)
5048/*
5049** - - - - - - -
5050** t _ p 0 6 e
5051** - - - - - - -
5052**
5053** Test eraP06e function.
5054**
5055** Returned:
5056** status int FALSE = success, TRUE = fail
5057**
5058** Called: eraP06e, vvd
5059**
5060** This revision: 2013 August 7
5061*/
5062{
5063 double eps0, psia, oma, bpa, bqa, pia, bpia,
5064 epsa, chia, za, zetaa, thetaa, pa, gam, phi, psi;
5065
5066
5067 eraP06e(2400000.5, 52541.0, &eps0, &psia, &oma, &bpa,
5068 &bqa, &pia, &bpia, &epsa, &chia, &za,
5069 &zetaa, &thetaa, &pa, &gam, &phi, &psi);
5070
5071 vvd(eps0, 0.4090926006005828715, 1e-14,
5072 "eraP06e", "eps0", status);
5073 vvd(psia, 0.6664369630191613431e-3, 1e-14,
5074 "eraP06e", "psia", status);
5075 vvd(oma , 0.4090925973783255982, 1e-14,
5076 "eraP06e", "oma", status);
5077 vvd(bpa, 0.5561149371265209445e-6, 1e-14,
5078 "eraP06e", "bpa", status);
5079 vvd(bqa, -0.6191517193290621270e-5, 1e-14,
5080 "eraP06e", "bqa", status);
5081 vvd(pia, 0.6216441751884382923e-5, 1e-14,
5082 "eraP06e", "pia", status);
5083 vvd(bpia, 3.052014180023779882, 1e-14,
5084 "eraP06e", "bpia", status);
5085 vvd(epsa, 0.4090864054922431688, 1e-14,
5086 "eraP06e", "epsa", status);
5087 vvd(chia, 0.1387703379530915364e-5, 1e-14,
5088 "eraP06e", "chia", status);
5089 vvd(za, 0.2921789846651790546e-3, 1e-14,
5090 "eraP06e", "za", status);
5091 vvd(zetaa, 0.3178773290332009310e-3, 1e-14,
5092 "eraP06e", "zetaa", status);
5093 vvd(thetaa, 0.2650932701657497181e-3, 1e-14,
5094 "eraP06e", "thetaa", status);
5095 vvd(pa, 0.6651637681381016344e-3, 1e-14,
5096 "eraP06e", "pa", status);
5097 vvd(gam, 0.1398077115963754987e-5, 1e-14,
5098 "eraP06e", "gam", status);
5099 vvd(phi, 0.4090864090837462602, 1e-14,
5100 "eraP06e", "phi", status);
5101 vvd(psi, 0.6664464807480920325e-3, 1e-14,
5102 "eraP06e", "psi", status);
5103
5104}
5105
5106static void t_p2pv(int *status)
5107/*
5108** - - - - - - -
5109** t _ p 2 p v
5110** - - - - - - -
5111**
5112** Test eraP2pv function.
5113**
5114** Returned:
5115** status int FALSE = success, TRUE = fail
5116**
5117** Called: eraP2pv, vvd
5118**
5119** This revision: 2013 August 7
5120*/
5121{
5122 double p[3], pv[2][3];
5123
5124
5125 p[0] = 0.25;
5126 p[1] = 1.2;
5127 p[2] = 3.0;
5128
5129 pv[0][0] = 0.3;
5130 pv[0][1] = 1.2;
5131 pv[0][2] = -2.5;
5132
5133 pv[1][0] = -0.5;
5134 pv[1][1] = 3.1;
5135 pv[1][2] = 0.9;
5136
5137 eraP2pv(p, pv);
5138
5139 vvd(pv[0][0], 0.25, 0.0, "eraP2pv", "p1", status);
5140 vvd(pv[0][1], 1.2, 0.0, "eraP2pv", "p2", status);
5141 vvd(pv[0][2], 3.0, 0.0, "eraP2pv", "p3", status);
5142
5143 vvd(pv[1][0], 0.0, 0.0, "eraP2pv", "v1", status);
5144 vvd(pv[1][1], 0.0, 0.0, "eraP2pv", "v2", status);
5145 vvd(pv[1][2], 0.0, 0.0, "eraP2pv", "v3", status);
5146
5147}
5148
5149static void t_p2s(int *status)
5150/*
5151** - - - - - -
5152** t _ p 2 s
5153** - - - - - -
5154**
5155** Test eraP2s function.
5156**
5157** Returned:
5158** status int FALSE = success, TRUE = fail
5159**
5160** Called: eraP2s, vvd
5161**
5162** This revision: 2013 August 7
5163*/
5164{
5165 double p[3], theta, phi, r;
5166
5167
5168 p[0] = 100.0;
5169 p[1] = -50.0;
5170 p[2] = 25.0;
5171
5172 eraP2s(p, &theta, &phi, &r);
5173
5174 vvd(theta, -0.4636476090008061162, 1e-12, "eraP2s", "theta", status);
5175 vvd(phi, 0.2199879773954594463, 1e-12, "eraP2s", "phi", status);
5176 vvd(r, 114.5643923738960002, 1e-9, "eraP2s", "r", status);
5177
5178}
5179
5180static void t_pap(int *status)
5181/*
5182** - - - - - -
5183** t _ p a p
5184** - - - - - -
5185**
5186** Test eraPap function.
5187**
5188** Returned:
5189** status int FALSE = success, TRUE = fail
5190**
5191** Called: eraPap, vvd
5192**
5193** This revision: 2013 August 7
5194*/
5195{
5196 double a[3], b[3], theta;
5197
5198
5199 a[0] = 1.0;
5200 a[1] = 0.1;
5201 a[2] = 0.2;
5202
5203 b[0] = -3.0;
5204 b[1] = 1e-3;
5205 b[2] = 0.2;
5206
5207 theta = eraPap(a, b);
5208
5209 vvd(theta, 0.3671514267841113674, 1e-12, "eraPap", "", status);
5210
5211}
5212
5213static void t_pas(int *status)
5214/*
5215** - - - - - -
5216** t _ p a s
5217** - - - - - -
5218**
5219** Test eraPas function.
5220**
5221** Returned:
5222** status int FALSE = success, TRUE = fail
5223**
5224** Called: eraPas, vvd
5225**
5226** This revision: 2013 August 7
5227*/
5228{
5229 double al, ap, bl, bp, theta;
5230
5231
5232 al = 1.0;
5233 ap = 0.1;
5234 bl = 0.2;
5235 bp = -1.0;
5236
5237 theta = eraPas(al, ap, bl, bp);
5238
5239 vvd(theta, -2.724544922932270424, 1e-12, "eraPas", "", status);
5240
5241}
5242
5243static void t_pb06(int *status)
5244/*
5245** - - - - - - -
5246** t _ p b 0 6
5247** - - - - - - -
5248**
5249** Test eraPb06 function.
5250**
5251** Returned:
5252** status int FALSE = success, TRUE = fail
5253**
5254** Called: eraPb06, vvd
5255**
5256** This revision: 2013 August 7
5257*/
5258{
5259 double bzeta, bz, btheta;
5260
5261
5262 eraPb06(2400000.5, 50123.9999, &bzeta, &bz, &btheta);
5263
5264 vvd(bzeta, -0.5092634016326478238e-3, 1e-12,
5265 "eraPb06", "bzeta", status);
5266 vvd(bz, -0.3602772060566044413e-3, 1e-12,
5267 "eraPb06", "bz", status);
5268 vvd(btheta, -0.3779735537167811177e-3, 1e-12,
5269 "eraPb06", "btheta", status);
5270
5271}
5272
5273static void t_pdp(int *status)
5274/*
5275** - - - - - -
5276** t _ p d p
5277** - - - - - -
5278**
5279** Test eraPdp function.
5280**
5281** Returned:
5282** status int FALSE = success, TRUE = fail
5283**
5284** Called: eraPdp, vvd
5285**
5286** This revision: 2013 August 7
5287*/
5288{
5289 double a[3], b[3], adb;
5290
5291
5292 a[0] = 2.0;
5293 a[1] = 2.0;
5294 a[2] = 3.0;
5295
5296 b[0] = 1.0;
5297 b[1] = 3.0;
5298 b[2] = 4.0;
5299
5300 adb = eraPdp(a, b);
5301
5302 vvd(adb, 20, 1e-12, "eraPdp", "", status);
5303
5304}
5305
5306static void t_pfw06(int *status)
5307/*
5308** - - - - - - - -
5309** t _ p f w 0 6
5310** - - - - - - - -
5311**
5312** Test eraPfw06 function.
5313**
5314** Returned:
5315** status int FALSE = success, TRUE = fail
5316**
5317** Called: eraPfw06, vvd
5318**
5319** This revision: 2013 August 7
5320*/
5321{
5322 double gamb, phib, psib, epsa;
5323
5324
5325 eraPfw06(2400000.5, 50123.9999, &gamb, &phib, &psib, &epsa);
5326
5327 vvd(gamb, -0.2243387670997995690e-5, 1e-16,
5328 "eraPfw06", "gamb", status);
5329 vvd(phib, 0.4091014602391312808, 1e-12,
5330 "eraPfw06", "phib", status);
5331 vvd(psib, -0.9501954178013031895e-3, 1e-14,
5332 "eraPfw06", "psib", status);
5333 vvd(epsa, 0.4091014316587367491, 1e-12,
5334 "eraPfw06", "epsa", status);
5335
5336}
5337
5338static void t_plan94(int *status)
5339/*
5340** - - - - - - - - -
5341** t _ p l a n 9 4
5342** - - - - - - - - -
5343**
5344** Test eraPlan94 function.
5345**
5346** Returned:
5347** status int FALSE = success, TRUE = fail
5348**
5349** Called: eraPlan94, vvd, viv
5350**
5351** This revision: 2013 October 2
5352*/
5353{
5354 double pv[2][3];
5355 int j;
5356
5357
5358 j = eraPlan94(2400000.5, 1e6, 0, pv);
5359
5360 vvd(pv[0][0], 0.0, 0.0, "eraPlan94", "x 1", status);
5361 vvd(pv[0][1], 0.0, 0.0, "eraPlan94", "y 1", status);
5362 vvd(pv[0][2], 0.0, 0.0, "eraPlan94", "z 1", status);
5363
5364 vvd(pv[1][0], 0.0, 0.0, "eraPlan94", "xd 1", status);
5365 vvd(pv[1][1], 0.0, 0.0, "eraPlan94", "yd 1", status);
5366 vvd(pv[1][2], 0.0, 0.0, "eraPlan94", "zd 1", status);
5367
5368 viv(j, -1, "eraPlan94", "j 1", status);
5369
5370 j = eraPlan94(2400000.5, 1e6, 10, pv);
5371
5372 viv(j, -1, "eraPlan94", "j 2", status);
5373
5374 j = eraPlan94(2400000.5, -320000, 3, pv);
5375
5376 vvd(pv[0][0], 0.9308038666832975759, 1e-11,
5377 "eraPlan94", "x 3", status);
5378 vvd(pv[0][1], 0.3258319040261346000, 1e-11,
5379 "eraPlan94", "y 3", status);
5380 vvd(pv[0][2], 0.1422794544481140560, 1e-11,
5381 "eraPlan94", "z 3", status);
5382
5383 vvd(pv[1][0], -0.6429458958255170006e-2, 1e-11,
5384 "eraPlan94", "xd 3", status);
5385 vvd(pv[1][1], 0.1468570657704237764e-1, 1e-11,
5386 "eraPlan94", "yd 3", status);
5387 vvd(pv[1][2], 0.6406996426270981189e-2, 1e-11,
5388 "eraPlan94", "zd 3", status);
5389
5390 viv(j, 1, "eraPlan94", "j 3", status);
5391
5392 j = eraPlan94(2400000.5, 43999.9, 1, pv);
5393
5394 vvd(pv[0][0], 0.2945293959257430832, 1e-11,
5395 "eraPlan94", "x 4", status);
5396 vvd(pv[0][1], -0.2452204176601049596, 1e-11,
5397 "eraPlan94", "y 4", status);
5398 vvd(pv[0][2], -0.1615427700571978153, 1e-11,
5399 "eraPlan94", "z 4", status);
5400
5401 vvd(pv[1][0], 0.1413867871404614441e-1, 1e-11,
5402 "eraPlan94", "xd 4", status);
5403 vvd(pv[1][1], 0.1946548301104706582e-1, 1e-11,
5404 "eraPlan94", "yd 4", status);
5405 vvd(pv[1][2], 0.8929809783898904786e-2, 1e-11,
5406 "eraPlan94", "zd 4", status);
5407
5408 viv(j, 0, "eraPlan94", "j 4", status);
5409
5410}
5411
5412static void t_pmat00(int *status)
5413/*
5414** - - - - - - - - -
5415** t _ p m a t 0 0
5416** - - - - - - - - -
5417**
5418** Test eraPmat00 function.
5419**
5420** Returned:
5421** status int FALSE = success, TRUE = fail
5422**
5423** Called: eraPmat00, vvd
5424**
5425** This revision: 2013 August 7
5426*/
5427{
5428 double rbp[3][3];
5429
5430
5431 eraPmat00(2400000.5, 50123.9999, rbp);
5432
5433 vvd(rbp[0][0], 0.9999995505175087260, 1e-12,
5434 "eraPmat00", "11", status);
5435 vvd(rbp[0][1], 0.8695405883617884705e-3, 1e-14,
5436 "eraPmat00", "12", status);
5437 vvd(rbp[0][2], 0.3779734722239007105e-3, 1e-14,
5438 "eraPmat00", "13", status);
5439
5440 vvd(rbp[1][0], -0.8695405990410863719e-3, 1e-14,
5441 "eraPmat00", "21", status);
5442 vvd(rbp[1][1], 0.9999996219494925900, 1e-12,
5443 "eraPmat00", "22", status);
5444 vvd(rbp[1][2], -0.1360775820404982209e-6, 1e-14,
5445 "eraPmat00", "23", status);
5446
5447 vvd(rbp[2][0], -0.3779734476558184991e-3, 1e-14,
5448 "eraPmat00", "31", status);
5449 vvd(rbp[2][1], -0.1925857585832024058e-6, 1e-14,
5450 "eraPmat00", "32", status);
5451 vvd(rbp[2][2], 0.9999999285680153377, 1e-12,
5452 "eraPmat00", "33", status);
5453
5454}
5455
5456static void t_pmat06(int *status)
5457/*
5458** - - - - - - - - -
5459** t _ p m a t 0 6
5460** - - - - - - - - -
5461**
5462** Test eraPmat06 function.
5463**
5464** Returned:
5465** status int FALSE = success, TRUE = fail
5466**
5467** Called: eraPmat06, vvd
5468**
5469** This revision: 2013 August 7
5470*/
5471{
5472 double rbp[3][3];
5473
5474
5475 eraPmat06(2400000.5, 50123.9999, rbp);
5476
5477 vvd(rbp[0][0], 0.9999995505176007047, 1e-12,
5478 "eraPmat06", "11", status);
5479 vvd(rbp[0][1], 0.8695404617348208406e-3, 1e-14,
5480 "eraPmat06", "12", status);
5481 vvd(rbp[0][2], 0.3779735201865589104e-3, 1e-14,
5482 "eraPmat06", "13", status);
5483
5484 vvd(rbp[1][0], -0.8695404723772031414e-3, 1e-14,
5485 "eraPmat06", "21", status);
5486 vvd(rbp[1][1], 0.9999996219496027161, 1e-12,
5487 "eraPmat06", "22", status);
5488 vvd(rbp[1][2], -0.1361752497080270143e-6, 1e-14,
5489 "eraPmat06", "23", status);
5490
5491 vvd(rbp[2][0], -0.3779734957034089490e-3, 1e-14,
5492 "eraPmat06", "31", status);
5493 vvd(rbp[2][1], -0.1924880847894457113e-6, 1e-14,
5494 "eraPmat06", "32", status);
5495 vvd(rbp[2][2], 0.9999999285679971958, 1e-12,
5496 "eraPmat06", "33", status);
5497
5498}
5499
5500static void t_pmat76(int *status)
5501/*
5502** - - - - - - - - -
5503** t _ p m a t 7 6
5504** - - - - - - - - -
5505**
5506** Test eraPmat76 function.
5507**
5508** Returned:
5509** status int FALSE = success, TRUE = fail
5510**
5511** Called: eraPmat76, vvd
5512**
5513** This revision: 2013 August 7
5514*/
5515{
5516 double rmatp[3][3];
5517
5518
5519 eraPmat76(2400000.5, 50123.9999, rmatp);
5520
5521 vvd(rmatp[0][0], 0.9999995504328350733, 1e-12,
5522 "eraPmat76", "11", status);
5523 vvd(rmatp[0][1], 0.8696632209480960785e-3, 1e-14,
5524 "eraPmat76", "12", status);
5525 vvd(rmatp[0][2], 0.3779153474959888345e-3, 1e-14,
5526 "eraPmat76", "13", status);
5527
5528 vvd(rmatp[1][0], -0.8696632209485112192e-3, 1e-14,
5529 "eraPmat76", "21", status);
5530 vvd(rmatp[1][1], 0.9999996218428560614, 1e-12,
5531 "eraPmat76", "22", status);
5532 vvd(rmatp[1][2], -0.1643284776111886407e-6, 1e-14,
5533 "eraPmat76", "23", status);
5534
5535 vvd(rmatp[2][0], -0.3779153474950335077e-3, 1e-14,
5536 "eraPmat76", "31", status);
5537 vvd(rmatp[2][1], -0.1643306746147366896e-6, 1e-14,
5538 "eraPmat76", "32", status);
5539 vvd(rmatp[2][2], 0.9999999285899790119, 1e-12,
5540 "eraPmat76", "33", status);
5541
5542}
5543
5544static void t_pm(int *status)
5545/*
5546** - - - - -
5547** t _ p m
5548** - - - - -
5549**
5550** Test eraPm function.
5551**
5552** Returned:
5553** status int FALSE = success, TRUE = fail
5554**
5555** Called: eraPm, vvd
5556**
5557** This revision: 2013 August 7
5558*/
5559{
5560 double p[3], r;
5561
5562
5563 p[0] = 0.3;
5564 p[1] = 1.2;
5565 p[2] = -2.5;
5566
5567 r = eraPm(p);
5568
5569 vvd(r, 2.789265136196270604, 1e-12, "eraPm", "", status);
5570
5571}
5572
5573static void t_pmp(int *status)
5574/*
5575** - - - - - -
5576** t _ p m p
5577** - - - - - -
5578**
5579** Test eraPmp function.
5580**
5581** Returned:
5582** status int FALSE = success, TRUE = fail
5583**
5584** Called: eraPmp, vvd
5585**
5586** This revision: 2013 August 7
5587*/
5588{
5589 double a[3], b[3], amb[3];
5590
5591
5592 a[0] = 2.0;
5593 a[1] = 2.0;
5594 a[2] = 3.0;
5595
5596 b[0] = 1.0;
5597 b[1] = 3.0;
5598 b[2] = 4.0;
5599
5600 eraPmp(a, b, amb);
5601
5602 vvd(amb[0], 1.0, 1e-12, "eraPmp", "0", status);
5603 vvd(amb[1], -1.0, 1e-12, "eraPmp", "1", status);
5604 vvd(amb[2], -1.0, 1e-12, "eraPmp", "2", status);
5605
5606}
5607
5608static void t_pmpx(int *status)
5609/*
5610** - - - - - - -
5611** t _ p m p x
5612** - - - - - - -
5613**
5614** Test eraPmpx function.
5615**
5616** Returned:
5617** status int FALSE = success, TRUE = fail
5618**
5619** Called: eraPmpx, vvd
5620**
5621** This revision: 2013 October 2
5622*/
5623{
5624 double rc, dc, pr, pd, px, rv, pmt, pob[3], pco[3];
5625
5626
5627 rc = 1.234;
5628 dc = 0.789;
5629 pr = 1e-5;
5630 pd = -2e-5;
5631 px = 1e-2;
5632 rv = 10.0;
5633 pmt = 8.75;
5634 pob[0] = 0.9;
5635 pob[1] = 0.4;
5636 pob[2] = 0.1;
5637
5638 eraPmpx(rc, dc, pr, pd, px, rv, pmt, pob, pco);
5639
5640 vvd(pco[0], 0.2328137623960308440, 1e-12,
5641 "eraPmpx", "1", status);
5642 vvd(pco[1], 0.6651097085397855317, 1e-12,
5643 "eraPmpx", "2", status);
5644 vvd(pco[2], 0.7095257765896359847, 1e-12,
5645 "eraPmpx", "3", status);
5646
5647}
5648
5649static void t_pmsafe(int *status)
5650/*
5651** - - - - - - - - -
5652** t _ p m s a f e
5653** - - - - - - - - -
5654**
5655** Test eraPmsafe function.
5656**
5657** Returned:
5658** status int FALSE = success, TRUE = fail
5659**
5660** Called: eraPmsafe, vvd, viv
5661**
5662** This revision: 2013 October 2
5663*/
5664{
5665 int j;
5666 double ra1, dec1, pmr1, pmd1, px1, rv1, ep1a, ep1b, ep2a, ep2b,
5667 ra2, dec2, pmr2, pmd2, px2, rv2;
5668
5669
5670 ra1 = 1.234;
5671 dec1 = 0.789;
5672 pmr1 = 1e-5;
5673 pmd1 = -2e-5;
5674 px1 = 1e-2;
5675 rv1 = 10.0;
5676 ep1a = 2400000.5;
5677 ep1b = 48348.5625;
5678 ep2a = 2400000.5;
5679 ep2b = 51544.5;
5680
5681 j = eraPmsafe(ra1, dec1, pmr1, pmd1, px1, rv1,
5682 ep1a, ep1b, ep2a, ep2b,
5683 &ra2, &dec2, &pmr2, &pmd2, &px2, &rv2);
5684
5685 vvd(ra2, 1.234087484501017061, 1e-12,
5686 "eraPmsafe", "ra2", status);
5687 vvd(dec2, 0.7888249982450468574, 1e-12,
5688 "eraPmsafe", "dec2", status);
5689 vvd(pmr2, 0.9996457663586073988e-5, 1e-12,
5690 "eraPmsafe", "pmr2", status);
5691 vvd(pmd2, -0.2000040085106737816e-4, 1e-16,
5692 "eraPmsafe", "pmd2", status);
5693 vvd(px2, 0.9999997295356765185e-2, 1e-12,
5694 "eraPmsafe", "px2", status);
5695 vvd(rv2, 10.38468380113917014, 1e-10,
5696 "eraPmsafe", "rv2", status);
5697 viv ( j, 0, "eraPmsafe", "j", status);
5698
5699}
5700
5701static void t_pn(int *status)
5702/*
5703** - - - - -
5704** t _ p n
5705** - - - - -
5706**
5707** Test eraPn function.
5708**
5709** Returned:
5710** status int FALSE = success, TRUE = fail
5711**
5712** Called: eraPn, vvd
5713**
5714** This revision: 2013 August 7
5715*/
5716{
5717 double p[3], r, u[3];
5718
5719
5720 p[0] = 0.3;
5721 p[1] = 1.2;
5722 p[2] = -2.5;
5723
5724 eraPn(p, &r, u);
5725
5726 vvd(r, 2.789265136196270604, 1e-12, "eraPn", "r", status);
5727
5728 vvd(u[0], 0.1075552109073112058, 1e-12, "eraPn", "u1", status);
5729 vvd(u[1], 0.4302208436292448232, 1e-12, "eraPn", "u2", status);
5730 vvd(u[2], -0.8962934242275933816, 1e-12, "eraPn", "u3", status);
5731
5732}
5733
5734static void t_pn00(int *status)
5735/*
5736** - - - - - - -
5737** t _ p n 0 0
5738** - - - - - - -
5739**
5740** Test eraPn00 function.
5741**
5742** Returned:
5743** status int FALSE = success, TRUE = fail
5744**
5745** Called: eraPn00, vvd
5746**
5747** This revision: 2013 August 7
5748*/
5749{
5750 double dpsi, deps, epsa,
5751 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
5752
5753
5754 dpsi = -0.9632552291149335877e-5;
5755 deps = 0.4063197106621141414e-4;
5756
5757 eraPn00(2400000.5, 53736.0, dpsi, deps,
5758 &epsa, rb, rp, rbp, rn, rbpn);
5759
5760 vvd(epsa, 0.4090791789404229916, 1e-12, "eraPn00", "epsa", status);
5761
5762 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
5763 "eraPn00", "rb11", status);
5764 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-18,
5765 "eraPn00", "rb12", status);
5766 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-18,
5767 "eraPn00", "rb13", status);
5768
5769 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-18,
5770 "eraPn00", "rb21", status);
5771 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
5772 "eraPn00", "rb22", status);
5773 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-18,
5774 "eraPn00", "rb23", status);
5775
5776 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-18,
5777 "eraPn00", "rb31", status);
5778 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-18,
5779 "eraPn00", "rb32", status);
5780 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
5781 "eraPn00", "rb33", status);
5782
5783 vvd(rp[0][0], 0.9999989300532289018, 1e-12,
5784 "eraPn00", "rp11", status);
5785 vvd(rp[0][1], -0.1341647226791824349e-2, 1e-14,
5786 "eraPn00", "rp12", status);
5787 vvd(rp[0][2], -0.5829880927190296547e-3, 1e-14,
5788 "eraPn00", "rp13", status);
5789
5790 vvd(rp[1][0], 0.1341647231069759008e-2, 1e-14,
5791 "eraPn00", "rp21", status);
5792 vvd(rp[1][1], 0.9999990999908750433, 1e-12,
5793 "eraPn00", "rp22", status);
5794 vvd(rp[1][2], -0.3837444441583715468e-6, 1e-14,
5795 "eraPn00", "rp23", status);
5796
5797 vvd(rp[2][0], 0.5829880828740957684e-3, 1e-14,
5798 "eraPn00", "rp31", status);
5799 vvd(rp[2][1], -0.3984203267708834759e-6, 1e-14,
5800 "eraPn00", "rp32", status);
5801 vvd(rp[2][2], 0.9999998300623538046, 1e-12,
5802 "eraPn00", "rp33", status);
5803
5804 vvd(rbp[0][0], 0.9999989300052243993, 1e-12,
5805 "eraPn00", "rbp11", status);
5806 vvd(rbp[0][1], -0.1341717990239703727e-2, 1e-14,
5807 "eraPn00", "rbp12", status);
5808 vvd(rbp[0][2], -0.5829075749891684053e-3, 1e-14,
5809 "eraPn00", "rbp13", status);
5810
5811 vvd(rbp[1][0], 0.1341718013831739992e-2, 1e-14,
5812 "eraPn00", "rbp21", status);
5813 vvd(rbp[1][1], 0.9999990998959191343, 1e-12,
5814 "eraPn00", "rbp22", status);
5815 vvd(rbp[1][2], -0.3505759733565421170e-6, 1e-14,
5816 "eraPn00", "rbp23", status);
5817
5818 vvd(rbp[2][0], 0.5829075206857717883e-3, 1e-14,
5819 "eraPn00", "rbp31", status);
5820 vvd(rbp[2][1], -0.4315219955198608970e-6, 1e-14,
5821 "eraPn00", "rbp32", status);
5822 vvd(rbp[2][2], 0.9999998301093036269, 1e-12,
5823 "eraPn00", "rbp33", status);
5824
5825 vvd(rn[0][0], 0.9999999999536069682, 1e-12,
5826 "eraPn00", "rn11", status);
5827 vvd(rn[0][1], 0.8837746144872140812e-5, 1e-16,
5828 "eraPn00", "rn12", status);
5829 vvd(rn[0][2], 0.3831488838252590008e-5, 1e-16,
5830 "eraPn00", "rn13", status);
5831
5832 vvd(rn[1][0], -0.8837590456633197506e-5, 1e-16,
5833 "eraPn00", "rn21", status);
5834 vvd(rn[1][1], 0.9999999991354692733, 1e-12,
5835 "eraPn00", "rn22", status);
5836 vvd(rn[1][2], -0.4063198798559573702e-4, 1e-16,
5837 "eraPn00", "rn23", status);
5838
5839 vvd(rn[2][0], -0.3831847930135328368e-5, 1e-16,
5840 "eraPn00", "rn31", status);
5841 vvd(rn[2][1], 0.4063195412258150427e-4, 1e-16,
5842 "eraPn00", "rn32", status);
5843 vvd(rn[2][2], 0.9999999991671806225, 1e-12,
5844 "eraPn00", "rn33", status);
5845
5846 vvd(rbpn[0][0], 0.9999989440499982806, 1e-12,
5847 "eraPn00", "rbpn11", status);
5848 vvd(rbpn[0][1], -0.1332880253640848301e-2, 1e-14,
5849 "eraPn00", "rbpn12", status);
5850 vvd(rbpn[0][2], -0.5790760898731087295e-3, 1e-14,
5851 "eraPn00", "rbpn13", status);
5852
5853 vvd(rbpn[1][0], 0.1332856746979948745e-2, 1e-14,
5854 "eraPn00", "rbpn21", status);
5855 vvd(rbpn[1][1], 0.9999991109064768883, 1e-12,
5856 "eraPn00", "rbpn22", status);
5857 vvd(rbpn[1][2], -0.4097740555723063806e-4, 1e-14,
5858 "eraPn00", "rbpn23", status);
5859
5860 vvd(rbpn[2][0], 0.5791301929950205000e-3, 1e-14,
5861 "eraPn00", "rbpn31", status);
5862 vvd(rbpn[2][1], 0.4020553681373702931e-4, 1e-14,
5863 "eraPn00", "rbpn32", status);
5864 vvd(rbpn[2][2], 0.9999998314958529887, 1e-12,
5865 "eraPn00", "rbpn33", status);
5866
5867}
5868
5869static void t_pn00a(int *status)
5870/*
5871** - - - - - - - -
5872** t _ p n 0 0 a
5873** - - - - - - - -
5874**
5875** Test eraPn00a function.
5876**
5877** Returned:
5878** status int FALSE = success, TRUE = fail
5879**
5880** Called: eraPn00a, vvd
5881**
5882** This revision: 2013 August 7
5883*/
5884{
5885 double dpsi, deps, epsa,
5886 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
5887
5888
5889 eraPn00a(2400000.5, 53736.0,
5890 &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn);
5891
5892 vvd(dpsi, -0.9630909107115518431e-5, 1e-12,
5893 "eraPn00a", "dpsi", status);
5894 vvd(deps, 0.4063239174001678710e-4, 1e-12,
5895 "eraPn00a", "deps", status);
5896 vvd(epsa, 0.4090791789404229916, 1e-12, "eraPn00a", "epsa", status);
5897
5898 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
5899 "eraPn00a", "rb11", status);
5900 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
5901 "eraPn00a", "rb12", status);
5902 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
5903 "eraPn00a", "rb13", status);
5904
5905 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
5906 "eraPn00a", "rb21", status);
5907 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
5908 "eraPn00a", "rb22", status);
5909 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
5910 "eraPn00a", "rb23", status);
5911
5912 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
5913 "eraPn00a", "rb31", status);
5914 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
5915 "eraPn00a", "rb32", status);
5916 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
5917 "eraPn00a", "rb33", status);
5918
5919 vvd(rp[0][0], 0.9999989300532289018, 1e-12,
5920 "eraPn00a", "rp11", status);
5921 vvd(rp[0][1], -0.1341647226791824349e-2, 1e-14,
5922 "eraPn00a", "rp12", status);
5923 vvd(rp[0][2], -0.5829880927190296547e-3, 1e-14,
5924 "eraPn00a", "rp13", status);
5925
5926 vvd(rp[1][0], 0.1341647231069759008e-2, 1e-14,
5927 "eraPn00a", "rp21", status);
5928 vvd(rp[1][1], 0.9999990999908750433, 1e-12,
5929 "eraPn00a", "rp22", status);
5930 vvd(rp[1][2], -0.3837444441583715468e-6, 1e-14,
5931 "eraPn00a", "rp23", status);
5932
5933 vvd(rp[2][0], 0.5829880828740957684e-3, 1e-14,
5934 "eraPn00a", "rp31", status);
5935 vvd(rp[2][1], -0.3984203267708834759e-6, 1e-14,
5936 "eraPn00a", "rp32", status);
5937 vvd(rp[2][2], 0.9999998300623538046, 1e-12,
5938 "eraPn00a", "rp33", status);
5939
5940 vvd(rbp[0][0], 0.9999989300052243993, 1e-12,
5941 "eraPn00a", "rbp11", status);
5942 vvd(rbp[0][1], -0.1341717990239703727e-2, 1e-14,
5943 "eraPn00a", "rbp12", status);
5944 vvd(rbp[0][2], -0.5829075749891684053e-3, 1e-14,
5945 "eraPn00a", "rbp13", status);
5946
5947 vvd(rbp[1][0], 0.1341718013831739992e-2, 1e-14,
5948 "eraPn00a", "rbp21", status);
5949 vvd(rbp[1][1], 0.9999990998959191343, 1e-12,
5950 "eraPn00a", "rbp22", status);
5951 vvd(rbp[1][2], -0.3505759733565421170e-6, 1e-14,
5952 "eraPn00a", "rbp23", status);
5953
5954 vvd(rbp[2][0], 0.5829075206857717883e-3, 1e-14,
5955 "eraPn00a", "rbp31", status);
5956 vvd(rbp[2][1], -0.4315219955198608970e-6, 1e-14,
5957 "eraPn00a", "rbp32", status);
5958 vvd(rbp[2][2], 0.9999998301093036269, 1e-12,
5959 "eraPn00a", "rbp33", status);
5960
5961 vvd(rn[0][0], 0.9999999999536227949, 1e-12,
5962 "eraPn00a", "rn11", status);
5963 vvd(rn[0][1], 0.8836238544090873336e-5, 1e-14,
5964 "eraPn00a", "rn12", status);
5965 vvd(rn[0][2], 0.3830835237722400669e-5, 1e-14,
5966 "eraPn00a", "rn13", status);
5967
5968 vvd(rn[1][0], -0.8836082880798569274e-5, 1e-14,
5969 "eraPn00a", "rn21", status);
5970 vvd(rn[1][1], 0.9999999991354655028, 1e-12,
5971 "eraPn00a", "rn22", status);
5972 vvd(rn[1][2], -0.4063240865362499850e-4, 1e-14,
5973 "eraPn00a", "rn23", status);
5974
5975 vvd(rn[2][0], -0.3831194272065995866e-5, 1e-14,
5976 "eraPn00a", "rn31", status);
5977 vvd(rn[2][1], 0.4063237480216291775e-4, 1e-14,
5978 "eraPn00a", "rn32", status);
5979 vvd(rn[2][2], 0.9999999991671660338, 1e-12,
5980 "eraPn00a", "rn33", status);
5981
5982 vvd(rbpn[0][0], 0.9999989440476103435, 1e-12,
5983 "eraPn00a", "rbpn11", status);
5984 vvd(rbpn[0][1], -0.1332881761240011763e-2, 1e-14,
5985 "eraPn00a", "rbpn12", status);
5986 vvd(rbpn[0][2], -0.5790767434730085751e-3, 1e-14,
5987 "eraPn00a", "rbpn13", status);
5988
5989 vvd(rbpn[1][0], 0.1332858254308954658e-2, 1e-14,
5990 "eraPn00a", "rbpn21", status);
5991 vvd(rbpn[1][1], 0.9999991109044505577, 1e-12,
5992 "eraPn00a", "rbpn22", status);
5993 vvd(rbpn[1][2], -0.4097782710396580452e-4, 1e-14,
5994 "eraPn00a", "rbpn23", status);
5995
5996 vvd(rbpn[2][0], 0.5791308472168152904e-3, 1e-14,
5997 "eraPn00a", "rbpn31", status);
5998 vvd(rbpn[2][1], 0.4020595661591500259e-4, 1e-14,
5999 "eraPn00a", "rbpn32", status);
6000 vvd(rbpn[2][2], 0.9999998314954572304, 1e-12,
6001 "eraPn00a", "rbpn33", status);
6002
6003}
6004
6005static void t_pn00b(int *status)
6006/*
6007** - - - - - - - -
6008** t _ p n 0 0 b
6009** - - - - - - - -
6010**
6011** Test eraPn00b function.
6012**
6013** Returned:
6014** status int FALSE = success, TRUE = fail
6015**
6016** Called: eraPn00b, vvd
6017**
6018** This revision: 2013 August 7
6019*/
6020{
6021 double dpsi, deps, epsa,
6022 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6023
6024
6025 eraPn00b(2400000.5, 53736.0, &dpsi, &deps, &epsa,
6026 rb, rp, rbp, rn, rbpn);
6027
6028 vvd(dpsi, -0.9632552291148362783e-5, 1e-12,
6029 "eraPn00b", "dpsi", status);
6030 vvd(deps, 0.4063197106621159367e-4, 1e-12,
6031 "eraPn00b", "deps", status);
6032 vvd(epsa, 0.4090791789404229916, 1e-12, "eraPn00b", "epsa", status);
6033
6034 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
6035 "eraPn00b", "rb11", status);
6036 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
6037 "eraPn00b", "rb12", status);
6038 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
6039 "eraPn00b", "rb13", status);
6040
6041 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
6042 "eraPn00b", "rb21", status);
6043 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6044 "eraPn00b", "rb22", status);
6045 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
6046 "eraPn00b", "rb23", status);
6047
6048 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
6049 "eraPn00b", "rb31", status);
6050 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
6051 "eraPn00b", "rb32", status);
6052 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6053 "eraPn00b", "rb33", status);
6054
6055 vvd(rp[0][0], 0.9999989300532289018, 1e-12,
6056 "eraPn00b", "rp11", status);
6057 vvd(rp[0][1], -0.1341647226791824349e-2, 1e-14,
6058 "eraPn00b", "rp12", status);
6059 vvd(rp[0][2], -0.5829880927190296547e-3, 1e-14,
6060 "eraPn00b", "rp13", status);
6061
6062 vvd(rp[1][0], 0.1341647231069759008e-2, 1e-14,
6063 "eraPn00b", "rp21", status);
6064 vvd(rp[1][1], 0.9999990999908750433, 1e-12,
6065 "eraPn00b", "rp22", status);
6066 vvd(rp[1][2], -0.3837444441583715468e-6, 1e-14,
6067 "eraPn00b", "rp23", status);
6068
6069 vvd(rp[2][0], 0.5829880828740957684e-3, 1e-14,
6070 "eraPn00b", "rp31", status);
6071 vvd(rp[2][1], -0.3984203267708834759e-6, 1e-14,
6072 "eraPn00b", "rp32", status);
6073 vvd(rp[2][2], 0.9999998300623538046, 1e-12,
6074 "eraPn00b", "rp33", status);
6075
6076 vvd(rbp[0][0], 0.9999989300052243993, 1e-12,
6077 "eraPn00b", "rbp11", status);
6078 vvd(rbp[0][1], -0.1341717990239703727e-2, 1e-14,
6079 "eraPn00b", "rbp12", status);
6080 vvd(rbp[0][2], -0.5829075749891684053e-3, 1e-14,
6081 "eraPn00b", "rbp13", status);
6082
6083 vvd(rbp[1][0], 0.1341718013831739992e-2, 1e-14,
6084 "eraPn00b", "rbp21", status);
6085 vvd(rbp[1][1], 0.9999990998959191343, 1e-12,
6086 "eraPn00b", "rbp22", status);
6087 vvd(rbp[1][2], -0.3505759733565421170e-6, 1e-14,
6088 "eraPn00b", "rbp23", status);
6089
6090 vvd(rbp[2][0], 0.5829075206857717883e-3, 1e-14,
6091 "eraPn00b", "rbp31", status);
6092 vvd(rbp[2][1], -0.4315219955198608970e-6, 1e-14,
6093 "eraPn00b", "rbp32", status);
6094 vvd(rbp[2][2], 0.9999998301093036269, 1e-12,
6095 "eraPn00b", "rbp33", status);
6096
6097 vvd(rn[0][0], 0.9999999999536069682, 1e-12,
6098 "eraPn00b", "rn11", status);
6099 vvd(rn[0][1], 0.8837746144871248011e-5, 1e-14,
6100 "eraPn00b", "rn12", status);
6101 vvd(rn[0][2], 0.3831488838252202945e-5, 1e-14,
6102 "eraPn00b", "rn13", status);
6103
6104 vvd(rn[1][0], -0.8837590456632304720e-5, 1e-14,
6105 "eraPn00b", "rn21", status);
6106 vvd(rn[1][1], 0.9999999991354692733, 1e-12,
6107 "eraPn00b", "rn22", status);
6108 vvd(rn[1][2], -0.4063198798559591654e-4, 1e-14,
6109 "eraPn00b", "rn23", status);
6110
6111 vvd(rn[2][0], -0.3831847930134941271e-5, 1e-14,
6112 "eraPn00b", "rn31", status);
6113 vvd(rn[2][1], 0.4063195412258168380e-4, 1e-14,
6114 "eraPn00b", "rn32", status);
6115 vvd(rn[2][2], 0.9999999991671806225, 1e-12,
6116 "eraPn00b", "rn33", status);
6117
6118 vvd(rbpn[0][0], 0.9999989440499982806, 1e-12,
6119 "eraPn00b", "rbpn11", status);
6120 vvd(rbpn[0][1], -0.1332880253640849194e-2, 1e-14,
6121 "eraPn00b", "rbpn12", status);
6122 vvd(rbpn[0][2], -0.5790760898731091166e-3, 1e-14,
6123 "eraPn00b", "rbpn13", status);
6124
6125 vvd(rbpn[1][0], 0.1332856746979949638e-2, 1e-14,
6126 "eraPn00b", "rbpn21", status);
6127 vvd(rbpn[1][1], 0.9999991109064768883, 1e-12,
6128 "eraPn00b", "rbpn22", status);
6129 vvd(rbpn[1][2], -0.4097740555723081811e-4, 1e-14,
6130 "eraPn00b", "rbpn23", status);
6131
6132 vvd(rbpn[2][0], 0.5791301929950208873e-3, 1e-14,
6133 "eraPn00b", "rbpn31", status);
6134 vvd(rbpn[2][1], 0.4020553681373720832e-4, 1e-14,
6135 "eraPn00b", "rbpn32", status);
6136 vvd(rbpn[2][2], 0.9999998314958529887, 1e-12,
6137 "eraPn00b", "rbpn33", status);
6138
6139}
6140
6141static void t_pn06a(int *status)
6142/*
6143** - - - - - - - -
6144** t _ p n 0 6 a
6145** - - - - - - - -
6146**
6147** Test eraPn06a function.
6148**
6149** Returned:
6150** status int FALSE = success, TRUE = fail
6151**
6152** Called: eraPn06a, vvd
6153**
6154** This revision: 2013 August 7
6155*/
6156{
6157 double dpsi, deps, epsa;
6158 double rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6159
6160
6161 eraPn06a(2400000.5, 53736.0, &dpsi, &deps, &epsa,
6162 rb, rp, rbp, rn, rbpn);
6163
6164 vvd(dpsi, -0.9630912025820308797e-5, 1e-12,
6165 "eraPn06a", "dpsi", status);
6166 vvd(deps, 0.4063238496887249798e-4, 1e-12,
6167 "eraPn06a", "deps", status);
6168 vvd(epsa, 0.4090789763356509926, 1e-12, "eraPn06a", "epsa", status);
6169
6170 vvd(rb[0][0], 0.9999999999999942497, 1e-12,
6171 "eraPn06a", "rb11", status);
6172 vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
6173 "eraPn06a", "rb12", status);
6174 vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
6175 "eraPn06a", "rb13", status);
6176
6177 vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
6178 "eraPn06a", "rb21", status);
6179 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6180 "eraPn06a", "rb22", status);
6181 vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
6182 "eraPn06a", "rb23", status);
6183
6184 vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
6185 "eraPn06a", "rb31", status);
6186 vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
6187 "eraPn06a", "rb32", status);
6188 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6189 "eraPn06a", "rb33", status);
6190
6191 vvd(rp[0][0], 0.9999989300536854831, 1e-12,
6192 "eraPn06a", "rp11", status);
6193 vvd(rp[0][1], -0.1341646886204443795e-2, 1e-14,
6194 "eraPn06a", "rp12", status);
6195 vvd(rp[0][2], -0.5829880933488627759e-3, 1e-14,
6196 "eraPn06a", "rp13", status);
6197
6198 vvd(rp[1][0], 0.1341646890569782183e-2, 1e-14,
6199 "eraPn06a", "rp21", status);
6200 vvd(rp[1][1], 0.9999990999913319321, 1e-12,
6201 "eraPn06a", "rp22", status);
6202 vvd(rp[1][2], -0.3835944216374477457e-6, 1e-14,
6203 "eraPn06a", "rp23", status);
6204
6205 vvd(rp[2][0], 0.5829880833027867368e-3, 1e-14,
6206 "eraPn06a", "rp31", status);
6207 vvd(rp[2][1], -0.3985701514686976112e-6, 1e-14,
6208 "eraPn06a", "rp32", status);
6209 vvd(rp[2][2], 0.9999998300623534950, 1e-12,
6210 "eraPn06a", "rp33", status);
6211
6212 vvd(rbp[0][0], 0.9999989300056797893, 1e-12,
6213 "eraPn06a", "rbp11", status);
6214 vvd(rbp[0][1], -0.1341717650545059598e-2, 1e-14,
6215 "eraPn06a", "rbp12", status);
6216 vvd(rbp[0][2], -0.5829075756493728856e-3, 1e-14,
6217 "eraPn06a", "rbp13", status);
6218
6219 vvd(rbp[1][0], 0.1341717674223918101e-2, 1e-14,
6220 "eraPn06a", "rbp21", status);
6221 vvd(rbp[1][1], 0.9999990998963748448, 1e-12,
6222 "eraPn06a", "rbp22", status);
6223 vvd(rbp[1][2], -0.3504269280170069029e-6, 1e-14,
6224 "eraPn06a", "rbp23", status);
6225
6226 vvd(rbp[2][0], 0.5829075211461454599e-3, 1e-14,
6227 "eraPn06a", "rbp31", status);
6228 vvd(rbp[2][1], -0.4316708436255949093e-6, 1e-14,
6229 "eraPn06a", "rbp32", status);
6230 vvd(rbp[2][2], 0.9999998301093032943, 1e-12,
6231 "eraPn06a", "rbp33", status);
6232
6233 vvd(rn[0][0], 0.9999999999536227668, 1e-12,
6234 "eraPn06a", "rn11", status);
6235 vvd(rn[0][1], 0.8836241998111535233e-5, 1e-14,
6236 "eraPn06a", "rn12", status);
6237 vvd(rn[0][2], 0.3830834608415287707e-5, 1e-14,
6238 "eraPn06a", "rn13", status);
6239
6240 vvd(rn[1][0], -0.8836086334870740138e-5, 1e-14,
6241 "eraPn06a", "rn21", status);
6242 vvd(rn[1][1], 0.9999999991354657474, 1e-12,
6243 "eraPn06a", "rn22", status);
6244 vvd(rn[1][2], -0.4063240188248455065e-4, 1e-14,
6245 "eraPn06a", "rn23", status);
6246
6247 vvd(rn[2][0], -0.3831193642839398128e-5, 1e-14,
6248 "eraPn06a", "rn31", status);
6249 vvd(rn[2][1], 0.4063236803101479770e-4, 1e-14,
6250 "eraPn06a", "rn32", status);
6251 vvd(rn[2][2], 0.9999999991671663114, 1e-12,
6252 "eraPn06a", "rn33", status);
6253
6254 vvd(rbpn[0][0], 0.9999989440480669738, 1e-12,
6255 "eraPn06a", "rbpn11", status);
6256 vvd(rbpn[0][1], -0.1332881418091915973e-2, 1e-14,
6257 "eraPn06a", "rbpn12", status);
6258 vvd(rbpn[0][2], -0.5790767447612042565e-3, 1e-14,
6259 "eraPn06a", "rbpn13", status);
6260
6261 vvd(rbpn[1][0], 0.1332857911250989133e-2, 1e-14,
6262 "eraPn06a", "rbpn21", status);
6263 vvd(rbpn[1][1], 0.9999991109049141908, 1e-12,
6264 "eraPn06a", "rbpn22", status);
6265 vvd(rbpn[1][2], -0.4097767128546784878e-4, 1e-14,
6266 "eraPn06a", "rbpn23", status);
6267
6268 vvd(rbpn[2][0], 0.5791308482835292617e-3, 1e-14,
6269 "eraPn06a", "rbpn31", status);
6270 vvd(rbpn[2][1], 0.4020580099454020310e-4, 1e-14,
6271 "eraPn06a", "rbpn32", status);
6272 vvd(rbpn[2][2], 0.9999998314954628695, 1e-12,
6273 "eraPn06a", "rbpn33", status);
6274
6275}
6276
6277static void t_pn06(int *status)
6278/*
6279** - - - - - - -
6280** t _ p n 0 6
6281** - - - - - - -
6282**
6283** Test eraPn06 function.
6284**
6285** Returned:
6286** status int FALSE = success, TRUE = fail
6287**
6288** Called: eraPn06, vvd
6289**
6290** This revision: 2013 August 7
6291*/
6292{
6293 double dpsi, deps, epsa,
6294 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6295
6296
6297 dpsi = -0.9632552291149335877e-5;
6298 deps = 0.4063197106621141414e-4;
6299
6300 eraPn06(2400000.5, 53736.0, dpsi, deps,
6301 &epsa, rb, rp, rbp, rn, rbpn);
6302
6303 vvd(epsa, 0.4090789763356509926, 1e-12, "eraPn06", "epsa", status);
6304
6305 vvd(rb[0][0], 0.9999999999999942497, 1e-12,
6306 "eraPn06", "rb11", status);
6307 vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
6308 "eraPn06", "rb12", status);
6309 vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
6310 "eraPn06", "rb13", status);
6311
6312 vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
6313 "eraPn06", "rb21", status);
6314 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6315 "eraPn06", "rb22", status);
6316 vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
6317 "eraPn06", "rb23", status);
6318
6319 vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
6320 "eraPn06", "rb31", status);
6321 vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
6322 "eraPn06", "rb32", status);
6323 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6324 "eraPn06", "rb33", status);
6325
6326 vvd(rp[0][0], 0.9999989300536854831, 1e-12,
6327 "eraPn06", "rp11", status);
6328 vvd(rp[0][1], -0.1341646886204443795e-2, 1e-14,
6329 "eraPn06", "rp12", status);
6330 vvd(rp[0][2], -0.5829880933488627759e-3, 1e-14,
6331 "eraPn06", "rp13", status);
6332
6333 vvd(rp[1][0], 0.1341646890569782183e-2, 1e-14,
6334 "eraPn06", "rp21", status);
6335 vvd(rp[1][1], 0.9999990999913319321, 1e-12,
6336 "eraPn06", "rp22", status);
6337 vvd(rp[1][2], -0.3835944216374477457e-6, 1e-14,
6338 "eraPn06", "rp23", status);
6339
6340 vvd(rp[2][0], 0.5829880833027867368e-3, 1e-14,
6341 "eraPn06", "rp31", status);
6342 vvd(rp[2][1], -0.3985701514686976112e-6, 1e-14,
6343 "eraPn06", "rp32", status);
6344 vvd(rp[2][2], 0.9999998300623534950, 1e-12,
6345 "eraPn06", "rp33", status);
6346
6347 vvd(rbp[0][0], 0.9999989300056797893, 1e-12,
6348 "eraPn06", "rbp11", status);
6349 vvd(rbp[0][1], -0.1341717650545059598e-2, 1e-14,
6350 "eraPn06", "rbp12", status);
6351 vvd(rbp[0][2], -0.5829075756493728856e-3, 1e-14,
6352 "eraPn06", "rbp13", status);
6353
6354 vvd(rbp[1][0], 0.1341717674223918101e-2, 1e-14,
6355 "eraPn06", "rbp21", status);
6356 vvd(rbp[1][1], 0.9999990998963748448, 1e-12,
6357 "eraPn06", "rbp22", status);
6358 vvd(rbp[1][2], -0.3504269280170069029e-6, 1e-14,
6359 "eraPn06", "rbp23", status);
6360
6361 vvd(rbp[2][0], 0.5829075211461454599e-3, 1e-14,
6362 "eraPn06", "rbp31", status);
6363 vvd(rbp[2][1], -0.4316708436255949093e-6, 1e-14,
6364 "eraPn06", "rbp32", status);
6365 vvd(rbp[2][2], 0.9999998301093032943, 1e-12,
6366 "eraPn06", "rbp33", status);
6367
6368 vvd(rn[0][0], 0.9999999999536069682, 1e-12,
6369 "eraPn06", "rn11", status);
6370 vvd(rn[0][1], 0.8837746921149881914e-5, 1e-14,
6371 "eraPn06", "rn12", status);
6372 vvd(rn[0][2], 0.3831487047682968703e-5, 1e-14,
6373 "eraPn06", "rn13", status);
6374
6375 vvd(rn[1][0], -0.8837591232983692340e-5, 1e-14,
6376 "eraPn06", "rn21", status);
6377 vvd(rn[1][1], 0.9999999991354692664, 1e-12,
6378 "eraPn06", "rn22", status);
6379 vvd(rn[1][2], -0.4063198798558931215e-4, 1e-14,
6380 "eraPn06", "rn23", status);
6381
6382 vvd(rn[2][0], -0.3831846139597250235e-5, 1e-14,
6383 "eraPn06", "rn31", status);
6384 vvd(rn[2][1], 0.4063195412258792914e-4, 1e-14,
6385 "eraPn06", "rn32", status);
6386 vvd(rn[2][2], 0.9999999991671806293, 1e-12,
6387 "eraPn06", "rn33", status);
6388
6389 vvd(rbpn[0][0], 0.9999989440504506688, 1e-12,
6390 "eraPn06", "rbpn11", status);
6391 vvd(rbpn[0][1], -0.1332879913170492655e-2, 1e-14,
6392 "eraPn06", "rbpn12", status);
6393 vvd(rbpn[0][2], -0.5790760923225655753e-3, 1e-14,
6394 "eraPn06", "rbpn13", status);
6395
6396 vvd(rbpn[1][0], 0.1332856406595754748e-2, 1e-14,
6397 "eraPn06", "rbpn21", status);
6398 vvd(rbpn[1][1], 0.9999991109069366795, 1e-12,
6399 "eraPn06", "rbpn22", status);
6400 vvd(rbpn[1][2], -0.4097725651142641812e-4, 1e-14,
6401 "eraPn06", "rbpn23", status);
6402
6403 vvd(rbpn[2][0], 0.5791301952321296716e-3, 1e-14,
6404 "eraPn06", "rbpn31", status);
6405 vvd(rbpn[2][1], 0.4020538796195230577e-4, 1e-14,
6406 "eraPn06", "rbpn32", status);
6407 vvd(rbpn[2][2], 0.9999998314958576778, 1e-12,
6408 "eraPn06", "rbpn33", status);
6409
6410}
6411
6412static void t_pnm00a(int *status)
6413/*
6414** - - - - - - - - -
6415** t _ p n m 0 0 a
6416** - - - - - - - - -
6417**
6418** Test eraPnm00a function.
6419**
6420** Returned:
6421** status int FALSE = success, TRUE = fail
6422**
6423** Called: eraPnm00a, vvd
6424**
6425** This revision: 2013 August 7
6426*/
6427{
6428 double rbpn[3][3];
6429
6430
6431 eraPnm00a(2400000.5, 50123.9999, rbpn);
6432
6433 vvd(rbpn[0][0], 0.9999995832793134257, 1e-12,
6434 "eraPnm00a", "11", status);
6435 vvd(rbpn[0][1], 0.8372384254137809439e-3, 1e-14,
6436 "eraPnm00a", "12", status);
6437 vvd(rbpn[0][2], 0.3639684306407150645e-3, 1e-14,
6438 "eraPnm00a", "13", status);
6439
6440 vvd(rbpn[1][0], -0.8372535226570394543e-3, 1e-14,
6441 "eraPnm00a", "21", status);
6442 vvd(rbpn[1][1], 0.9999996486491582471, 1e-12,
6443 "eraPnm00a", "22", status);
6444 vvd(rbpn[1][2], 0.4132915262664072381e-4, 1e-14,
6445 "eraPnm00a", "23", status);
6446
6447 vvd(rbpn[2][0], -0.3639337004054317729e-3, 1e-14,
6448 "eraPnm00a", "31", status);
6449 vvd(rbpn[2][1], -0.4163386925461775873e-4, 1e-14,
6450 "eraPnm00a", "32", status);
6451 vvd(rbpn[2][2], 0.9999999329094390695, 1e-12,
6452 "eraPnm00a", "33", status);
6453
6454}
6455
6456static void t_pnm00b(int *status)
6457/*
6458** - - - - - - - - -
6459** t _ p n m 0 0 b
6460** - - - - - - - - -
6461**
6462** Test eraPnm00b function.
6463**
6464** Returned:
6465** status int FALSE = success, TRUE = fail
6466**
6467** Called: eraPnm00b, vvd
6468**
6469** This revision: 2013 August 7
6470*/
6471{
6472 double rbpn[3][3];
6473
6474
6475 eraPnm00b(2400000.5, 50123.9999, rbpn);
6476
6477 vvd(rbpn[0][0], 0.9999995832776208280, 1e-12,
6478 "eraPnm00b", "11", status);
6479 vvd(rbpn[0][1], 0.8372401264429654837e-3, 1e-14,
6480 "eraPnm00b", "12", status);
6481 vvd(rbpn[0][2], 0.3639691681450271771e-3, 1e-14,
6482 "eraPnm00b", "13", status);
6483
6484 vvd(rbpn[1][0], -0.8372552234147137424e-3, 1e-14,
6485 "eraPnm00b", "21", status);
6486 vvd(rbpn[1][1], 0.9999996486477686123, 1e-12,
6487 "eraPnm00b", "22", status);
6488 vvd(rbpn[1][2], 0.4132832190946052890e-4, 1e-14,
6489 "eraPnm00b", "23", status);
6490
6491 vvd(rbpn[2][0], -0.3639344385341866407e-3, 1e-14,
6492 "eraPnm00b", "31", status);
6493 vvd(rbpn[2][1], -0.4163303977421522785e-4, 1e-14,
6494 "eraPnm00b", "32", status);
6495 vvd(rbpn[2][2], 0.9999999329092049734, 1e-12,
6496 "eraPnm00b", "33", status);
6497
6498}
6499
6500static void t_pnm06a(int *status)
6501/*
6502** - - - - - - - - -
6503** t _ p n m 0 6 a
6504** - - - - - - - - -
6505**
6506** Test eraPnm06a function.
6507**
6508** Returned:
6509** status int FALSE = success, TRUE = fail
6510**
6511** Called: eraPnm06a, vvd
6512**
6513** This revision: 2013 August 7
6514*/
6515{
6516 double rbpn[3][3];
6517
6518
6519 eraPnm06a(2400000.5, 50123.9999, rbpn);
6520
6521 vvd(rbpn[0][0], 0.9999995832794205484, 1e-12,
6522 "eraPnm06a", "11", status);
6523 vvd(rbpn[0][1], 0.8372382772630962111e-3, 1e-14,
6524 "eraPnm06a", "12", status);
6525 vvd(rbpn[0][2], 0.3639684771140623099e-3, 1e-14,
6526 "eraPnm06a", "13", status);
6527
6528 vvd(rbpn[1][0], -0.8372533744743683605e-3, 1e-14,
6529 "eraPnm06a", "21", status);
6530 vvd(rbpn[1][1], 0.9999996486492861646, 1e-12,
6531 "eraPnm06a", "22", status);
6532 vvd(rbpn[1][2], 0.4132905944611019498e-4, 1e-14,
6533 "eraPnm06a", "23", status);
6534
6535 vvd(rbpn[2][0], -0.3639337469629464969e-3, 1e-14,
6536 "eraPnm06a", "31", status);
6537 vvd(rbpn[2][1], -0.4163377605910663999e-4, 1e-14,
6538 "eraPnm06a", "32", status);
6539 vvd(rbpn[2][2], 0.9999999329094260057, 1e-12,
6540 "eraPnm06a", "33", status);
6541
6542}
6543
6544static void t_pnm80(int *status)
6545/*
6546** - - - - - - - -
6547** t _ p n m 8 0
6548** - - - - - - - -
6549**
6550** Test eraPnm80 function.
6551**
6552** Returned:
6553** status int FALSE = success, TRUE = fail
6554**
6555** Called: eraPnm80, vvd
6556**
6557** This revision: 2013 August 7
6558*/
6559{
6560 double rmatpn[3][3];
6561
6562
6563 eraPnm80(2400000.5, 50123.9999, rmatpn);
6564
6565 vvd(rmatpn[0][0], 0.9999995831934611169, 1e-12,
6566 "eraPnm80", "11", status);
6567 vvd(rmatpn[0][1], 0.8373654045728124011e-3, 1e-14,
6568 "eraPnm80", "12", status);
6569 vvd(rmatpn[0][2], 0.3639121916933106191e-3, 1e-14,
6570 "eraPnm80", "13", status);
6571
6572 vvd(rmatpn[1][0], -0.8373804896118301316e-3, 1e-14,
6573 "eraPnm80", "21", status);
6574 vvd(rmatpn[1][1], 0.9999996485439674092, 1e-12,
6575 "eraPnm80", "22", status);
6576 vvd(rmatpn[1][2], 0.4130202510421549752e-4, 1e-14,
6577 "eraPnm80", "23", status);
6578
6579 vvd(rmatpn[2][0], -0.3638774789072144473e-3, 1e-14,
6580 "eraPnm80", "31", status);
6581 vvd(rmatpn[2][1], -0.4160674085851722359e-4, 1e-14,
6582 "eraPnm80", "32", status);
6583 vvd(rmatpn[2][2], 0.9999999329310274805, 1e-12,
6584 "eraPnm80", "33", status);
6585
6586}
6587
6588static void t_pom00(int *status)
6589/*
6590** - - - - - - - -
6591** t _ p o m 0 0
6592** - - - - - - - -
6593**
6594** Test eraPom00 function.
6595**
6596** Returned:
6597** status int FALSE = success, TRUE = fail
6598**
6599** Called: eraPom00, vvd
6600**
6601** This revision: 2013 August 7
6602*/
6603{
6604 double xp, yp, sp, rpom[3][3];
6605
6606
6607 xp = 2.55060238e-7;
6608 yp = 1.860359247e-6;
6609 sp = -0.1367174580728891460e-10;
6610
6611 eraPom00(xp, yp, sp, rpom);
6612
6613 vvd(rpom[0][0], 0.9999999999999674721, 1e-12,
6614 "eraPom00", "11", status);
6615 vvd(rpom[0][1], -0.1367174580728846989e-10, 1e-16,
6616 "eraPom00", "12", status);
6617 vvd(rpom[0][2], 0.2550602379999972345e-6, 1e-16,
6618 "eraPom00", "13", status);
6619
6620 vvd(rpom[1][0], 0.1414624947957029801e-10, 1e-16,
6621 "eraPom00", "21", status);
6622 vvd(rpom[1][1], 0.9999999999982695317, 1e-12,
6623 "eraPom00", "22", status);
6624 vvd(rpom[1][2], -0.1860359246998866389e-5, 1e-16,
6625 "eraPom00", "23", status);
6626
6627 vvd(rpom[2][0], -0.2550602379741215021e-6, 1e-16,
6628 "eraPom00", "31", status);
6629 vvd(rpom[2][1], 0.1860359247002414021e-5, 1e-16,
6630 "eraPom00", "32", status);
6631 vvd(rpom[2][2], 0.9999999999982370039, 1e-12,
6632 "eraPom00", "33", status);
6633
6634}
6635
6636static void t_ppp(int *status)
6637/*
6638** - - - - - -
6639** t _ p p p
6640** - - - - - -
6641**
6642** Test eraPpp function.
6643**
6644** Returned:
6645** status int FALSE = success, TRUE = fail
6646**
6647** Called: eraPpp, vvd
6648**
6649** This revision: 2013 August 7
6650*/
6651{
6652 double a[3], b[3], apb[3];
6653
6654
6655 a[0] = 2.0;
6656 a[1] = 2.0;
6657 a[2] = 3.0;
6658
6659 b[0] = 1.0;
6660 b[1] = 3.0;
6661 b[2] = 4.0;
6662
6663 eraPpp(a, b, apb);
6664
6665 vvd(apb[0], 3.0, 1e-12, "eraPpp", "0", status);
6666 vvd(apb[1], 5.0, 1e-12, "eraPpp", "1", status);
6667 vvd(apb[2], 7.0, 1e-12, "eraPpp", "2", status);
6668
6669}
6670
6671static void t_ppsp(int *status)
6672/*
6673** - - - - - - -
6674** t _ p p s p
6675** - - - - - - -
6676**
6677** Test eraPpsp function.
6678**
6679** Returned:
6680** status int FALSE = success, TRUE = fail
6681**
6682** Called: eraPpsp, vvd
6683**
6684** This revision: 2013 August 7
6685*/
6686{
6687 double a[3], s, b[3], apsb[3];
6688
6689
6690 a[0] = 2.0;
6691 a[1] = 2.0;
6692 a[2] = 3.0;
6693
6694 s = 5.0;
6695
6696 b[0] = 1.0;
6697 b[1] = 3.0;
6698 b[2] = 4.0;
6699
6700 eraPpsp(a, s, b, apsb);
6701
6702 vvd(apsb[0], 7.0, 1e-12, "eraPpsp", "0", status);
6703 vvd(apsb[1], 17.0, 1e-12, "eraPpsp", "1", status);
6704 vvd(apsb[2], 23.0, 1e-12, "eraPpsp", "2", status);
6705
6706}
6707
6708static void t_pr00(int *status)
6709/*
6710** - - - - - - -
6711** t _ p r 0 0
6712** - - - - - - -
6713**
6714** Test eraPr00 function.
6715**
6716** Returned:
6717** status int FALSE = success, TRUE = fail
6718**
6719** Called: eraPr00, vvd
6720**
6721** This revision: 2013 August 7
6722*/
6723{
6724 double dpsipr, depspr;
6725
6726 eraPr00(2400000.5, 53736, &dpsipr, &depspr);
6727
6728 vvd(dpsipr, -0.8716465172668347629e-7, 1e-22,
6729 "eraPr00", "dpsipr", status);
6730 vvd(depspr, -0.7342018386722813087e-8, 1e-22,
6731 "eraPr00", "depspr", status);
6732
6733}
6734
6735static void t_prec76(int *status)
6736/*
6737** - - - - - - - - -
6738** t _ p r e c 7 6
6739** - - - - - - - - -
6740**
6741** Test eraPrec76 function.
6742**
6743** Returned:
6744** status int FALSE = success, TRUE = fail
6745**
6746** Called: eraPrec76, vvd
6747**
6748** This revision: 2013 August 7
6749*/
6750{
6751 double ep01, ep02, ep11, ep12, zeta, z, theta;
6752
6753
6754 ep01 = 2400000.5;
6755 ep02 = 33282.0;
6756 ep11 = 2400000.5;
6757 ep12 = 51544.0;
6758
6759 eraPrec76(ep01, ep02, ep11, ep12, &zeta, &z, &theta);
6760
6761 vvd(zeta, 0.5588961642000161243e-2, 1e-12,
6762 "eraPrec76", "zeta", status);
6763 vvd(z, 0.5589922365870680624e-2, 1e-12,
6764 "eraPrec76", "z", status);
6765 vvd(theta, 0.4858945471687296760e-2, 1e-12,
6766 "eraPrec76", "theta", status);
6767
6768}
6769
6770static void t_pv2p(int *status)
6771/*
6772** - - - - - - -
6773** t _ p v 2 p
6774** - - - - - - -
6775**
6776** Test eraPv2p function.
6777**
6778** Returned:
6779** status int FALSE = success, TRUE = fail
6780**
6781** Called: eraPv2p, vvd
6782**
6783** This revision: 2013 August 7
6784*/
6785{
6786 double pv[2][3], p[3];
6787
6788
6789 pv[0][0] = 0.3;
6790 pv[0][1] = 1.2;
6791 pv[0][2] = -2.5;
6792
6793 pv[1][0] = -0.5;
6794 pv[1][1] = 3.1;
6795 pv[1][2] = 0.9;
6796
6797 eraPv2p(pv, p);
6798
6799 vvd(p[0], 0.3, 0.0, "eraPv2p", "1", status);
6800 vvd(p[1], 1.2, 0.0, "eraPv2p", "2", status);
6801 vvd(p[2], -2.5, 0.0, "eraPv2p", "3", status);
6802
6803}
6804
6805static void t_pv2s(int *status)
6806/*
6807** - - - - - - -
6808** t _ p v 2 s
6809** - - - - - - -
6810**
6811** Test eraPv2s function.
6812**
6813** Returned:
6814** status int FALSE = success, TRUE = fail
6815**
6816** Called: eraPv2s, vvd
6817**
6818** This revision: 2013 August 7
6819*/
6820{
6821 double pv[2][3], theta, phi, r, td, pd, rd;
6822
6823
6824 pv[0][0] = -0.4514964673880165;
6825 pv[0][1] = 0.03093394277342585;
6826 pv[0][2] = 0.05594668105108779;
6827
6828 pv[1][0] = 1.292270850663260e-5;
6829 pv[1][1] = 2.652814182060692e-6;
6830 pv[1][2] = 2.568431853930293e-6;
6831
6832 eraPv2s(pv, &theta, &phi, &r, &td, &pd, &rd);
6833
6834 vvd(theta, 3.073185307179586515, 1e-12, "eraPv2s", "theta", status);
6835 vvd(phi, 0.1229999999999999992, 1e-12, "eraPv2s", "phi", status);
6836 vvd(r, 0.4559999999999999757, 1e-12, "eraPv2s", "r", status);
6837 vvd(td, -0.7800000000000000364e-5, 1e-16, "eraPv2s", "td", status);
6838 vvd(pd, 0.9010000000000001639e-5, 1e-16, "eraPv2s", "pd", status);
6839 vvd(rd, -0.1229999999999999832e-4, 1e-16, "eraPv2s", "rd", status);
6840
6841}
6842
6843static void t_pvdpv(int *status)
6844/*
6845** - - - - - - - -
6846** t _ p v d p v
6847** - - - - - - - -
6848**
6849** Test eraPvdpv function.
6850**
6851** Returned:
6852** status int FALSE = success, TRUE = fail
6853**
6854** Called: eraPvdpv, vvd
6855**
6856** This revision: 2013 August 7
6857*/
6858{
6859 double a[2][3], b[2][3], adb[2];
6860
6861
6862 a[0][0] = 2.0;
6863 a[0][1] = 2.0;
6864 a[0][2] = 3.0;
6865
6866 a[1][0] = 6.0;
6867 a[1][1] = 0.0;
6868 a[1][2] = 4.0;
6869
6870 b[0][0] = 1.0;
6871 b[0][1] = 3.0;
6872 b[0][2] = 4.0;
6873
6874 b[1][0] = 0.0;
6875 b[1][1] = 2.0;
6876 b[1][2] = 8.0;
6877
6878 eraPvdpv(a, b, adb);
6879
6880 vvd(adb[0], 20.0, 1e-12, "eraPvdpv", "1", status);
6881 vvd(adb[1], 50.0, 1e-12, "eraPvdpv", "2", status);
6882
6883}
6884
6885static void t_pvm(int *status)
6886/*
6887** - - - - - -
6888** t _ p v m
6889** - - - - - -
6890**
6891** Test eraPvm function.
6892**
6893** Returned:
6894** status int FALSE = success, TRUE = fail
6895**
6896** Called: eraPvm, vvd
6897**
6898** This revision: 2013 August 7
6899*/
6900{
6901 double pv[2][3], r, s;
6902
6903
6904 pv[0][0] = 0.3;
6905 pv[0][1] = 1.2;
6906 pv[0][2] = -2.5;
6907
6908 pv[1][0] = 0.45;
6909 pv[1][1] = -0.25;
6910 pv[1][2] = 1.1;
6911
6912 eraPvm(pv, &r, &s);
6913
6914 vvd(r, 2.789265136196270604, 1e-12, "eraPvm", "r", status);
6915 vvd(s, 1.214495780149111922, 1e-12, "eraPvm", "s", status);
6916
6917}
6918
6919static void t_pvmpv(int *status)
6920/*
6921** - - - - - - - -
6922** t _ p v m p v
6923** - - - - - - - -
6924**
6925** Test eraPvmpv function.
6926**
6927** Returned:
6928** status int FALSE = success, TRUE = fail
6929**
6930** Called: eraPvmpv, vvd
6931**
6932** This revision: 2013 August 7
6933*/
6934{
6935 double a[2][3], b[2][3], amb[2][3];
6936
6937
6938 a[0][0] = 2.0;
6939 a[0][1] = 2.0;
6940 a[0][2] = 3.0;
6941
6942 a[1][0] = 5.0;
6943 a[1][1] = 6.0;
6944 a[1][2] = 3.0;
6945
6946 b[0][0] = 1.0;
6947 b[0][1] = 3.0;
6948 b[0][2] = 4.0;
6949
6950 b[1][0] = 3.0;
6951 b[1][1] = 2.0;
6952 b[1][2] = 1.0;
6953
6954 eraPvmpv(a, b, amb);
6955
6956 vvd(amb[0][0], 1.0, 1e-12, "eraPvmpv", "11", status);
6957 vvd(amb[0][1], -1.0, 1e-12, "eraPvmpv", "21", status);
6958 vvd(amb[0][2], -1.0, 1e-12, "eraPvmpv", "31", status);
6959
6960 vvd(amb[1][0], 2.0, 1e-12, "eraPvmpv", "12", status);
6961 vvd(amb[1][1], 4.0, 1e-12, "eraPvmpv", "22", status);
6962 vvd(amb[1][2], 2.0, 1e-12, "eraPvmpv", "32", status);
6963
6964}
6965
6966static void t_pvppv(int *status)
6967/*
6968** - - - - - - - -
6969** t _ p v p p v
6970** - - - - - - - -
6971**
6972** Test eraPvppv function.
6973**
6974** Returned:
6975** status int FALSE = success, TRUE = fail
6976**
6977** Called: eraPvppv, vvd
6978**
6979** This revision: 2013 August 7
6980*/
6981{
6982 double a[2][3], b[2][3], apb[2][3];
6983
6984
6985 a[0][0] = 2.0;
6986 a[0][1] = 2.0;
6987 a[0][2] = 3.0;
6988
6989 a[1][0] = 5.0;
6990 a[1][1] = 6.0;
6991 a[1][2] = 3.0;
6992
6993 b[0][0] = 1.0;
6994 b[0][1] = 3.0;
6995 b[0][2] = 4.0;
6996
6997 b[1][0] = 3.0;
6998 b[1][1] = 2.0;
6999 b[1][2] = 1.0;
7000
7001 eraPvppv(a, b, apb);
7002
7003 vvd(apb[0][0], 3.0, 1e-12, "eraPvppv", "p1", status);
7004 vvd(apb[0][1], 5.0, 1e-12, "eraPvppv", "p2", status);
7005 vvd(apb[0][2], 7.0, 1e-12, "eraPvppv", "p3", status);
7006
7007 vvd(apb[1][0], 8.0, 1e-12, "eraPvppv", "v1", status);
7008 vvd(apb[1][1], 8.0, 1e-12, "eraPvppv", "v2", status);
7009 vvd(apb[1][2], 4.0, 1e-12, "eraPvppv", "v3", status);
7010
7011}
7012
7013static void t_pvstar(int *status)
7014/*
7015** - - - - - - - - -
7016** t _ p v s t a r
7017** - - - - - - - - -
7018**
7019** Test eraPvstar function.
7020**
7021** Returned:
7022** status int FALSE = success, TRUE = fail
7023**
7024** Called: eraPvstar, vvd, viv
7025**
7026** This revision: 2013 August 7
7027*/
7028{
7029 double pv[2][3], ra, dec, pmr, pmd, px, rv;
7030 int j;
7031
7032
7033 pv[0][0] = 126668.5912743160601;
7034 pv[0][1] = 2136.792716839935195;
7035 pv[0][2] = -245251.2339876830091;
7036
7037 pv[1][0] = -0.4051854035740712739e-2;
7038 pv[1][1] = -0.6253919754866173866e-2;
7039 pv[1][2] = 0.1189353719774107189e-1;
7040
7041 j = eraPvstar(pv, &ra, &dec, &pmr, &pmd, &px, &rv);
7042
7043 vvd(ra, 0.1686756e-1, 1e-12, "eraPvstar", "ra", status);
7044 vvd(dec, -1.093989828, 1e-12, "eraPvstar", "dec", status);
7045 vvd(pmr, -0.178323516e-4, 1e-16, "eraPvstar", "pmr", status);
7046 vvd(pmd, 0.2336024047e-5, 1e-16, "eraPvstar", "pmd", status);
7047 vvd(px, 0.74723, 1e-12, "eraPvstar", "px", status);
7048 vvd(rv, -21.6, 1e-11, "eraPvstar", "rv", status);
7049
7050 viv(j, 0, "eraPvstar", "j", status);
7051
7052}
7053
7054static void t_pvtob(int *status)
7055/*
7056** - - - - - - - -
7057** t _ p v t o b
7058** - - - - - - - -
7059**
7060** Test eraPvtob function.
7061**
7062** Returned:
7063** status int FALSE = success, TRUE = fail
7064**
7065** Called: eraPvtob, vvd
7066**
7067** This revision: 2013 October 2
7068*/
7069{
7070 double elong, phi, hm, xp, yp, sp, theta, pv[2][3];
7071
7072
7073 elong = 2.0;
7074 phi = 0.5;
7075 hm = 3000.0;
7076 xp = 1e-6;
7077 yp = -0.5e-6;
7078 sp = 1e-8;
7079 theta = 5.0;
7080
7081 eraPvtob(elong, phi, hm, xp, yp, sp, theta, pv);
7082
7083 vvd(pv[0][0], 4225081.367071159207, 1e-5,
7084 "eraPvtob", "p(1)", status);
7085 vvd(pv[0][1], 3681943.215856198144, 1e-5,
7086 "eraPvtob", "p(2)", status);
7087 vvd(pv[0][2], 3041149.399241260785, 1e-5,
7088 "eraPvtob", "p(3)", status);
7089 vvd(pv[1][0], -268.4915389365998787, 1e-9,
7090 "eraPvtob", "v(1)", status);
7091 vvd(pv[1][1], 308.0977983288903123, 1e-9,
7092 "eraPvtob", "v(2)", status);
7093 vvd(pv[1][2], 0, 0,
7094 "eraPvtob", "v(3)", status);
7095
7096}
7097
7098static void t_pvu(int *status)
7099/*
7100** - - - - - -
7101** t _ p v u
7102** - - - - - -
7103**
7104** Test eraPvu function.
7105**
7106** Returned:
7107** status int FALSE = success, TRUE = fail
7108**
7109** Called: eraPvu, vvd
7110**
7111** This revision: 2013 August 7
7112*/
7113{
7114 double pv[2][3], upv[2][3];
7115
7116
7117 pv[0][0] = 126668.5912743160734;
7118 pv[0][1] = 2136.792716839935565;
7119 pv[0][2] = -245251.2339876830229;
7120
7121 pv[1][0] = -0.4051854035740713039e-2;
7122 pv[1][1] = -0.6253919754866175788e-2;
7123 pv[1][2] = 0.1189353719774107615e-1;
7124
7125 eraPvu(2920.0, pv, upv);
7126
7127 vvd(upv[0][0], 126656.7598605317105, 1e-12,
7128 "eraPvu", "p1", status);
7129 vvd(upv[0][1], 2118.531271155726332, 1e-12,
7130 "eraPvu", "p2", status);
7131 vvd(upv[0][2], -245216.5048590656190, 1e-12,
7132 "eraPvu", "p3", status);
7133
7134 vvd(upv[1][0], -0.4051854035740713039e-2, 1e-12,
7135 "eraPvu", "v1", status);
7136 vvd(upv[1][1], -0.6253919754866175788e-2, 1e-12,
7137 "eraPvu", "v2", status);
7138 vvd(upv[1][2], 0.1189353719774107615e-1, 1e-12,
7139 "eraPvu", "v3", status);
7140
7141}
7142
7143static void t_pvup(int *status)
7144/*
7145** - - - - - - -
7146** t _ p v u p
7147** - - - - - - -
7148**
7149** Test eraPvup function.
7150**
7151** Returned:
7152** status int FALSE = success, TRUE = fail
7153**
7154** Called: eraPvup, vvd
7155**
7156** This revision: 2013 August 7
7157*/
7158{
7159 double pv[2][3], p[3];
7160
7161
7162 pv[0][0] = 126668.5912743160734;
7163 pv[0][1] = 2136.792716839935565;
7164 pv[0][2] = -245251.2339876830229;
7165
7166 pv[1][0] = -0.4051854035740713039e-2;
7167 pv[1][1] = -0.6253919754866175788e-2;
7168 pv[1][2] = 0.1189353719774107615e-1;
7169
7170 eraPvup(2920.0, pv, p);
7171
7172 vvd(p[0], 126656.7598605317105, 1e-12, "eraPvup", "1", status);
7173 vvd(p[1], 2118.531271155726332, 1e-12, "eraPvup", "2", status);
7174 vvd(p[2], -245216.5048590656190, 1e-12, "eraPvup", "3", status);
7175
7176}
7177
7178static void t_pvxpv(int *status)
7179/*
7180** - - - - - - - -
7181** t _ p v x p v
7182** - - - - - - - -
7183**
7184** Test eraPvxpv function.
7185**
7186** Returned:
7187** status int FALSE = success, TRUE = fail
7188**
7189** Called: eraPvxpv, vvd
7190**
7191** This revision: 2013 August 7
7192*/
7193{
7194 double a[2][3], b[2][3], axb[2][3];
7195
7196
7197 a[0][0] = 2.0;
7198 a[0][1] = 2.0;
7199 a[0][2] = 3.0;
7200
7201 a[1][0] = 6.0;
7202 a[1][1] = 0.0;
7203 a[1][2] = 4.0;
7204
7205 b[0][0] = 1.0;
7206 b[0][1] = 3.0;
7207 b[0][2] = 4.0;
7208
7209 b[1][0] = 0.0;
7210 b[1][1] = 2.0;
7211 b[1][2] = 8.0;
7212
7213 eraPvxpv(a, b, axb);
7214
7215 vvd(axb[0][0], -1.0, 1e-12, "eraPvxpv", "p1", status);
7216 vvd(axb[0][1], -5.0, 1e-12, "eraPvxpv", "p2", status);
7217 vvd(axb[0][2], 4.0, 1e-12, "eraPvxpv", "p3", status);
7218
7219 vvd(axb[1][0], -2.0, 1e-12, "eraPvxpv", "v1", status);
7220 vvd(axb[1][1], -36.0, 1e-12, "eraPvxpv", "v2", status);
7221 vvd(axb[1][2], 22.0, 1e-12, "eraPvxpv", "v3", status);
7222
7223}
7224
7225static void t_pxp(int *status)
7226/*
7227** - - - - - -
7228** t _ p x p
7229** - - - - - -
7230**
7231** Test eraPxp function.
7232**
7233** Returned:
7234** status int FALSE = success, TRUE = fail
7235**
7236** Called: eraPxp, vvd
7237**
7238** This revision: 2013 August 7
7239*/
7240{
7241 double a[3], b[3], axb[3];
7242
7243
7244 a[0] = 2.0;
7245 a[1] = 2.0;
7246 a[2] = 3.0;
7247
7248 b[0] = 1.0;
7249 b[1] = 3.0;
7250 b[2] = 4.0;
7251
7252 eraPxp(a, b, axb);
7253
7254 vvd(axb[0], -1.0, 1e-12, "eraPxp", "1", status);
7255 vvd(axb[1], -5.0, 1e-12, "eraPxp", "2", status);
7256 vvd(axb[2], 4.0, 1e-12, "eraPxp", "3", status);
7257
7258}
7259
7260static void t_refco(int *status)
7261/*
7262** - - - - - - - -
7263** t _ r e f c o
7264** - - - - - - - -
7265**
7266** Test eraRefco function.
7267**
7268** Returned:
7269** status int FALSE = success, TRUE = fail
7270**
7271** Called: eraRefco, vvd
7272**
7273** This revision: 2013 October 2
7274*/
7275{
7276 double phpa, tc, rh, wl, refa, refb;
7277
7278
7279 phpa = 800.0;
7280 tc = 10.0;
7281 rh = 0.9;
7282 wl = 0.4;
7283
7284 eraRefco(phpa, tc, rh, wl, &refa, &refb);
7285
7286 vvd(refa, 0.2264949956241415009e-3, 1e-15,
7287 "eraRefco", "refa", status);
7288 vvd(refb, -0.2598658261729343970e-6, 1e-18,
7289 "eraRefco", "refb", status);
7290
7291}
7292
7293static void t_rm2v(int *status)
7294/*
7295** - - - - - - -
7296** t _ r m 2 v
7297** - - - - - - -
7298**
7299** Test eraRm2v function.
7300**
7301** Returned:
7302** status int FALSE = success, TRUE = fail
7303**
7304** Called: eraRm2v, vvd
7305**
7306** This revision: 2013 August 7
7307*/
7308{
7309 double r[3][3], w[3];
7310
7311
7312 r[0][0] = 0.00;
7313 r[0][1] = -0.80;
7314 r[0][2] = -0.60;
7315
7316 r[1][0] = 0.80;
7317 r[1][1] = -0.36;
7318 r[1][2] = 0.48;
7319
7320 r[2][0] = 0.60;
7321 r[2][1] = 0.48;
7322 r[2][2] = -0.64;
7323
7324 eraRm2v(r, w);
7325
7326 vvd(w[0], 0.0, 1e-12, "eraRm2v", "1", status);
7327 vvd(w[1], 1.413716694115406957, 1e-12, "eraRm2v", "2", status);
7328 vvd(w[2], -1.884955592153875943, 1e-12, "eraRm2v", "3", status);
7329
7330}
7331
7332static void t_rv2m(int *status)
7333/*
7334** - - - - - - -
7335** t _ r v 2 m
7336** - - - - - - -
7337**
7338** Test eraRv2m function.
7339**
7340** Returned:
7341** status int FALSE = success, TRUE = fail
7342**
7343** Called: eraRv2m, vvd
7344**
7345** This revision: 2013 August 7
7346*/
7347{
7348 double w[3], r[3][3];
7349
7350
7351 w[0] = 0.0;
7352 w[1] = 1.41371669;
7353 w[2] = -1.88495559;
7354
7355 eraRv2m(w, r);
7356
7357 vvd(r[0][0], -0.7071067782221119905, 1e-14, "eraRv2m", "11", status);
7358 vvd(r[0][1], -0.5656854276809129651, 1e-14, "eraRv2m", "12", status);
7359 vvd(r[0][2], -0.4242640700104211225, 1e-14, "eraRv2m", "13", status);
7360
7361 vvd(r[1][0], 0.5656854276809129651, 1e-14, "eraRv2m", "21", status);
7362 vvd(r[1][1], -0.0925483394532274246, 1e-14, "eraRv2m", "22", status);
7363 vvd(r[1][2], -0.8194112531408833269, 1e-14, "eraRv2m", "23", status);
7364
7365 vvd(r[2][0], 0.4242640700104211225, 1e-14, "eraRv2m", "31", status);
7366 vvd(r[2][1], -0.8194112531408833269, 1e-14, "eraRv2m", "32", status);
7367 vvd(r[2][2], 0.3854415612311154341, 1e-14, "eraRv2m", "33", status);
7368
7369}
7370
7371static void t_rx(int *status)
7372/*
7373** - - - - -
7374** t _ r x
7375** - - - - -
7376**
7377** Test eraRx function.
7378**
7379** Returned:
7380** status int FALSE = success, TRUE = fail
7381**
7382** Called: eraRx, vvd
7383**
7384** This revision: 2013 August 7
7385*/
7386{
7387 double phi, r[3][3];
7388
7389
7390 phi = 0.3456789;
7391
7392 r[0][0] = 2.0;
7393 r[0][1] = 3.0;
7394 r[0][2] = 2.0;
7395
7396 r[1][0] = 3.0;
7397 r[1][1] = 2.0;
7398 r[1][2] = 3.0;
7399
7400 r[2][0] = 3.0;
7401 r[2][1] = 4.0;
7402 r[2][2] = 5.0;
7403
7404 eraRx(phi, r);
7405
7406 vvd(r[0][0], 2.0, 0.0, "eraRx", "11", status);
7407 vvd(r[0][1], 3.0, 0.0, "eraRx", "12", status);
7408 vvd(r[0][2], 2.0, 0.0, "eraRx", "13", status);
7409
7410 vvd(r[1][0], 3.839043388235612460, 1e-12, "eraRx", "21", status);
7411 vvd(r[1][1], 3.237033249594111899, 1e-12, "eraRx", "22", status);
7412 vvd(r[1][2], 4.516714379005982719, 1e-12, "eraRx", "23", status);
7413
7414 vvd(r[2][0], 1.806030415924501684, 1e-12, "eraRx", "31", status);
7415 vvd(r[2][1], 3.085711545336372503, 1e-12, "eraRx", "32", status);
7416 vvd(r[2][2], 3.687721683977873065, 1e-12, "eraRx", "33", status);
7417
7418}
7419
7420static void t_rxp(int *status)
7421/*
7422** - - - - - -
7423** t _ r x p
7424** - - - - - -
7425**
7426** Test eraRxp function.
7427**
7428** Returned:
7429** status int FALSE = success, TRUE = fail
7430**
7431** Called: eraRxp, vvd
7432**
7433** This revision: 2013 August 7
7434*/
7435{
7436 double r[3][3], p[3], rp[3];
7437
7438
7439 r[0][0] = 2.0;
7440 r[0][1] = 3.0;
7441 r[0][2] = 2.0;
7442
7443 r[1][0] = 3.0;
7444 r[1][1] = 2.0;
7445 r[1][2] = 3.0;
7446
7447 r[2][0] = 3.0;
7448 r[2][1] = 4.0;
7449 r[2][2] = 5.0;
7450
7451 p[0] = 0.2;
7452 p[1] = 1.5;
7453 p[2] = 0.1;
7454
7455 eraRxp(r, p, rp);
7456
7457 vvd(rp[0], 5.1, 1e-12, "eraRxp", "1", status);
7458 vvd(rp[1], 3.9, 1e-12, "eraRxp", "2", status);
7459 vvd(rp[2], 7.1, 1e-12, "eraRxp", "3", status);
7460
7461}
7462
7463static void t_rxpv(int *status)
7464/*
7465** - - - - - - -
7466** t _ r x p v
7467** - - - - - - -
7468**
7469** Test eraRxpv function.
7470**
7471** Returned:
7472** status int FALSE = success, TRUE = fail
7473**
7474** Called: eraRxpv, vvd
7475**
7476** This revision: 2013 August 7
7477*/
7478{
7479 double r[3][3], pv[2][3], rpv[2][3];
7480
7481
7482 r[0][0] = 2.0;
7483 r[0][1] = 3.0;
7484 r[0][2] = 2.0;
7485
7486 r[1][0] = 3.0;
7487 r[1][1] = 2.0;
7488 r[1][2] = 3.0;
7489
7490 r[2][0] = 3.0;
7491 r[2][1] = 4.0;
7492 r[2][2] = 5.0;
7493
7494 pv[0][0] = 0.2;
7495 pv[0][1] = 1.5;
7496 pv[0][2] = 0.1;
7497
7498 pv[1][0] = 1.5;
7499 pv[1][1] = 0.2;
7500 pv[1][2] = 0.1;
7501
7502 eraRxpv(r, pv, rpv);
7503
7504 vvd(rpv[0][0], 5.1, 1e-12, "eraRxpv", "11", status);
7505 vvd(rpv[1][0], 3.8, 1e-12, "eraRxpv", "12", status);
7506
7507 vvd(rpv[0][1], 3.9, 1e-12, "eraRxpv", "21", status);
7508 vvd(rpv[1][1], 5.2, 1e-12, "eraRxpv", "22", status);
7509
7510 vvd(rpv[0][2], 7.1, 1e-12, "eraRxpv", "31", status);
7511 vvd(rpv[1][2], 5.8, 1e-12, "eraRxpv", "32", status);
7512
7513}
7514
7515static void t_rxr(int *status)
7516/*
7517** - - - - - -
7518** t _ r x r
7519** - - - - - -
7520**
7521** Test eraRxr function.
7522**
7523** Returned:
7524** status int FALSE = success, TRUE = fail
7525**
7526** Called: eraRxr, vvd
7527**
7528** This revision: 2013 August 7
7529*/
7530{
7531 double a[3][3], b[3][3], atb[3][3];
7532
7533
7534 a[0][0] = 2.0;
7535 a[0][1] = 3.0;
7536 a[0][2] = 2.0;
7537
7538 a[1][0] = 3.0;
7539 a[1][1] = 2.0;
7540 a[1][2] = 3.0;
7541
7542 a[2][0] = 3.0;
7543 a[2][1] = 4.0;
7544 a[2][2] = 5.0;
7545
7546 b[0][0] = 1.0;
7547 b[0][1] = 2.0;
7548 b[0][2] = 2.0;
7549
7550 b[1][0] = 4.0;
7551 b[1][1] = 1.0;
7552 b[1][2] = 1.0;
7553
7554 b[2][0] = 3.0;
7555 b[2][1] = 0.0;
7556 b[2][2] = 1.0;
7557
7558 eraRxr(a, b, atb);
7559
7560 vvd(atb[0][0], 20.0, 1e-12, "eraRxr", "11", status);
7561 vvd(atb[0][1], 7.0, 1e-12, "eraRxr", "12", status);
7562 vvd(atb[0][2], 9.0, 1e-12, "eraRxr", "13", status);
7563
7564 vvd(atb[1][0], 20.0, 1e-12, "eraRxr", "21", status);
7565 vvd(atb[1][1], 8.0, 1e-12, "eraRxr", "22", status);
7566 vvd(atb[1][2], 11.0, 1e-12, "eraRxr", "23", status);
7567
7568 vvd(atb[2][0], 34.0, 1e-12, "eraRxr", "31", status);
7569 vvd(atb[2][1], 10.0, 1e-12, "eraRxr", "32", status);
7570 vvd(atb[2][2], 15.0, 1e-12, "eraRxr", "33", status);
7571
7572}
7573
7574static void t_ry(int *status)
7575/*
7576** - - - - -
7577** t _ r y
7578** - - - - -
7579**
7580** Test eraRy function.
7581**
7582** Returned:
7583** status int FALSE = success, TRUE = fail
7584**
7585** Called: eraRy, vvd
7586**
7587** This revision: 2013 August 7
7588*/
7589{
7590 double theta, r[3][3];
7591
7592
7593 theta = 0.3456789;
7594
7595 r[0][0] = 2.0;
7596 r[0][1] = 3.0;
7597 r[0][2] = 2.0;
7598
7599 r[1][0] = 3.0;
7600 r[1][1] = 2.0;
7601 r[1][2] = 3.0;
7602
7603 r[2][0] = 3.0;
7604 r[2][1] = 4.0;
7605 r[2][2] = 5.0;
7606
7607 eraRy(theta, r);
7608
7609 vvd(r[0][0], 0.8651847818978159930, 1e-12, "eraRy", "11", status);
7610 vvd(r[0][1], 1.467194920539316554, 1e-12, "eraRy", "12", status);
7611 vvd(r[0][2], 0.1875137911274457342, 1e-12, "eraRy", "13", status);
7612
7613 vvd(r[1][0], 3, 1e-12, "eraRy", "21", status);
7614 vvd(r[1][1], 2, 1e-12, "eraRy", "22", status);
7615 vvd(r[1][2], 3, 1e-12, "eraRy", "23", status);
7616
7617 vvd(r[2][0], 3.500207892850427330, 1e-12, "eraRy", "31", status);
7618 vvd(r[2][1], 4.779889022262298150, 1e-12, "eraRy", "32", status);
7619 vvd(r[2][2], 5.381899160903798712, 1e-12, "eraRy", "33", status);
7620
7621}
7622
7623static void t_rz(int *status)
7624/*
7625** - - - - -
7626** t _ r z
7627** - - - - -
7628**
7629** Test eraRz function.
7630**
7631** Returned:
7632** status int FALSE = success, TRUE = fail
7633**
7634** Called: eraRz, vvd
7635**
7636** This revision: 2013 August 7
7637*/
7638{
7639 double psi, r[3][3];
7640
7641
7642 psi = 0.3456789;
7643
7644 r[0][0] = 2.0;
7645 r[0][1] = 3.0;
7646 r[0][2] = 2.0;
7647
7648 r[1][0] = 3.0;
7649 r[1][1] = 2.0;
7650 r[1][2] = 3.0;
7651
7652 r[2][0] = 3.0;
7653 r[2][1] = 4.0;
7654 r[2][2] = 5.0;
7655
7656 eraRz(psi, r);
7657
7658 vvd(r[0][0], 2.898197754208926769, 1e-12, "eraRz", "11", status);
7659 vvd(r[0][1], 3.500207892850427330, 1e-12, "eraRz", "12", status);
7660 vvd(r[0][2], 2.898197754208926769, 1e-12, "eraRz", "13", status);
7661
7662 vvd(r[1][0], 2.144865911309686813, 1e-12, "eraRz", "21", status);
7663 vvd(r[1][1], 0.865184781897815993, 1e-12, "eraRz", "22", status);
7664 vvd(r[1][2], 2.144865911309686813, 1e-12, "eraRz", "23", status);
7665
7666 vvd(r[2][0], 3.0, 1e-12, "eraRz", "31", status);
7667 vvd(r[2][1], 4.0, 1e-12, "eraRz", "32", status);
7668 vvd(r[2][2], 5.0, 1e-12, "eraRz", "33", status);
7669
7670}
7671
7672static void t_s00a(int *status)
7673/*
7674** - - - - - - -
7675** t _ s 0 0 a
7676** - - - - - - -
7677**
7678** Test eraS00a function.
7679**
7680** Returned:
7681** status int FALSE = success, TRUE = fail
7682**
7683** Called: eraS00a, vvd
7684**
7685** This revision: 2013 August 7
7686*/
7687{
7688 double s;
7689
7690
7691 s = eraS00a(2400000.5, 52541.0);
7692
7693 vvd(s, -0.1340684448919163584e-7, 1e-18, "eraS00a", "", status);
7694
7695}
7696
7697static void t_s00b(int *status)
7698/*
7699** - - - - - - -
7700** t _ s 0 0 b
7701** - - - - - - -
7702**
7703** Test eraS00b function.
7704**
7705** Returned:
7706** status int FALSE = success, TRUE = fail
7707**
7708** Called: eraS00b, vvd
7709**
7710** This revision: 2013 August 7
7711*/
7712{
7713 double s;
7714
7715
7716 s = eraS00b(2400000.5, 52541.0);
7717
7718 vvd(s, -0.1340695782951026584e-7, 1e-18, "eraS00b", "", status);
7719
7720}
7721
7722static void t_s00(int *status)
7723/*
7724** - - - - - -
7725** t _ s 0 0
7726** - - - - - -
7727**
7728** Test eraS00 function.
7729**
7730** Returned:
7731** status int FALSE = success, TRUE = fail
7732**
7733** Called: eraS00, vvd
7734**
7735** This revision: 2013 August 7
7736*/
7737{
7738 double x, y, s;
7739
7740
7741 x = 0.5791308486706011000e-3;
7742 y = 0.4020579816732961219e-4;
7743
7744 s = eraS00(2400000.5, 53736.0, x, y);
7745
7746 vvd(s, -0.1220036263270905693e-7, 1e-18, "eraS00", "", status);
7747
7748}
7749
7750static void t_s06a(int *status)
7751/*
7752** - - - - - - -
7753** t _ s 0 6 a
7754** - - - - - - -
7755**
7756** Test eraS06a function.
7757**
7758** Returned:
7759** status int FALSE = success, TRUE = fail
7760**
7761** Called: eraS06a, vvd
7762**
7763** This revision: 2013 August 7
7764*/
7765{
7766 double s;
7767
7768
7769 s = eraS06a(2400000.5, 52541.0);
7770
7771 vvd(s, -0.1340680437291812383e-7, 1e-18, "eraS06a", "", status);
7772
7773}
7774
7775static void t_s06(int *status)
7776/*
7777** - - - - - -
7778** t _ s 0 6
7779** - - - - - -
7780**
7781** Test eraS06 function.
7782**
7783** Returned:
7784** status int FALSE = success, TRUE = fail
7785**
7786** Called: eraS06, vvd
7787**
7788** This revision: 2013 August 7
7789*/
7790{
7791 double x, y, s;
7792
7793
7794 x = 0.5791308486706011000e-3;
7795 y = 0.4020579816732961219e-4;
7796
7797 s = eraS06(2400000.5, 53736.0, x, y);
7798
7799 vvd(s, -0.1220032213076463117e-7, 1e-18, "eraS06", "", status);
7800
7801}
7802
7803static void t_s2c(int *status)
7804/*
7805** - - - - - -
7806** t _ s 2 c
7807** - - - - - -
7808**
7809** Test eraS2c function.
7810**
7811** Returned:
7812** status int FALSE = success, TRUE = fail
7813**
7814** Called: eraS2c, vvd
7815**
7816** This revision: 2013 August 7
7817*/
7818{
7819 double c[3];
7820
7821
7822 eraS2c(3.0123, -0.999, c);
7823
7824 vvd(c[0], -0.5366267667260523906, 1e-12, "eraS2c", "1", status);
7825 vvd(c[1], 0.0697711109765145365, 1e-12, "eraS2c", "2", status);
7826 vvd(c[2], -0.8409302618566214041, 1e-12, "eraS2c", "3", status);
7827
7828}
7829
7830static void t_s2p(int *status)
7831/*
7832** - - - - - -
7833** t _ s 2 p
7834** - - - - - -
7835**
7836** Test eraS2p function.
7837**
7838** Returned:
7839** status int FALSE = success, TRUE = fail
7840**
7841** Called: eraS2p, vvd
7842**
7843** This revision: 2013 August 7
7844*/
7845{
7846 double p[3];
7847
7848
7849 eraS2p(-3.21, 0.123, 0.456, p);
7850
7851 vvd(p[0], -0.4514964673880165228, 1e-12, "eraS2p", "x", status);
7852 vvd(p[1], 0.0309339427734258688, 1e-12, "eraS2p", "y", status);
7853 vvd(p[2], 0.0559466810510877933, 1e-12, "eraS2p", "z", status);
7854
7855}
7856
7857static void t_s2pv(int *status)
7858/*
7859** - - - - - - -
7860** t _ s 2 p v
7861** - - - - - - -
7862**
7863** Test eraS2pv function.
7864**
7865** Returned:
7866** status int FALSE = success, TRUE = fail
7867**
7868** Called: eraS2pv, vvd
7869**
7870** This revision: 2013 August 7
7871*/
7872{
7873 double pv[2][3];
7874
7875
7876 eraS2pv(-3.21, 0.123, 0.456, -7.8e-6, 9.01e-6, -1.23e-5, pv);
7877
7878 vvd(pv[0][0], -0.4514964673880165228, 1e-12, "eraS2pv", "x", status);
7879 vvd(pv[0][1], 0.0309339427734258688, 1e-12, "eraS2pv", "y", status);
7880 vvd(pv[0][2], 0.0559466810510877933, 1e-12, "eraS2pv", "z", status);
7881
7882 vvd(pv[1][0], 0.1292270850663260170e-4, 1e-16,
7883 "eraS2pv", "vx", status);
7884 vvd(pv[1][1], 0.2652814182060691422e-5, 1e-16,
7885 "eraS2pv", "vy", status);
7886 vvd(pv[1][2], 0.2568431853930292259e-5, 1e-16,
7887 "eraS2pv", "vz", status);
7888
7889}
7890
7891static void t_s2xpv(int *status)
7892/*
7893** - - - - - - - -
7894** t _ s 2 x p v
7895** - - - - - - - -
7896**
7897** Test eraS2xpv function.
7898**
7899** Returned:
7900** status int FALSE = success, TRUE = fail
7901**
7902** Called: eraS2xpv, vvd
7903**
7904** This revision: 2013 August 7
7905*/
7906{
7907 double s1, s2, pv[2][3], spv[2][3];
7908
7909
7910 s1 = 2.0;
7911 s2 = 3.0;
7912
7913 pv[0][0] = 0.3;
7914 pv[0][1] = 1.2;
7915 pv[0][2] = -2.5;
7916
7917 pv[1][0] = 0.5;
7918 pv[1][1] = 2.3;
7919 pv[1][2] = -0.4;
7920
7921 eraS2xpv(s1, s2, pv, spv);
7922
7923 vvd(spv[0][0], 0.6, 1e-12, "eraS2xpv", "p1", status);
7924 vvd(spv[0][1], 2.4, 1e-12, "eraS2xpv", "p2", status);
7925 vvd(spv[0][2], -5.0, 1e-12, "eraS2xpv", "p3", status);
7926
7927 vvd(spv[1][0], 1.5, 1e-12, "eraS2xpv", "v1", status);
7928 vvd(spv[1][1], 6.9, 1e-12, "eraS2xpv", "v2", status);
7929 vvd(spv[1][2], -1.2, 1e-12, "eraS2xpv", "v3", status);
7930
7931}
7932
7933static void t_sepp(int *status)
7934/*
7935** - - - - - - -
7936** t _ s e p p
7937** - - - - - - -
7938**
7939** Test eraSepp function.
7940**
7941** Returned:
7942** status int FALSE = success, TRUE = fail
7943**
7944** Called: eraSepp, vvd
7945**
7946** This revision: 2013 August 7
7947*/
7948{
7949 double a[3], b[3], s;
7950
7951
7952 a[0] = 1.0;
7953 a[1] = 0.1;
7954 a[2] = 0.2;
7955
7956 b[0] = -3.0;
7957 b[1] = 1e-3;
7958 b[2] = 0.2;
7959
7960 s = eraSepp(a, b);
7961
7962 vvd(s, 2.860391919024660768, 1e-12, "eraSepp", "", status);
7963
7964}
7965
7966static void t_seps(int *status)
7967/*
7968** - - - - - - -
7969** t _ s e p s
7970** - - - - - - -
7971**
7972** Test eraSeps function.
7973**
7974** Returned:
7975** status int FALSE = success, TRUE = fail
7976**
7977** Called: eraSeps, vvd
7978**
7979** This revision: 2013 August 7
7980*/
7981{
7982 double al, ap, bl, bp, s;
7983
7984
7985 al = 1.0;
7986 ap = 0.1;
7987
7988 bl = 0.2;
7989 bp = -3.0;
7990
7991 s = eraSeps(al, ap, bl, bp);
7992
7993 vvd(s, 2.346722016996998842, 1e-14, "eraSeps", "", status);
7994
7995}
7996
7997static void t_sp00(int *status)
7998/*
7999** - - - - - - -
8000** t _ s p 0 0
8001** - - - - - - -
8002**
8003** Test eraSp00 function.
8004**
8005** Returned:
8006** status int FALSE = success, TRUE = fail
8007**
8008** Called: eraSp00, vvd
8009**
8010** This revision: 2013 August 7
8011*/
8012{
8013 vvd(eraSp00(2400000.5, 52541.0),
8014 -0.6216698469981019309e-11, 1e-12, "eraSp00", "", status);
8015
8016}
8017
8018static void t_starpm(int *status)
8019/*
8020** - - - - - - - - -
8021** t _ s t a r p m
8022** - - - - - - - - -
8023**
8024** Test eraStarpm function.
8025**
8026** Returned:
8027** status int FALSE = success, TRUE = fail
8028**
8029** Called: eraStarpm, vvd, viv
8030**
8031** This revision: 2013 August 7
8032*/
8033{
8034 double ra1, dec1, pmr1, pmd1, px1, rv1;
8035 double ra2, dec2, pmr2, pmd2, px2, rv2;
8036 int j;
8037
8038
8039 ra1 = 0.01686756;
8040 dec1 = -1.093989828;
8041 pmr1 = -1.78323516e-5;
8042 pmd1 = 2.336024047e-6;
8043 px1 = 0.74723;
8044 rv1 = -21.6;
8045
8046 j = eraStarpm(ra1, dec1, pmr1, pmd1, px1, rv1,
8047 2400000.5, 50083.0, 2400000.5, 53736.0,
8048 &ra2, &dec2, &pmr2, &pmd2, &px2, &rv2);
8049
8050 vvd(ra2, 0.01668919069414242368, 1e-13,
8051 "eraStarpm", "ra", status);
8052 vvd(dec2, -1.093966454217127879, 1e-13,
8053 "eraStarpm", "dec", status);
8054 vvd(pmr2, -0.1783662682155932702e-4, 1e-17,
8055 "eraStarpm", "pmr", status);
8056 vvd(pmd2, 0.2338092915987603664e-5, 1e-17,
8057 "eraStarpm", "pmd", status);
8058 vvd(px2, 0.7473533835323493644, 1e-13,
8059 "eraStarpm", "px", status);
8060 vvd(rv2, -21.59905170476860786, 1e-11,
8061 "eraStarpm", "rv", status);
8062
8063 viv(j, 0, "eraStarpm", "j", status);
8064
8065}
8066
8067static void t_starpv(int *status)
8068/*
8069** - - - - - - - - -
8070** t _ s t a r p v
8071** - - - - - - - - -
8072**
8073** Test eraStarpv function.
8074**
8075** Returned:
8076** status int FALSE = success, TRUE = fail
8077**
8078** Called: eraStarpv, vvd, viv
8079**
8080** This revision: 2013 August 7
8081*/
8082{
8083 double ra, dec, pmr, pmd, px, rv, pv[2][3];
8084 int j;
8085
8086
8087 ra = 0.01686756;
8088 dec = -1.093989828;
8089 pmr = -1.78323516e-5;
8090 pmd = 2.336024047e-6;
8091 px = 0.74723;
8092 rv = -21.6;
8093
8094 j = eraStarpv(ra, dec, pmr, pmd, px, rv, pv);
8095
8096 vvd(pv[0][0], 126668.5912743160601, 1e-10,
8097 "eraStarpv", "11", status);
8098 vvd(pv[0][1], 2136.792716839935195, 1e-12,
8099 "eraStarpv", "12", status);
8100 vvd(pv[0][2], -245251.2339876830091, 1e-10,
8101 "eraStarpv", "13", status);
8102
8103 vvd(pv[1][0], -0.4051854035740712739e-2, 1e-13,
8104 "eraStarpv", "21", status);
8105 vvd(pv[1][1], -0.6253919754866173866e-2, 1e-15,
8106 "eraStarpv", "22", status);
8107 vvd(pv[1][2], 0.1189353719774107189e-1, 1e-13,
8108 "eraStarpv", "23", status);
8109
8110 viv(j, 0, "eraStarpv", "j", status);
8111
8112}
8113
8114static void t_sxp(int *status)
8115/*
8116** - - - - - -
8117** t _ s x p
8118** - - - - - -
8119**
8120** Test eraSxp function.
8121**
8122** Returned:
8123** status int FALSE = success, TRUE = fail
8124**
8125** Called: eraSxp, vvd
8126**
8127** This revision: 2013 August 7
8128*/
8129{
8130 double s, p[3], sp[3];
8131
8132
8133 s = 2.0;
8134
8135 p[0] = 0.3;
8136 p[1] = 1.2;
8137 p[2] = -2.5;
8138
8139 eraSxp(s, p, sp);
8140
8141 vvd(sp[0], 0.6, 0.0, "eraSxp", "1", status);
8142 vvd(sp[1], 2.4, 0.0, "eraSxp", "2", status);
8143 vvd(sp[2], -5.0, 0.0, "eraSxp", "3", status);
8144
8145}
8146
8147
8148static void t_sxpv(int *status)
8149/*
8150** - - - - - - -
8151** t _ s x p v
8152** - - - - - - -
8153**
8154** Test eraSxpv function.
8155**
8156** Returned:
8157** status int FALSE = success, TRUE = fail
8158**
8159** Called: eraSxpv, vvd
8160**
8161** This revision: 2013 August 7
8162*/
8163{
8164 double s, pv[2][3], spv[2][3];
8165
8166
8167 s = 2.0;
8168
8169 pv[0][0] = 0.3;
8170 pv[0][1] = 1.2;
8171 pv[0][2] = -2.5;
8172
8173 pv[1][0] = 0.5;
8174 pv[1][1] = 3.2;
8175 pv[1][2] = -0.7;
8176
8177 eraSxpv(s, pv, spv);
8178
8179 vvd(spv[0][0], 0.6, 0.0, "eraSxpv", "p1", status);
8180 vvd(spv[0][1], 2.4, 0.0, "eraSxpv", "p2", status);
8181 vvd(spv[0][2], -5.0, 0.0, "eraSxpv", "p3", status);
8182
8183 vvd(spv[1][0], 1.0, 0.0, "eraSxpv", "v1", status);
8184 vvd(spv[1][1], 6.4, 0.0, "eraSxpv", "v2", status);
8185 vvd(spv[1][2], -1.4, 0.0, "eraSxpv", "v3", status);
8186
8187}
8188
8189static void t_taitt(int *status)
8190/*
8191** - - - - - - - -
8192** t _ t a i t t
8193** - - - - - - - -
8194**
8195** Test eraTaitt function.
8196**
8197** Returned:
8198** status int FALSE = success, TRUE = fail
8199**
8200** Called: eraTaitt, vvd, viv
8201**
8202** This revision: 2013 August 7
8203*/
8204{
8205 double t1, t2;
8206 int j;
8207
8208
8209 j = eraTaitt(2453750.5, 0.892482639, &t1, &t2);
8210
8211 vvd(t1, 2453750.5, 1e-6, "eraTaitt", "t1", status);
8212 vvd(t2, 0.892855139, 1e-12, "eraTaitt", "t2", status);
8213 viv(j, 0, "eraTaitt", "j", status);
8214
8215}
8216
8217static void t_taiut1(int *status)
8218/*
8219** - - - - - - - - -
8220** t _ t a i u t 1
8221** - - - - - - - - -
8222**
8223** Test eraTaiut1 function.
8224**
8225** Returned:
8226** status int FALSE = success, TRUE = fail
8227**
8228** Called: eraTaiut1, vvd, viv
8229**
8230** This revision: 2013 August 7
8231*/
8232{
8233 double u1, u2;
8234 int j;
8235
8236
8237 j = eraTaiut1(2453750.5, 0.892482639, -32.6659, &u1, &u2);
8238
8239 vvd(u1, 2453750.5, 1e-6, "eraTaiut1", "u1", status);
8240 vvd(u2, 0.8921045614537037037, 1e-12, "eraTaiut1", "u2", status);
8241 viv(j, 0, "eraTaiut1", "j", status);
8242
8243}
8244
8245static void t_taiutc(int *status)
8246/*
8247** - - - - - - - - -
8248** t _ t a i u t c
8249** - - - - - - - - -
8250**
8251** Test eraTaiutc function.
8252**
8253** Returned:
8254** status LOGICAL TRUE = success, FALSE = fail
8255**
8256** Called: eraTaiutc, vvd, viv
8257**
8258** This revision: 2013 October 3
8259*/
8260{
8261 double u1, u2;
8262 int j;
8263
8264
8265 j = eraTaiutc(2453750.5, 0.892482639, &u1, &u2);
8266
8267 vvd(u1, 2453750.5, 1e-6, "eraTaiutc", "u1", status);
8268 vvd(u2, 0.8921006945555555556, 1e-12, "eraTaiutc", "u2", status);
8269 viv(j, 0, "eraTaiutc", "j", status);
8270
8271}
8272
8273static void t_tcbtdb(int *status)
8274/*
8275** - - - - - - - - -
8276** t _ t c b t d b
8277** - - - - - - - - -
8278**
8279** Test eraTcbtdb function.
8280**
8281** Returned:
8282** status int FALSE = success, TRUE = fail
8283**
8284** Called: eraTcbtdb, vvd, viv
8285**
8286** This revision: 2013 August 7
8287*/
8288{
8289 double b1, b2;
8290 int j;
8291
8292
8293 j = eraTcbtdb(2453750.5, 0.893019599, &b1, &b2);
8294
8295 vvd(b1, 2453750.5, 1e-6, "eraTcbtdb", "b1", status);
8296 vvd(b2, 0.8928551362746343397, 1e-12, "eraTcbtdb", "b2", status);
8297 viv(j, 0, "eraTcbtdb", "j", status);
8298
8299}
8300
8301static void t_tcgtt(int *status)
8302/*
8303** - - - - - - - -
8304** t _ t c g t t
8305** - - - - - - - -
8306**
8307** Test eraTcgtt function.
8308**
8309** Returned:
8310** status int FALSE = success, TRUE = fail
8311**
8312** Called: eraTcgtt, vvd, viv
8313**
8314** This revision: 2013 August 7
8315*/
8316{
8317 double t1, t2;
8318 int j;
8319
8320
8321 j = eraTcgtt(2453750.5, 0.892862531, &t1, &t2);
8322
8323 vvd(t1, 2453750.5, 1e-6, "eraTcgtt", "t1", status);
8324 vvd(t2, 0.8928551387488816828, 1e-12, "eraTcgtt", "t2", status);
8325 viv(j, 0, "eraTcgtt", "j", status);
8326
8327}
8328
8329static void t_tdbtcb(int *status)
8330/*
8331** - - - - - - - - -
8332** t _ t d b t c b
8333** - - - - - - - - -
8334**
8335** Test eraTdbtcb function.
8336**
8337** Returned:
8338** status int FALSE = success, TRUE = fail
8339**
8340** Called: eraTdbtcb, vvd, viv
8341**
8342** This revision: 2013 August 7
8343*/
8344{
8345 double b1, b2;
8346 int j;
8347
8348
8349 j = eraTdbtcb(2453750.5, 0.892855137, &b1, &b2);
8350
8351 vvd( b1, 2453750.5, 1e-6, "eraTdbtcb", "b1", status);
8352 vvd( b2, 0.8930195997253656716, 1e-12, "eraTdbtcb", "b2", status);
8353 viv(j, 0, "eraTdbtcb", "j", status);
8354
8355}
8356
8357static void t_tdbtt(int *status)
8358/*
8359** - - - - - - - -
8360** t _ t d b t t
8361** - - - - - - - -
8362**
8363** Test eraTdbtt function.
8364**
8365** Returned:
8366** status int FALSE = success, TRUE = fail
8367**
8368** Called: eraTdbtt, vvd, viv
8369**
8370** This revision: 2013 August 7
8371*/
8372{
8373 double t1, t2;
8374 int j;
8375
8376
8377 j = eraTdbtt(2453750.5, 0.892855137, -0.000201, &t1, &t2);
8378
8379 vvd(t1, 2453750.5, 1e-6, "eraTdbtt", "t1", status);
8380 vvd(t2, 0.8928551393263888889, 1e-12, "eraTdbtt", "t2", status);
8381 viv(j, 0, "eraTdbtt", "j", status);
8382
8383}
8384
8385static void t_tf2a(int *status)
8386/*
8387** - - - - - - -
8388** t _ t f 2 a
8389** - - - - - - -
8390**
8391** Test eraTf2a function.
8392**
8393** Returned:
8394** status int FALSE = success, TRUE = fail
8395**
8396** Called: eraTf2a, vvd, viv
8397**
8398** This revision: 2013 August 7
8399*/
8400{
8401 double a;
8402 int j;
8403
8404
8405 j = eraTf2a('+', 4, 58, 20.2, &a);
8406
8407 vvd(a, 1.301739278189537429, 1e-12, "eraTf2a", "a", status);
8408 viv(j, 0, "eraTf2a", "j", status);
8409
8410}
8411
8412static void t_tf2d(int *status)
8413/*
8414** - - - - - - -
8415** t _ t f 2 d
8416** - - - - - - -
8417**
8418** Test eraTf2d function.
8419**
8420** Returned:
8421** status int FALSE = success, TRUE = fail
8422**
8423** Called: eraTf2d, vvd, viv
8424**
8425** This revision: 2013 August 7
8426*/
8427{
8428 double d;
8429 int j;
8430
8431
8432 j = eraTf2d(' ', 23, 55, 10.9, &d);
8433
8434 vvd(d, 0.9966539351851851852, 1e-12, "eraTf2d", "d", status);
8435 viv(j, 0, "eraTf2d", "j", status);
8436
8437}
8438
8439static void t_tr(int *status)
8440/*
8441** - - - - -
8442** t _ t r
8443** - - - - -
8444**
8445** Test eraTr function.
8446**
8447** Returned:
8448** status int FALSE = success, TRUE = fail
8449**
8450** Called: eraTr, vvd
8451**
8452** This revision: 2013 August 7
8453*/
8454{
8455 double r[3][3], rt[3][3];
8456
8457
8458 r[0][0] = 2.0;
8459 r[0][1] = 3.0;
8460 r[0][2] = 2.0;
8461
8462 r[1][0] = 3.0;
8463 r[1][1] = 2.0;
8464 r[1][2] = 3.0;
8465
8466 r[2][0] = 3.0;
8467 r[2][1] = 4.0;
8468 r[2][2] = 5.0;
8469
8470 eraTr(r, rt);
8471
8472 vvd(rt[0][0], 2.0, 0.0, "eraTr", "11", status);
8473 vvd(rt[0][1], 3.0, 0.0, "eraTr", "12", status);
8474 vvd(rt[0][2], 3.0, 0.0, "eraTr", "13", status);
8475
8476 vvd(rt[1][0], 3.0, 0.0, "eraTr", "21", status);
8477 vvd(rt[1][1], 2.0, 0.0, "eraTr", "22", status);
8478 vvd(rt[1][2], 4.0, 0.0, "eraTr", "23", status);
8479
8480 vvd(rt[2][0], 2.0, 0.0, "eraTr", "31", status);
8481 vvd(rt[2][1], 3.0, 0.0, "eraTr", "32", status);
8482 vvd(rt[2][2], 5.0, 0.0, "eraTr", "33", status);
8483
8484}
8485
8486static void t_trxp(int *status)
8487/*
8488** - - - - - - -
8489** t _ t r x p
8490** - - - - - - -
8491**
8492** Test eraTrxp function.
8493**
8494** Returned:
8495** status int FALSE = success, TRUE = fail
8496**
8497** Called: eraTrxp, vvd
8498**
8499** This revision: 2013 August 7
8500*/
8501{
8502 double r[3][3], p[3], trp[3];
8503
8504
8505 r[0][0] = 2.0;
8506 r[0][1] = 3.0;
8507 r[0][2] = 2.0;
8508
8509 r[1][0] = 3.0;
8510 r[1][1] = 2.0;
8511 r[1][2] = 3.0;
8512
8513 r[2][0] = 3.0;
8514 r[2][1] = 4.0;
8515 r[2][2] = 5.0;
8516
8517 p[0] = 0.2;
8518 p[1] = 1.5;
8519 p[2] = 0.1;
8520
8521 eraTrxp(r, p, trp);
8522
8523 vvd(trp[0], 5.2, 1e-12, "eraTrxp", "1", status);
8524 vvd(trp[1], 4.0, 1e-12, "eraTrxp", "2", status);
8525 vvd(trp[2], 5.4, 1e-12, "eraTrxp", "3", status);
8526
8527}
8528
8529static void t_trxpv(int *status)
8530/*
8531** - - - - - - - -
8532** t _ t r x p v
8533** - - - - - - - -
8534**
8535** Test eraTrxpv function.
8536**
8537** Returned:
8538** status int FALSE = success, TRUE = fail
8539**
8540** Called: eraTrxpv, vvd
8541**
8542** This revision: 2013 August 7
8543*/
8544{
8545 double r[3][3], pv[2][3], trpv[2][3];
8546
8547
8548 r[0][0] = 2.0;
8549 r[0][1] = 3.0;
8550 r[0][2] = 2.0;
8551
8552 r[1][0] = 3.0;
8553 r[1][1] = 2.0;
8554 r[1][2] = 3.0;
8555
8556 r[2][0] = 3.0;
8557 r[2][1] = 4.0;
8558 r[2][2] = 5.0;
8559
8560 pv[0][0] = 0.2;
8561 pv[0][1] = 1.5;
8562 pv[0][2] = 0.1;
8563
8564 pv[1][0] = 1.5;
8565 pv[1][1] = 0.2;
8566 pv[1][2] = 0.1;
8567
8568 eraTrxpv(r, pv, trpv);
8569
8570 vvd(trpv[0][0], 5.2, 1e-12, "eraTrxpv", "p1", status);
8571 vvd(trpv[0][1], 4.0, 1e-12, "eraTrxpv", "p1", status);
8572 vvd(trpv[0][2], 5.4, 1e-12, "eraTrxpv", "p1", status);
8573
8574 vvd(trpv[1][0], 3.9, 1e-12, "eraTrxpv", "v1", status);
8575 vvd(trpv[1][1], 5.3, 1e-12, "eraTrxpv", "v2", status);
8576 vvd(trpv[1][2], 4.1, 1e-12, "eraTrxpv", "v3", status);
8577
8578}
8579
8580static void t_tttai(int *status)
8581/*
8582** - - - - - - - -
8583** t _ t t t a i
8584** - - - - - - - -
8585**
8586** Test eraTttai function.
8587**
8588** Returned:
8589** status int FALSE = success, TRUE = fail
8590**
8591** Called: eraTttai, vvd, viv
8592**
8593** This revision: 2013 August 7
8594*/
8595{
8596 double a1, a2;
8597 int j;
8598
8599
8600 j = eraTttai(2453750.5, 0.892482639, &a1, &a2);
8601
8602 vvd(a1, 2453750.5, 1e-6, "eraTttai", "a1", status);
8603 vvd(a2, 0.892110139, 1e-12, "eraTttai", "a2", status);
8604 viv(j, 0, "eraTttai", "j", status);
8605
8606}
8607
8608static void t_tttcg(int *status)
8609/*
8610** - - - - - - - -
8611** t _ t t t c g
8612** - - - - - - - -
8613**
8614** Test eraTttcg function.
8615**
8616** Returned:
8617** status int FALSE = success, TRUE = fail
8618**
8619** Called: eraTttcg, vvd, viv
8620**
8621** This revision: 2013 August 7
8622*/
8623{
8624 double g1, g2;
8625 int j;
8626
8627
8628 j = eraTttcg(2453750.5, 0.892482639, &g1, &g2);
8629
8630 vvd( g1, 2453750.5, 1e-6, "eraTttcg", "g1", status);
8631 vvd( g2, 0.8924900312508587113, 1e-12, "eraTttcg", "g2", status);
8632 viv(j, 0, "eraTttcg", "j", status);
8633
8634}
8635
8636static void t_tttdb(int *status)
8637/*
8638** - - - - - - - -
8639** t _ t t t d b
8640** - - - - - - - -
8641**
8642** Test eraTttdb function.
8643**
8644** Returned:
8645** status int FALSE = success, TRUE = fail
8646**
8647** Called: eraTttdb, vvd, viv
8648**
8649** This revision: 2013 August 7
8650*/
8651{
8652 double b1, b2;
8653 int j;
8654
8655
8656 j = eraTttdb(2453750.5, 0.892855139, -0.000201, &b1, &b2);
8657
8658 vvd(b1, 2453750.5, 1e-6, "eraTttdb", "b1", status);
8659 vvd(b2, 0.8928551366736111111, 1e-12, "eraTttdb", "b2", status);
8660 viv(j, 0, "eraTttdb", "j", status);
8661
8662}
8663
8664static void t_ttut1(int *status)
8665/*
8666** - - - - - - - -
8667** t _ t t u t 1
8668** - - - - - - - -
8669**
8670** Test eraTtut1 function.
8671**
8672** Returned:
8673** status int FALSE = success, TRUE = fail
8674**
8675** Called: eraTtut1, vvd, viv
8676**
8677** This revision: 2013 August 7
8678*/
8679{
8680 double u1, u2;
8681 int j;
8682
8683
8684 j = eraTtut1(2453750.5, 0.892855139, 64.8499, &u1, &u2);
8685
8686 vvd(u1, 2453750.5, 1e-6, "eraTtut1", "u1", status);
8687 vvd(u2, 0.8921045614537037037, 1e-12, "eraTtut1", "u2", status);
8688 viv(j, 0, "eraTtut1", "j", status);
8689
8690}
8691
8692static void t_ut1tai(int *status)
8693/*
8694** - - - - - - - - -
8695** t _ u t 1 t a i
8696** - - - - - - - - -
8697**
8698** Test eraUt1tai function.
8699**
8700** Returned:
8701** status int FALSE = success, TRUE = fail
8702**
8703** Called: eraUt1tai, vvd, viv
8704**
8705** This revision: 2013 August 7
8706*/
8707{
8708 double a1, a2;
8709 int j;
8710
8711
8712 j = eraUt1tai(2453750.5, 0.892104561, -32.6659, &a1, &a2);
8713
8714 vvd(a1, 2453750.5, 1e-6, "eraUt1tai", "a1", status);
8715 vvd(a2, 0.8924826385462962963, 1e-12, "eraUt1tai", "a2", status);
8716 viv(j, 0, "eraUt1tai", "j", status);
8717
8718}
8719
8720static void t_ut1tt(int *status)
8721/*
8722** - - - - - - - -
8723** t _ u t 1 t t
8724** - - - - - - - -
8725**
8726** Test eraUt1tt function.
8727**
8728** Returned:
8729** status int FALSE = success, TRUE = fail
8730**
8731** Called: eraUt1tt, vvd, viv
8732**
8733** This revision: 2013 October 3
8734*/
8735{
8736 double t1, t2;
8737 int j;
8738
8739
8740 j = eraUt1tt(2453750.5, 0.892104561, 64.8499, &t1, &t2);
8741
8742 vvd(t1, 2453750.5, 1e-6, "eraUt1tt", "t1", status);
8743 vvd(t2, 0.8928551385462962963, 1e-12, "eraUt1tt", "t2", status);
8744 viv(j, 0, "eraUt1tt", "j", status);
8745
8746}
8747
8748static void t_ut1utc(int *status)
8749/*
8750** - - - - - - - - -
8751** t _ u t 1 u t c
8752** - - - - - - - - -
8753**
8754** Test eraUt1utc function.
8755**
8756** Returned:
8757** status int FALSE = success, TRUE = fail
8758**
8759** Called: eraUt1utc, vvd, viv
8760**
8761** This revision: 2013 August 7
8762*/
8763{
8764 double u1, u2;
8765 int j;
8766
8767
8768 j = eraUt1utc(2453750.5, 0.892104561, 0.3341, &u1, &u2);
8769
8770 vvd(u1, 2453750.5, 1e-6, "eraUt1utc", "u1", status);
8771 vvd(u2, 0.8921006941018518519, 1e-12, "eraUt1utc", "u2", status);
8772 viv(j, 0, "eraUt1utc", "j", status);
8773
8774}
8775
8776static void t_utctai(int *status)
8777/*
8778** - - - - - - - - -
8779** t _ u t c t a i
8780** - - - - - - - - -
8781**
8782** Test eraUtctai function.
8783**
8784** Returned:
8785** status int FALSE = success, TRUE = fail
8786**
8787** Called: eraUtctai, vvd, viv
8788**
8789** This revision: 2013 August 7
8790*/
8791{
8792 double u1, u2;
8793 int j;
8794
8795
8796 j = eraUtctai(2453750.5, 0.892100694, &u1, &u2);
8797
8798 vvd(u1, 2453750.5, 1e-6, "eraUtctai", "u1", status);
8799 vvd(u2, 0.8924826384444444444, 1e-12, "eraUtctai", "u2", status);
8800 viv(j, 0, "eraUtctai", "j", status);
8801
8802}
8803
8804static void t_utcut1(int *status)
8805/*
8806** - - - - - - - - -
8807** t _ u t c u t 1
8808** - - - - - - - - -
8809**
8810** Test eraUtcut1 function.
8811**
8812** Returned:
8813** status int FALSE = success, TRUE = fail
8814**
8815** Called: eraUtcut1, vvd, viv
8816**
8817** This revision: 2013 August 7
8818*/
8819{
8820 double u1, u2;
8821 int j;
8822
8823
8824 j = eraUtcut1(2453750.5, 0.892100694, 0.3341, &u1, &u2);
8825
8826 vvd(u1, 2453750.5, 1e-6, "eraUtcut1", "u1", status);
8827 vvd(u2, 0.8921045608981481481, 1e-12, "eraUtcut1", "u2", status);
8828 viv(j, 0, "eraUtcut1", "j", status);
8829
8830}
8831
8832static void t_xy06(int *status)
8833/*
8834** - - - - - - -
8835** t _ x y 0 6
8836** - - - - - - -
8837**
8838** Test eraXy06 function.
8839**
8840** Returned:
8841** status int FALSE = success, TRUE = fail
8842**
8843** Called: eraXy06, vvd
8844**
8845** This revision: 2013 August 7
8846*/
8847{
8848 double x, y;
8849
8850
8851 eraXy06(2400000.5, 53736.0, &x, &y);
8852
8853 vvd(x, 0.5791308486706010975e-3, 1e-15, "eraXy06", "x", status);
8854 vvd(y, 0.4020579816732958141e-4, 1e-16, "eraXy06", "y", status);
8855
8856}
8857
8858static void t_xys00a(int *status)
8859/*
8860** - - - - - - - - -
8861** t _ x y s 0 0 a
8862** - - - - - - - - -
8863**
8864** Test eraXys00a function.
8865**
8866** Returned:
8867** status int FALSE = success, TRUE = fail
8868**
8869** Called: eraXys00a, vvd
8870**
8871** This revision: 2013 August 7
8872*/
8873{
8874 double x, y, s;
8875
8876
8877 eraXys00a(2400000.5, 53736.0, &x, &y, &s);
8878
8879 vvd(x, 0.5791308472168152904e-3, 1e-14, "eraXys00a", "x", status);
8880 vvd(y, 0.4020595661591500259e-4, 1e-15, "eraXys00a", "y", status);
8881 vvd(s, -0.1220040848471549623e-7, 1e-18, "eraXys00a", "s", status);
8882
8883}
8884
8885static void t_xys00b(int *status)
8886/*
8887** - - - - - - - - -
8888** t _ x y s 0 0 b
8889** - - - - - - - - -
8890**
8891** Test eraXys00b function.
8892**
8893** Returned:
8894** status int FALSE = success, TRUE = fail
8895**
8896** Called: eraXys00b, vvd
8897**
8898** This revision: 2013 August 7
8899*/
8900{
8901 double x, y, s;
8902
8903
8904 eraXys00b(2400000.5, 53736.0, &x, &y, &s);
8905
8906 vvd(x, 0.5791301929950208873e-3, 1e-14, "eraXys00b", "x", status);
8907 vvd(y, 0.4020553681373720832e-4, 1e-15, "eraXys00b", "y", status);
8908 vvd(s, -0.1220027377285083189e-7, 1e-18, "eraXys00b", "s", status);
8909
8910}
8911
8912static void t_xys06a(int *status)
8913/*
8914** - - - - - - - - -
8915** t _ x y s 0 6 a
8916** - - - - - - - - -
8917**
8918** Test eraXys06a function.
8919**
8920** Returned:
8921** status int FALSE = success, TRUE = fail
8922**
8923** Called: eraXys06a, vvd
8924**
8925** This revision: 2013 August 7
8926*/
8927{
8928 double x, y, s;
8929
8930
8931 eraXys06a(2400000.5, 53736.0, &x, &y, &s);
8932
8933 vvd(x, 0.5791308482835292617e-3, 1e-14, "eraXys06a", "x", status);
8934 vvd(y, 0.4020580099454020310e-4, 1e-15, "eraXys06a", "y", status);
8935 vvd(s, -0.1220032294164579896e-7, 1e-18, "eraXys06a", "s", status);
8936
8937}
8938
8939static void t_zp(int *status)
8940/*
8941** - - - - -
8942** t _ z p
8943** - - - - -
8944**
8945** Test eraZp function.
8946**
8947** Returned:
8948** status int FALSE = success, TRUE = fail
8949**
8950** Called: eraZp, vvd
8951**
8952** This revision: 2013 August 7
8953*/
8954{
8955 double p[3];
8956
8957
8958 p[0] = 0.3;
8959 p[1] = 1.2;
8960 p[2] = -2.5;
8961
8962 eraZp(p);
8963
8964 vvd(p[0], 0.0, 0.0, "eraZp", "1", status);
8965 vvd(p[1], 0.0, 0.0, "eraZp", "2", status);
8966 vvd(p[2], 0.0, 0.0, "eraZp", "3", status);
8967
8968}
8969
8970static void t_zpv(int *status)
8971/*
8972** - - - - - -
8973** t _ z p v
8974** - - - - - -
8975**
8976** Test eraZpv function.
8977**
8978** Returned:
8979** status int FALSE = success, TRUE = fail
8980**
8981** Called: eraZpv, vvd
8982**
8983** This revision: 2013 August 7
8984*/
8985{
8986 double pv[2][3];
8987
8988
8989 pv[0][0] = 0.3;
8990 pv[0][1] = 1.2;
8991 pv[0][2] = -2.5;
8992
8993 pv[1][0] = -0.5;
8994 pv[1][1] = 3.1;
8995 pv[1][2] = 0.9;
8996
8997 eraZpv(pv);
8998
8999 vvd(pv[0][0], 0.0, 0.0, "eraZpv", "p1", status);
9000 vvd(pv[0][1], 0.0, 0.0, "eraZpv", "p2", status);
9001 vvd(pv[0][2], 0.0, 0.0, "eraZpv", "p3", status);
9002
9003 vvd(pv[1][0], 0.0, 0.0, "eraZpv", "v1", status);
9004 vvd(pv[1][1], 0.0, 0.0, "eraZpv", "v2", status);
9005 vvd(pv[1][2], 0.0, 0.0, "eraZpv", "v3", status);
9006
9007}
9008
9009static void t_zr(int *status)
9010/*
9011** - - - - -
9012** t _ z r
9013** - - - - -
9014**
9015** Test eraZr function.
9016**
9017** Returned:
9018** status int FALSE = success, TRUE = fail
9019**
9020** Called: eraZr, vvd
9021**
9022** This revision: 2013 August 7
9023*/
9024{
9025 double r[3][3];
9026
9027
9028 r[0][0] = 2.0;
9029 r[1][0] = 3.0;
9030 r[2][0] = 2.0;
9031
9032 r[0][1] = 3.0;
9033 r[1][1] = 2.0;
9034 r[2][1] = 3.0;
9035
9036 r[0][2] = 3.0;
9037 r[1][2] = 4.0;
9038 r[2][2] = 5.0;
9039
9040 eraZr(r);
9041
9042 vvd(r[0][0], 0.0, 0.0, "eraZr", "00", status);
9043 vvd(r[1][0], 0.0, 0.0, "eraZr", "01", status);
9044 vvd(r[2][0], 0.0, 0.0, "eraZr", "02", status);
9045
9046 vvd(r[0][1], 0.0, 0.0, "eraZr", "10", status);
9047 vvd(r[1][1], 0.0, 0.0, "eraZr", "11", status);
9048 vvd(r[2][1], 0.0, 0.0, "eraZr", "12", status);
9049
9050 vvd(r[0][2], 0.0, 0.0, "eraZr", "20", status);
9051 vvd(r[1][2], 0.0, 0.0, "eraZr", "21", status);
9052 vvd(r[2][2], 0.0, 0.0, "eraZr", "22", status);
9053
9054}
9055
9056int main(int argc, char *argv[])
9057/*
9058** - - - - -
9059** m a i n
9060** - - - - -
9061**
9062** This revision: 2013 October 3
9063*/
9064{
9065 int status;
9066
9067
9068/* If any command-line argument, switch to verbose reporting. */
9069 if (argc > 1) {
9070 verbose = 1;
9071 argv[0][0] += 0; /* to avoid compiler warnings */
9072 }
9073
9074/* Preset the &status to FALSE = success. */
9075 status = 0;
9076
9077/* Test all of the ERFA functions. */
9078 t_a2af(&status);
9079 t_a2tf(&status);
9080 t_ab(&status);
9081 t_af2a(&status);
9082 t_anp(&status);
9083 t_anpm(&status);
9084 t_apcg(&status);
9085 t_apcg13(&status);
9086 t_apci(&status);
9087 t_apci13(&status);
9088 t_apco(&status);
9089 t_apco13(&status);
9090 t_apcs(&status);
9091 t_apcs13(&status);
9092 t_aper(&status);
9093 t_aper13(&status);
9094 t_apio(&status);
9095 t_apio13(&status);
9096 t_atci13(&status);
9097 t_atciq(&status);
9098 t_atciqn(&status);
9099 t_atciqz(&status);
9100 t_atco13(&status);
9101 t_atic13(&status);
9102 t_aticq(&status);
9103 t_aticqn(&status);
9104 t_atio13(&status);
9105 t_atioq(&status);
9106 t_atoc13(&status);
9107 t_atoi13(&status);
9108 t_atoiq(&status);
9109 t_bi00(&status);
9110 t_bp00(&status);
9111 t_bp06(&status);
9112 t_bpn2xy(&status);
9113 t_c2i00a(&status);
9114 t_c2i00b(&status);
9115 t_c2i06a(&status);
9116 t_c2ibpn(&status);
9117 t_c2ixy(&status);
9118 t_c2ixys(&status);
9119 t_c2s(&status);
9120 t_c2t00a(&status);
9121 t_c2t00b(&status);
9122 t_c2t06a(&status);
9123 t_c2tcio(&status);
9124 t_c2teqx(&status);
9125 t_c2tpe(&status);
9126 t_c2txy(&status);
9127 t_cal2jd(&status);
9128 t_cp(&status);
9129 t_cpv(&status);
9130 t_cr(&status);
9131 t_d2dtf(&status);
9132 t_d2tf(&status);
9133 t_dat(&status);
9134 t_dtdb(&status);
9135 t_dtf2d(&status);
9136 t_ee00(&status);
9137 t_ee00a(&status);
9138 t_ee00b(&status);
9139 t_ee06a(&status);
9140 t_eect00(&status);
9141 t_eform(&status);
9142 t_eo06a(&status);
9143 t_eors(&status);
9144 t_epb(&status);
9145 t_epb2jd(&status);
9146 t_epj(&status);
9147 t_epj2jd(&status);
9148 t_epv00(&status);
9149 t_eqeq94(&status);
9150 t_era00(&status);
9151 t_fad03(&status);
9152 t_fae03(&status);
9153 t_faf03(&status);
9154 t_faju03(&status);
9155 t_fal03(&status);
9156 t_falp03(&status);
9157 t_fama03(&status);
9158 t_fame03(&status);
9159 t_fane03(&status);
9160 t_faom03(&status);
9161 t_fapa03(&status);
9162 t_fasa03(&status);
9163 t_faur03(&status);
9164 t_fave03(&status);
9165 t_fk52h(&status);
9166 t_fk5hip(&status);
9167 t_fk5hz(&status);
9168 t_fw2m(&status);
9169 t_fw2xy(&status);
9170 t_g2icrs(&status);
9171 t_gc2gd(&status);
9172 t_gc2gde(&status);
9173 t_gd2gc(&status);
9174 t_gd2gce(&status);
9175 t_gmst00(&status);
9176 t_gmst06(&status);
9177 t_gmst82(&status);
9178 t_gst00a(&status);
9179 t_gst00b(&status);
9180 t_gst06(&status);
9181 t_gst06a(&status);
9182 t_gst94(&status);
9183 t_h2fk5(&status);
9184 t_hfk5z(&status);
9185 t_icrs2g(&status);
9186 t_ir(&status);
9187 t_jd2cal(&status);
9188 t_jdcalf(&status);
9189 t_ld(&status);
9190 t_ldn(&status);
9191 t_ldsun(&status);
9192 t_num00a(&status);
9193 t_num00b(&status);
9194 t_num06a(&status);
9195 t_numat(&status);
9196 t_nut00a(&status);
9197 t_nut00b(&status);
9198 t_nut06a(&status);
9199 t_nut80(&status);
9200 t_nutm80(&status);
9201 t_obl06(&status);
9202 t_obl80(&status);
9203 t_p06e(&status);
9204 t_p2pv(&status);
9205 t_p2s(&status);
9206 t_pap(&status);
9207 t_pas(&status);
9208 t_pb06(&status);
9209 t_pdp(&status);
9210 t_pfw06(&status);
9211 t_plan94(&status);
9212 t_pmat00(&status);
9213 t_pmat06(&status);
9214 t_pmat76(&status);
9215 t_pm(&status);
9216 t_pmp(&status);
9217 t_pmpx(&status);
9218 t_pmsafe(&status);
9219 t_pn(&status);
9220 t_pn00(&status);
9221 t_pn00a(&status);
9222 t_pn00b(&status);
9223 t_pn06a(&status);
9224 t_pn06(&status);
9225 t_pnm00a(&status);
9226 t_pnm00b(&status);
9227 t_pnm06a(&status);
9228 t_pnm80(&status);
9229 t_pom00(&status);
9230 t_ppp(&status);
9231 t_ppsp(&status);
9232 t_pr00(&status);
9233 t_prec76(&status);
9234 t_pv2p(&status);
9235 t_pv2s(&status);
9236 t_pvdpv(&status);
9237 t_pvm(&status);
9238 t_pvmpv(&status);
9239 t_pvppv(&status);
9240 t_pvstar(&status);
9241 t_pvtob(&status);
9242 t_pvu(&status);
9243 t_pvup(&status);
9244 t_pvxpv(&status);
9245 t_pxp(&status);
9246 t_refco(&status);
9247 t_rm2v(&status);
9248 t_rv2m(&status);
9249 t_rx(&status);
9250 t_rxp(&status);
9251 t_rxpv(&status);
9252 t_rxr(&status);
9253 t_ry(&status);
9254 t_rz(&status);
9255 t_s00a(&status);
9256 t_s00b(&status);
9257 t_s00(&status);
9258 t_s06a(&status);
9259 t_s06(&status);
9260 t_s2c(&status);
9261 t_s2p(&status);
9262 t_s2pv(&status);
9263 t_s2xpv(&status);
9264 t_sepp(&status);
9265 t_seps(&status);
9266 t_sp00(&status);
9267 t_starpm(&status);
9268 t_starpv(&status);
9269 t_sxp(&status);
9270 t_sxpv(&status);
9271 t_taitt(&status);
9272 t_taiut1(&status);
9273 t_taiutc(&status);
9274 t_tcbtdb(&status);
9275 t_tcgtt(&status);
9276 t_tdbtcb(&status);
9277 t_tdbtt(&status);
9278 t_tf2a(&status);
9279 t_tf2d(&status);
9280 t_tr(&status);
9281 t_trxp(&status);
9282 t_trxpv(&status);
9283 t_tttai(&status);
9284 t_tttcg(&status);
9285 t_tttdb(&status);
9286 t_ttut1(&status);
9287 t_ut1tai(&status);
9288 t_ut1tt(&status) ;
9289 t_ut1utc(&status);
9290 t_utctai(&status);
9291 t_utcut1(&status);
9292 t_xy06(&status);
9293 t_xys00a(&status);
9294 t_xys00b(&status);
9295 t_xys06a(&status);
9296 t_zp(&status);
9297 t_zpv(&status);
9298 t_zr(&status);
9299
9300/* Report, set up an appropriate exit status, and finish. */
9301 if (status) {
9302 printf("t_erfa_c validation failed!\n");
9303 } else {
9304 printf("t_erfa_c validation successful\n");
9305 }
9306 return status;
9307}
9308/*----------------------------------------------------------------------
9309**
9310**
9311** Copyright (C) 2013-2015, NumFOCUS Foundation.
9312** All rights reserved.
9313**
9314** This library is derived, with permission, from the International
9315** Astronomical Union's "Standards of Fundamental Astronomy" library,
9316** available from http://www.iausofa.org.
9317**
9318** The ERFA version is intended to retain identical functionality to
9319** the SOFA library, but made distinct through different function and
9320** file names, as set out in the SOFA license conditions. The SOFA
9321** original has a role as a reference standard for the IAU and IERS,
9322** and consequently redistribution is permitted only in its unaltered
9323** state. The ERFA version is not subject to this restriction and
9324** therefore can be included in distributions which do not support the
9325** concept of "read only" software.
9326**
9327** Although the intent is to replicate the SOFA API (other than
9328** replacement of prefix names) and results (with the exception of
9329** bugs; any that are discovered will be fixed), SOFA is not
9330** responsible for any errors found in this version of the library.
9331**
9332** If you wish to acknowledge the SOFA heritage, please acknowledge
9333** that you are using a library derived from SOFA, rather than SOFA
9334** itself.
9335**
9336**
9337** TERMS AND CONDITIONS
9338**
9339** Redistribution and use in source and binary forms, with or without
9340** modification, are permitted provided that the following conditions
9341** are met:
9342**
9343** 1 Redistributions of source code must retain the above copyright
9344** notice, this list of conditions and the following disclaimer.
9345**
9346** 2 Redistributions in binary form must reproduce the above copyright
9347** notice, this list of conditions and the following disclaimer in
9348** the documentation and/or other materials provided with the
9349** distribution.
9350**
9351** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
9352** the International Astronomical Union nor the names of its
9353** contributors may be used to endorse or promote products derived
9354** from this software without specific prior written permission.
9355**
9356** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9357** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9358** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
9359** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
9360** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
9361** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
9362** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9363** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
9364** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9365** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
9366** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
9367** POSSIBILITY OF SUCH DAMAGE.
9368**
9369*/
Note: See TracBrowser for help on using the repository browser.