source: branches/FACT++_lidctrl_usb/erfa/src/t_erfa_c.c@ 19758

Last change on this file since 19758 was 18711, checked in by tbretz, 8 years ago
Updated to ERFA 1.3.0 (no relevant code change except the leap second at the beginning of 2017)
File size: 224.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: 2016 July 11
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: 2016 April 21
80*/
81{
82 double a, f; /* absolute and fractional error */
83
84
85 a = val - valok;
86 if (a != 0.0 && fabs(a) > fabs(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: 2016 July 11
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(2017, 9, 1, 0.0, &deltat);
2923
2924 vvd(deltat, 37.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_eceq06(int *status)
2982/*
2983** - - - - -
2984** t _ e c e q 0 6
2985** - - - - -
2986**
2987** Test eraEceq06 function.
2988**
2989** Returned:
2990** status int FALSE = success, TRUE = fail
2991**
2992** Called: eraEceq06, vvd
2993**
2994** This revision: 2016 March 12
2995*/
2996{
2997 double date1, date2, dl, db, dr, dd;
2998
2999
3000 date1 = 2456165.5;
3001 date2 = 0.401182685;
3002 dl = 5.1;
3003 db = -0.9;
3004
3005 eraEceq06(date1, date2, dl, db, &dr, &dd);
3006
3007 vvd(dr, 5.533459733613627767, 1e-14, "eraEceq06", "dr", status);
3008 vvd(dd, -1.246542932554480576, 1e-14, "eraEceq06", "dd", status);
3009
3010}
3011
3012static void t_ecm06(int *status)
3013/*
3014** - - - - - - - -
3015** t _ e c m 0 6
3016** - - - - - - - -
3017**
3018** Test eraEcm06 function.
3019**
3020** Returned:
3021** status int FALSE = success, TRUE = fail
3022**
3023** Called: eraEcm06, vvd
3024**
3025** This revision: 2016 March 12
3026*/
3027{
3028 double date1, date2, rm[3][3];
3029
3030
3031 date1 = 2456165.5;
3032 date2 = 0.401182685;
3033
3034 eraEcm06(date1, date2, rm);
3035
3036 vvd(rm[0][0], 0.9999952427708701137, 1e-14,
3037 "eraEcm06", "rm11", status);
3038 vvd(rm[0][1], -0.2829062057663042347e-2, 1e-14,
3039 "eraEcm06", "rm12", status);
3040 vvd(rm[0][2], -0.1229163741100017629e-2, 1e-14,
3041 "eraEcm06", "rm13", status);
3042 vvd(rm[1][0], 0.3084546876908653562e-2, 1e-14,
3043 "eraEcm06", "rm21", status);
3044 vvd(rm[1][1], 0.9174891871550392514, 1e-14,
3045 "eraEcm06", "rm22", status);
3046 vvd(rm[1][2], 0.3977487611849338124, 1e-14,
3047 "eraEcm06", "rm23", status);
3048 vvd(rm[2][0], 0.2488512951527405928e-5, 1e-14,
3049 "eraEcm06", "rm31", status);
3050 vvd(rm[2][1], -0.3977506604161195467, 1e-14,
3051 "eraEcm06", "rm32", status);
3052 vvd(rm[2][2], 0.9174935488232863071, 1e-14,
3053 "eraEcm06", "rm33", status);
3054
3055}
3056
3057static void t_ee00(int *status)
3058/*
3059** - - - - - - -
3060** t _ e e 0 0
3061** - - - - - - -
3062**
3063** Test eraEe00 function.
3064**
3065** Returned:
3066** status int FALSE = success, TRUE = fail
3067**
3068** Called: eraEe00, vvd
3069**
3070** This revision: 2013 August 7
3071*/
3072{
3073 double epsa, dpsi, ee;
3074
3075
3076 epsa = 0.4090789763356509900;
3077 dpsi = -0.9630909107115582393e-5;
3078
3079 ee = eraEe00(2400000.5, 53736.0, epsa, dpsi);
3080
3081 vvd(ee, -0.8834193235367965479e-5, 1e-18, "eraEe00", "", status);
3082
3083}
3084
3085static void t_ee00a(int *status)
3086/*
3087** - - - - - - - -
3088** t _ e e 0 0 a
3089** - - - - - - - -
3090**
3091** Test eraEe00a function.
3092**
3093** Returned:
3094** status int FALSE = success, TRUE = fail
3095**
3096** Called: eraEe00a, vvd
3097**
3098** This revision: 2013 August 7
3099*/
3100{
3101 double ee;
3102
3103
3104 ee = eraEe00a(2400000.5, 53736.0);
3105
3106 vvd(ee, -0.8834192459222588227e-5, 1e-18, "eraEe00a", "", status);
3107
3108}
3109
3110static void t_ee00b(int *status)
3111/*
3112** - - - - - - - -
3113** t _ e e 0 0 b
3114** - - - - - - - -
3115**
3116** Test eraEe00b function.
3117**
3118** Returned:
3119** status int FALSE = success, TRUE = fail
3120**
3121** Called: eraEe00b, vvd
3122**
3123** This revision: 2013 August 7
3124*/
3125{
3126 double ee;
3127
3128
3129 ee = eraEe00b(2400000.5, 53736.0);
3130
3131 vvd(ee, -0.8835700060003032831e-5, 1e-18, "eraEe00b", "", status);
3132
3133}
3134
3135static void t_ee06a(int *status)
3136/*
3137** - - - - - - - -
3138** t _ e e 0 6 a
3139** - - - - - - - -
3140**
3141** Test eraEe06a function.
3142**
3143** Returned:
3144** status int FALSE = success, TRUE = fail
3145**
3146** Called: eraEe06a, vvd
3147**
3148** This revision: 2013 August 7
3149*/
3150{
3151 double ee;
3152
3153
3154 ee = eraEe06a(2400000.5, 53736.0);
3155
3156 vvd(ee, -0.8834195072043790156e-5, 1e-15, "eraEe06a", "", status);
3157}
3158
3159static void t_eect00(int *status)
3160/*
3161** - - - - - - - - -
3162** t _ e e c t 0 0
3163** - - - - - - - - -
3164**
3165** Test eraEect00 function.
3166**
3167** Returned:
3168** status int FALSE = success, TRUE = fail
3169**
3170** Called: eraEect00, vvd
3171**
3172** This revision: 2013 August 7
3173*/
3174{
3175 double eect;
3176
3177
3178 eect = eraEect00(2400000.5, 53736.0);
3179
3180 vvd(eect, 0.2046085004885125264e-8, 1e-20, "eraEect00", "", status);
3181
3182}
3183
3184static void t_eform(int *status)
3185/*
3186** - - - - - - - -
3187** t _ e f o r m
3188** - - - - - - - -
3189**
3190** Test eraEform function.
3191**
3192** Returned:
3193** status int FALSE = success, TRUE = fail
3194**
3195** Called: eraEform, viv, vvd
3196**
3197** This revision: 2016 March 12
3198*/
3199{
3200 int j;
3201 double a, f;
3202
3203 j = eraEform(0, &a, &f);
3204
3205 viv(j, -1, "eraEform", "j0", status);
3206
3207 j = eraEform(ERFA_WGS84, &a, &f);
3208
3209 viv(j, 0, "eraEform", "j1", status);
3210 vvd(a, 6378137.0, 1e-10, "eraEform", "a1", status);
3211 vvd(f, 0.3352810664747480720e-2, 1e-18, "eraEform", "f1", status);
3212
3213 j = eraEform(ERFA_GRS80, &a, &f);
3214
3215 viv(j, 0, "eraEform", "j2", status);
3216 vvd(a, 6378137.0, 1e-10, "eraEform", "a2", status);
3217 vvd(f, 0.3352810681182318935e-2, 1e-18, "eraEform", "f2", status);
3218
3219 j = eraEform(ERFA_WGS72, &a, &f);
3220
3221 viv(j, 0, "eraEform", "j2", status);
3222 vvd(a, 6378135.0, 1e-10, "eraEform", "a3", status);
3223 vvd(f, 0.3352779454167504862e-2, 1e-18, "eraEform", "f3", status);
3224
3225 j = eraEform(4, &a, &f);
3226 viv(j, -1, "eraEform", "j3", status);
3227}
3228
3229static void t_eo06a(int *status)
3230/*
3231** - - - - - - - -
3232** t _ e o 0 6 a
3233** - - - - - - - -
3234**
3235** Test eraEo06a function.
3236**
3237** Returned:
3238** status int FALSE = success, TRUE = fail
3239**
3240** Called: eraEo06a, vvd
3241**
3242** This revision: 2013 August 7
3243*/
3244{
3245 double eo;
3246
3247
3248 eo = eraEo06a(2400000.5, 53736.0);
3249
3250 vvd(eo, -0.1332882371941833644e-2, 1e-15, "eraEo06a", "", status);
3251
3252}
3253
3254static void t_eors(int *status)
3255/*
3256** - - - - - - -
3257** t _ e o r s
3258** - - - - - - -
3259**
3260** Test eraEors function.
3261**
3262** Returned:
3263** status int FALSE = success, TRUE = fail
3264**
3265** Called: eraEors, vvd
3266**
3267** This revision: 2013 August 7
3268*/
3269{
3270 double rnpb[3][3], s, eo;
3271
3272
3273 rnpb[0][0] = 0.9999989440476103608;
3274 rnpb[0][1] = -0.1332881761240011518e-2;
3275 rnpb[0][2] = -0.5790767434730085097e-3;
3276
3277 rnpb[1][0] = 0.1332858254308954453e-2;
3278 rnpb[1][1] = 0.9999991109044505944;
3279 rnpb[1][2] = -0.4097782710401555759e-4;
3280
3281 rnpb[2][0] = 0.5791308472168153320e-3;
3282 rnpb[2][1] = 0.4020595661593994396e-4;
3283 rnpb[2][2] = 0.9999998314954572365;
3284
3285 s = -0.1220040848472271978e-7;
3286
3287 eo = eraEors(rnpb, s);
3288
3289 vvd(eo, -0.1332882715130744606e-2, 1e-14, "eraEors", "", status);
3290
3291}
3292
3293static void t_epb(int *status)
3294/*
3295** - - - - - -
3296** t _ e p b
3297** - - - - - -
3298**
3299** Test eraEpb function.
3300**
3301** Returned:
3302** status int FALSE = success, TRUE = fail
3303**
3304** Called: eraEpb, vvd
3305**
3306** This revision: 2013 August 7
3307*/
3308{
3309 double epb;
3310
3311
3312 epb = eraEpb(2415019.8135, 30103.18648);
3313
3314 vvd(epb, 1982.418424159278580, 1e-12, "eraEpb", "", status);
3315
3316}
3317
3318static void t_epb2jd(int *status)
3319/*
3320** - - - - - - - - -
3321** t _ e p b 2 j d
3322** - - - - - - - - -
3323**
3324** Test eraEpb2jd function.
3325**
3326** Returned:
3327** status int FALSE = success, TRUE = fail
3328**
3329** Called: eraEpb2jd, vvd
3330**
3331** This revision: 2013 August 7
3332*/
3333{
3334 double epb, djm0, djm;
3335
3336
3337 epb = 1957.3;
3338
3339 eraEpb2jd(epb, &djm0, &djm);
3340
3341 vvd(djm0, 2400000.5, 1e-9, "eraEpb2jd", "djm0", status);
3342 vvd(djm, 35948.1915101513, 1e-9, "eraEpb2jd", "mjd", status);
3343
3344}
3345
3346static void t_epj(int *status)
3347/*
3348** - - - - - -
3349** t _ e p j
3350** - - - - - -
3351**
3352** Test eraEpj function.
3353**
3354** Returned:
3355** status int FALSE = success, TRUE = fail
3356**
3357** Called: eraEpj, vvd
3358**
3359** This revision: 2013 August 7
3360*/
3361{
3362 double epj;
3363
3364
3365 epj = eraEpj(2451545, -7392.5);
3366
3367 vvd(epj, 1979.760438056125941, 1e-12, "eraEpj", "", status);
3368
3369}
3370
3371static void t_epj2jd(int *status)
3372/*
3373** - - - - - - - - -
3374** t _ e p j 2 j d
3375** - - - - - - - - -
3376**
3377** Test eraEpj2jd function.
3378**
3379** Returned:
3380** status int FALSE = success, TRUE = fail
3381**
3382** Called: eraEpj2jd, vvd
3383**
3384** This revision: 2013 August 7
3385*/
3386{
3387 double epj, djm0, djm;
3388
3389
3390 epj = 1996.8;
3391
3392 eraEpj2jd(epj, &djm0, &djm);
3393
3394 vvd(djm0, 2400000.5, 1e-9, "eraEpj2jd", "djm0", status);
3395 vvd(djm, 50375.7, 1e-9, "eraEpj2jd", "mjd", status);
3396
3397}
3398
3399static void t_epv00(int *status)
3400/*
3401** - - - - - - - -
3402** t _ e p v 0 0
3403** - - - - - - - -
3404**
3405** Test eraEpv00 function.
3406**
3407** Returned:
3408** status int FALSE = success, TRUE = fail
3409**
3410** Called: eraEpv00, vvd, viv
3411**
3412** This revision: 2013 August 7
3413*/
3414{
3415 double pvh[2][3], pvb[2][3];
3416 int j;
3417
3418
3419 j = eraEpv00(2400000.5, 53411.52501161, pvh, pvb);
3420
3421 vvd(pvh[0][0], -0.7757238809297706813, 1e-14,
3422 "eraEpv00", "ph(x)", status);
3423 vvd(pvh[0][1], 0.5598052241363340596, 1e-14,
3424 "eraEpv00", "ph(y)", status);
3425 vvd(pvh[0][2], 0.2426998466481686993, 1e-14,
3426 "eraEpv00", "ph(z)", status);
3427
3428 vvd(pvh[1][0], -0.1091891824147313846e-1, 1e-15,
3429 "eraEpv00", "vh(x)", status);
3430 vvd(pvh[1][1], -0.1247187268440845008e-1, 1e-15,
3431 "eraEpv00", "vh(y)", status);
3432 vvd(pvh[1][2], -0.5407569418065039061e-2, 1e-15,
3433 "eraEpv00", "vh(z)", status);
3434
3435 vvd(pvb[0][0], -0.7714104440491111971, 1e-14,
3436 "eraEpv00", "pb(x)", status);
3437 vvd(pvb[0][1], 0.5598412061824171323, 1e-14,
3438 "eraEpv00", "pb(y)", status);
3439 vvd(pvb[0][2], 0.2425996277722452400, 1e-14,
3440 "eraEpv00", "pb(z)", status);
3441
3442 vvd(pvb[1][0], -0.1091874268116823295e-1, 1e-15,
3443 "eraEpv00", "vb(x)", status);
3444 vvd(pvb[1][1], -0.1246525461732861538e-1, 1e-15,
3445 "eraEpv00", "vb(y)", status);
3446 vvd(pvb[1][2], -0.5404773180966231279e-2, 1e-15,
3447 "eraEpv00", "vb(z)", status);
3448
3449 viv(j, 0, "eraEpv00", "j", status);
3450
3451}
3452
3453static void t_eqec06(int *status)
3454/*
3455** - - - - - - - - -
3456** t _ e q e c 0 6
3457** - - - - - - - - -
3458**
3459** Test eraEqec06 function.
3460**
3461** Returned:
3462** status int FALSE = success, TRUE = fail
3463**
3464** Called: eraEqec06, vvd
3465**
3466** This revision: 2016 March 12
3467*/
3468{
3469 double date1, date2, dr, dd, dl, db;
3470
3471
3472 date1 = 1234.5;
3473 date2 = 2440000.5;
3474 dr = 1.234;
3475 dd = 0.987;
3476
3477 eraEqec06(date1, date2, dr, dd, &dl, &db);
3478
3479 vvd(dl, 1.342509918994654619, 1e-14, "eraEqec06", "dl", status);
3480 vvd(db, 0.5926215259704608132, 1e-14, "eraEqec06", "db", status);
3481
3482}
3483
3484static void t_eqeq94(int *status)
3485/*
3486** - - - - - - - - -
3487** t _ e q e q 9 4
3488** - - - - - - - - -
3489**
3490** Test eraEqeq94 function.
3491**
3492** Returned:
3493** status int FALSE = success, TRUE = fail
3494**
3495** Called: eraEqeq94, vvd
3496**
3497** This revision: 2013 August 7
3498*/
3499{
3500 double eqeq;
3501
3502
3503 eqeq = eraEqeq94(2400000.5, 41234.0);
3504
3505 vvd(eqeq, 0.5357758254609256894e-4, 1e-17, "eraEqeq94", "", status);
3506
3507}
3508
3509static void t_era00(int *status)
3510/*
3511** - - - - - - - -
3512** t _ e r a 0 0
3513** - - - - - - - -
3514**
3515** Test eraEra00 function.
3516**
3517** Returned:
3518** status int FALSE = success, TRUE = fail
3519**
3520** Called: eraEra00, vvd
3521**
3522** This revision: 2013 August 7
3523*/
3524{
3525 double era00;
3526
3527
3528 era00 = eraEra00(2400000.5, 54388.0);
3529
3530 vvd(era00, 0.4022837240028158102, 1e-12, "eraEra00", "", status);
3531
3532}
3533
3534static void t_fad03(int *status)
3535/*
3536** - - - - - - - -
3537** t _ f a d 0 3
3538** - - - - - - - -
3539**
3540** Test eraFad03 function.
3541**
3542** Returned:
3543** status int FALSE = success, TRUE = fail
3544**
3545** Called: eraFad03, vvd
3546**
3547** This revision: 2013 August 7
3548*/
3549{
3550 vvd(eraFad03(0.80), 1.946709205396925672, 1e-12,
3551 "eraFad03", "", status);
3552}
3553
3554static void t_fae03(int *status)
3555/*
3556** - - - - - - - -
3557** t _ f a e 0 3
3558** - - - - - - - -
3559**
3560** Test eraFae03 function.
3561**
3562** Returned:
3563** status int FALSE = success, TRUE = fail
3564**
3565** Called: eraFae03, vvd
3566**
3567** This revision: 2013 August 7
3568*/
3569{
3570 vvd(eraFae03(0.80), 1.744713738913081846, 1e-12,
3571 "eraFae03", "", status);
3572}
3573
3574static void t_faf03(int *status)
3575/*
3576** - - - - - - - -
3577** t _ f a f 0 3
3578** - - - - - - - -
3579**
3580** Test eraFaf03 function.
3581**
3582** Returned:
3583** status int FALSE = success, TRUE = fail
3584**
3585** Called: eraFaf03, vvd
3586**
3587** This revision: 2013 August 7
3588*/
3589{
3590 vvd(eraFaf03(0.80), 0.2597711366745499518, 1e-12,
3591 "eraFaf03", "", status);
3592}
3593
3594static void t_faju03(int *status)
3595/*
3596** - - - - - - - - -
3597** t _ f a j u 0 3
3598** - - - - - - - - -
3599**
3600** Test eraFaju03 function.
3601**
3602** Returned:
3603** status int FALSE = success, TRUE = fail
3604**
3605** Called: eraFaju03, vvd
3606**
3607** This revision: 2013 August 7
3608*/
3609{
3610 vvd(eraFaju03(0.80), 5.275711665202481138, 1e-12,
3611 "eraFaju03", "", status);
3612}
3613
3614static void t_fal03(int *status)
3615/*
3616** - - - - - - - -
3617** t _ f a l 0 3
3618** - - - - - - - -
3619**
3620** Test eraFal03 function.
3621**
3622** Returned:
3623** status int FALSE = success, TRUE = fail
3624**
3625** Called: eraFal03, vvd
3626**
3627** This revision: 2013 August 7
3628*/
3629{
3630 vvd(eraFal03(0.80), 5.132369751108684150, 1e-12,
3631 "eraFal03", "", status);
3632}
3633
3634static void t_falp03(int *status)
3635/*
3636** - - - - - - - - -
3637** t _ f a l p 0 3
3638** - - - - - - - - -
3639**
3640** Test eraFalp03 function.
3641**
3642** Returned:
3643** status int FALSE = success, TRUE = fail
3644**
3645** Called: eraFalp03, vvd
3646**
3647** This revision: 2013 August 7
3648*/
3649{
3650 vvd(eraFalp03(0.80), 6.226797973505507345, 1e-12,
3651 "eraFalp03", "", status);
3652}
3653
3654static void t_fama03(int *status)
3655/*
3656** - - - - - - - - -
3657** t _ f a m a 0 3
3658** - - - - - - - - -
3659**
3660** Test eraFama03 function.
3661**
3662** Returned:
3663** status int FALSE = success, TRUE = fail
3664**
3665** Called: eraFama03, vvd
3666**
3667** This revision: 2013 August 7
3668*/
3669{
3670 vvd(eraFama03(0.80), 3.275506840277781492, 1e-12,
3671 "eraFama03", "", status);
3672}
3673
3674static void t_fame03(int *status)
3675/*
3676** - - - - - - - - -
3677** t _ f a m e 0 3
3678** - - - - - - - - -
3679**
3680** Test eraFame03 function.
3681**
3682** Returned:
3683** status int FALSE = success, TRUE = fail
3684**
3685** Called: eraFame03, vvd
3686**
3687** This revision: 2013 August 7
3688*/
3689{
3690 vvd(eraFame03(0.80), 5.417338184297289661, 1e-12,
3691 "eraFame03", "", status);
3692}
3693
3694static void t_fane03(int *status)
3695/*
3696** - - - - - - - - -
3697** t _ f a n e 0 3
3698** - - - - - - - - -
3699**
3700** Test eraFane03 function.
3701**
3702** Returned:
3703** status int FALSE = success, TRUE = fail
3704**
3705** Called: eraFane03, vvd
3706**
3707** This revision: 2013 August 7
3708*/
3709{
3710 vvd(eraFane03(0.80), 2.079343830860413523, 1e-12,
3711 "eraFane03", "", status);
3712}
3713
3714static void t_faom03(int *status)
3715/*
3716** - - - - - - - - -
3717** t _ f a o m 0 3
3718** - - - - - - - - -
3719**
3720** Test eraFaom03 function.
3721**
3722** Returned:
3723** status int FALSE = success, TRUE = fail
3724**
3725** Called: eraFaom03, vvd
3726**
3727** This revision: 2013 August 7
3728*/
3729{
3730 vvd(eraFaom03(0.80), -5.973618440951302183, 1e-12,
3731 "eraFaom03", "", status);
3732}
3733
3734static void t_fapa03(int *status)
3735/*
3736** - - - - - - - - -
3737** t _ f a p a 0 3
3738** - - - - - - - - -
3739**
3740** Test eraFapa03 function.
3741**
3742** Returned:
3743** status int FALSE = success, TRUE = fail
3744**
3745** Called: eraFapa03, vvd
3746**
3747** This revision: 2013 August 7
3748*/
3749{
3750 vvd(eraFapa03(0.80), 0.1950884762240000000e-1, 1e-12,
3751 "eraFapa03", "", status);
3752}
3753
3754static void t_fasa03(int *status)
3755/*
3756** - - - - - - - - -
3757** t _ f a s a 0 3
3758** - - - - - - - - -
3759**
3760** Test eraFasa03 function.
3761**
3762** Returned:
3763** status int FALSE = success, TRUE = fail
3764**
3765** Called: eraFasa03, vvd
3766**
3767** This revision: 2013 August 7
3768*/
3769{
3770 vvd(eraFasa03(0.80), 5.371574539440827046, 1e-12,
3771 "eraFasa03", "", status);
3772}
3773
3774static void t_faur03(int *status)
3775/*
3776** - - - - - - - - -
3777** t _ f a u r 0 3
3778** - - - - - - - - -
3779**
3780** Test eraFaur03 function.
3781**
3782** Returned:
3783** status int FALSE = success, TRUE = fail
3784**
3785** Called: eraFaur03, vvd
3786**
3787** This revision: 2013 August 7
3788*/
3789{
3790 vvd(eraFaur03(0.80), 5.180636450180413523, 1e-12,
3791 "eraFaur03", "", status);
3792}
3793
3794static void t_fave03(int *status)
3795/*
3796** - - - - - - - - -
3797** t _ f a v e 0 3
3798** - - - - - - - - -
3799**
3800** Test eraFave03 function.
3801**
3802** Returned:
3803** status int FALSE = success, TRUE = fail
3804**
3805** Called: eraFave03, vvd
3806**
3807** This revision: 2013 August 7
3808*/
3809{
3810 vvd(eraFave03(0.80), 3.424900460533758000, 1e-12,
3811 "eraFave03", "", status);
3812}
3813
3814static void t_fk52h(int *status)
3815/*
3816** - - - - - - - -
3817** t _ f k 5 2 h
3818** - - - - - - - -
3819**
3820** Test eraFk52h function.
3821**
3822** Returned:
3823** status int FALSE = success, TRUE = fail
3824**
3825** Called: eraFk52h, vvd
3826**
3827** This revision: 2013 August 7
3828*/
3829{
3830 double r5, d5, dr5, dd5, px5, rv5, rh, dh, drh, ddh, pxh, rvh;
3831
3832
3833 r5 = 1.76779433;
3834 d5 = -0.2917517103;
3835 dr5 = -1.91851572e-7;
3836 dd5 = -5.8468475e-6;
3837 px5 = 0.379210;
3838 rv5 = -7.6;
3839
3840 eraFk52h(r5, d5, dr5, dd5, px5, rv5,
3841 &rh, &dh, &drh, &ddh, &pxh, &rvh);
3842
3843 vvd(rh, 1.767794226299947632, 1e-14,
3844 "eraFk52h", "ra", status);
3845 vvd(dh, -0.2917516070530391757, 1e-14,
3846 "eraFk52h", "dec", status);
3847 vvd(drh, -0.19618741256057224e-6,1e-19,
3848 "eraFk52h", "dr5", status);
3849 vvd(ddh, -0.58459905176693911e-5, 1e-19,
3850 "eraFk52h", "dd5", status);
3851 vvd(pxh, 0.37921, 1e-14,
3852 "eraFk52h", "px", status);
3853 vvd(rvh, -7.6000000940000254, 1e-11,
3854 "eraFk52h", "rv", status);
3855
3856}
3857
3858static void t_fk5hip(int *status)
3859/*
3860** - - - - - - - - -
3861** t _ f k 5 h i p
3862** - - - - - - - - -
3863**
3864** Test eraFk5hip function.
3865**
3866** Returned:
3867** status int FALSE = success, TRUE = fail
3868**
3869** Called: eraFk5hip, vvd
3870**
3871** This revision: 2013 August 7
3872*/
3873{
3874 double r5h[3][3], s5h[3];
3875
3876
3877 eraFk5hip(r5h, s5h);
3878
3879 vvd(r5h[0][0], 0.9999999999999928638, 1e-14,
3880 "eraFk5hip", "11", status);
3881 vvd(r5h[0][1], 0.1110223351022919694e-6, 1e-17,
3882 "eraFk5hip", "12", status);
3883 vvd(r5h[0][2], 0.4411803962536558154e-7, 1e-17,
3884 "eraFk5hip", "13", status);
3885 vvd(r5h[1][0], -0.1110223308458746430e-6, 1e-17,
3886 "eraFk5hip", "21", status);
3887 vvd(r5h[1][1], 0.9999999999999891830, 1e-14,
3888 "eraFk5hip", "22", status);
3889 vvd(r5h[1][2], -0.9647792498984142358e-7, 1e-17,
3890 "eraFk5hip", "23", status);
3891 vvd(r5h[2][0], -0.4411805033656962252e-7, 1e-17,
3892 "eraFk5hip", "31", status);
3893 vvd(r5h[2][1], 0.9647792009175314354e-7, 1e-17,
3894 "eraFk5hip", "32", status);
3895 vvd(r5h[2][2], 0.9999999999999943728, 1e-14,
3896 "eraFk5hip", "33", status);
3897 vvd(s5h[0], -0.1454441043328607981e-8, 1e-17,
3898 "eraFk5hip", "s1", status);
3899 vvd(s5h[1], 0.2908882086657215962e-8, 1e-17,
3900 "eraFk5hip", "s2", status);
3901 vvd(s5h[2], 0.3393695767766751955e-8, 1e-17,
3902 "eraFk5hip", "s3", status);
3903
3904}
3905
3906static void t_fk5hz(int *status)
3907/*
3908** - - - - - - - -
3909** t _ f k 5 h z
3910** - - - - - - - -
3911**
3912** Test eraFk5hz function.
3913**
3914** Returned:
3915** status int FALSE = success, TRUE = fail
3916**
3917** Called: eraFk5hz, vvd
3918**
3919** This revision: 2013 August 7
3920*/
3921{
3922 double r5, d5, rh, dh;
3923
3924
3925 r5 = 1.76779433;
3926 d5 = -0.2917517103;
3927
3928 eraFk5hz(r5, d5, 2400000.5, 54479.0, &rh, &dh);
3929
3930 vvd(rh, 1.767794191464423978, 1e-12, "eraFk5hz", "ra", status);
3931 vvd(dh, -0.2917516001679884419, 1e-12, "eraFk5hz", "dec", status);
3932
3933}
3934
3935static void t_fw2m(int *status)
3936/*
3937** - - - - - - -
3938** t _ f w 2 m
3939** - - - - - - -
3940**
3941** Test eraFw2m function.
3942**
3943** Returned:
3944** status int FALSE = success, TRUE = fail
3945**
3946** Called: eraFw2m, vvd
3947**
3948** This revision: 2013 August 7
3949*/
3950{
3951 double gamb, phib, psi, eps, r[3][3];
3952
3953
3954 gamb = -0.2243387670997992368e-5;
3955 phib = 0.4091014602391312982;
3956 psi = -0.9501954178013015092e-3;
3957 eps = 0.4091014316587367472;
3958
3959 eraFw2m(gamb, phib, psi, eps, r);
3960
3961 vvd(r[0][0], 0.9999995505176007047, 1e-12,
3962 "eraFw2m", "11", status);
3963 vvd(r[0][1], 0.8695404617348192957e-3, 1e-12,
3964 "eraFw2m", "12", status);
3965 vvd(r[0][2], 0.3779735201865582571e-3, 1e-12,
3966 "eraFw2m", "13", status);
3967
3968 vvd(r[1][0], -0.8695404723772016038e-3, 1e-12,
3969 "eraFw2m", "21", status);
3970 vvd(r[1][1], 0.9999996219496027161, 1e-12,
3971 "eraFw2m", "22", status);
3972 vvd(r[1][2], -0.1361752496887100026e-6, 1e-12,
3973 "eraFw2m", "23", status);
3974
3975 vvd(r[2][0], -0.3779734957034082790e-3, 1e-12,
3976 "eraFw2m", "31", status);
3977 vvd(r[2][1], -0.1924880848087615651e-6, 1e-12,
3978 "eraFw2m", "32", status);
3979 vvd(r[2][2], 0.9999999285679971958, 1e-12,
3980 "eraFw2m", "33", status);
3981
3982}
3983
3984static void t_fw2xy(int *status)
3985/*
3986** - - - - - - - -
3987** t _ f w 2 x y
3988** - - - - - - - -
3989**
3990** Test eraFw2xy function.
3991**
3992** Returned:
3993** status int FALSE = success, TRUE = fail
3994**
3995** Called: eraFw2xy, vvd
3996**
3997** This revision: 2013 August 7
3998*/
3999{
4000 double gamb, phib, psi, eps, x, y;
4001
4002
4003 gamb = -0.2243387670997992368e-5;
4004 phib = 0.4091014602391312982;
4005 psi = -0.9501954178013015092e-3;
4006 eps = 0.4091014316587367472;
4007
4008 eraFw2xy(gamb, phib, psi, eps, &x, &y);
4009
4010 vvd(x, -0.3779734957034082790e-3, 1e-14, "eraFw2xy", "x", status);
4011 vvd(y, -0.1924880848087615651e-6, 1e-14, "eraFw2xy", "y", status);
4012
4013}
4014
4015static void t_g2icrs(int *status)
4016/*
4017** - - - - - - - - -
4018** t _ g 2 i c r s
4019** - - - - - - - - -
4020**
4021** Test eraG2icrs function.
4022**
4023** Returned:
4024** status int FALSE = success, TRUE = fail
4025**
4026** Called: eraG2icrs, vvd
4027**
4028** This revision: 2015 January 30
4029*/
4030{
4031 double dl, db, dr, dd;
4032
4033
4034 dl = 5.5850536063818546461558105;
4035 db = -0.7853981633974483096156608;
4036 eraG2icrs (dl, db, &dr, &dd);
4037 vvd(dr, 5.9338074302227188048671, 1e-14, "eraG2icrs", "R", status);
4038 vvd(dd, -1.1784870613579944551541, 1e-14, "eraG2icrs", "D", status);
4039 }
4040
4041static void t_gc2gd(int *status)
4042/*
4043** - - - - - - - -
4044** t _ g c 2 g d
4045** - - - - - - - -
4046**
4047** Test eraGc2gd function.
4048**
4049** Returned:
4050** status int FALSE = success, TRUE = fail
4051**
4052** Called: eraGc2gd, viv, vvd
4053**
4054** This revision: 2016 March 12
4055*/
4056{
4057 int j;
4058 double xyz[] = {2e6, 3e6, 5.244e6};
4059 double e, p, h;
4060
4061 j = eraGc2gd(0, xyz, &e, &p, &h);
4062
4063 viv(j, -1, "eraGc2gd", "j0", status);
4064
4065 j = eraGc2gd(ERFA_WGS84, xyz, &e, &p, &h);
4066
4067 viv(j, 0, "eraGc2gd", "j1", status);
4068 vvd(e, 0.9827937232473290680, 1e-14, "eraGc2gd", "e1", status);
4069 vvd(p, 0.97160184819075459, 1e-14, "eraGc2gd", "p1", status);
4070 vvd(h, 331.4172461426059892, 1e-8, "eraGc2gd", "h1", status);
4071
4072 j = eraGc2gd(ERFA_GRS80, xyz, &e, &p, &h);
4073
4074 viv(j, 0, "eraGc2gd", "j2", status);
4075 vvd(e, 0.9827937232473290680, 1e-14, "eraGc2gd", "e2", status);
4076 vvd(p, 0.97160184820607853, 1e-14, "eraGc2gd", "p2", status);
4077 vvd(h, 331.41731754844348, 1e-8, "eraGc2gd", "h2", status);
4078
4079 j = eraGc2gd(ERFA_WGS72, xyz, &e, &p, &h);
4080
4081 viv(j, 0, "eraGc2gd", "j3", status);
4082 vvd(e, 0.9827937232473290680, 1e-14, "eraGc2gd", "e3", status);
4083 vvd(p, 0.9716018181101511937, 1e-14, "eraGc2gd", "p3", status);
4084 vvd(h, 333.2770726130318123, 1e-8, "eraGc2gd", "h3", status);
4085
4086 j = eraGc2gd(4, xyz, &e, &p, &h);
4087
4088 viv(j, -1, "eraGc2gd", "j4", status);
4089}
4090
4091static void t_gc2gde(int *status)
4092/*
4093** - - - - - - - - -
4094** t _ g c 2 g d e
4095** - - - - - - - - -
4096**
4097** Test eraGc2gde function.
4098**
4099** Returned:
4100** status int FALSE = success, TRUE = fail
4101**
4102** Called: eraGc2gde, viv, vvd
4103**
4104** This revision: 2016 March 12
4105*/
4106{
4107 int j;
4108 double a = 6378136.0, f = 0.0033528;
4109 double xyz[] = {2e6, 3e6, 5.244e6};
4110 double e, p, h;
4111
4112 j = eraGc2gde(a, f, xyz, &e, &p, &h);
4113
4114 viv(j, 0, "eraGc2gde", "j", status);
4115 vvd(e, 0.9827937232473290680, 1e-14, "eraGc2gde", "e", status);
4116 vvd(p, 0.9716018377570411532, 1e-14, "eraGc2gde", "p", status);
4117 vvd(h, 332.36862495764397, 1e-8, "eraGc2gde", "h", status);
4118}
4119
4120static void t_gd2gc(int *status)
4121/*
4122** - - - - - - - -
4123** t _ g d 2 g c
4124** - - - - - - - -
4125**
4126** Test eraGd2gc function.
4127**
4128** Returned:
4129** status int FALSE = success, TRUE = fail
4130**
4131** Called: eraGd2gc, viv, vvd
4132**
4133** This revision: 2016 March 12
4134*/
4135{
4136 int j;
4137 double e = 3.1, p = -0.5, h = 2500.0;
4138 double xyz[3];
4139
4140 j = eraGd2gc(0, e, p, h, xyz);
4141
4142 viv(j, -1, "eraGd2gc", "j0", status);
4143
4144 j = eraGd2gc(ERFA_WGS84, e, p, h, xyz);
4145
4146 viv(j, 0, "eraGd2gc", "j1", status);
4147 vvd(xyz[0], -5599000.5577049947, 1e-7, "eraGd2gc", "1/1", status);
4148 vvd(xyz[1], 233011.67223479203, 1e-7, "eraGd2gc", "2/1", status);
4149 vvd(xyz[2], -3040909.4706983363, 1e-7, "eraGd2gc", "3/1", status);
4150
4151 j = eraGd2gc(ERFA_GRS80, e, p, h, xyz);
4152
4153 viv(j, 0, "eraGd2gc", "j2", status);
4154 vvd(xyz[0], -5599000.5577260984, 1e-7, "eraGd2gc", "1/2", status);
4155 vvd(xyz[1], 233011.6722356702949, 1e-7, "eraGd2gc", "2/2", status);
4156 vvd(xyz[2], -3040909.4706095476, 1e-7, "eraGd2gc", "3/2", status);
4157
4158 j = eraGd2gc(ERFA_WGS72, e, p, h, xyz);
4159
4160 viv(j, 0, "eraGd2gc", "j3", status);
4161 vvd(xyz[0], -5598998.7626301490, 1e-7, "eraGd2gc", "1/3", status);
4162 vvd(xyz[1], 233011.5975297822211, 1e-7, "eraGd2gc", "2/3", status);
4163 vvd(xyz[2], -3040908.6861467111, 1e-7, "eraGd2gc", "3/3", status);
4164
4165 j = eraGd2gc(4, e, p, h, xyz);
4166
4167 viv(j, -1, "eraGd2gc", "j4", status);
4168}
4169
4170static void t_gd2gce(int *status)
4171/*
4172** - - - - - - - - -
4173** t _ g d 2 g c e
4174** - - - - - - - - -
4175**
4176** Test eraGd2gce function.
4177**
4178** Returned:
4179** status int FALSE = success, TRUE = fail
4180**
4181** Called: eraGd2gce, viv, vvd
4182**
4183** This revision: 2016 March 12
4184*/
4185{
4186 int j;
4187 double a = 6378136.0, f = 0.0033528;
4188 double e = 3.1, p = -0.5, h = 2500.0;
4189 double xyz[3];
4190
4191 j = eraGd2gce(a, f, e, p, h, xyz);
4192
4193 viv(j, 0, "eraGd2gce", "j", status);
4194 vvd(xyz[0], -5598999.6665116328, 1e-7, "eraGd2gce", "1", status);
4195 vvd(xyz[1], 233011.6351463057189, 1e-7, "eraGd2gce", "2", status);
4196 vvd(xyz[2], -3040909.0517314132, 1e-7, "eraGd2gce", "3", status);
4197}
4198
4199static void t_gmst00(int *status)
4200/*
4201** - - - - - - - - -
4202** t _ g m s t 0 0
4203** - - - - - - - - -
4204**
4205** Test eraGmst00 function.
4206**
4207** Returned:
4208** status int FALSE = success, TRUE = fail
4209**
4210** Called: eraGmst00, vvd
4211**
4212** This revision: 2013 August 7
4213*/
4214{
4215 double theta;
4216
4217
4218 theta = eraGmst00(2400000.5, 53736.0, 2400000.5, 53736.0);
4219
4220 vvd(theta, 1.754174972210740592, 1e-12, "eraGmst00", "", status);
4221
4222}
4223
4224static void t_gmst06(int *status)
4225/*
4226** - - - - - - - - -
4227** t _ g m s t 0 6
4228** - - - - - - - - -
4229**
4230** Test eraGmst06 function.
4231**
4232** Returned:
4233** status int FALSE = success, TRUE = fail
4234**
4235** Called: eraGmst06, vvd
4236**
4237** This revision: 2013 August 7
4238*/
4239{
4240 double theta;
4241
4242
4243 theta = eraGmst06(2400000.5, 53736.0, 2400000.5, 53736.0);
4244
4245 vvd(theta, 1.754174971870091203, 1e-12, "eraGmst06", "", status);
4246
4247}
4248
4249static void t_gmst82(int *status)
4250/*
4251** - - - - - - - - -
4252** t _ g m s t 8 2
4253** - - - - - - - - -
4254**
4255** Test eraGmst82 function.
4256**
4257** Returned:
4258** status int FALSE = success, TRUE = fail
4259**
4260** Called: eraGmst82, vvd
4261**
4262** This revision: 2013 August 7
4263*/
4264{
4265 double theta;
4266
4267
4268 theta = eraGmst82(2400000.5, 53736.0);
4269
4270 vvd(theta, 1.754174981860675096, 1e-12, "eraGmst82", "", status);
4271
4272}
4273
4274static void t_gst00a(int *status)
4275/*
4276** - - - - - - - - -
4277** t _ g s t 0 0 a
4278** - - - - - - - - -
4279**
4280** Test eraGst00a function.
4281**
4282** Returned:
4283** status int FALSE = success, TRUE = fail
4284**
4285** Called: eraGst00a, vvd
4286**
4287** This revision: 2013 August 7
4288*/
4289{
4290 double theta;
4291
4292
4293 theta = eraGst00a(2400000.5, 53736.0, 2400000.5, 53736.0);
4294
4295 vvd(theta, 1.754166138018281369, 1e-12, "eraGst00a", "", status);
4296
4297}
4298
4299static void t_gst00b(int *status)
4300/*
4301** - - - - - - - - -
4302** t _ g s t 0 0 b
4303** - - - - - - - - -
4304**
4305** Test eraGst00b function.
4306**
4307** Returned:
4308** status int FALSE = success, TRUE = fail
4309**
4310** Called: eraGst00b, vvd
4311**
4312** This revision: 2013 August 7
4313*/
4314{
4315 double theta;
4316
4317
4318 theta = eraGst00b(2400000.5, 53736.0);
4319
4320 vvd(theta, 1.754166136510680589, 1e-12, "eraGst00b", "", status);
4321
4322}
4323
4324static void t_gst06(int *status)
4325/*
4326** - - - - - - - -
4327** t _ g s t 0 6
4328** - - - - - - - -
4329**
4330** Test eraGst06 function.
4331**
4332** Returned:
4333** status int FALSE = success, TRUE = fail
4334**
4335** Called: eraGst06, vvd
4336**
4337** This revision: 2013 August 7
4338*/
4339{
4340 double rnpb[3][3], theta;
4341
4342
4343 rnpb[0][0] = 0.9999989440476103608;
4344 rnpb[0][1] = -0.1332881761240011518e-2;
4345 rnpb[0][2] = -0.5790767434730085097e-3;
4346
4347 rnpb[1][0] = 0.1332858254308954453e-2;
4348 rnpb[1][1] = 0.9999991109044505944;
4349 rnpb[1][2] = -0.4097782710401555759e-4;
4350
4351 rnpb[2][0] = 0.5791308472168153320e-3;
4352 rnpb[2][1] = 0.4020595661593994396e-4;
4353 rnpb[2][2] = 0.9999998314954572365;
4354
4355 theta = eraGst06(2400000.5, 53736.0, 2400000.5, 53736.0, rnpb);
4356
4357 vvd(theta, 1.754166138018167568, 1e-12, "eraGst06", "", status);
4358
4359}
4360
4361static void t_gst06a(int *status)
4362/*
4363** - - - - - - - - -
4364** t _ g s t 0 6 a
4365** - - - - - - - - -
4366**
4367** Test eraGst06a function.
4368**
4369** Returned:
4370** status int FALSE = success, TRUE = fail
4371**
4372** Called: eraGst06a, vvd
4373**
4374** This revision: 2013 August 7
4375*/
4376{
4377 double theta;
4378
4379
4380 theta = eraGst06a(2400000.5, 53736.0, 2400000.5, 53736.0);
4381
4382 vvd(theta, 1.754166137675019159, 1e-12, "eraGst06a", "", status);
4383
4384}
4385
4386static void t_gst94(int *status)
4387/*
4388** - - - - - - - -
4389** t _ g s t 9 4
4390** - - - - - - - -
4391**
4392** Test eraGst94 function.
4393**
4394** Returned:
4395** status int FALSE = success, TRUE = fail
4396**
4397** Called: eraGst94, vvd
4398**
4399** This revision: 2013 August 7
4400*/
4401{
4402 double theta;
4403
4404
4405 theta = eraGst94(2400000.5, 53736.0);
4406
4407 vvd(theta, 1.754166136020645203, 1e-12, "eraGst94", "", status);
4408
4409}
4410
4411static void t_icrs2g(int *status)
4412/*
4413** - - - - - - - - -
4414** t _ i c r s 2 g
4415** - - - - - - - - -
4416**
4417** Test eraIcrs2g function.
4418**
4419** Returned:
4420** status int FALSE = success, TRUE = fail
4421**
4422** Called: eraIcrs2g, vvd
4423**
4424** This revision: 2015 January 30
4425*/
4426{
4427 double dr, dd, dl, db;
4428
4429 dr = 5.9338074302227188048671087;
4430 dd = -1.1784870613579944551540570;
4431 eraIcrs2g (dr, dd, &dl, &db);
4432 vvd(dl, 5.5850536063818546461558, 1e-14, "eraIcrs2g", "L", status);
4433 vvd(db, -0.7853981633974483096157, 1e-14, "eraIcrs2g", "B", status);
4434 }
4435
4436static void t_h2fk5(int *status)
4437/*
4438** - - - - - - - -
4439** t _ h 2 f k 5
4440** - - - - - - - -
4441**
4442** Test eraH2fk5 function.
4443**
4444** Returned:
4445** status int FALSE = success, TRUE = fail
4446**
4447** Called: eraH2fk5, vvd
4448**
4449** This revision: 2013 August 7
4450*/
4451{
4452 double rh, dh, drh, ddh, pxh, rvh, r5, d5, dr5, dd5, px5, rv5;
4453
4454
4455 rh = 1.767794352;
4456 dh = -0.2917512594;
4457 drh = -2.76413026e-6;
4458 ddh = -5.92994449e-6;
4459 pxh = 0.379210;
4460 rvh = -7.6;
4461
4462 eraH2fk5(rh, dh, drh, ddh, pxh, rvh,
4463 &r5, &d5, &dr5, &dd5, &px5, &rv5);
4464
4465 vvd(r5, 1.767794455700065506, 1e-13,
4466 "eraH2fk5", "ra", status);
4467 vvd(d5, -0.2917513626469638890, 1e-13,
4468 "eraH2fk5", "dec", status);
4469 vvd(dr5, -0.27597945024511204e-5, 1e-18,
4470 "eraH2fk5", "dr5", status);
4471 vvd(dd5, -0.59308014093262838e-5, 1e-18,
4472 "eraH2fk5", "dd5", status);
4473 vvd(px5, 0.37921, 1e-13,
4474 "eraH2fk5", "px", status);
4475 vvd(rv5, -7.6000001309071126, 1e-10,
4476 "eraH2fk5", "rv", status);
4477
4478}
4479
4480static void t_hfk5z(int *status)
4481/*
4482** - - - - - - - -
4483** t _ h f k 5 z
4484** - - - - - - - -
4485**
4486** Test eraHfk5z function.
4487**
4488** Returned:
4489** status int FALSE = success, TRUE = fail
4490**
4491** Called: eraHfk5z, vvd
4492**
4493** This revision: 2013 August 7
4494*/
4495{
4496 double rh, dh, r5, d5, dr5, dd5;
4497
4498
4499
4500 rh = 1.767794352;
4501 dh = -0.2917512594;
4502
4503 eraHfk5z(rh, dh, 2400000.5, 54479.0, &r5, &d5, &dr5, &dd5);
4504
4505 vvd(r5, 1.767794490535581026, 1e-13,
4506 "eraHfk5z", "ra", status);
4507 vvd(d5, -0.2917513695320114258, 1e-14,
4508 "eraHfk5z", "dec", status);
4509 vvd(dr5, 0.4335890983539243029e-8, 1e-22,
4510 "eraHfk5z", "dr5", status);
4511 vvd(dd5, -0.8569648841237745902e-9, 1e-23,
4512 "eraHfk5z", "dd5", status);
4513
4514}
4515
4516static void t_ir(int *status)
4517/*
4518** - - - - -
4519** t _ i r
4520** - - - - -
4521**
4522** Test eraIr function.
4523**
4524** Returned:
4525** status int FALSE = success, TRUE = fail
4526**
4527** Called: eraIr, vvd
4528**
4529** This revision: 2013 August 7
4530*/
4531{
4532 double r[3][3];
4533
4534
4535 r[0][0] = 2.0;
4536 r[0][1] = 3.0;
4537 r[0][2] = 2.0;
4538
4539 r[1][0] = 3.0;
4540 r[1][1] = 2.0;
4541 r[1][2] = 3.0;
4542
4543 r[2][0] = 3.0;
4544 r[2][1] = 4.0;
4545 r[2][2] = 5.0;
4546
4547 eraIr(r);
4548
4549 vvd(r[0][0], 1.0, 0.0, "eraIr", "11", status);
4550 vvd(r[0][1], 0.0, 0.0, "eraIr", "12", status);
4551 vvd(r[0][2], 0.0, 0.0, "eraIr", "13", status);
4552
4553 vvd(r[1][0], 0.0, 0.0, "eraIr", "21", status);
4554 vvd(r[1][1], 1.0, 0.0, "eraIr", "22", status);
4555 vvd(r[1][2], 0.0, 0.0, "eraIr", "23", status);
4556
4557 vvd(r[2][0], 0.0, 0.0, "eraIr", "31", status);
4558 vvd(r[2][1], 0.0, 0.0, "eraIr", "32", status);
4559 vvd(r[2][2], 1.0, 0.0, "eraIr", "33", status);
4560
4561}
4562
4563static void t_jd2cal(int *status)
4564/*
4565** - - - - - - - - -
4566** t _ j d 2 c a l
4567** - - - - - - - - -
4568**
4569** Test eraJd2cal function.
4570**
4571** Returned:
4572** status int FALSE = success, TRUE = fail
4573**
4574** Called: eraJd2cal, viv, vvd
4575**
4576** This revision: 2013 August 7
4577*/
4578{
4579 double dj1, dj2, fd;
4580 int iy, im, id, j;
4581
4582
4583 dj1 = 2400000.5;
4584 dj2 = 50123.9999;
4585
4586 j = eraJd2cal(dj1, dj2, &iy, &im, &id, &fd);
4587
4588 viv(iy, 1996, "eraJd2cal", "y", status);
4589 viv(im, 2, "eraJd2cal", "m", status);
4590 viv(id, 10, "eraJd2cal", "d", status);
4591 vvd(fd, 0.9999, 1e-7, "eraJd2cal", "fd", status);
4592 viv(j, 0, "eraJd2cal", "j", status);
4593
4594}
4595
4596static void t_jdcalf(int *status)
4597/*
4598** - - - - - - - - -
4599** t _ j d c a l f
4600** - - - - - - - - -
4601**
4602** Test eraJdcalf function.
4603**
4604** Returned:
4605** status int FALSE = success, TRUE = fail
4606**
4607** Called: eraJdcalf, viv
4608**
4609** This revision: 2013 August 7
4610*/
4611{
4612 double dj1, dj2;
4613 int iydmf[4], j;
4614
4615
4616 dj1 = 2400000.5;
4617 dj2 = 50123.9999;
4618
4619 j = eraJdcalf(4, dj1, dj2, iydmf);
4620
4621 viv(iydmf[0], 1996, "eraJdcalf", "y", status);
4622 viv(iydmf[1], 2, "eraJdcalf", "m", status);
4623 viv(iydmf[2], 10, "eraJdcalf", "d", status);
4624 viv(iydmf[3], 9999, "eraJdcalf", "f", status);
4625
4626 viv(j, 0, "eraJdcalf", "j", status);
4627
4628}
4629
4630static void t_ld(int *status)
4631/*
4632** - - - - -
4633** t _ l d
4634** - - - - -
4635**
4636** Test eraLd function.
4637**
4638** Returned:
4639** status int FALSE = success, TRUE = fail
4640**
4641** Called: eraLd, vvd
4642*
4643** This revision: 2013 October 2
4644*/
4645{
4646 double bm, p[3], q[3], e[3], em, dlim, p1[3];
4647
4648
4649 bm = 0.00028574;
4650 p[0] = -0.763276255;
4651 p[1] = -0.608633767;
4652 p[2] = -0.216735543;
4653 q[0] = -0.763276255;
4654 q[1] = -0.608633767;
4655 q[2] = -0.216735543;
4656 e[0] = 0.76700421;
4657 e[1] = 0.605629598;
4658 e[2] = 0.211937094;
4659 em = 8.91276983;
4660 dlim = 3e-10;
4661
4662 eraLd(bm, p, q, e, em, dlim, p1);
4663
4664 vvd(p1[0], -0.7632762548968159627, 1e-12,
4665 "eraLd", "1", status);
4666 vvd(p1[1], -0.6086337670823762701, 1e-12,
4667 "eraLd", "2", status);
4668 vvd(p1[2], -0.2167355431320546947, 1e-12,
4669 "eraLd", "3", status);
4670
4671}
4672
4673static void t_ldn(int *status)
4674/*
4675** - - - - - -
4676** t _ l d n
4677** - - - - - -
4678**
4679** Test eraLdn function.
4680**
4681** Returned:
4682** status int FALSE = success, TRUE = fail
4683**
4684** Called: eraLdn, vvd
4685**
4686** This revision: 2013 October 2
4687*/
4688{
4689 int n;
4690 eraLDBODY b[3];
4691 double ob[3], sc[3], sn[3];
4692
4693
4694 n = 3;
4695 b[0].bm = 0.00028574;
4696 b[0].dl = 3e-10;
4697 b[0].pv[0][0] = -7.81014427;
4698 b[0].pv[0][1] = -5.60956681;
4699 b[0].pv[0][2] = -1.98079819;
4700 b[0].pv[1][0] = 0.0030723249;
4701 b[0].pv[1][1] = -0.00406995477;
4702 b[0].pv[1][2] = -0.00181335842;
4703 b[1].bm = 0.00095435;
4704 b[1].dl = 3e-9;
4705 b[1].pv[0][0] = 0.738098796;
4706 b[1].pv[0][1] = 4.63658692;
4707 b[1].pv[0][2] = 1.9693136;
4708 b[1].pv[1][0] = -0.00755816922;
4709 b[1].pv[1][1] = 0.00126913722;
4710 b[1].pv[1][2] = 0.000727999001;
4711 b[2].bm = 1.0;
4712 b[2].dl = 6e-6;
4713 b[2].pv[0][0] = -0.000712174377;
4714 b[2].pv[0][1] = -0.00230478303;
4715 b[2].pv[0][2] = -0.00105865966;
4716 b[2].pv[1][0] = 6.29235213e-6;
4717 b[2].pv[1][1] = -3.30888387e-7;
4718 b[2].pv[1][2] = -2.96486623e-7;
4719 ob[0] = -0.974170437;
4720 ob[1] = -0.2115201;
4721 ob[2] = -0.0917583114;
4722 sc[0] = -0.763276255;
4723 sc[1] = -0.608633767;
4724 sc[2] = -0.216735543;
4725
4726 eraLdn(n, b, ob, sc, sn);
4727
4728 vvd(sn[0], -0.7632762579693333866, 1e-12,
4729 "eraLdn", "1", status);
4730 vvd(sn[1], -0.6086337636093002660, 1e-12,
4731 "eraLdn", "2", status);
4732 vvd(sn[2], -0.2167355420646328159, 1e-12,
4733 "eraLdn", "3", status);
4734
4735}
4736
4737static void t_ldsun(int *status)
4738/*
4739** - - - - - - - -
4740** t _ l d s u n
4741** - - - - - - - -
4742**
4743** Test eraLdsun function.
4744**
4745** Returned:
4746** status int FALSE = success, TRUE = fail
4747**
4748** Called: eraLdsun, vvd
4749**
4750** This revision: 2013 October 2
4751*/
4752{
4753 double p[3], e[3], em, p1[3];
4754
4755
4756 p[0] = -0.763276255;
4757 p[1] = -0.608633767;
4758 p[2] = -0.216735543;
4759 e[0] = -0.973644023;
4760 e[1] = -0.20925523;
4761 e[2] = -0.0907169552;
4762 em = 0.999809214;
4763
4764 eraLdsun(p, e, em, p1);
4765
4766 vvd(p1[0], -0.7632762580731413169, 1e-12,
4767 "eraLdsun", "1", status);
4768 vvd(p1[1], -0.6086337635262647900, 1e-12,
4769 "eraLdsun", "2", status);
4770 vvd(p1[2], -0.2167355419322321302, 1e-12,
4771 "eraLdsun", "3", status);
4772
4773}
4774
4775static void t_lteceq(int *status)
4776/*
4777** - - - - - - - - -
4778** t _ l t e c e q
4779** - - - - - - - - -
4780**
4781** Test eraLteceq function.
4782**
4783** Returned:
4784** status int FALSE = success, TRUE = fail
4785**
4786** Called: eraLteceq, vvd
4787**
4788** This revision: 2016 March 12
4789*/
4790{
4791 double epj, dl, db, dr, dd;
4792
4793
4794 epj = 2500.0;
4795 dl = 1.5;
4796 db = 0.6;
4797
4798 eraLteceq(epj, dl, db, &dr, &dd);
4799
4800 vvd(dr, 1.275156021861921167, 1e-14, "eraLteceq", "dr", status);
4801 vvd(dd, 0.9966573543519204791, 1e-14, "eraLteceq", "dd", status);
4802
4803}
4804
4805static void t_ltecm(int *status)
4806/*
4807** - - - - - - - -
4808** t _ l t e c m
4809** - - - - - - - -
4810**
4811** Test eraLtecm function.
4812**
4813** Returned:
4814** status int FALSE = success, TRUE = fail
4815**
4816** Called: eraLtecm, vvd
4817**
4818** This revision: 2016 March 12
4819*/
4820{
4821 double epj, rm[3][3];
4822
4823
4824 epj = -3000.0;
4825
4826 eraLtecm(epj, rm);
4827
4828 vvd(rm[0][0], 0.3564105644859788825, 1e-14,
4829 "eraLtecm", "rm11", status);
4830 vvd(rm[0][1], 0.8530575738617682284, 1e-14,
4831 "eraLtecm", "rm12", status);
4832 vvd(rm[0][2], 0.3811355207795060435, 1e-14,
4833 "eraLtecm", "rm13", status);
4834 vvd(rm[1][0], -0.9343283469640709942, 1e-14,
4835 "eraLtecm", "rm21", status);
4836 vvd(rm[1][1], 0.3247830597681745976, 1e-14,
4837 "eraLtecm", "rm22", status);
4838 vvd(rm[1][2], 0.1467872751535940865, 1e-14,
4839 "eraLtecm", "rm23", status);
4840 vvd(rm[2][0], 0.1431636191201167793e-2, 1e-14,
4841 "eraLtecm", "rm31", status);
4842 vvd(rm[2][1], -0.4084222566960599342, 1e-14,
4843 "eraLtecm", "rm32", status);
4844 vvd(rm[2][2], 0.9127919865189030899, 1e-14,
4845 "eraLtecm", "rm33", status);
4846
4847}
4848
4849static void t_lteqec(int *status)
4850/*
4851** - - - - - - - - -
4852** t _ l t e q e c
4853** - - - - - - - - -
4854**
4855** Test eraLteqec function.
4856**
4857** Returned:
4858** status int FALSE = success, TRUE = fail
4859**
4860** Called: eraLteqec, vvd
4861**
4862** This revision: 2016 March 12
4863*/
4864{
4865 double epj, dr, dd, dl, db;
4866
4867
4868 epj = -1500.0;
4869 dr = 1.234;
4870 dd = 0.987;
4871
4872 eraLteqec(epj, dr, dd, &dl, &db);
4873
4874 vvd(dl, 0.5039483649047114859, 1e-14, "eraLteqec", "dl", status);
4875 vvd(db, 0.5848534459726224882, 1e-14, "eraLteqec", "db", status);
4876
4877}
4878
4879static void t_ltp(int *status)
4880/*
4881** - - - - - -
4882** t _ l t p
4883** - - - - - -
4884**
4885** Test eraLtp function.
4886**
4887** Returned:
4888** status int FALSE = success, TRUE = fail
4889**
4890** Called: eraLtp, vvd
4891**
4892** This revision: 2016 March 12
4893*/
4894{
4895 double epj, rp[3][3];
4896
4897
4898 epj = 1666.666;
4899
4900 eraLtp(epj, rp);
4901
4902 vvd(rp[0][0], 0.9967044141159213819, 1e-14,
4903 "eraLtp", "rp11", status);
4904 vvd(rp[0][1], 0.7437801893193210840e-1, 1e-14,
4905 "eraLtp", "rp12", status);
4906 vvd(rp[0][2], 0.3237624409345603401e-1, 1e-14,
4907 "eraLtp", "rp13", status);
4908 vvd(rp[1][0], -0.7437802731819618167e-1, 1e-14,
4909 "eraLtp", "rp21", status);
4910 vvd(rp[1][1], 0.9972293894454533070, 1e-14,
4911 "eraLtp", "rp22", status);
4912 vvd(rp[1][2], -0.1205768842723593346e-2, 1e-14,
4913 "eraLtp", "rp23", status);
4914 vvd(rp[2][0], -0.3237622482766575399e-1, 1e-14,
4915 "eraLtp", "rp31", status);
4916 vvd(rp[2][1], -0.1206286039697609008e-2, 1e-14,
4917 "eraLtp", "rp32", status);
4918 vvd(rp[2][2], 0.9994750246704010914, 1e-14,
4919 "eraLtp", "rp33", status);
4920
4921}
4922
4923static void t_ltpb(int *status)
4924/*
4925** - - - - - - -
4926** t _ l t p b
4927** - - - - - - -
4928**
4929** Test eraLtpb function.
4930**
4931** Returned:
4932** status int FALSE = success, TRUE = fail
4933**
4934** Called: eraLtpb, vvd
4935**
4936** This revision: 2016 March 12
4937*/
4938{
4939 double epj, rpb[3][3];
4940
4941
4942 epj = 1666.666;
4943
4944 eraLtpb(epj, rpb);
4945
4946 vvd(rpb[0][0], 0.9967044167723271851, 1e-14,
4947 "eraLtpb", "rpb11", status);
4948 vvd(rpb[0][1], 0.7437794731203340345e-1, 1e-14,
4949 "eraLtpb", "rpb12", status);
4950 vvd(rpb[0][2], 0.3237632684841625547e-1, 1e-14,
4951 "eraLtpb", "rpb13", status);
4952 vvd(rpb[1][0], -0.7437795663437177152e-1, 1e-14,
4953 "eraLtpb", "rpb21", status);
4954 vvd(rpb[1][1], 0.9972293947500013666, 1e-14,
4955 "eraLtpb", "rpb22", status);
4956 vvd(rpb[1][2], -0.1205741865911243235e-2, 1e-14,
4957 "eraLtpb", "rpb23", status);
4958 vvd(rpb[2][0], -0.3237630543224664992e-1, 1e-14,
4959 "eraLtpb", "rpb31", status);
4960 vvd(rpb[2][1], -0.1206316791076485295e-2, 1e-14,
4961 "eraLtpb", "rpb32", status);
4962 vvd(rpb[2][2], 0.9994750220222438819, 1e-14,
4963 "eraLtpb", "rpb33", status);
4964
4965}
4966
4967static void t_ltpecl(int *status)
4968/*
4969** - - - - - - - - -
4970** t _ l t p e c l
4971** - - - - - - - - -
4972**
4973** Test eraLtpecl function.
4974**
4975** Returned:
4976** status int FALSE = success, TRUE = fail
4977**
4978** Called: eraLtpecl, vvd
4979**
4980** This revision: 2016 March 12
4981*/
4982{
4983 double epj, vec[3];
4984
4985
4986 epj = -1500.0;
4987
4988 eraLtpecl(epj, vec);
4989
4990 vvd(vec[0], 0.4768625676477096525e-3, 1e-14,
4991 "eraLtpecl", "vec1", status);
4992 vvd(vec[1], -0.4052259533091875112, 1e-14,
4993 "eraLtpecl", "vec2", status);
4994 vvd(vec[2], 0.9142164401096448012, 1e-14,
4995 "eraLtpecl", "vec3", status);
4996
4997}
4998
4999static void t_ltpequ(int *status)
5000/*
5001** - - - - - - - - -
5002** t _ l t p e q u
5003** - - - - - - - - -
5004**
5005** Test eraLtpequ function.
5006**
5007** Returned:
5008** status int FALSE = success, TRUE = fail
5009**
5010** Called: eraLtpequ, vvd
5011**
5012** This revision: 2016 March 12
5013*/
5014{
5015 double epj, veq[3];
5016
5017
5018 epj = -2500.0;
5019
5020 eraLtpequ(epj, veq);
5021
5022 vvd(veq[0], -0.3586652560237326659, 1e-14,
5023 "eraLtpequ", "veq1", status);
5024 vvd(veq[1], -0.1996978910771128475, 1e-14,
5025 "eraLtpequ", "veq2", status);
5026 vvd(veq[2], 0.9118552442250819624, 1e-14,
5027 "eraLtpequ", "veq3", status);
5028
5029}
5030
5031static void t_num00a(int *status)
5032/*
5033** - - - - - - - - -
5034** t _ n u m 0 0 a
5035** - - - - - - - - -
5036**
5037** Test eraNum00a function.
5038**
5039** Returned:
5040** status int FALSE = success, TRUE = fail
5041**
5042** Called: eraNum00a, vvd
5043**
5044** This revision: 2013 August 7
5045*/
5046{
5047 double rmatn[3][3];
5048
5049
5050 eraNum00a(2400000.5, 53736.0, rmatn);
5051
5052 vvd(rmatn[0][0], 0.9999999999536227949, 1e-12,
5053 "eraNum00a", "11", status);
5054 vvd(rmatn[0][1], 0.8836238544090873336e-5, 1e-12,
5055 "eraNum00a", "12", status);
5056 vvd(rmatn[0][2], 0.3830835237722400669e-5, 1e-12,
5057 "eraNum00a", "13", status);
5058
5059 vvd(rmatn[1][0], -0.8836082880798569274e-5, 1e-12,
5060 "eraNum00a", "21", status);
5061 vvd(rmatn[1][1], 0.9999999991354655028, 1e-12,
5062 "eraNum00a", "22", status);
5063 vvd(rmatn[1][2], -0.4063240865362499850e-4, 1e-12,
5064 "eraNum00a", "23", status);
5065
5066 vvd(rmatn[2][0], -0.3831194272065995866e-5, 1e-12,
5067 "eraNum00a", "31", status);
5068 vvd(rmatn[2][1], 0.4063237480216291775e-4, 1e-12,
5069 "eraNum00a", "32", status);
5070 vvd(rmatn[2][2], 0.9999999991671660338, 1e-12,
5071 "eraNum00a", "33", status);
5072
5073}
5074
5075static void t_num00b(int *status)
5076/*
5077** - - - - - - - - -
5078** t _ n u m 0 0 b
5079** - - - - - - - - -
5080**
5081** Test eraNum00b function.
5082**
5083** Returned:
5084** status int FALSE = success, TRUE = fail
5085**
5086** Called: eraNum00b, vvd
5087**
5088** This revision: 2013 August 7
5089*/
5090{
5091 double rmatn[3][3];
5092
5093 eraNum00b(2400000.5, 53736, rmatn);
5094
5095 vvd(rmatn[0][0], 0.9999999999536069682, 1e-12,
5096 "eraNum00b", "11", status);
5097 vvd(rmatn[0][1], 0.8837746144871248011e-5, 1e-12,
5098 "eraNum00b", "12", status);
5099 vvd(rmatn[0][2], 0.3831488838252202945e-5, 1e-12,
5100 "eraNum00b", "13", status);
5101
5102 vvd(rmatn[1][0], -0.8837590456632304720e-5, 1e-12,
5103 "eraNum00b", "21", status);
5104 vvd(rmatn[1][1], 0.9999999991354692733, 1e-12,
5105 "eraNum00b", "22", status);
5106 vvd(rmatn[1][2], -0.4063198798559591654e-4, 1e-12,
5107 "eraNum00b", "23", status);
5108
5109 vvd(rmatn[2][0], -0.3831847930134941271e-5, 1e-12,
5110 "eraNum00b", "31", status);
5111 vvd(rmatn[2][1], 0.4063195412258168380e-4, 1e-12,
5112 "eraNum00b", "32", status);
5113 vvd(rmatn[2][2], 0.9999999991671806225, 1e-12,
5114 "eraNum00b", "33", status);
5115
5116}
5117
5118static void t_num06a(int *status)
5119/*
5120** - - - - - - - - -
5121** t _ n u m 0 6 a
5122** - - - - - - - - -
5123**
5124** Test eraNum06a function.
5125**
5126** Returned:
5127** status int FALSE = success, TRUE = fail
5128**
5129** Called: eraNum06a, vvd
5130**
5131** This revision: 2013 August 7
5132*/
5133{
5134 double rmatn[3][3];
5135
5136 eraNum06a(2400000.5, 53736, rmatn);
5137
5138 vvd(rmatn[0][0], 0.9999999999536227668, 1e-12,
5139 "eraNum06a", "11", status);
5140 vvd(rmatn[0][1], 0.8836241998111535233e-5, 1e-12,
5141 "eraNum06a", "12", status);
5142 vvd(rmatn[0][2], 0.3830834608415287707e-5, 1e-12,
5143 "eraNum06a", "13", status);
5144
5145 vvd(rmatn[1][0], -0.8836086334870740138e-5, 1e-12,
5146 "eraNum06a", "21", status);
5147 vvd(rmatn[1][1], 0.9999999991354657474, 1e-12,
5148 "eraNum06a", "22", status);
5149 vvd(rmatn[1][2], -0.4063240188248455065e-4, 1e-12,
5150 "eraNum06a", "23", status);
5151
5152 vvd(rmatn[2][0], -0.3831193642839398128e-5, 1e-12,
5153 "eraNum06a", "31", status);
5154 vvd(rmatn[2][1], 0.4063236803101479770e-4, 1e-12,
5155 "eraNum06a", "32", status);
5156 vvd(rmatn[2][2], 0.9999999991671663114, 1e-12,
5157 "eraNum06a", "33", status);
5158
5159}
5160
5161static void t_numat(int *status)
5162/*
5163** - - - - - - - -
5164** t _ n u m a t
5165** - - - - - - - -
5166**
5167** Test eraNumat function.
5168**
5169** Returned:
5170** status int FALSE = success, TRUE = fail
5171**
5172** Called: eraNumat, vvd
5173**
5174** This revision: 2013 August 7
5175*/
5176{
5177 double epsa, dpsi, deps, rmatn[3][3];
5178
5179
5180 epsa = 0.4090789763356509900;
5181 dpsi = -0.9630909107115582393e-5;
5182 deps = 0.4063239174001678826e-4;
5183
5184 eraNumat(epsa, dpsi, deps, rmatn);
5185
5186 vvd(rmatn[0][0], 0.9999999999536227949, 1e-12,
5187 "eraNumat", "11", status);
5188 vvd(rmatn[0][1], 0.8836239320236250577e-5, 1e-12,
5189 "eraNumat", "12", status);
5190 vvd(rmatn[0][2], 0.3830833447458251908e-5, 1e-12,
5191 "eraNumat", "13", status);
5192
5193 vvd(rmatn[1][0], -0.8836083657016688588e-5, 1e-12,
5194 "eraNumat", "21", status);
5195 vvd(rmatn[1][1], 0.9999999991354654959, 1e-12,
5196 "eraNumat", "22", status);
5197 vvd(rmatn[1][2], -0.4063240865361857698e-4, 1e-12,
5198 "eraNumat", "23", status);
5199
5200 vvd(rmatn[2][0], -0.3831192481833385226e-5, 1e-12,
5201 "eraNumat", "31", status);
5202 vvd(rmatn[2][1], 0.4063237480216934159e-4, 1e-12,
5203 "eraNumat", "32", status);
5204 vvd(rmatn[2][2], 0.9999999991671660407, 1e-12,
5205 "eraNumat", "33", status);
5206
5207}
5208
5209static void t_nut00a(int *status)
5210/*
5211** - - - - - - - - -
5212** t _ n u t 0 0 a
5213** - - - - - - - - -
5214**
5215** Test eraNut00a function.
5216**
5217** Returned:
5218** status int FALSE = success, TRUE = fail
5219**
5220** Called: eraNut00a, vvd
5221**
5222** This revision: 2013 August 7
5223*/
5224{
5225 double dpsi, deps;
5226
5227
5228 eraNut00a(2400000.5, 53736.0, &dpsi, &deps);
5229
5230 vvd(dpsi, -0.9630909107115518431e-5, 1e-13,
5231 "eraNut00a", "dpsi", status);
5232 vvd(deps, 0.4063239174001678710e-4, 1e-13,
5233 "eraNut00a", "deps", status);
5234
5235}
5236
5237static void t_nut00b(int *status)
5238/*
5239** - - - - - - - - -
5240** t _ n u t 0 0 b
5241** - - - - - - - - -
5242**
5243** Test eraNut00b function.
5244**
5245** Returned:
5246** status int FALSE = success, TRUE = fail
5247**
5248** Called: eraNut00b, vvd
5249**
5250** This revision: 2013 August 7
5251*/
5252{
5253 double dpsi, deps;
5254
5255
5256 eraNut00b(2400000.5, 53736.0, &dpsi, &deps);
5257
5258 vvd(dpsi, -0.9632552291148362783e-5, 1e-13,
5259 "eraNut00b", "dpsi", status);
5260 vvd(deps, 0.4063197106621159367e-4, 1e-13,
5261 "eraNut00b", "deps", status);
5262
5263}
5264
5265static void t_nut06a(int *status)
5266/*
5267** - - - - - - - - -
5268** t _ n u t 0 6 a
5269** - - - - - - - - -
5270**
5271** Test eraNut06a function.
5272**
5273** Returned:
5274** status int FALSE = success, TRUE = fail
5275**
5276** Called: eraNut06a, vvd
5277**
5278** This revision: 2013 August 7
5279*/
5280{
5281 double dpsi, deps;
5282
5283
5284 eraNut06a(2400000.5, 53736.0, &dpsi, &deps);
5285
5286 vvd(dpsi, -0.9630912025820308797e-5, 1e-13,
5287 "eraNut06a", "dpsi", status);
5288 vvd(deps, 0.4063238496887249798e-4, 1e-13,
5289 "eraNut06a", "deps", status);
5290
5291}
5292
5293static void t_nut80(int *status)
5294/*
5295** - - - - - - - -
5296** t _ n u t 8 0
5297** - - - - - - - -
5298**
5299** Test eraNut80 function.
5300**
5301** Returned:
5302** status int FALSE = success, TRUE = fail
5303**
5304** Called: eraNut80, vvd
5305**
5306** This revision: 2013 August 7
5307*/
5308{
5309 double dpsi, deps;
5310
5311
5312 eraNut80(2400000.5, 53736.0, &dpsi, &deps);
5313
5314 vvd(dpsi, -0.9643658353226563966e-5, 1e-13,
5315 "eraNut80", "dpsi", status);
5316 vvd(deps, 0.4060051006879713322e-4, 1e-13,
5317 "eraNut80", "deps", status);
5318
5319}
5320
5321static void t_nutm80(int *status)
5322/*
5323** - - - - - - - - -
5324** t _ n u t m 8 0
5325** - - - - - - - - -
5326**
5327** Test eraNutm80 function.
5328**
5329** Returned:
5330** status int FALSE = success, TRUE = fail
5331**
5332** Called: eraNutm80, vvd
5333**
5334** This revision: 2013 August 7
5335*/
5336{
5337 double rmatn[3][3];
5338
5339
5340 eraNutm80(2400000.5, 53736.0, rmatn);
5341
5342 vvd(rmatn[0][0], 0.9999999999534999268, 1e-12,
5343 "eraNutm80", "11", status);
5344 vvd(rmatn[0][1], 0.8847935789636432161e-5, 1e-12,
5345 "eraNutm80", "12", status);
5346 vvd(rmatn[0][2], 0.3835906502164019142e-5, 1e-12,
5347 "eraNutm80", "13", status);
5348
5349 vvd(rmatn[1][0], -0.8847780042583435924e-5, 1e-12,
5350 "eraNutm80", "21", status);
5351 vvd(rmatn[1][1], 0.9999999991366569963, 1e-12,
5352 "eraNutm80", "22", status);
5353 vvd(rmatn[1][2], -0.4060052702727130809e-4, 1e-12,
5354 "eraNutm80", "23", status);
5355
5356 vvd(rmatn[2][0], -0.3836265729708478796e-5, 1e-12,
5357 "eraNutm80", "31", status);
5358 vvd(rmatn[2][1], 0.4060049308612638555e-4, 1e-12,
5359 "eraNutm80", "32", status);
5360 vvd(rmatn[2][2], 0.9999999991684415129, 1e-12,
5361 "eraNutm80", "33", status);
5362
5363}
5364
5365static void t_obl06(int *status)
5366/*
5367** - - - - - - - -
5368** t _ o b l 0 6
5369** - - - - - - - -
5370**
5371** Test eraObl06 function.
5372**
5373** Returned:
5374** status int FALSE = success, TRUE = fail
5375**
5376** Called: eraObl06, vvd
5377**
5378** This revision: 2013 August 7
5379*/
5380{
5381 vvd(eraObl06(2400000.5, 54388.0), 0.4090749229387258204, 1e-14,
5382 "eraObl06", "", status);
5383}
5384
5385static void t_obl80(int *status)
5386/*
5387** - - - - - - - -
5388** t _ o b l 8 0
5389** - - - - - - - -
5390**
5391** Test eraObl80 function.
5392**
5393** Returned:
5394** status int FALSE = success, TRUE = fail
5395**
5396** Called: eraObl80, vvd
5397**
5398** This revision: 2013 August 7
5399*/
5400{
5401 double eps0;
5402
5403
5404 eps0 = eraObl80(2400000.5, 54388.0);
5405
5406 vvd(eps0, 0.4090751347643816218, 1e-14, "eraObl80", "", status);
5407
5408}
5409
5410static void t_p06e(int *status)
5411/*
5412** - - - - - - -
5413** t _ p 0 6 e
5414** - - - - - - -
5415**
5416** Test eraP06e function.
5417**
5418** Returned:
5419** status int FALSE = success, TRUE = fail
5420**
5421** Called: eraP06e, vvd
5422**
5423** This revision: 2013 August 7
5424*/
5425{
5426 double eps0, psia, oma, bpa, bqa, pia, bpia,
5427 epsa, chia, za, zetaa, thetaa, pa, gam, phi, psi;
5428
5429
5430 eraP06e(2400000.5, 52541.0, &eps0, &psia, &oma, &bpa,
5431 &bqa, &pia, &bpia, &epsa, &chia, &za,
5432 &zetaa, &thetaa, &pa, &gam, &phi, &psi);
5433
5434 vvd(eps0, 0.4090926006005828715, 1e-14,
5435 "eraP06e", "eps0", status);
5436 vvd(psia, 0.6664369630191613431e-3, 1e-14,
5437 "eraP06e", "psia", status);
5438 vvd(oma , 0.4090925973783255982, 1e-14,
5439 "eraP06e", "oma", status);
5440 vvd(bpa, 0.5561149371265209445e-6, 1e-14,
5441 "eraP06e", "bpa", status);
5442 vvd(bqa, -0.6191517193290621270e-5, 1e-14,
5443 "eraP06e", "bqa", status);
5444 vvd(pia, 0.6216441751884382923e-5, 1e-14,
5445 "eraP06e", "pia", status);
5446 vvd(bpia, 3.052014180023779882, 1e-14,
5447 "eraP06e", "bpia", status);
5448 vvd(epsa, 0.4090864054922431688, 1e-14,
5449 "eraP06e", "epsa", status);
5450 vvd(chia, 0.1387703379530915364e-5, 1e-14,
5451 "eraP06e", "chia", status);
5452 vvd(za, 0.2921789846651790546e-3, 1e-14,
5453 "eraP06e", "za", status);
5454 vvd(zetaa, 0.3178773290332009310e-3, 1e-14,
5455 "eraP06e", "zetaa", status);
5456 vvd(thetaa, 0.2650932701657497181e-3, 1e-14,
5457 "eraP06e", "thetaa", status);
5458 vvd(pa, 0.6651637681381016344e-3, 1e-14,
5459 "eraP06e", "pa", status);
5460 vvd(gam, 0.1398077115963754987e-5, 1e-14,
5461 "eraP06e", "gam", status);
5462 vvd(phi, 0.4090864090837462602, 1e-14,
5463 "eraP06e", "phi", status);
5464 vvd(psi, 0.6664464807480920325e-3, 1e-14,
5465 "eraP06e", "psi", status);
5466
5467}
5468
5469static void t_p2pv(int *status)
5470/*
5471** - - - - - - -
5472** t _ p 2 p v
5473** - - - - - - -
5474**
5475** Test eraP2pv function.
5476**
5477** Returned:
5478** status int FALSE = success, TRUE = fail
5479**
5480** Called: eraP2pv, vvd
5481**
5482** This revision: 2013 August 7
5483*/
5484{
5485 double p[3], pv[2][3];
5486
5487
5488 p[0] = 0.25;
5489 p[1] = 1.2;
5490 p[2] = 3.0;
5491
5492 pv[0][0] = 0.3;
5493 pv[0][1] = 1.2;
5494 pv[0][2] = -2.5;
5495
5496 pv[1][0] = -0.5;
5497 pv[1][1] = 3.1;
5498 pv[1][2] = 0.9;
5499
5500 eraP2pv(p, pv);
5501
5502 vvd(pv[0][0], 0.25, 0.0, "eraP2pv", "p1", status);
5503 vvd(pv[0][1], 1.2, 0.0, "eraP2pv", "p2", status);
5504 vvd(pv[0][2], 3.0, 0.0, "eraP2pv", "p3", status);
5505
5506 vvd(pv[1][0], 0.0, 0.0, "eraP2pv", "v1", status);
5507 vvd(pv[1][1], 0.0, 0.0, "eraP2pv", "v2", status);
5508 vvd(pv[1][2], 0.0, 0.0, "eraP2pv", "v3", status);
5509
5510}
5511
5512static void t_p2s(int *status)
5513/*
5514** - - - - - -
5515** t _ p 2 s
5516** - - - - - -
5517**
5518** Test eraP2s function.
5519**
5520** Returned:
5521** status int FALSE = success, TRUE = fail
5522**
5523** Called: eraP2s, vvd
5524**
5525** This revision: 2013 August 7
5526*/
5527{
5528 double p[3], theta, phi, r;
5529
5530
5531 p[0] = 100.0;
5532 p[1] = -50.0;
5533 p[2] = 25.0;
5534
5535 eraP2s(p, &theta, &phi, &r);
5536
5537 vvd(theta, -0.4636476090008061162, 1e-12, "eraP2s", "theta", status);
5538 vvd(phi, 0.2199879773954594463, 1e-12, "eraP2s", "phi", status);
5539 vvd(r, 114.5643923738960002, 1e-9, "eraP2s", "r", status);
5540
5541}
5542
5543static void t_pap(int *status)
5544/*
5545** - - - - - -
5546** t _ p a p
5547** - - - - - -
5548**
5549** Test eraPap function.
5550**
5551** Returned:
5552** status int FALSE = success, TRUE = fail
5553**
5554** Called: eraPap, vvd
5555**
5556** This revision: 2013 August 7
5557*/
5558{
5559 double a[3], b[3], theta;
5560
5561
5562 a[0] = 1.0;
5563 a[1] = 0.1;
5564 a[2] = 0.2;
5565
5566 b[0] = -3.0;
5567 b[1] = 1e-3;
5568 b[2] = 0.2;
5569
5570 theta = eraPap(a, b);
5571
5572 vvd(theta, 0.3671514267841113674, 1e-12, "eraPap", "", status);
5573
5574}
5575
5576static void t_pas(int *status)
5577/*
5578** - - - - - -
5579** t _ p a s
5580** - - - - - -
5581**
5582** Test eraPas function.
5583**
5584** Returned:
5585** status int FALSE = success, TRUE = fail
5586**
5587** Called: eraPas, vvd
5588**
5589** This revision: 2013 August 7
5590*/
5591{
5592 double al, ap, bl, bp, theta;
5593
5594
5595 al = 1.0;
5596 ap = 0.1;
5597 bl = 0.2;
5598 bp = -1.0;
5599
5600 theta = eraPas(al, ap, bl, bp);
5601
5602 vvd(theta, -2.724544922932270424, 1e-12, "eraPas", "", status);
5603
5604}
5605
5606static void t_pb06(int *status)
5607/*
5608** - - - - - - -
5609** t _ p b 0 6
5610** - - - - - - -
5611**
5612** Test eraPb06 function.
5613**
5614** Returned:
5615** status int FALSE = success, TRUE = fail
5616**
5617** Called: eraPb06, vvd
5618**
5619** This revision: 2013 August 7
5620*/
5621{
5622 double bzeta, bz, btheta;
5623
5624
5625 eraPb06(2400000.5, 50123.9999, &bzeta, &bz, &btheta);
5626
5627 vvd(bzeta, -0.5092634016326478238e-3, 1e-12,
5628 "eraPb06", "bzeta", status);
5629 vvd(bz, -0.3602772060566044413e-3, 1e-12,
5630 "eraPb06", "bz", status);
5631 vvd(btheta, -0.3779735537167811177e-3, 1e-12,
5632 "eraPb06", "btheta", status);
5633
5634}
5635
5636static void t_pdp(int *status)
5637/*
5638** - - - - - -
5639** t _ p d p
5640** - - - - - -
5641**
5642** Test eraPdp function.
5643**
5644** Returned:
5645** status int FALSE = success, TRUE = fail
5646**
5647** Called: eraPdp, vvd
5648**
5649** This revision: 2013 August 7
5650*/
5651{
5652 double a[3], b[3], adb;
5653
5654
5655 a[0] = 2.0;
5656 a[1] = 2.0;
5657 a[2] = 3.0;
5658
5659 b[0] = 1.0;
5660 b[1] = 3.0;
5661 b[2] = 4.0;
5662
5663 adb = eraPdp(a, b);
5664
5665 vvd(adb, 20, 1e-12, "eraPdp", "", status);
5666
5667}
5668
5669static void t_pfw06(int *status)
5670/*
5671** - - - - - - - -
5672** t _ p f w 0 6
5673** - - - - - - - -
5674**
5675** Test eraPfw06 function.
5676**
5677** Returned:
5678** status int FALSE = success, TRUE = fail
5679**
5680** Called: eraPfw06, vvd
5681**
5682** This revision: 2013 August 7
5683*/
5684{
5685 double gamb, phib, psib, epsa;
5686
5687
5688 eraPfw06(2400000.5, 50123.9999, &gamb, &phib, &psib, &epsa);
5689
5690 vvd(gamb, -0.2243387670997995690e-5, 1e-16,
5691 "eraPfw06", "gamb", status);
5692 vvd(phib, 0.4091014602391312808, 1e-12,
5693 "eraPfw06", "phib", status);
5694 vvd(psib, -0.9501954178013031895e-3, 1e-14,
5695 "eraPfw06", "psib", status);
5696 vvd(epsa, 0.4091014316587367491, 1e-12,
5697 "eraPfw06", "epsa", status);
5698
5699}
5700
5701static void t_plan94(int *status)
5702/*
5703** - - - - - - - - -
5704** t _ p l a n 9 4
5705** - - - - - - - - -
5706**
5707** Test eraPlan94 function.
5708**
5709** Returned:
5710** status int FALSE = success, TRUE = fail
5711**
5712** Called: eraPlan94, vvd, viv
5713**
5714** This revision: 2013 October 2
5715*/
5716{
5717 double pv[2][3];
5718 int j;
5719
5720
5721 j = eraPlan94(2400000.5, 1e6, 0, pv);
5722
5723 vvd(pv[0][0], 0.0, 0.0, "eraPlan94", "x 1", status);
5724 vvd(pv[0][1], 0.0, 0.0, "eraPlan94", "y 1", status);
5725 vvd(pv[0][2], 0.0, 0.0, "eraPlan94", "z 1", status);
5726
5727 vvd(pv[1][0], 0.0, 0.0, "eraPlan94", "xd 1", status);
5728 vvd(pv[1][1], 0.0, 0.0, "eraPlan94", "yd 1", status);
5729 vvd(pv[1][2], 0.0, 0.0, "eraPlan94", "zd 1", status);
5730
5731 viv(j, -1, "eraPlan94", "j 1", status);
5732
5733 j = eraPlan94(2400000.5, 1e6, 10, pv);
5734
5735 viv(j, -1, "eraPlan94", "j 2", status);
5736
5737 j = eraPlan94(2400000.5, -320000, 3, pv);
5738
5739 vvd(pv[0][0], 0.9308038666832975759, 1e-11,
5740 "eraPlan94", "x 3", status);
5741 vvd(pv[0][1], 0.3258319040261346000, 1e-11,
5742 "eraPlan94", "y 3", status);
5743 vvd(pv[0][2], 0.1422794544481140560, 1e-11,
5744 "eraPlan94", "z 3", status);
5745
5746 vvd(pv[1][0], -0.6429458958255170006e-2, 1e-11,
5747 "eraPlan94", "xd 3", status);
5748 vvd(pv[1][1], 0.1468570657704237764e-1, 1e-11,
5749 "eraPlan94", "yd 3", status);
5750 vvd(pv[1][2], 0.6406996426270981189e-2, 1e-11,
5751 "eraPlan94", "zd 3", status);
5752
5753 viv(j, 1, "eraPlan94", "j 3", status);
5754
5755 j = eraPlan94(2400000.5, 43999.9, 1, pv);
5756
5757 vvd(pv[0][0], 0.2945293959257430832, 1e-11,
5758 "eraPlan94", "x 4", status);
5759 vvd(pv[0][1], -0.2452204176601049596, 1e-11,
5760 "eraPlan94", "y 4", status);
5761 vvd(pv[0][2], -0.1615427700571978153, 1e-11,
5762 "eraPlan94", "z 4", status);
5763
5764 vvd(pv[1][0], 0.1413867871404614441e-1, 1e-11,
5765 "eraPlan94", "xd 4", status);
5766 vvd(pv[1][1], 0.1946548301104706582e-1, 1e-11,
5767 "eraPlan94", "yd 4", status);
5768 vvd(pv[1][2], 0.8929809783898904786e-2, 1e-11,
5769 "eraPlan94", "zd 4", status);
5770
5771 viv(j, 0, "eraPlan94", "j 4", status);
5772
5773}
5774
5775static void t_pmat00(int *status)
5776/*
5777** - - - - - - - - -
5778** t _ p m a t 0 0
5779** - - - - - - - - -
5780**
5781** Test eraPmat00 function.
5782**
5783** Returned:
5784** status int FALSE = success, TRUE = fail
5785**
5786** Called: eraPmat00, vvd
5787**
5788** This revision: 2013 August 7
5789*/
5790{
5791 double rbp[3][3];
5792
5793
5794 eraPmat00(2400000.5, 50123.9999, rbp);
5795
5796 vvd(rbp[0][0], 0.9999995505175087260, 1e-12,
5797 "eraPmat00", "11", status);
5798 vvd(rbp[0][1], 0.8695405883617884705e-3, 1e-14,
5799 "eraPmat00", "12", status);
5800 vvd(rbp[0][2], 0.3779734722239007105e-3, 1e-14,
5801 "eraPmat00", "13", status);
5802
5803 vvd(rbp[1][0], -0.8695405990410863719e-3, 1e-14,
5804 "eraPmat00", "21", status);
5805 vvd(rbp[1][1], 0.9999996219494925900, 1e-12,
5806 "eraPmat00", "22", status);
5807 vvd(rbp[1][2], -0.1360775820404982209e-6, 1e-14,
5808 "eraPmat00", "23", status);
5809
5810 vvd(rbp[2][0], -0.3779734476558184991e-3, 1e-14,
5811 "eraPmat00", "31", status);
5812 vvd(rbp[2][1], -0.1925857585832024058e-6, 1e-14,
5813 "eraPmat00", "32", status);
5814 vvd(rbp[2][2], 0.9999999285680153377, 1e-12,
5815 "eraPmat00", "33", status);
5816
5817}
5818
5819static void t_pmat06(int *status)
5820/*
5821** - - - - - - - - -
5822** t _ p m a t 0 6
5823** - - - - - - - - -
5824**
5825** Test eraPmat06 function.
5826**
5827** Returned:
5828** status int FALSE = success, TRUE = fail
5829**
5830** Called: eraPmat06, vvd
5831**
5832** This revision: 2013 August 7
5833*/
5834{
5835 double rbp[3][3];
5836
5837
5838 eraPmat06(2400000.5, 50123.9999, rbp);
5839
5840 vvd(rbp[0][0], 0.9999995505176007047, 1e-12,
5841 "eraPmat06", "11", status);
5842 vvd(rbp[0][1], 0.8695404617348208406e-3, 1e-14,
5843 "eraPmat06", "12", status);
5844 vvd(rbp[0][2], 0.3779735201865589104e-3, 1e-14,
5845 "eraPmat06", "13", status);
5846
5847 vvd(rbp[1][0], -0.8695404723772031414e-3, 1e-14,
5848 "eraPmat06", "21", status);
5849 vvd(rbp[1][1], 0.9999996219496027161, 1e-12,
5850 "eraPmat06", "22", status);
5851 vvd(rbp[1][2], -0.1361752497080270143e-6, 1e-14,
5852 "eraPmat06", "23", status);
5853
5854 vvd(rbp[2][0], -0.3779734957034089490e-3, 1e-14,
5855 "eraPmat06", "31", status);
5856 vvd(rbp[2][1], -0.1924880847894457113e-6, 1e-14,
5857 "eraPmat06", "32", status);
5858 vvd(rbp[2][2], 0.9999999285679971958, 1e-12,
5859 "eraPmat06", "33", status);
5860
5861}
5862
5863static void t_pmat76(int *status)
5864/*
5865** - - - - - - - - -
5866** t _ p m a t 7 6
5867** - - - - - - - - -
5868**
5869** Test eraPmat76 function.
5870**
5871** Returned:
5872** status int FALSE = success, TRUE = fail
5873**
5874** Called: eraPmat76, vvd
5875**
5876** This revision: 2013 August 7
5877*/
5878{
5879 double rmatp[3][3];
5880
5881
5882 eraPmat76(2400000.5, 50123.9999, rmatp);
5883
5884 vvd(rmatp[0][0], 0.9999995504328350733, 1e-12,
5885 "eraPmat76", "11", status);
5886 vvd(rmatp[0][1], 0.8696632209480960785e-3, 1e-14,
5887 "eraPmat76", "12", status);
5888 vvd(rmatp[0][2], 0.3779153474959888345e-3, 1e-14,
5889 "eraPmat76", "13", status);
5890
5891 vvd(rmatp[1][0], -0.8696632209485112192e-3, 1e-14,
5892 "eraPmat76", "21", status);
5893 vvd(rmatp[1][1], 0.9999996218428560614, 1e-12,
5894 "eraPmat76", "22", status);
5895 vvd(rmatp[1][2], -0.1643284776111886407e-6, 1e-14,
5896 "eraPmat76", "23", status);
5897
5898 vvd(rmatp[2][0], -0.3779153474950335077e-3, 1e-14,
5899 "eraPmat76", "31", status);
5900 vvd(rmatp[2][1], -0.1643306746147366896e-6, 1e-14,
5901 "eraPmat76", "32", status);
5902 vvd(rmatp[2][2], 0.9999999285899790119, 1e-12,
5903 "eraPmat76", "33", status);
5904
5905}
5906
5907static void t_pm(int *status)
5908/*
5909** - - - - -
5910** t _ p m
5911** - - - - -
5912**
5913** Test eraPm function.
5914**
5915** Returned:
5916** status int FALSE = success, TRUE = fail
5917**
5918** Called: eraPm, vvd
5919**
5920** This revision: 2013 August 7
5921*/
5922{
5923 double p[3], r;
5924
5925
5926 p[0] = 0.3;
5927 p[1] = 1.2;
5928 p[2] = -2.5;
5929
5930 r = eraPm(p);
5931
5932 vvd(r, 2.789265136196270604, 1e-12, "eraPm", "", status);
5933
5934}
5935
5936static void t_pmp(int *status)
5937/*
5938** - - - - - -
5939** t _ p m p
5940** - - - - - -
5941**
5942** Test eraPmp function.
5943**
5944** Returned:
5945** status int FALSE = success, TRUE = fail
5946**
5947** Called: eraPmp, vvd
5948**
5949** This revision: 2013 August 7
5950*/
5951{
5952 double a[3], b[3], amb[3];
5953
5954
5955 a[0] = 2.0;
5956 a[1] = 2.0;
5957 a[2] = 3.0;
5958
5959 b[0] = 1.0;
5960 b[1] = 3.0;
5961 b[2] = 4.0;
5962
5963 eraPmp(a, b, amb);
5964
5965 vvd(amb[0], 1.0, 1e-12, "eraPmp", "0", status);
5966 vvd(amb[1], -1.0, 1e-12, "eraPmp", "1", status);
5967 vvd(amb[2], -1.0, 1e-12, "eraPmp", "2", status);
5968
5969}
5970
5971static void t_pmpx(int *status)
5972/*
5973** - - - - - - -
5974** t _ p m p x
5975** - - - - - - -
5976**
5977** Test eraPmpx function.
5978**
5979** Returned:
5980** status int FALSE = success, TRUE = fail
5981**
5982** Called: eraPmpx, vvd
5983**
5984** This revision: 2013 October 2
5985*/
5986{
5987 double rc, dc, pr, pd, px, rv, pmt, pob[3], pco[3];
5988
5989
5990 rc = 1.234;
5991 dc = 0.789;
5992 pr = 1e-5;
5993 pd = -2e-5;
5994 px = 1e-2;
5995 rv = 10.0;
5996 pmt = 8.75;
5997 pob[0] = 0.9;
5998 pob[1] = 0.4;
5999 pob[2] = 0.1;
6000
6001 eraPmpx(rc, dc, pr, pd, px, rv, pmt, pob, pco);
6002
6003 vvd(pco[0], 0.2328137623960308440, 1e-12,
6004 "eraPmpx", "1", status);
6005 vvd(pco[1], 0.6651097085397855317, 1e-12,
6006 "eraPmpx", "2", status);
6007 vvd(pco[2], 0.7095257765896359847, 1e-12,
6008 "eraPmpx", "3", status);
6009
6010}
6011
6012static void t_pmsafe(int *status)
6013/*
6014** - - - - - - - - -
6015** t _ p m s a f e
6016** - - - - - - - - -
6017**
6018** Test eraPmsafe function.
6019**
6020** Returned:
6021** status int FALSE = success, TRUE = fail
6022**
6023** Called: eraPmsafe, vvd, viv
6024**
6025** This revision: 2013 October 2
6026*/
6027{
6028 int j;
6029 double ra1, dec1, pmr1, pmd1, px1, rv1, ep1a, ep1b, ep2a, ep2b,
6030 ra2, dec2, pmr2, pmd2, px2, rv2;
6031
6032
6033 ra1 = 1.234;
6034 dec1 = 0.789;
6035 pmr1 = 1e-5;
6036 pmd1 = -2e-5;
6037 px1 = 1e-2;
6038 rv1 = 10.0;
6039 ep1a = 2400000.5;
6040 ep1b = 48348.5625;
6041 ep2a = 2400000.5;
6042 ep2b = 51544.5;
6043
6044 j = eraPmsafe(ra1, dec1, pmr1, pmd1, px1, rv1,
6045 ep1a, ep1b, ep2a, ep2b,
6046 &ra2, &dec2, &pmr2, &pmd2, &px2, &rv2);
6047
6048 vvd(ra2, 1.234087484501017061, 1e-12,
6049 "eraPmsafe", "ra2", status);
6050 vvd(dec2, 0.7888249982450468574, 1e-12,
6051 "eraPmsafe", "dec2", status);
6052 vvd(pmr2, 0.9996457663586073988e-5, 1e-12,
6053 "eraPmsafe", "pmr2", status);
6054 vvd(pmd2, -0.2000040085106737816e-4, 1e-16,
6055 "eraPmsafe", "pmd2", status);
6056 vvd(px2, 0.9999997295356765185e-2, 1e-12,
6057 "eraPmsafe", "px2", status);
6058 vvd(rv2, 10.38468380113917014, 1e-10,
6059 "eraPmsafe", "rv2", status);
6060 viv ( j, 0, "eraPmsafe", "j", status);
6061
6062}
6063
6064static void t_pn(int *status)
6065/*
6066** - - - - -
6067** t _ p n
6068** - - - - -
6069**
6070** Test eraPn function.
6071**
6072** Returned:
6073** status int FALSE = success, TRUE = fail
6074**
6075** Called: eraPn, vvd
6076**
6077** This revision: 2013 August 7
6078*/
6079{
6080 double p[3], r, u[3];
6081
6082
6083 p[0] = 0.3;
6084 p[1] = 1.2;
6085 p[2] = -2.5;
6086
6087 eraPn(p, &r, u);
6088
6089 vvd(r, 2.789265136196270604, 1e-12, "eraPn", "r", status);
6090
6091 vvd(u[0], 0.1075552109073112058, 1e-12, "eraPn", "u1", status);
6092 vvd(u[1], 0.4302208436292448232, 1e-12, "eraPn", "u2", status);
6093 vvd(u[2], -0.8962934242275933816, 1e-12, "eraPn", "u3", status);
6094
6095}
6096
6097static void t_pn00(int *status)
6098/*
6099** - - - - - - -
6100** t _ p n 0 0
6101** - - - - - - -
6102**
6103** Test eraPn00 function.
6104**
6105** Returned:
6106** status int FALSE = success, TRUE = fail
6107**
6108** Called: eraPn00, vvd
6109**
6110** This revision: 2013 August 7
6111*/
6112{
6113 double dpsi, deps, epsa,
6114 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6115
6116
6117 dpsi = -0.9632552291149335877e-5;
6118 deps = 0.4063197106621141414e-4;
6119
6120 eraPn00(2400000.5, 53736.0, dpsi, deps,
6121 &epsa, rb, rp, rbp, rn, rbpn);
6122
6123 vvd(epsa, 0.4090791789404229916, 1e-12, "eraPn00", "epsa", status);
6124
6125 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
6126 "eraPn00", "rb11", status);
6127 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-18,
6128 "eraPn00", "rb12", status);
6129 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-18,
6130 "eraPn00", "rb13", status);
6131
6132 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-18,
6133 "eraPn00", "rb21", status);
6134 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6135 "eraPn00", "rb22", status);
6136 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-18,
6137 "eraPn00", "rb23", status);
6138
6139 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-18,
6140 "eraPn00", "rb31", status);
6141 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-18,
6142 "eraPn00", "rb32", status);
6143 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6144 "eraPn00", "rb33", status);
6145
6146 vvd(rp[0][0], 0.9999989300532289018, 1e-12,
6147 "eraPn00", "rp11", status);
6148 vvd(rp[0][1], -0.1341647226791824349e-2, 1e-14,
6149 "eraPn00", "rp12", status);
6150 vvd(rp[0][2], -0.5829880927190296547e-3, 1e-14,
6151 "eraPn00", "rp13", status);
6152
6153 vvd(rp[1][0], 0.1341647231069759008e-2, 1e-14,
6154 "eraPn00", "rp21", status);
6155 vvd(rp[1][1], 0.9999990999908750433, 1e-12,
6156 "eraPn00", "rp22", status);
6157 vvd(rp[1][2], -0.3837444441583715468e-6, 1e-14,
6158 "eraPn00", "rp23", status);
6159
6160 vvd(rp[2][0], 0.5829880828740957684e-3, 1e-14,
6161 "eraPn00", "rp31", status);
6162 vvd(rp[2][1], -0.3984203267708834759e-6, 1e-14,
6163 "eraPn00", "rp32", status);
6164 vvd(rp[2][2], 0.9999998300623538046, 1e-12,
6165 "eraPn00", "rp33", status);
6166
6167 vvd(rbp[0][0], 0.9999989300052243993, 1e-12,
6168 "eraPn00", "rbp11", status);
6169 vvd(rbp[0][1], -0.1341717990239703727e-2, 1e-14,
6170 "eraPn00", "rbp12", status);
6171 vvd(rbp[0][2], -0.5829075749891684053e-3, 1e-14,
6172 "eraPn00", "rbp13", status);
6173
6174 vvd(rbp[1][0], 0.1341718013831739992e-2, 1e-14,
6175 "eraPn00", "rbp21", status);
6176 vvd(rbp[1][1], 0.9999990998959191343, 1e-12,
6177 "eraPn00", "rbp22", status);
6178 vvd(rbp[1][2], -0.3505759733565421170e-6, 1e-14,
6179 "eraPn00", "rbp23", status);
6180
6181 vvd(rbp[2][0], 0.5829075206857717883e-3, 1e-14,
6182 "eraPn00", "rbp31", status);
6183 vvd(rbp[2][1], -0.4315219955198608970e-6, 1e-14,
6184 "eraPn00", "rbp32", status);
6185 vvd(rbp[2][2], 0.9999998301093036269, 1e-12,
6186 "eraPn00", "rbp33", status);
6187
6188 vvd(rn[0][0], 0.9999999999536069682, 1e-12,
6189 "eraPn00", "rn11", status);
6190 vvd(rn[0][1], 0.8837746144872140812e-5, 1e-16,
6191 "eraPn00", "rn12", status);
6192 vvd(rn[0][2], 0.3831488838252590008e-5, 1e-16,
6193 "eraPn00", "rn13", status);
6194
6195 vvd(rn[1][0], -0.8837590456633197506e-5, 1e-16,
6196 "eraPn00", "rn21", status);
6197 vvd(rn[1][1], 0.9999999991354692733, 1e-12,
6198 "eraPn00", "rn22", status);
6199 vvd(rn[1][2], -0.4063198798559573702e-4, 1e-16,
6200 "eraPn00", "rn23", status);
6201
6202 vvd(rn[2][0], -0.3831847930135328368e-5, 1e-16,
6203 "eraPn00", "rn31", status);
6204 vvd(rn[2][1], 0.4063195412258150427e-4, 1e-16,
6205 "eraPn00", "rn32", status);
6206 vvd(rn[2][2], 0.9999999991671806225, 1e-12,
6207 "eraPn00", "rn33", status);
6208
6209 vvd(rbpn[0][0], 0.9999989440499982806, 1e-12,
6210 "eraPn00", "rbpn11", status);
6211 vvd(rbpn[0][1], -0.1332880253640848301e-2, 1e-14,
6212 "eraPn00", "rbpn12", status);
6213 vvd(rbpn[0][2], -0.5790760898731087295e-3, 1e-14,
6214 "eraPn00", "rbpn13", status);
6215
6216 vvd(rbpn[1][0], 0.1332856746979948745e-2, 1e-14,
6217 "eraPn00", "rbpn21", status);
6218 vvd(rbpn[1][1], 0.9999991109064768883, 1e-12,
6219 "eraPn00", "rbpn22", status);
6220 vvd(rbpn[1][2], -0.4097740555723063806e-4, 1e-14,
6221 "eraPn00", "rbpn23", status);
6222
6223 vvd(rbpn[2][0], 0.5791301929950205000e-3, 1e-14,
6224 "eraPn00", "rbpn31", status);
6225 vvd(rbpn[2][1], 0.4020553681373702931e-4, 1e-14,
6226 "eraPn00", "rbpn32", status);
6227 vvd(rbpn[2][2], 0.9999998314958529887, 1e-12,
6228 "eraPn00", "rbpn33", status);
6229
6230}
6231
6232static void t_pn00a(int *status)
6233/*
6234** - - - - - - - -
6235** t _ p n 0 0 a
6236** - - - - - - - -
6237**
6238** Test eraPn00a function.
6239**
6240** Returned:
6241** status int FALSE = success, TRUE = fail
6242**
6243** Called: eraPn00a, vvd
6244**
6245** This revision: 2013 August 7
6246*/
6247{
6248 double dpsi, deps, epsa,
6249 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6250
6251
6252 eraPn00a(2400000.5, 53736.0,
6253 &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn);
6254
6255 vvd(dpsi, -0.9630909107115518431e-5, 1e-12,
6256 "eraPn00a", "dpsi", status);
6257 vvd(deps, 0.4063239174001678710e-4, 1e-12,
6258 "eraPn00a", "deps", status);
6259 vvd(epsa, 0.4090791789404229916, 1e-12, "eraPn00a", "epsa", status);
6260
6261 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
6262 "eraPn00a", "rb11", status);
6263 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
6264 "eraPn00a", "rb12", status);
6265 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
6266 "eraPn00a", "rb13", status);
6267
6268 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
6269 "eraPn00a", "rb21", status);
6270 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6271 "eraPn00a", "rb22", status);
6272 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
6273 "eraPn00a", "rb23", status);
6274
6275 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
6276 "eraPn00a", "rb31", status);
6277 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
6278 "eraPn00a", "rb32", status);
6279 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6280 "eraPn00a", "rb33", status);
6281
6282 vvd(rp[0][0], 0.9999989300532289018, 1e-12,
6283 "eraPn00a", "rp11", status);
6284 vvd(rp[0][1], -0.1341647226791824349e-2, 1e-14,
6285 "eraPn00a", "rp12", status);
6286 vvd(rp[0][2], -0.5829880927190296547e-3, 1e-14,
6287 "eraPn00a", "rp13", status);
6288
6289 vvd(rp[1][0], 0.1341647231069759008e-2, 1e-14,
6290 "eraPn00a", "rp21", status);
6291 vvd(rp[1][1], 0.9999990999908750433, 1e-12,
6292 "eraPn00a", "rp22", status);
6293 vvd(rp[1][2], -0.3837444441583715468e-6, 1e-14,
6294 "eraPn00a", "rp23", status);
6295
6296 vvd(rp[2][0], 0.5829880828740957684e-3, 1e-14,
6297 "eraPn00a", "rp31", status);
6298 vvd(rp[2][1], -0.3984203267708834759e-6, 1e-14,
6299 "eraPn00a", "rp32", status);
6300 vvd(rp[2][2], 0.9999998300623538046, 1e-12,
6301 "eraPn00a", "rp33", status);
6302
6303 vvd(rbp[0][0], 0.9999989300052243993, 1e-12,
6304 "eraPn00a", "rbp11", status);
6305 vvd(rbp[0][1], -0.1341717990239703727e-2, 1e-14,
6306 "eraPn00a", "rbp12", status);
6307 vvd(rbp[0][2], -0.5829075749891684053e-3, 1e-14,
6308 "eraPn00a", "rbp13", status);
6309
6310 vvd(rbp[1][0], 0.1341718013831739992e-2, 1e-14,
6311 "eraPn00a", "rbp21", status);
6312 vvd(rbp[1][1], 0.9999990998959191343, 1e-12,
6313 "eraPn00a", "rbp22", status);
6314 vvd(rbp[1][2], -0.3505759733565421170e-6, 1e-14,
6315 "eraPn00a", "rbp23", status);
6316
6317 vvd(rbp[2][0], 0.5829075206857717883e-3, 1e-14,
6318 "eraPn00a", "rbp31", status);
6319 vvd(rbp[2][1], -0.4315219955198608970e-6, 1e-14,
6320 "eraPn00a", "rbp32", status);
6321 vvd(rbp[2][2], 0.9999998301093036269, 1e-12,
6322 "eraPn00a", "rbp33", status);
6323
6324 vvd(rn[0][0], 0.9999999999536227949, 1e-12,
6325 "eraPn00a", "rn11", status);
6326 vvd(rn[0][1], 0.8836238544090873336e-5, 1e-14,
6327 "eraPn00a", "rn12", status);
6328 vvd(rn[0][2], 0.3830835237722400669e-5, 1e-14,
6329 "eraPn00a", "rn13", status);
6330
6331 vvd(rn[1][0], -0.8836082880798569274e-5, 1e-14,
6332 "eraPn00a", "rn21", status);
6333 vvd(rn[1][1], 0.9999999991354655028, 1e-12,
6334 "eraPn00a", "rn22", status);
6335 vvd(rn[1][2], -0.4063240865362499850e-4, 1e-14,
6336 "eraPn00a", "rn23", status);
6337
6338 vvd(rn[2][0], -0.3831194272065995866e-5, 1e-14,
6339 "eraPn00a", "rn31", status);
6340 vvd(rn[2][1], 0.4063237480216291775e-4, 1e-14,
6341 "eraPn00a", "rn32", status);
6342 vvd(rn[2][2], 0.9999999991671660338, 1e-12,
6343 "eraPn00a", "rn33", status);
6344
6345 vvd(rbpn[0][0], 0.9999989440476103435, 1e-12,
6346 "eraPn00a", "rbpn11", status);
6347 vvd(rbpn[0][1], -0.1332881761240011763e-2, 1e-14,
6348 "eraPn00a", "rbpn12", status);
6349 vvd(rbpn[0][2], -0.5790767434730085751e-3, 1e-14,
6350 "eraPn00a", "rbpn13", status);
6351
6352 vvd(rbpn[1][0], 0.1332858254308954658e-2, 1e-14,
6353 "eraPn00a", "rbpn21", status);
6354 vvd(rbpn[1][1], 0.9999991109044505577, 1e-12,
6355 "eraPn00a", "rbpn22", status);
6356 vvd(rbpn[1][2], -0.4097782710396580452e-4, 1e-14,
6357 "eraPn00a", "rbpn23", status);
6358
6359 vvd(rbpn[2][0], 0.5791308472168152904e-3, 1e-14,
6360 "eraPn00a", "rbpn31", status);
6361 vvd(rbpn[2][1], 0.4020595661591500259e-4, 1e-14,
6362 "eraPn00a", "rbpn32", status);
6363 vvd(rbpn[2][2], 0.9999998314954572304, 1e-12,
6364 "eraPn00a", "rbpn33", status);
6365
6366}
6367
6368static void t_pn00b(int *status)
6369/*
6370** - - - - - - - -
6371** t _ p n 0 0 b
6372** - - - - - - - -
6373**
6374** Test eraPn00b function.
6375**
6376** Returned:
6377** status int FALSE = success, TRUE = fail
6378**
6379** Called: eraPn00b, vvd
6380**
6381** This revision: 2013 August 7
6382*/
6383{
6384 double dpsi, deps, epsa,
6385 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6386
6387
6388 eraPn00b(2400000.5, 53736.0, &dpsi, &deps, &epsa,
6389 rb, rp, rbp, rn, rbpn);
6390
6391 vvd(dpsi, -0.9632552291148362783e-5, 1e-12,
6392 "eraPn00b", "dpsi", status);
6393 vvd(deps, 0.4063197106621159367e-4, 1e-12,
6394 "eraPn00b", "deps", status);
6395 vvd(epsa, 0.4090791789404229916, 1e-12, "eraPn00b", "epsa", status);
6396
6397 vvd(rb[0][0], 0.9999999999999942498, 1e-12,
6398 "eraPn00b", "rb11", status);
6399 vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
6400 "eraPn00b", "rb12", status);
6401 vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
6402 "eraPn00b", "rb13", status);
6403
6404 vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
6405 "eraPn00b", "rb21", status);
6406 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6407 "eraPn00b", "rb22", status);
6408 vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
6409 "eraPn00b", "rb23", status);
6410
6411 vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
6412 "eraPn00b", "rb31", status);
6413 vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
6414 "eraPn00b", "rb32", status);
6415 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6416 "eraPn00b", "rb33", status);
6417
6418 vvd(rp[0][0], 0.9999989300532289018, 1e-12,
6419 "eraPn00b", "rp11", status);
6420 vvd(rp[0][1], -0.1341647226791824349e-2, 1e-14,
6421 "eraPn00b", "rp12", status);
6422 vvd(rp[0][2], -0.5829880927190296547e-3, 1e-14,
6423 "eraPn00b", "rp13", status);
6424
6425 vvd(rp[1][0], 0.1341647231069759008e-2, 1e-14,
6426 "eraPn00b", "rp21", status);
6427 vvd(rp[1][1], 0.9999990999908750433, 1e-12,
6428 "eraPn00b", "rp22", status);
6429 vvd(rp[1][2], -0.3837444441583715468e-6, 1e-14,
6430 "eraPn00b", "rp23", status);
6431
6432 vvd(rp[2][0], 0.5829880828740957684e-3, 1e-14,
6433 "eraPn00b", "rp31", status);
6434 vvd(rp[2][1], -0.3984203267708834759e-6, 1e-14,
6435 "eraPn00b", "rp32", status);
6436 vvd(rp[2][2], 0.9999998300623538046, 1e-12,
6437 "eraPn00b", "rp33", status);
6438
6439 vvd(rbp[0][0], 0.9999989300052243993, 1e-12,
6440 "eraPn00b", "rbp11", status);
6441 vvd(rbp[0][1], -0.1341717990239703727e-2, 1e-14,
6442 "eraPn00b", "rbp12", status);
6443 vvd(rbp[0][2], -0.5829075749891684053e-3, 1e-14,
6444 "eraPn00b", "rbp13", status);
6445
6446 vvd(rbp[1][0], 0.1341718013831739992e-2, 1e-14,
6447 "eraPn00b", "rbp21", status);
6448 vvd(rbp[1][1], 0.9999990998959191343, 1e-12,
6449 "eraPn00b", "rbp22", status);
6450 vvd(rbp[1][2], -0.3505759733565421170e-6, 1e-14,
6451 "eraPn00b", "rbp23", status);
6452
6453 vvd(rbp[2][0], 0.5829075206857717883e-3, 1e-14,
6454 "eraPn00b", "rbp31", status);
6455 vvd(rbp[2][1], -0.4315219955198608970e-6, 1e-14,
6456 "eraPn00b", "rbp32", status);
6457 vvd(rbp[2][2], 0.9999998301093036269, 1e-12,
6458 "eraPn00b", "rbp33", status);
6459
6460 vvd(rn[0][0], 0.9999999999536069682, 1e-12,
6461 "eraPn00b", "rn11", status);
6462 vvd(rn[0][1], 0.8837746144871248011e-5, 1e-14,
6463 "eraPn00b", "rn12", status);
6464 vvd(rn[0][2], 0.3831488838252202945e-5, 1e-14,
6465 "eraPn00b", "rn13", status);
6466
6467 vvd(rn[1][0], -0.8837590456632304720e-5, 1e-14,
6468 "eraPn00b", "rn21", status);
6469 vvd(rn[1][1], 0.9999999991354692733, 1e-12,
6470 "eraPn00b", "rn22", status);
6471 vvd(rn[1][2], -0.4063198798559591654e-4, 1e-14,
6472 "eraPn00b", "rn23", status);
6473
6474 vvd(rn[2][0], -0.3831847930134941271e-5, 1e-14,
6475 "eraPn00b", "rn31", status);
6476 vvd(rn[2][1], 0.4063195412258168380e-4, 1e-14,
6477 "eraPn00b", "rn32", status);
6478 vvd(rn[2][2], 0.9999999991671806225, 1e-12,
6479 "eraPn00b", "rn33", status);
6480
6481 vvd(rbpn[0][0], 0.9999989440499982806, 1e-12,
6482 "eraPn00b", "rbpn11", status);
6483 vvd(rbpn[0][1], -0.1332880253640849194e-2, 1e-14,
6484 "eraPn00b", "rbpn12", status);
6485 vvd(rbpn[0][2], -0.5790760898731091166e-3, 1e-14,
6486 "eraPn00b", "rbpn13", status);
6487
6488 vvd(rbpn[1][0], 0.1332856746979949638e-2, 1e-14,
6489 "eraPn00b", "rbpn21", status);
6490 vvd(rbpn[1][1], 0.9999991109064768883, 1e-12,
6491 "eraPn00b", "rbpn22", status);
6492 vvd(rbpn[1][2], -0.4097740555723081811e-4, 1e-14,
6493 "eraPn00b", "rbpn23", status);
6494
6495 vvd(rbpn[2][0], 0.5791301929950208873e-3, 1e-14,
6496 "eraPn00b", "rbpn31", status);
6497 vvd(rbpn[2][1], 0.4020553681373720832e-4, 1e-14,
6498 "eraPn00b", "rbpn32", status);
6499 vvd(rbpn[2][2], 0.9999998314958529887, 1e-12,
6500 "eraPn00b", "rbpn33", status);
6501
6502}
6503
6504static void t_pn06a(int *status)
6505/*
6506** - - - - - - - -
6507** t _ p n 0 6 a
6508** - - - - - - - -
6509**
6510** Test eraPn06a function.
6511**
6512** Returned:
6513** status int FALSE = success, TRUE = fail
6514**
6515** Called: eraPn06a, vvd
6516**
6517** This revision: 2013 August 7
6518*/
6519{
6520 double dpsi, deps, epsa;
6521 double rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6522
6523
6524 eraPn06a(2400000.5, 53736.0, &dpsi, &deps, &epsa,
6525 rb, rp, rbp, rn, rbpn);
6526
6527 vvd(dpsi, -0.9630912025820308797e-5, 1e-12,
6528 "eraPn06a", "dpsi", status);
6529 vvd(deps, 0.4063238496887249798e-4, 1e-12,
6530 "eraPn06a", "deps", status);
6531 vvd(epsa, 0.4090789763356509926, 1e-12, "eraPn06a", "epsa", status);
6532
6533 vvd(rb[0][0], 0.9999999999999942497, 1e-12,
6534 "eraPn06a", "rb11", status);
6535 vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
6536 "eraPn06a", "rb12", status);
6537 vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
6538 "eraPn06a", "rb13", status);
6539
6540 vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
6541 "eraPn06a", "rb21", status);
6542 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6543 "eraPn06a", "rb22", status);
6544 vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
6545 "eraPn06a", "rb23", status);
6546
6547 vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
6548 "eraPn06a", "rb31", status);
6549 vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
6550 "eraPn06a", "rb32", status);
6551 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6552 "eraPn06a", "rb33", status);
6553
6554 vvd(rp[0][0], 0.9999989300536854831, 1e-12,
6555 "eraPn06a", "rp11", status);
6556 vvd(rp[0][1], -0.1341646886204443795e-2, 1e-14,
6557 "eraPn06a", "rp12", status);
6558 vvd(rp[0][2], -0.5829880933488627759e-3, 1e-14,
6559 "eraPn06a", "rp13", status);
6560
6561 vvd(rp[1][0], 0.1341646890569782183e-2, 1e-14,
6562 "eraPn06a", "rp21", status);
6563 vvd(rp[1][1], 0.9999990999913319321, 1e-12,
6564 "eraPn06a", "rp22", status);
6565 vvd(rp[1][2], -0.3835944216374477457e-6, 1e-14,
6566 "eraPn06a", "rp23", status);
6567
6568 vvd(rp[2][0], 0.5829880833027867368e-3, 1e-14,
6569 "eraPn06a", "rp31", status);
6570 vvd(rp[2][1], -0.3985701514686976112e-6, 1e-14,
6571 "eraPn06a", "rp32", status);
6572 vvd(rp[2][2], 0.9999998300623534950, 1e-12,
6573 "eraPn06a", "rp33", status);
6574
6575 vvd(rbp[0][0], 0.9999989300056797893, 1e-12,
6576 "eraPn06a", "rbp11", status);
6577 vvd(rbp[0][1], -0.1341717650545059598e-2, 1e-14,
6578 "eraPn06a", "rbp12", status);
6579 vvd(rbp[0][2], -0.5829075756493728856e-3, 1e-14,
6580 "eraPn06a", "rbp13", status);
6581
6582 vvd(rbp[1][0], 0.1341717674223918101e-2, 1e-14,
6583 "eraPn06a", "rbp21", status);
6584 vvd(rbp[1][1], 0.9999990998963748448, 1e-12,
6585 "eraPn06a", "rbp22", status);
6586 vvd(rbp[1][2], -0.3504269280170069029e-6, 1e-14,
6587 "eraPn06a", "rbp23", status);
6588
6589 vvd(rbp[2][0], 0.5829075211461454599e-3, 1e-14,
6590 "eraPn06a", "rbp31", status);
6591 vvd(rbp[2][1], -0.4316708436255949093e-6, 1e-14,
6592 "eraPn06a", "rbp32", status);
6593 vvd(rbp[2][2], 0.9999998301093032943, 1e-12,
6594 "eraPn06a", "rbp33", status);
6595
6596 vvd(rn[0][0], 0.9999999999536227668, 1e-12,
6597 "eraPn06a", "rn11", status);
6598 vvd(rn[0][1], 0.8836241998111535233e-5, 1e-14,
6599 "eraPn06a", "rn12", status);
6600 vvd(rn[0][2], 0.3830834608415287707e-5, 1e-14,
6601 "eraPn06a", "rn13", status);
6602
6603 vvd(rn[1][0], -0.8836086334870740138e-5, 1e-14,
6604 "eraPn06a", "rn21", status);
6605 vvd(rn[1][1], 0.9999999991354657474, 1e-12,
6606 "eraPn06a", "rn22", status);
6607 vvd(rn[1][2], -0.4063240188248455065e-4, 1e-14,
6608 "eraPn06a", "rn23", status);
6609
6610 vvd(rn[2][0], -0.3831193642839398128e-5, 1e-14,
6611 "eraPn06a", "rn31", status);
6612 vvd(rn[2][1], 0.4063236803101479770e-4, 1e-14,
6613 "eraPn06a", "rn32", status);
6614 vvd(rn[2][2], 0.9999999991671663114, 1e-12,
6615 "eraPn06a", "rn33", status);
6616
6617 vvd(rbpn[0][0], 0.9999989440480669738, 1e-12,
6618 "eraPn06a", "rbpn11", status);
6619 vvd(rbpn[0][1], -0.1332881418091915973e-2, 1e-14,
6620 "eraPn06a", "rbpn12", status);
6621 vvd(rbpn[0][2], -0.5790767447612042565e-3, 1e-14,
6622 "eraPn06a", "rbpn13", status);
6623
6624 vvd(rbpn[1][0], 0.1332857911250989133e-2, 1e-14,
6625 "eraPn06a", "rbpn21", status);
6626 vvd(rbpn[1][1], 0.9999991109049141908, 1e-12,
6627 "eraPn06a", "rbpn22", status);
6628 vvd(rbpn[1][2], -0.4097767128546784878e-4, 1e-14,
6629 "eraPn06a", "rbpn23", status);
6630
6631 vvd(rbpn[2][0], 0.5791308482835292617e-3, 1e-14,
6632 "eraPn06a", "rbpn31", status);
6633 vvd(rbpn[2][1], 0.4020580099454020310e-4, 1e-14,
6634 "eraPn06a", "rbpn32", status);
6635 vvd(rbpn[2][2], 0.9999998314954628695, 1e-12,
6636 "eraPn06a", "rbpn33", status);
6637
6638}
6639
6640static void t_pn06(int *status)
6641/*
6642** - - - - - - -
6643** t _ p n 0 6
6644** - - - - - - -
6645**
6646** Test eraPn06 function.
6647**
6648** Returned:
6649** status int FALSE = success, TRUE = fail
6650**
6651** Called: eraPn06, vvd
6652**
6653** This revision: 2013 August 7
6654*/
6655{
6656 double dpsi, deps, epsa,
6657 rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3];
6658
6659
6660 dpsi = -0.9632552291149335877e-5;
6661 deps = 0.4063197106621141414e-4;
6662
6663 eraPn06(2400000.5, 53736.0, dpsi, deps,
6664 &epsa, rb, rp, rbp, rn, rbpn);
6665
6666 vvd(epsa, 0.4090789763356509926, 1e-12, "eraPn06", "epsa", status);
6667
6668 vvd(rb[0][0], 0.9999999999999942497, 1e-12,
6669 "eraPn06", "rb11", status);
6670 vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
6671 "eraPn06", "rb12", status);
6672 vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
6673 "eraPn06", "rb13", status);
6674
6675 vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
6676 "eraPn06", "rb21", status);
6677 vvd(rb[1][1], 0.9999999999999969484, 1e-12,
6678 "eraPn06", "rb22", status);
6679 vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
6680 "eraPn06", "rb23", status);
6681
6682 vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
6683 "eraPn06", "rb31", status);
6684 vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
6685 "eraPn06", "rb32", status);
6686 vvd(rb[2][2], 0.9999999999999962084, 1e-12,
6687 "eraPn06", "rb33", status);
6688
6689 vvd(rp[0][0], 0.9999989300536854831, 1e-12,
6690 "eraPn06", "rp11", status);
6691 vvd(rp[0][1], -0.1341646886204443795e-2, 1e-14,
6692 "eraPn06", "rp12", status);
6693 vvd(rp[0][2], -0.5829880933488627759e-3, 1e-14,
6694 "eraPn06", "rp13", status);
6695
6696 vvd(rp[1][0], 0.1341646890569782183e-2, 1e-14,
6697 "eraPn06", "rp21", status);
6698 vvd(rp[1][1], 0.9999990999913319321, 1e-12,
6699 "eraPn06", "rp22", status);
6700 vvd(rp[1][2], -0.3835944216374477457e-6, 1e-14,
6701 "eraPn06", "rp23", status);
6702
6703 vvd(rp[2][0], 0.5829880833027867368e-3, 1e-14,
6704 "eraPn06", "rp31", status);
6705 vvd(rp[2][1], -0.3985701514686976112e-6, 1e-14,
6706 "eraPn06", "rp32", status);
6707 vvd(rp[2][2], 0.9999998300623534950, 1e-12,
6708 "eraPn06", "rp33", status);
6709
6710 vvd(rbp[0][0], 0.9999989300056797893, 1e-12,
6711 "eraPn06", "rbp11", status);
6712 vvd(rbp[0][1], -0.1341717650545059598e-2, 1e-14,
6713 "eraPn06", "rbp12", status);
6714 vvd(rbp[0][2], -0.5829075756493728856e-3, 1e-14,
6715 "eraPn06", "rbp13", status);
6716
6717 vvd(rbp[1][0], 0.1341717674223918101e-2, 1e-14,
6718 "eraPn06", "rbp21", status);
6719 vvd(rbp[1][1], 0.9999990998963748448, 1e-12,
6720 "eraPn06", "rbp22", status);
6721 vvd(rbp[1][2], -0.3504269280170069029e-6, 1e-14,
6722 "eraPn06", "rbp23", status);
6723
6724 vvd(rbp[2][0], 0.5829075211461454599e-3, 1e-14,
6725 "eraPn06", "rbp31", status);
6726 vvd(rbp[2][1], -0.4316708436255949093e-6, 1e-14,
6727 "eraPn06", "rbp32", status);
6728 vvd(rbp[2][2], 0.9999998301093032943, 1e-12,
6729 "eraPn06", "rbp33", status);
6730
6731 vvd(rn[0][0], 0.9999999999536069682, 1e-12,
6732 "eraPn06", "rn11", status);
6733 vvd(rn[0][1], 0.8837746921149881914e-5, 1e-14,
6734 "eraPn06", "rn12", status);
6735 vvd(rn[0][2], 0.3831487047682968703e-5, 1e-14,
6736 "eraPn06", "rn13", status);
6737
6738 vvd(rn[1][0], -0.8837591232983692340e-5, 1e-14,
6739 "eraPn06", "rn21", status);
6740 vvd(rn[1][1], 0.9999999991354692664, 1e-12,
6741 "eraPn06", "rn22", status);
6742 vvd(rn[1][2], -0.4063198798558931215e-4, 1e-14,
6743 "eraPn06", "rn23", status);
6744
6745 vvd(rn[2][0], -0.3831846139597250235e-5, 1e-14,
6746 "eraPn06", "rn31", status);
6747 vvd(rn[2][1], 0.4063195412258792914e-4, 1e-14,
6748 "eraPn06", "rn32", status);
6749 vvd(rn[2][2], 0.9999999991671806293, 1e-12,
6750 "eraPn06", "rn33", status);
6751
6752 vvd(rbpn[0][0], 0.9999989440504506688, 1e-12,
6753 "eraPn06", "rbpn11", status);
6754 vvd(rbpn[0][1], -0.1332879913170492655e-2, 1e-14,
6755 "eraPn06", "rbpn12", status);
6756 vvd(rbpn[0][2], -0.5790760923225655753e-3, 1e-14,
6757 "eraPn06", "rbpn13", status);
6758
6759 vvd(rbpn[1][0], 0.1332856406595754748e-2, 1e-14,
6760 "eraPn06", "rbpn21", status);
6761 vvd(rbpn[1][1], 0.9999991109069366795, 1e-12,
6762 "eraPn06", "rbpn22", status);
6763 vvd(rbpn[1][2], -0.4097725651142641812e-4, 1e-14,
6764 "eraPn06", "rbpn23", status);
6765
6766 vvd(rbpn[2][0], 0.5791301952321296716e-3, 1e-14,
6767 "eraPn06", "rbpn31", status);
6768 vvd(rbpn[2][1], 0.4020538796195230577e-4, 1e-14,
6769 "eraPn06", "rbpn32", status);
6770 vvd(rbpn[2][2], 0.9999998314958576778, 1e-12,
6771 "eraPn06", "rbpn33", status);
6772
6773}
6774
6775static void t_pnm00a(int *status)
6776/*
6777** - - - - - - - - -
6778** t _ p n m 0 0 a
6779** - - - - - - - - -
6780**
6781** Test eraPnm00a function.
6782**
6783** Returned:
6784** status int FALSE = success, TRUE = fail
6785**
6786** Called: eraPnm00a, vvd
6787**
6788** This revision: 2013 August 7
6789*/
6790{
6791 double rbpn[3][3];
6792
6793
6794 eraPnm00a(2400000.5, 50123.9999, rbpn);
6795
6796 vvd(rbpn[0][0], 0.9999995832793134257, 1e-12,
6797 "eraPnm00a", "11", status);
6798 vvd(rbpn[0][1], 0.8372384254137809439e-3, 1e-14,
6799 "eraPnm00a", "12", status);
6800 vvd(rbpn[0][2], 0.3639684306407150645e-3, 1e-14,
6801 "eraPnm00a", "13", status);
6802
6803 vvd(rbpn[1][0], -0.8372535226570394543e-3, 1e-14,
6804 "eraPnm00a", "21", status);
6805 vvd(rbpn[1][1], 0.9999996486491582471, 1e-12,
6806 "eraPnm00a", "22", status);
6807 vvd(rbpn[1][2], 0.4132915262664072381e-4, 1e-14,
6808 "eraPnm00a", "23", status);
6809
6810 vvd(rbpn[2][0], -0.3639337004054317729e-3, 1e-14,
6811 "eraPnm00a", "31", status);
6812 vvd(rbpn[2][1], -0.4163386925461775873e-4, 1e-14,
6813 "eraPnm00a", "32", status);
6814 vvd(rbpn[2][2], 0.9999999329094390695, 1e-12,
6815 "eraPnm00a", "33", status);
6816
6817}
6818
6819static void t_pnm00b(int *status)
6820/*
6821** - - - - - - - - -
6822** t _ p n m 0 0 b
6823** - - - - - - - - -
6824**
6825** Test eraPnm00b function.
6826**
6827** Returned:
6828** status int FALSE = success, TRUE = fail
6829**
6830** Called: eraPnm00b, vvd
6831**
6832** This revision: 2013 August 7
6833*/
6834{
6835 double rbpn[3][3];
6836
6837
6838 eraPnm00b(2400000.5, 50123.9999, rbpn);
6839
6840 vvd(rbpn[0][0], 0.9999995832776208280, 1e-12,
6841 "eraPnm00b", "11", status);
6842 vvd(rbpn[0][1], 0.8372401264429654837e-3, 1e-14,
6843 "eraPnm00b", "12", status);
6844 vvd(rbpn[0][2], 0.3639691681450271771e-3, 1e-14,
6845 "eraPnm00b", "13", status);
6846
6847 vvd(rbpn[1][0], -0.8372552234147137424e-3, 1e-14,
6848 "eraPnm00b", "21", status);
6849 vvd(rbpn[1][1], 0.9999996486477686123, 1e-12,
6850 "eraPnm00b", "22", status);
6851 vvd(rbpn[1][2], 0.4132832190946052890e-4, 1e-14,
6852 "eraPnm00b", "23", status);
6853
6854 vvd(rbpn[2][0], -0.3639344385341866407e-3, 1e-14,
6855 "eraPnm00b", "31", status);
6856 vvd(rbpn[2][1], -0.4163303977421522785e-4, 1e-14,
6857 "eraPnm00b", "32", status);
6858 vvd(rbpn[2][2], 0.9999999329092049734, 1e-12,
6859 "eraPnm00b", "33", status);
6860
6861}
6862
6863static void t_pnm06a(int *status)
6864/*
6865** - - - - - - - - -
6866** t _ p n m 0 6 a
6867** - - - - - - - - -
6868**
6869** Test eraPnm06a function.
6870**
6871** Returned:
6872** status int FALSE = success, TRUE = fail
6873**
6874** Called: eraPnm06a, vvd
6875**
6876** This revision: 2013 August 7
6877*/
6878{
6879 double rbpn[3][3];
6880
6881
6882 eraPnm06a(2400000.5, 50123.9999, rbpn);
6883
6884 vvd(rbpn[0][0], 0.9999995832794205484, 1e-12,
6885 "eraPnm06a", "11", status);
6886 vvd(rbpn[0][1], 0.8372382772630962111e-3, 1e-14,
6887 "eraPnm06a", "12", status);
6888 vvd(rbpn[0][2], 0.3639684771140623099e-3, 1e-14,
6889 "eraPnm06a", "13", status);
6890
6891 vvd(rbpn[1][0], -0.8372533744743683605e-3, 1e-14,
6892 "eraPnm06a", "21", status);
6893 vvd(rbpn[1][1], 0.9999996486492861646, 1e-12,
6894 "eraPnm06a", "22", status);
6895 vvd(rbpn[1][2], 0.4132905944611019498e-4, 1e-14,
6896 "eraPnm06a", "23", status);
6897
6898 vvd(rbpn[2][0], -0.3639337469629464969e-3, 1e-14,
6899 "eraPnm06a", "31", status);
6900 vvd(rbpn[2][1], -0.4163377605910663999e-4, 1e-14,
6901 "eraPnm06a", "32", status);
6902 vvd(rbpn[2][2], 0.9999999329094260057, 1e-12,
6903 "eraPnm06a", "33", status);
6904
6905}
6906
6907static void t_pnm80(int *status)
6908/*
6909** - - - - - - - -
6910** t _ p n m 8 0
6911** - - - - - - - -
6912**
6913** Test eraPnm80 function.
6914**
6915** Returned:
6916** status int FALSE = success, TRUE = fail
6917**
6918** Called: eraPnm80, vvd
6919**
6920** This revision: 2013 August 7
6921*/
6922{
6923 double rmatpn[3][3];
6924
6925
6926 eraPnm80(2400000.5, 50123.9999, rmatpn);
6927
6928 vvd(rmatpn[0][0], 0.9999995831934611169, 1e-12,
6929 "eraPnm80", "11", status);
6930 vvd(rmatpn[0][1], 0.8373654045728124011e-3, 1e-14,
6931 "eraPnm80", "12", status);
6932 vvd(rmatpn[0][2], 0.3639121916933106191e-3, 1e-14,
6933 "eraPnm80", "13", status);
6934
6935 vvd(rmatpn[1][0], -0.8373804896118301316e-3, 1e-14,
6936 "eraPnm80", "21", status);
6937 vvd(rmatpn[1][1], 0.9999996485439674092, 1e-12,
6938 "eraPnm80", "22", status);
6939 vvd(rmatpn[1][2], 0.4130202510421549752e-4, 1e-14,
6940 "eraPnm80", "23", status);
6941
6942 vvd(rmatpn[2][0], -0.3638774789072144473e-3, 1e-14,
6943 "eraPnm80", "31", status);
6944 vvd(rmatpn[2][1], -0.4160674085851722359e-4, 1e-14,
6945 "eraPnm80", "32", status);
6946 vvd(rmatpn[2][2], 0.9999999329310274805, 1e-12,
6947 "eraPnm80", "33", status);
6948
6949}
6950
6951static void t_pom00(int *status)
6952/*
6953** - - - - - - - -
6954** t _ p o m 0 0
6955** - - - - - - - -
6956**
6957** Test eraPom00 function.
6958**
6959** Returned:
6960** status int FALSE = success, TRUE = fail
6961**
6962** Called: eraPom00, vvd
6963**
6964** This revision: 2013 August 7
6965*/
6966{
6967 double xp, yp, sp, rpom[3][3];
6968
6969
6970 xp = 2.55060238e-7;
6971 yp = 1.860359247e-6;
6972 sp = -0.1367174580728891460e-10;
6973
6974 eraPom00(xp, yp, sp, rpom);
6975
6976 vvd(rpom[0][0], 0.9999999999999674721, 1e-12,
6977 "eraPom00", "11", status);
6978 vvd(rpom[0][1], -0.1367174580728846989e-10, 1e-16,
6979 "eraPom00", "12", status);
6980 vvd(rpom[0][2], 0.2550602379999972345e-6, 1e-16,
6981 "eraPom00", "13", status);
6982
6983 vvd(rpom[1][0], 0.1414624947957029801e-10, 1e-16,
6984 "eraPom00", "21", status);
6985 vvd(rpom[1][1], 0.9999999999982695317, 1e-12,
6986 "eraPom00", "22", status);
6987 vvd(rpom[1][2], -0.1860359246998866389e-5, 1e-16,
6988 "eraPom00", "23", status);
6989
6990 vvd(rpom[2][0], -0.2550602379741215021e-6, 1e-16,
6991 "eraPom00", "31", status);
6992 vvd(rpom[2][1], 0.1860359247002414021e-5, 1e-16,
6993 "eraPom00", "32", status);
6994 vvd(rpom[2][2], 0.9999999999982370039, 1e-12,
6995 "eraPom00", "33", status);
6996
6997}
6998
6999static void t_ppp(int *status)
7000/*
7001** - - - - - -
7002** t _ p p p
7003** - - - - - -
7004**
7005** Test eraPpp function.
7006**
7007** Returned:
7008** status int FALSE = success, TRUE = fail
7009**
7010** Called: eraPpp, vvd
7011**
7012** This revision: 2013 August 7
7013*/
7014{
7015 double a[3], b[3], apb[3];
7016
7017
7018 a[0] = 2.0;
7019 a[1] = 2.0;
7020 a[2] = 3.0;
7021
7022 b[0] = 1.0;
7023 b[1] = 3.0;
7024 b[2] = 4.0;
7025
7026 eraPpp(a, b, apb);
7027
7028 vvd(apb[0], 3.0, 1e-12, "eraPpp", "0", status);
7029 vvd(apb[1], 5.0, 1e-12, "eraPpp", "1", status);
7030 vvd(apb[2], 7.0, 1e-12, "eraPpp", "2", status);
7031
7032}
7033
7034static void t_ppsp(int *status)
7035/*
7036** - - - - - - -
7037** t _ p p s p
7038** - - - - - - -
7039**
7040** Test eraPpsp function.
7041**
7042** Returned:
7043** status int FALSE = success, TRUE = fail
7044**
7045** Called: eraPpsp, vvd
7046**
7047** This revision: 2013 August 7
7048*/
7049{
7050 double a[3], s, b[3], apsb[3];
7051
7052
7053 a[0] = 2.0;
7054 a[1] = 2.0;
7055 a[2] = 3.0;
7056
7057 s = 5.0;
7058
7059 b[0] = 1.0;
7060 b[1] = 3.0;
7061 b[2] = 4.0;
7062
7063 eraPpsp(a, s, b, apsb);
7064
7065 vvd(apsb[0], 7.0, 1e-12, "eraPpsp", "0", status);
7066 vvd(apsb[1], 17.0, 1e-12, "eraPpsp", "1", status);
7067 vvd(apsb[2], 23.0, 1e-12, "eraPpsp", "2", status);
7068
7069}
7070
7071static void t_pr00(int *status)
7072/*
7073** - - - - - - -
7074** t _ p r 0 0
7075** - - - - - - -
7076**
7077** Test eraPr00 function.
7078**
7079** Returned:
7080** status int FALSE = success, TRUE = fail
7081**
7082** Called: eraPr00, vvd
7083**
7084** This revision: 2013 August 7
7085*/
7086{
7087 double dpsipr, depspr;
7088
7089 eraPr00(2400000.5, 53736, &dpsipr, &depspr);
7090
7091 vvd(dpsipr, -0.8716465172668347629e-7, 1e-22,
7092 "eraPr00", "dpsipr", status);
7093 vvd(depspr, -0.7342018386722813087e-8, 1e-22,
7094 "eraPr00", "depspr", status);
7095
7096}
7097
7098static void t_prec76(int *status)
7099/*
7100** - - - - - - - - -
7101** t _ p r e c 7 6
7102** - - - - - - - - -
7103**
7104** Test eraPrec76 function.
7105**
7106** Returned:
7107** status int FALSE = success, TRUE = fail
7108**
7109** Called: eraPrec76, vvd
7110**
7111** This revision: 2013 August 7
7112*/
7113{
7114 double ep01, ep02, ep11, ep12, zeta, z, theta;
7115
7116
7117 ep01 = 2400000.5;
7118 ep02 = 33282.0;
7119 ep11 = 2400000.5;
7120 ep12 = 51544.0;
7121
7122 eraPrec76(ep01, ep02, ep11, ep12, &zeta, &z, &theta);
7123
7124 vvd(zeta, 0.5588961642000161243e-2, 1e-12,
7125 "eraPrec76", "zeta", status);
7126 vvd(z, 0.5589922365870680624e-2, 1e-12,
7127 "eraPrec76", "z", status);
7128 vvd(theta, 0.4858945471687296760e-2, 1e-12,
7129 "eraPrec76", "theta", status);
7130
7131}
7132
7133static void t_pv2p(int *status)
7134/*
7135** - - - - - - -
7136** t _ p v 2 p
7137** - - - - - - -
7138**
7139** Test eraPv2p function.
7140**
7141** Returned:
7142** status int FALSE = success, TRUE = fail
7143**
7144** Called: eraPv2p, vvd
7145**
7146** This revision: 2013 August 7
7147*/
7148{
7149 double pv[2][3], p[3];
7150
7151
7152 pv[0][0] = 0.3;
7153 pv[0][1] = 1.2;
7154 pv[0][2] = -2.5;
7155
7156 pv[1][0] = -0.5;
7157 pv[1][1] = 3.1;
7158 pv[1][2] = 0.9;
7159
7160 eraPv2p(pv, p);
7161
7162 vvd(p[0], 0.3, 0.0, "eraPv2p", "1", status);
7163 vvd(p[1], 1.2, 0.0, "eraPv2p", "2", status);
7164 vvd(p[2], -2.5, 0.0, "eraPv2p", "3", status);
7165
7166}
7167
7168static void t_pv2s(int *status)
7169/*
7170** - - - - - - -
7171** t _ p v 2 s
7172** - - - - - - -
7173**
7174** Test eraPv2s function.
7175**
7176** Returned:
7177** status int FALSE = success, TRUE = fail
7178**
7179** Called: eraPv2s, vvd
7180**
7181** This revision: 2013 August 7
7182*/
7183{
7184 double pv[2][3], theta, phi, r, td, pd, rd;
7185
7186
7187 pv[0][0] = -0.4514964673880165;
7188 pv[0][1] = 0.03093394277342585;
7189 pv[0][2] = 0.05594668105108779;
7190
7191 pv[1][0] = 1.292270850663260e-5;
7192 pv[1][1] = 2.652814182060692e-6;
7193 pv[1][2] = 2.568431853930293e-6;
7194
7195 eraPv2s(pv, &theta, &phi, &r, &td, &pd, &rd);
7196
7197 vvd(theta, 3.073185307179586515, 1e-12, "eraPv2s", "theta", status);
7198 vvd(phi, 0.1229999999999999992, 1e-12, "eraPv2s", "phi", status);
7199 vvd(r, 0.4559999999999999757, 1e-12, "eraPv2s", "r", status);
7200 vvd(td, -0.7800000000000000364e-5, 1e-16, "eraPv2s", "td", status);
7201 vvd(pd, 0.9010000000000001639e-5, 1e-16, "eraPv2s", "pd", status);
7202 vvd(rd, -0.1229999999999999832e-4, 1e-16, "eraPv2s", "rd", status);
7203
7204}
7205
7206static void t_pvdpv(int *status)
7207/*
7208** - - - - - - - -
7209** t _ p v d p v
7210** - - - - - - - -
7211**
7212** Test eraPvdpv function.
7213**
7214** Returned:
7215** status int FALSE = success, TRUE = fail
7216**
7217** Called: eraPvdpv, vvd
7218**
7219** This revision: 2013 August 7
7220*/
7221{
7222 double a[2][3], b[2][3], adb[2];
7223
7224
7225 a[0][0] = 2.0;
7226 a[0][1] = 2.0;
7227 a[0][2] = 3.0;
7228
7229 a[1][0] = 6.0;
7230 a[1][1] = 0.0;
7231 a[1][2] = 4.0;
7232
7233 b[0][0] = 1.0;
7234 b[0][1] = 3.0;
7235 b[0][2] = 4.0;
7236
7237 b[1][0] = 0.0;
7238 b[1][1] = 2.0;
7239 b[1][2] = 8.0;
7240
7241 eraPvdpv(a, b, adb);
7242
7243 vvd(adb[0], 20.0, 1e-12, "eraPvdpv", "1", status);
7244 vvd(adb[1], 50.0, 1e-12, "eraPvdpv", "2", status);
7245
7246}
7247
7248static void t_pvm(int *status)
7249/*
7250** - - - - - -
7251** t _ p v m
7252** - - - - - -
7253**
7254** Test eraPvm function.
7255**
7256** Returned:
7257** status int FALSE = success, TRUE = fail
7258**
7259** Called: eraPvm, vvd
7260**
7261** This revision: 2013 August 7
7262*/
7263{
7264 double pv[2][3], r, s;
7265
7266
7267 pv[0][0] = 0.3;
7268 pv[0][1] = 1.2;
7269 pv[0][2] = -2.5;
7270
7271 pv[1][0] = 0.45;
7272 pv[1][1] = -0.25;
7273 pv[1][2] = 1.1;
7274
7275 eraPvm(pv, &r, &s);
7276
7277 vvd(r, 2.789265136196270604, 1e-12, "eraPvm", "r", status);
7278 vvd(s, 1.214495780149111922, 1e-12, "eraPvm", "s", status);
7279
7280}
7281
7282static void t_pvmpv(int *status)
7283/*
7284** - - - - - - - -
7285** t _ p v m p v
7286** - - - - - - - -
7287**
7288** Test eraPvmpv function.
7289**
7290** Returned:
7291** status int FALSE = success, TRUE = fail
7292**
7293** Called: eraPvmpv, vvd
7294**
7295** This revision: 2013 August 7
7296*/
7297{
7298 double a[2][3], b[2][3], amb[2][3];
7299
7300
7301 a[0][0] = 2.0;
7302 a[0][1] = 2.0;
7303 a[0][2] = 3.0;
7304
7305 a[1][0] = 5.0;
7306 a[1][1] = 6.0;
7307 a[1][2] = 3.0;
7308
7309 b[0][0] = 1.0;
7310 b[0][1] = 3.0;
7311 b[0][2] = 4.0;
7312
7313 b[1][0] = 3.0;
7314 b[1][1] = 2.0;
7315 b[1][2] = 1.0;
7316
7317 eraPvmpv(a, b, amb);
7318
7319 vvd(amb[0][0], 1.0, 1e-12, "eraPvmpv", "11", status);
7320 vvd(amb[0][1], -1.0, 1e-12, "eraPvmpv", "21", status);
7321 vvd(amb[0][2], -1.0, 1e-12, "eraPvmpv", "31", status);
7322
7323 vvd(amb[1][0], 2.0, 1e-12, "eraPvmpv", "12", status);
7324 vvd(amb[1][1], 4.0, 1e-12, "eraPvmpv", "22", status);
7325 vvd(amb[1][2], 2.0, 1e-12, "eraPvmpv", "32", status);
7326
7327}
7328
7329static void t_pvppv(int *status)
7330/*
7331** - - - - - - - -
7332** t _ p v p p v
7333** - - - - - - - -
7334**
7335** Test eraPvppv function.
7336**
7337** Returned:
7338** status int FALSE = success, TRUE = fail
7339**
7340** Called: eraPvppv, vvd
7341**
7342** This revision: 2013 August 7
7343*/
7344{
7345 double a[2][3], b[2][3], apb[2][3];
7346
7347
7348 a[0][0] = 2.0;
7349 a[0][1] = 2.0;
7350 a[0][2] = 3.0;
7351
7352 a[1][0] = 5.0;
7353 a[1][1] = 6.0;
7354 a[1][2] = 3.0;
7355
7356 b[0][0] = 1.0;
7357 b[0][1] = 3.0;
7358 b[0][2] = 4.0;
7359
7360 b[1][0] = 3.0;
7361 b[1][1] = 2.0;
7362 b[1][2] = 1.0;
7363
7364 eraPvppv(a, b, apb);
7365
7366 vvd(apb[0][0], 3.0, 1e-12, "eraPvppv", "p1", status);
7367 vvd(apb[0][1], 5.0, 1e-12, "eraPvppv", "p2", status);
7368 vvd(apb[0][2], 7.0, 1e-12, "eraPvppv", "p3", status);
7369
7370 vvd(apb[1][0], 8.0, 1e-12, "eraPvppv", "v1", status);
7371 vvd(apb[1][1], 8.0, 1e-12, "eraPvppv", "v2", status);
7372 vvd(apb[1][2], 4.0, 1e-12, "eraPvppv", "v3", status);
7373
7374}
7375
7376static void t_pvstar(int *status)
7377/*
7378** - - - - - - - - -
7379** t _ p v s t a r
7380** - - - - - - - - -
7381**
7382** Test eraPvstar function.
7383**
7384** Returned:
7385** status int FALSE = success, TRUE = fail
7386**
7387** Called: eraPvstar, vvd, viv
7388**
7389** This revision: 2013 August 7
7390*/
7391{
7392 double pv[2][3], ra, dec, pmr, pmd, px, rv;
7393 int j;
7394
7395
7396 pv[0][0] = 126668.5912743160601;
7397 pv[0][1] = 2136.792716839935195;
7398 pv[0][2] = -245251.2339876830091;
7399
7400 pv[1][0] = -0.4051854035740712739e-2;
7401 pv[1][1] = -0.6253919754866173866e-2;
7402 pv[1][2] = 0.1189353719774107189e-1;
7403
7404 j = eraPvstar(pv, &ra, &dec, &pmr, &pmd, &px, &rv);
7405
7406 vvd(ra, 0.1686756e-1, 1e-12, "eraPvstar", "ra", status);
7407 vvd(dec, -1.093989828, 1e-12, "eraPvstar", "dec", status);
7408 vvd(pmr, -0.178323516e-4, 1e-16, "eraPvstar", "pmr", status);
7409 vvd(pmd, 0.2336024047e-5, 1e-16, "eraPvstar", "pmd", status);
7410 vvd(px, 0.74723, 1e-12, "eraPvstar", "px", status);
7411 vvd(rv, -21.6, 1e-11, "eraPvstar", "rv", status);
7412
7413 viv(j, 0, "eraPvstar", "j", status);
7414
7415}
7416
7417static void t_pvtob(int *status)
7418/*
7419** - - - - - - - -
7420** t _ p v t o b
7421** - - - - - - - -
7422**
7423** Test eraPvtob function.
7424**
7425** Returned:
7426** status int FALSE = success, TRUE = fail
7427**
7428** Called: eraPvtob, vvd
7429**
7430** This revision: 2013 October 2
7431*/
7432{
7433 double elong, phi, hm, xp, yp, sp, theta, pv[2][3];
7434
7435
7436 elong = 2.0;
7437 phi = 0.5;
7438 hm = 3000.0;
7439 xp = 1e-6;
7440 yp = -0.5e-6;
7441 sp = 1e-8;
7442 theta = 5.0;
7443
7444 eraPvtob(elong, phi, hm, xp, yp, sp, theta, pv);
7445
7446 vvd(pv[0][0], 4225081.367071159207, 1e-5,
7447 "eraPvtob", "p(1)", status);
7448 vvd(pv[0][1], 3681943.215856198144, 1e-5,
7449 "eraPvtob", "p(2)", status);
7450 vvd(pv[0][2], 3041149.399241260785, 1e-5,
7451 "eraPvtob", "p(3)", status);
7452 vvd(pv[1][0], -268.4915389365998787, 1e-9,
7453 "eraPvtob", "v(1)", status);
7454 vvd(pv[1][1], 308.0977983288903123, 1e-9,
7455 "eraPvtob", "v(2)", status);
7456 vvd(pv[1][2], 0, 0,
7457 "eraPvtob", "v(3)", status);
7458
7459}
7460
7461static void t_pvu(int *status)
7462/*
7463** - - - - - -
7464** t _ p v u
7465** - - - - - -
7466**
7467** Test eraPvu function.
7468**
7469** Returned:
7470** status int FALSE = success, TRUE = fail
7471**
7472** Called: eraPvu, vvd
7473**
7474** This revision: 2013 August 7
7475*/
7476{
7477 double pv[2][3], upv[2][3];
7478
7479
7480 pv[0][0] = 126668.5912743160734;
7481 pv[0][1] = 2136.792716839935565;
7482 pv[0][2] = -245251.2339876830229;
7483
7484 pv[1][0] = -0.4051854035740713039e-2;
7485 pv[1][1] = -0.6253919754866175788e-2;
7486 pv[1][2] = 0.1189353719774107615e-1;
7487
7488 eraPvu(2920.0, pv, upv);
7489
7490 vvd(upv[0][0], 126656.7598605317105, 1e-12,
7491 "eraPvu", "p1", status);
7492 vvd(upv[0][1], 2118.531271155726332, 1e-12,
7493 "eraPvu", "p2", status);
7494 vvd(upv[0][2], -245216.5048590656190, 1e-12,
7495 "eraPvu", "p3", status);
7496
7497 vvd(upv[1][0], -0.4051854035740713039e-2, 1e-12,
7498 "eraPvu", "v1", status);
7499 vvd(upv[1][1], -0.6253919754866175788e-2, 1e-12,
7500 "eraPvu", "v2", status);
7501 vvd(upv[1][2], 0.1189353719774107615e-1, 1e-12,
7502 "eraPvu", "v3", status);
7503
7504}
7505
7506static void t_pvup(int *status)
7507/*
7508** - - - - - - -
7509** t _ p v u p
7510** - - - - - - -
7511**
7512** Test eraPvup function.
7513**
7514** Returned:
7515** status int FALSE = success, TRUE = fail
7516**
7517** Called: eraPvup, vvd
7518**
7519** This revision: 2013 August 7
7520*/
7521{
7522 double pv[2][3], p[3];
7523
7524
7525 pv[0][0] = 126668.5912743160734;
7526 pv[0][1] = 2136.792716839935565;
7527 pv[0][2] = -245251.2339876830229;
7528
7529 pv[1][0] = -0.4051854035740713039e-2;
7530 pv[1][1] = -0.6253919754866175788e-2;
7531 pv[1][2] = 0.1189353719774107615e-1;
7532
7533 eraPvup(2920.0, pv, p);
7534
7535 vvd(p[0], 126656.7598605317105, 1e-12, "eraPvup", "1", status);
7536 vvd(p[1], 2118.531271155726332, 1e-12, "eraPvup", "2", status);
7537 vvd(p[2], -245216.5048590656190, 1e-12, "eraPvup", "3", status);
7538
7539}
7540
7541static void t_pvxpv(int *status)
7542/*
7543** - - - - - - - -
7544** t _ p v x p v
7545** - - - - - - - -
7546**
7547** Test eraPvxpv function.
7548**
7549** Returned:
7550** status int FALSE = success, TRUE = fail
7551**
7552** Called: eraPvxpv, vvd
7553**
7554** This revision: 2013 August 7
7555*/
7556{
7557 double a[2][3], b[2][3], axb[2][3];
7558
7559
7560 a[0][0] = 2.0;
7561 a[0][1] = 2.0;
7562 a[0][2] = 3.0;
7563
7564 a[1][0] = 6.0;
7565 a[1][1] = 0.0;
7566 a[1][2] = 4.0;
7567
7568 b[0][0] = 1.0;
7569 b[0][1] = 3.0;
7570 b[0][2] = 4.0;
7571
7572 b[1][0] = 0.0;
7573 b[1][1] = 2.0;
7574 b[1][2] = 8.0;
7575
7576 eraPvxpv(a, b, axb);
7577
7578 vvd(axb[0][0], -1.0, 1e-12, "eraPvxpv", "p1", status);
7579 vvd(axb[0][1], -5.0, 1e-12, "eraPvxpv", "p2", status);
7580 vvd(axb[0][2], 4.0, 1e-12, "eraPvxpv", "p3", status);
7581
7582 vvd(axb[1][0], -2.0, 1e-12, "eraPvxpv", "v1", status);
7583 vvd(axb[1][1], -36.0, 1e-12, "eraPvxpv", "v2", status);
7584 vvd(axb[1][2], 22.0, 1e-12, "eraPvxpv", "v3", status);
7585
7586}
7587
7588static void t_pxp(int *status)
7589/*
7590** - - - - - -
7591** t _ p x p
7592** - - - - - -
7593**
7594** Test eraPxp function.
7595**
7596** Returned:
7597** status int FALSE = success, TRUE = fail
7598**
7599** Called: eraPxp, vvd
7600**
7601** This revision: 2013 August 7
7602*/
7603{
7604 double a[3], b[3], axb[3];
7605
7606
7607 a[0] = 2.0;
7608 a[1] = 2.0;
7609 a[2] = 3.0;
7610
7611 b[0] = 1.0;
7612 b[1] = 3.0;
7613 b[2] = 4.0;
7614
7615 eraPxp(a, b, axb);
7616
7617 vvd(axb[0], -1.0, 1e-12, "eraPxp", "1", status);
7618 vvd(axb[1], -5.0, 1e-12, "eraPxp", "2", status);
7619 vvd(axb[2], 4.0, 1e-12, "eraPxp", "3", status);
7620
7621}
7622
7623static void t_refco(int *status)
7624/*
7625** - - - - - - - -
7626** t _ r e f c o
7627** - - - - - - - -
7628**
7629** Test eraRefco function.
7630**
7631** Returned:
7632** status int FALSE = success, TRUE = fail
7633**
7634** Called: eraRefco, vvd
7635**
7636** This revision: 2013 October 2
7637*/
7638{
7639 double phpa, tc, rh, wl, refa, refb;
7640
7641
7642 phpa = 800.0;
7643 tc = 10.0;
7644 rh = 0.9;
7645 wl = 0.4;
7646
7647 eraRefco(phpa, tc, rh, wl, &refa, &refb);
7648
7649 vvd(refa, 0.2264949956241415009e-3, 1e-15,
7650 "eraRefco", "refa", status);
7651 vvd(refb, -0.2598658261729343970e-6, 1e-18,
7652 "eraRefco", "refb", status);
7653
7654}
7655
7656static void t_rm2v(int *status)
7657/*
7658** - - - - - - -
7659** t _ r m 2 v
7660** - - - - - - -
7661**
7662** Test eraRm2v function.
7663**
7664** Returned:
7665** status int FALSE = success, TRUE = fail
7666**
7667** Called: eraRm2v, vvd
7668**
7669** This revision: 2013 August 7
7670*/
7671{
7672 double r[3][3], w[3];
7673
7674
7675 r[0][0] = 0.00;
7676 r[0][1] = -0.80;
7677 r[0][2] = -0.60;
7678
7679 r[1][0] = 0.80;
7680 r[1][1] = -0.36;
7681 r[1][2] = 0.48;
7682
7683 r[2][0] = 0.60;
7684 r[2][1] = 0.48;
7685 r[2][2] = -0.64;
7686
7687 eraRm2v(r, w);
7688
7689 vvd(w[0], 0.0, 1e-12, "eraRm2v", "1", status);
7690 vvd(w[1], 1.413716694115406957, 1e-12, "eraRm2v", "2", status);
7691 vvd(w[2], -1.884955592153875943, 1e-12, "eraRm2v", "3", status);
7692
7693}
7694
7695static void t_rv2m(int *status)
7696/*
7697** - - - - - - -
7698** t _ r v 2 m
7699** - - - - - - -
7700**
7701** Test eraRv2m function.
7702**
7703** Returned:
7704** status int FALSE = success, TRUE = fail
7705**
7706** Called: eraRv2m, vvd
7707**
7708** This revision: 2013 August 7
7709*/
7710{
7711 double w[3], r[3][3];
7712
7713
7714 w[0] = 0.0;
7715 w[1] = 1.41371669;
7716 w[2] = -1.88495559;
7717
7718 eraRv2m(w, r);
7719
7720 vvd(r[0][0], -0.7071067782221119905, 1e-14, "eraRv2m", "11", status);
7721 vvd(r[0][1], -0.5656854276809129651, 1e-14, "eraRv2m", "12", status);
7722 vvd(r[0][2], -0.4242640700104211225, 1e-14, "eraRv2m", "13", status);
7723
7724 vvd(r[1][0], 0.5656854276809129651, 1e-14, "eraRv2m", "21", status);
7725 vvd(r[1][1], -0.0925483394532274246, 1e-14, "eraRv2m", "22", status);
7726 vvd(r[1][2], -0.8194112531408833269, 1e-14, "eraRv2m", "23", status);
7727
7728 vvd(r[2][0], 0.4242640700104211225, 1e-14, "eraRv2m", "31", status);
7729 vvd(r[2][1], -0.8194112531408833269, 1e-14, "eraRv2m", "32", status);
7730 vvd(r[2][2], 0.3854415612311154341, 1e-14, "eraRv2m", "33", status);
7731
7732}
7733
7734static void t_rx(int *status)
7735/*
7736** - - - - -
7737** t _ r x
7738** - - - - -
7739**
7740** Test eraRx function.
7741**
7742** Returned:
7743** status int FALSE = success, TRUE = fail
7744**
7745** Called: eraRx, vvd
7746**
7747** This revision: 2013 August 7
7748*/
7749{
7750 double phi, r[3][3];
7751
7752
7753 phi = 0.3456789;
7754
7755 r[0][0] = 2.0;
7756 r[0][1] = 3.0;
7757 r[0][2] = 2.0;
7758
7759 r[1][0] = 3.0;
7760 r[1][1] = 2.0;
7761 r[1][2] = 3.0;
7762
7763 r[2][0] = 3.0;
7764 r[2][1] = 4.0;
7765 r[2][2] = 5.0;
7766
7767 eraRx(phi, r);
7768
7769 vvd(r[0][0], 2.0, 0.0, "eraRx", "11", status);
7770 vvd(r[0][1], 3.0, 0.0, "eraRx", "12", status);
7771 vvd(r[0][2], 2.0, 0.0, "eraRx", "13", status);
7772
7773 vvd(r[1][0], 3.839043388235612460, 1e-12, "eraRx", "21", status);
7774 vvd(r[1][1], 3.237033249594111899, 1e-12, "eraRx", "22", status);
7775 vvd(r[1][2], 4.516714379005982719, 1e-12, "eraRx", "23", status);
7776
7777 vvd(r[2][0], 1.806030415924501684, 1e-12, "eraRx", "31", status);
7778 vvd(r[2][1], 3.085711545336372503, 1e-12, "eraRx", "32", status);
7779 vvd(r[2][2], 3.687721683977873065, 1e-12, "eraRx", "33", status);
7780
7781}
7782
7783static void t_rxp(int *status)
7784/*
7785** - - - - - -
7786** t _ r x p
7787** - - - - - -
7788**
7789** Test eraRxp function.
7790**
7791** Returned:
7792** status int FALSE = success, TRUE = fail
7793**
7794** Called: eraRxp, vvd
7795**
7796** This revision: 2013 August 7
7797*/
7798{
7799 double r[3][3], p[3], rp[3];
7800
7801
7802 r[0][0] = 2.0;
7803 r[0][1] = 3.0;
7804 r[0][2] = 2.0;
7805
7806 r[1][0] = 3.0;
7807 r[1][1] = 2.0;
7808 r[1][2] = 3.0;
7809
7810 r[2][0] = 3.0;
7811 r[2][1] = 4.0;
7812 r[2][2] = 5.0;
7813
7814 p[0] = 0.2;
7815 p[1] = 1.5;
7816 p[2] = 0.1;
7817
7818 eraRxp(r, p, rp);
7819
7820 vvd(rp[0], 5.1, 1e-12, "eraRxp", "1", status);
7821 vvd(rp[1], 3.9, 1e-12, "eraRxp", "2", status);
7822 vvd(rp[2], 7.1, 1e-12, "eraRxp", "3", status);
7823
7824}
7825
7826static void t_rxpv(int *status)
7827/*
7828** - - - - - - -
7829** t _ r x p v
7830** - - - - - - -
7831**
7832** Test eraRxpv function.
7833**
7834** Returned:
7835** status int FALSE = success, TRUE = fail
7836**
7837** Called: eraRxpv, vvd
7838**
7839** This revision: 2013 August 7
7840*/
7841{
7842 double r[3][3], pv[2][3], rpv[2][3];
7843
7844
7845 r[0][0] = 2.0;
7846 r[0][1] = 3.0;
7847 r[0][2] = 2.0;
7848
7849 r[1][0] = 3.0;
7850 r[1][1] = 2.0;
7851 r[1][2] = 3.0;
7852
7853 r[2][0] = 3.0;
7854 r[2][1] = 4.0;
7855 r[2][2] = 5.0;
7856
7857 pv[0][0] = 0.2;
7858 pv[0][1] = 1.5;
7859 pv[0][2] = 0.1;
7860
7861 pv[1][0] = 1.5;
7862 pv[1][1] = 0.2;
7863 pv[1][2] = 0.1;
7864
7865 eraRxpv(r, pv, rpv);
7866
7867 vvd(rpv[0][0], 5.1, 1e-12, "eraRxpv", "11", status);
7868 vvd(rpv[1][0], 3.8, 1e-12, "eraRxpv", "12", status);
7869
7870 vvd(rpv[0][1], 3.9, 1e-12, "eraRxpv", "21", status);
7871 vvd(rpv[1][1], 5.2, 1e-12, "eraRxpv", "22", status);
7872
7873 vvd(rpv[0][2], 7.1, 1e-12, "eraRxpv", "31", status);
7874 vvd(rpv[1][2], 5.8, 1e-12, "eraRxpv", "32", status);
7875
7876}
7877
7878static void t_rxr(int *status)
7879/*
7880** - - - - - -
7881** t _ r x r
7882** - - - - - -
7883**
7884** Test eraRxr function.
7885**
7886** Returned:
7887** status int FALSE = success, TRUE = fail
7888**
7889** Called: eraRxr, vvd
7890**
7891** This revision: 2013 August 7
7892*/
7893{
7894 double a[3][3], b[3][3], atb[3][3];
7895
7896
7897 a[0][0] = 2.0;
7898 a[0][1] = 3.0;
7899 a[0][2] = 2.0;
7900
7901 a[1][0] = 3.0;
7902 a[1][1] = 2.0;
7903 a[1][2] = 3.0;
7904
7905 a[2][0] = 3.0;
7906 a[2][1] = 4.0;
7907 a[2][2] = 5.0;
7908
7909 b[0][0] = 1.0;
7910 b[0][1] = 2.0;
7911 b[0][2] = 2.0;
7912
7913 b[1][0] = 4.0;
7914 b[1][1] = 1.0;
7915 b[1][2] = 1.0;
7916
7917 b[2][0] = 3.0;
7918 b[2][1] = 0.0;
7919 b[2][2] = 1.0;
7920
7921 eraRxr(a, b, atb);
7922
7923 vvd(atb[0][0], 20.0, 1e-12, "eraRxr", "11", status);
7924 vvd(atb[0][1], 7.0, 1e-12, "eraRxr", "12", status);
7925 vvd(atb[0][2], 9.0, 1e-12, "eraRxr", "13", status);
7926
7927 vvd(atb[1][0], 20.0, 1e-12, "eraRxr", "21", status);
7928 vvd(atb[1][1], 8.0, 1e-12, "eraRxr", "22", status);
7929 vvd(atb[1][2], 11.0, 1e-12, "eraRxr", "23", status);
7930
7931 vvd(atb[2][0], 34.0, 1e-12, "eraRxr", "31", status);
7932 vvd(atb[2][1], 10.0, 1e-12, "eraRxr", "32", status);
7933 vvd(atb[2][2], 15.0, 1e-12, "eraRxr", "33", status);
7934
7935}
7936
7937static void t_ry(int *status)
7938/*
7939** - - - - -
7940** t _ r y
7941** - - - - -
7942**
7943** Test eraRy function.
7944**
7945** Returned:
7946** status int FALSE = success, TRUE = fail
7947**
7948** Called: eraRy, vvd
7949**
7950** This revision: 2013 August 7
7951*/
7952{
7953 double theta, r[3][3];
7954
7955
7956 theta = 0.3456789;
7957
7958 r[0][0] = 2.0;
7959 r[0][1] = 3.0;
7960 r[0][2] = 2.0;
7961
7962 r[1][0] = 3.0;
7963 r[1][1] = 2.0;
7964 r[1][2] = 3.0;
7965
7966 r[2][0] = 3.0;
7967 r[2][1] = 4.0;
7968 r[2][2] = 5.0;
7969
7970 eraRy(theta, r);
7971
7972 vvd(r[0][0], 0.8651847818978159930, 1e-12, "eraRy", "11", status);
7973 vvd(r[0][1], 1.467194920539316554, 1e-12, "eraRy", "12", status);
7974 vvd(r[0][2], 0.1875137911274457342, 1e-12, "eraRy", "13", status);
7975
7976 vvd(r[1][0], 3, 1e-12, "eraRy", "21", status);
7977 vvd(r[1][1], 2, 1e-12, "eraRy", "22", status);
7978 vvd(r[1][2], 3, 1e-12, "eraRy", "23", status);
7979
7980 vvd(r[2][0], 3.500207892850427330, 1e-12, "eraRy", "31", status);
7981 vvd(r[2][1], 4.779889022262298150, 1e-12, "eraRy", "32", status);
7982 vvd(r[2][2], 5.381899160903798712, 1e-12, "eraRy", "33", status);
7983
7984}
7985
7986static void t_rz(int *status)
7987/*
7988** - - - - -
7989** t _ r z
7990** - - - - -
7991**
7992** Test eraRz function.
7993**
7994** Returned:
7995** status int FALSE = success, TRUE = fail
7996**
7997** Called: eraRz, vvd
7998**
7999** This revision: 2013 August 7
8000*/
8001{
8002 double psi, r[3][3];
8003
8004
8005 psi = 0.3456789;
8006
8007 r[0][0] = 2.0;
8008 r[0][1] = 3.0;
8009 r[0][2] = 2.0;
8010
8011 r[1][0] = 3.0;
8012 r[1][1] = 2.0;
8013 r[1][2] = 3.0;
8014
8015 r[2][0] = 3.0;
8016 r[2][1] = 4.0;
8017 r[2][2] = 5.0;
8018
8019 eraRz(psi, r);
8020
8021 vvd(r[0][0], 2.898197754208926769, 1e-12, "eraRz", "11", status);
8022 vvd(r[0][1], 3.500207892850427330, 1e-12, "eraRz", "12", status);
8023 vvd(r[0][2], 2.898197754208926769, 1e-12, "eraRz", "13", status);
8024
8025 vvd(r[1][0], 2.144865911309686813, 1e-12, "eraRz", "21", status);
8026 vvd(r[1][1], 0.865184781897815993, 1e-12, "eraRz", "22", status);
8027 vvd(r[1][2], 2.144865911309686813, 1e-12, "eraRz", "23", status);
8028
8029 vvd(r[2][0], 3.0, 1e-12, "eraRz", "31", status);
8030 vvd(r[2][1], 4.0, 1e-12, "eraRz", "32", status);
8031 vvd(r[2][2], 5.0, 1e-12, "eraRz", "33", status);
8032
8033}
8034
8035static void t_s00a(int *status)
8036/*
8037** - - - - - - -
8038** t _ s 0 0 a
8039** - - - - - - -
8040**
8041** Test eraS00a function.
8042**
8043** Returned:
8044** status int FALSE = success, TRUE = fail
8045**
8046** Called: eraS00a, vvd
8047**
8048** This revision: 2013 August 7
8049*/
8050{
8051 double s;
8052
8053
8054 s = eraS00a(2400000.5, 52541.0);
8055
8056 vvd(s, -0.1340684448919163584e-7, 1e-18, "eraS00a", "", status);
8057
8058}
8059
8060static void t_s00b(int *status)
8061/*
8062** - - - - - - -
8063** t _ s 0 0 b
8064** - - - - - - -
8065**
8066** Test eraS00b function.
8067**
8068** Returned:
8069** status int FALSE = success, TRUE = fail
8070**
8071** Called: eraS00b, vvd
8072**
8073** This revision: 2013 August 7
8074*/
8075{
8076 double s;
8077
8078
8079 s = eraS00b(2400000.5, 52541.0);
8080
8081 vvd(s, -0.1340695782951026584e-7, 1e-18, "eraS00b", "", status);
8082
8083}
8084
8085static void t_s00(int *status)
8086/*
8087** - - - - - -
8088** t _ s 0 0
8089** - - - - - -
8090**
8091** Test eraS00 function.
8092**
8093** Returned:
8094** status int FALSE = success, TRUE = fail
8095**
8096** Called: eraS00, vvd
8097**
8098** This revision: 2013 August 7
8099*/
8100{
8101 double x, y, s;
8102
8103
8104 x = 0.5791308486706011000e-3;
8105 y = 0.4020579816732961219e-4;
8106
8107 s = eraS00(2400000.5, 53736.0, x, y);
8108
8109 vvd(s, -0.1220036263270905693e-7, 1e-18, "eraS00", "", status);
8110
8111}
8112
8113static void t_s06a(int *status)
8114/*
8115** - - - - - - -
8116** t _ s 0 6 a
8117** - - - - - - -
8118**
8119** Test eraS06a function.
8120**
8121** Returned:
8122** status int FALSE = success, TRUE = fail
8123**
8124** Called: eraS06a, vvd
8125**
8126** This revision: 2013 August 7
8127*/
8128{
8129 double s;
8130
8131
8132 s = eraS06a(2400000.5, 52541.0);
8133
8134 vvd(s, -0.1340680437291812383e-7, 1e-18, "eraS06a", "", status);
8135
8136}
8137
8138static void t_s06(int *status)
8139/*
8140** - - - - - -
8141** t _ s 0 6
8142** - - - - - -
8143**
8144** Test eraS06 function.
8145**
8146** Returned:
8147** status int FALSE = success, TRUE = fail
8148**
8149** Called: eraS06, vvd
8150**
8151** This revision: 2013 August 7
8152*/
8153{
8154 double x, y, s;
8155
8156
8157 x = 0.5791308486706011000e-3;
8158 y = 0.4020579816732961219e-4;
8159
8160 s = eraS06(2400000.5, 53736.0, x, y);
8161
8162 vvd(s, -0.1220032213076463117e-7, 1e-18, "eraS06", "", status);
8163
8164}
8165
8166static void t_s2c(int *status)
8167/*
8168** - - - - - -
8169** t _ s 2 c
8170** - - - - - -
8171**
8172** Test eraS2c function.
8173**
8174** Returned:
8175** status int FALSE = success, TRUE = fail
8176**
8177** Called: eraS2c, vvd
8178**
8179** This revision: 2013 August 7
8180*/
8181{
8182 double c[3];
8183
8184
8185 eraS2c(3.0123, -0.999, c);
8186
8187 vvd(c[0], -0.5366267667260523906, 1e-12, "eraS2c", "1", status);
8188 vvd(c[1], 0.0697711109765145365, 1e-12, "eraS2c", "2", status);
8189 vvd(c[2], -0.8409302618566214041, 1e-12, "eraS2c", "3", status);
8190
8191}
8192
8193static void t_s2p(int *status)
8194/*
8195** - - - - - -
8196** t _ s 2 p
8197** - - - - - -
8198**
8199** Test eraS2p function.
8200**
8201** Returned:
8202** status int FALSE = success, TRUE = fail
8203**
8204** Called: eraS2p, vvd
8205**
8206** This revision: 2013 August 7
8207*/
8208{
8209 double p[3];
8210
8211
8212 eraS2p(-3.21, 0.123, 0.456, p);
8213
8214 vvd(p[0], -0.4514964673880165228, 1e-12, "eraS2p", "x", status);
8215 vvd(p[1], 0.0309339427734258688, 1e-12, "eraS2p", "y", status);
8216 vvd(p[2], 0.0559466810510877933, 1e-12, "eraS2p", "z", status);
8217
8218}
8219
8220static void t_s2pv(int *status)
8221/*
8222** - - - - - - -
8223** t _ s 2 p v
8224** - - - - - - -
8225**
8226** Test eraS2pv function.
8227**
8228** Returned:
8229** status int FALSE = success, TRUE = fail
8230**
8231** Called: eraS2pv, vvd
8232**
8233** This revision: 2013 August 7
8234*/
8235{
8236 double pv[2][3];
8237
8238
8239 eraS2pv(-3.21, 0.123, 0.456, -7.8e-6, 9.01e-6, -1.23e-5, pv);
8240
8241 vvd(pv[0][0], -0.4514964673880165228, 1e-12, "eraS2pv", "x", status);
8242 vvd(pv[0][1], 0.0309339427734258688, 1e-12, "eraS2pv", "y", status);
8243 vvd(pv[0][2], 0.0559466810510877933, 1e-12, "eraS2pv", "z", status);
8244
8245 vvd(pv[1][0], 0.1292270850663260170e-4, 1e-16,
8246 "eraS2pv", "vx", status);
8247 vvd(pv[1][1], 0.2652814182060691422e-5, 1e-16,
8248 "eraS2pv", "vy", status);
8249 vvd(pv[1][2], 0.2568431853930292259e-5, 1e-16,
8250 "eraS2pv", "vz", status);
8251
8252}
8253
8254static void t_s2xpv(int *status)
8255/*
8256** - - - - - - - -
8257** t _ s 2 x p v
8258** - - - - - - - -
8259**
8260** Test eraS2xpv function.
8261**
8262** Returned:
8263** status int FALSE = success, TRUE = fail
8264**
8265** Called: eraS2xpv, vvd
8266**
8267** This revision: 2013 August 7
8268*/
8269{
8270 double s1, s2, pv[2][3], spv[2][3];
8271
8272
8273 s1 = 2.0;
8274 s2 = 3.0;
8275
8276 pv[0][0] = 0.3;
8277 pv[0][1] = 1.2;
8278 pv[0][2] = -2.5;
8279
8280 pv[1][0] = 0.5;
8281 pv[1][1] = 2.3;
8282 pv[1][2] = -0.4;
8283
8284 eraS2xpv(s1, s2, pv, spv);
8285
8286 vvd(spv[0][0], 0.6, 1e-12, "eraS2xpv", "p1", status);
8287 vvd(spv[0][1], 2.4, 1e-12, "eraS2xpv", "p2", status);
8288 vvd(spv[0][2], -5.0, 1e-12, "eraS2xpv", "p3", status);
8289
8290 vvd(spv[1][0], 1.5, 1e-12, "eraS2xpv", "v1", status);
8291 vvd(spv[1][1], 6.9, 1e-12, "eraS2xpv", "v2", status);
8292 vvd(spv[1][2], -1.2, 1e-12, "eraS2xpv", "v3", status);
8293
8294}
8295
8296static void t_sepp(int *status)
8297/*
8298** - - - - - - -
8299** t _ s e p p
8300** - - - - - - -
8301**
8302** Test eraSepp function.
8303**
8304** Returned:
8305** status int FALSE = success, TRUE = fail
8306**
8307** Called: eraSepp, vvd
8308**
8309** This revision: 2013 August 7
8310*/
8311{
8312 double a[3], b[3], s;
8313
8314
8315 a[0] = 1.0;
8316 a[1] = 0.1;
8317 a[2] = 0.2;
8318
8319 b[0] = -3.0;
8320 b[1] = 1e-3;
8321 b[2] = 0.2;
8322
8323 s = eraSepp(a, b);
8324
8325 vvd(s, 2.860391919024660768, 1e-12, "eraSepp", "", status);
8326
8327}
8328
8329static void t_seps(int *status)
8330/*
8331** - - - - - - -
8332** t _ s e p s
8333** - - - - - - -
8334**
8335** Test eraSeps function.
8336**
8337** Returned:
8338** status int FALSE = success, TRUE = fail
8339**
8340** Called: eraSeps, vvd
8341**
8342** This revision: 2013 August 7
8343*/
8344{
8345 double al, ap, bl, bp, s;
8346
8347
8348 al = 1.0;
8349 ap = 0.1;
8350
8351 bl = 0.2;
8352 bp = -3.0;
8353
8354 s = eraSeps(al, ap, bl, bp);
8355
8356 vvd(s, 2.346722016996998842, 1e-14, "eraSeps", "", status);
8357
8358}
8359
8360static void t_sp00(int *status)
8361/*
8362** - - - - - - -
8363** t _ s p 0 0
8364** - - - - - - -
8365**
8366** Test eraSp00 function.
8367**
8368** Returned:
8369** status int FALSE = success, TRUE = fail
8370**
8371** Called: eraSp00, vvd
8372**
8373** This revision: 2013 August 7
8374*/
8375{
8376 vvd(eraSp00(2400000.5, 52541.0),
8377 -0.6216698469981019309e-11, 1e-12, "eraSp00", "", status);
8378
8379}
8380
8381static void t_starpm(int *status)
8382/*
8383** - - - - - - - - -
8384** t _ s t a r p m
8385** - - - - - - - - -
8386**
8387** Test eraStarpm function.
8388**
8389** Returned:
8390** status int FALSE = success, TRUE = fail
8391**
8392** Called: eraStarpm, vvd, viv
8393**
8394** This revision: 2013 August 7
8395*/
8396{
8397 double ra1, dec1, pmr1, pmd1, px1, rv1;
8398 double ra2, dec2, pmr2, pmd2, px2, rv2;
8399 int j;
8400
8401
8402 ra1 = 0.01686756;
8403 dec1 = -1.093989828;
8404 pmr1 = -1.78323516e-5;
8405 pmd1 = 2.336024047e-6;
8406 px1 = 0.74723;
8407 rv1 = -21.6;
8408
8409 j = eraStarpm(ra1, dec1, pmr1, pmd1, px1, rv1,
8410 2400000.5, 50083.0, 2400000.5, 53736.0,
8411 &ra2, &dec2, &pmr2, &pmd2, &px2, &rv2);
8412
8413 vvd(ra2, 0.01668919069414242368, 1e-13,
8414 "eraStarpm", "ra", status);
8415 vvd(dec2, -1.093966454217127879, 1e-13,
8416 "eraStarpm", "dec", status);
8417 vvd(pmr2, -0.1783662682155932702e-4, 1e-17,
8418 "eraStarpm", "pmr", status);
8419 vvd(pmd2, 0.2338092915987603664e-5, 1e-17,
8420 "eraStarpm", "pmd", status);
8421 vvd(px2, 0.7473533835323493644, 1e-13,
8422 "eraStarpm", "px", status);
8423 vvd(rv2, -21.59905170476860786, 1e-11,
8424 "eraStarpm", "rv", status);
8425
8426 viv(j, 0, "eraStarpm", "j", status);
8427
8428}
8429
8430static void t_starpv(int *status)
8431/*
8432** - - - - - - - - -
8433** t _ s t a r p v
8434** - - - - - - - - -
8435**
8436** Test eraStarpv function.
8437**
8438** Returned:
8439** status int FALSE = success, TRUE = fail
8440**
8441** Called: eraStarpv, vvd, viv
8442**
8443** This revision: 2013 August 7
8444*/
8445{
8446 double ra, dec, pmr, pmd, px, rv, pv[2][3];
8447 int j;
8448
8449
8450 ra = 0.01686756;
8451 dec = -1.093989828;
8452 pmr = -1.78323516e-5;
8453 pmd = 2.336024047e-6;
8454 px = 0.74723;
8455 rv = -21.6;
8456
8457 j = eraStarpv(ra, dec, pmr, pmd, px, rv, pv);
8458
8459 vvd(pv[0][0], 126668.5912743160601, 1e-10,
8460 "eraStarpv", "11", status);
8461 vvd(pv[0][1], 2136.792716839935195, 1e-12,
8462 "eraStarpv", "12", status);
8463 vvd(pv[0][2], -245251.2339876830091, 1e-10,
8464 "eraStarpv", "13", status);
8465
8466 vvd(pv[1][0], -0.4051854035740712739e-2, 1e-13,
8467 "eraStarpv", "21", status);
8468 vvd(pv[1][1], -0.6253919754866173866e-2, 1e-15,
8469 "eraStarpv", "22", status);
8470 vvd(pv[1][2], 0.1189353719774107189e-1, 1e-13,
8471 "eraStarpv", "23", status);
8472
8473 viv(j, 0, "eraStarpv", "j", status);
8474
8475}
8476
8477static void t_sxp(int *status)
8478/*
8479** - - - - - -
8480** t _ s x p
8481** - - - - - -
8482**
8483** Test eraSxp function.
8484**
8485** Returned:
8486** status int FALSE = success, TRUE = fail
8487**
8488** Called: eraSxp, vvd
8489**
8490** This revision: 2013 August 7
8491*/
8492{
8493 double s, p[3], sp[3];
8494
8495
8496 s = 2.0;
8497
8498 p[0] = 0.3;
8499 p[1] = 1.2;
8500 p[2] = -2.5;
8501
8502 eraSxp(s, p, sp);
8503
8504 vvd(sp[0], 0.6, 0.0, "eraSxp", "1", status);
8505 vvd(sp[1], 2.4, 0.0, "eraSxp", "2", status);
8506 vvd(sp[2], -5.0, 0.0, "eraSxp", "3", status);
8507
8508}
8509
8510
8511static void t_sxpv(int *status)
8512/*
8513** - - - - - - -
8514** t _ s x p v
8515** - - - - - - -
8516**
8517** Test eraSxpv function.
8518**
8519** Returned:
8520** status int FALSE = success, TRUE = fail
8521**
8522** Called: eraSxpv, vvd
8523**
8524** This revision: 2013 August 7
8525*/
8526{
8527 double s, pv[2][3], spv[2][3];
8528
8529
8530 s = 2.0;
8531
8532 pv[0][0] = 0.3;
8533 pv[0][1] = 1.2;
8534 pv[0][2] = -2.5;
8535
8536 pv[1][0] = 0.5;
8537 pv[1][1] = 3.2;
8538 pv[1][2] = -0.7;
8539
8540 eraSxpv(s, pv, spv);
8541
8542 vvd(spv[0][0], 0.6, 0.0, "eraSxpv", "p1", status);
8543 vvd(spv[0][1], 2.4, 0.0, "eraSxpv", "p2", status);
8544 vvd(spv[0][2], -5.0, 0.0, "eraSxpv", "p3", status);
8545
8546 vvd(spv[1][0], 1.0, 0.0, "eraSxpv", "v1", status);
8547 vvd(spv[1][1], 6.4, 0.0, "eraSxpv", "v2", status);
8548 vvd(spv[1][2], -1.4, 0.0, "eraSxpv", "v3", status);
8549
8550}
8551
8552static void t_taitt(int *status)
8553/*
8554** - - - - - - - -
8555** t _ t a i t t
8556** - - - - - - - -
8557**
8558** Test eraTaitt function.
8559**
8560** Returned:
8561** status int FALSE = success, TRUE = fail
8562**
8563** Called: eraTaitt, vvd, viv
8564**
8565** This revision: 2013 August 7
8566*/
8567{
8568 double t1, t2;
8569 int j;
8570
8571
8572 j = eraTaitt(2453750.5, 0.892482639, &t1, &t2);
8573
8574 vvd(t1, 2453750.5, 1e-6, "eraTaitt", "t1", status);
8575 vvd(t2, 0.892855139, 1e-12, "eraTaitt", "t2", status);
8576 viv(j, 0, "eraTaitt", "j", status);
8577
8578}
8579
8580static void t_taiut1(int *status)
8581/*
8582** - - - - - - - - -
8583** t _ t a i u t 1
8584** - - - - - - - - -
8585**
8586** Test eraTaiut1 function.
8587**
8588** Returned:
8589** status int FALSE = success, TRUE = fail
8590**
8591** Called: eraTaiut1, vvd, viv
8592**
8593** This revision: 2013 August 7
8594*/
8595{
8596 double u1, u2;
8597 int j;
8598
8599
8600 j = eraTaiut1(2453750.5, 0.892482639, -32.6659, &u1, &u2);
8601
8602 vvd(u1, 2453750.5, 1e-6, "eraTaiut1", "u1", status);
8603 vvd(u2, 0.8921045614537037037, 1e-12, "eraTaiut1", "u2", status);
8604 viv(j, 0, "eraTaiut1", "j", status);
8605
8606}
8607
8608static void t_taiutc(int *status)
8609/*
8610** - - - - - - - - -
8611** t _ t a i u t c
8612** - - - - - - - - -
8613**
8614** Test eraTaiutc function.
8615**
8616** Returned:
8617** status LOGICAL TRUE = success, FALSE = fail
8618**
8619** Called: eraTaiutc, vvd, viv
8620**
8621** This revision: 2013 October 3
8622*/
8623{
8624 double u1, u2;
8625 int j;
8626
8627
8628 j = eraTaiutc(2453750.5, 0.892482639, &u1, &u2);
8629
8630 vvd(u1, 2453750.5, 1e-6, "eraTaiutc", "u1", status);
8631 vvd(u2, 0.8921006945555555556, 1e-12, "eraTaiutc", "u2", status);
8632 viv(j, 0, "eraTaiutc", "j", status);
8633
8634}
8635
8636static void t_tcbtdb(int *status)
8637/*
8638** - - - - - - - - -
8639** t _ t c b t d b
8640** - - - - - - - - -
8641**
8642** Test eraTcbtdb function.
8643**
8644** Returned:
8645** status int FALSE = success, TRUE = fail
8646**
8647** Called: eraTcbtdb, vvd, viv
8648**
8649** This revision: 2013 August 7
8650*/
8651{
8652 double b1, b2;
8653 int j;
8654
8655
8656 j = eraTcbtdb(2453750.5, 0.893019599, &b1, &b2);
8657
8658 vvd(b1, 2453750.5, 1e-6, "eraTcbtdb", "b1", status);
8659 vvd(b2, 0.8928551362746343397, 1e-12, "eraTcbtdb", "b2", status);
8660 viv(j, 0, "eraTcbtdb", "j", status);
8661
8662}
8663
8664static void t_tcgtt(int *status)
8665/*
8666** - - - - - - - -
8667** t _ t c g t t
8668** - - - - - - - -
8669**
8670** Test eraTcgtt function.
8671**
8672** Returned:
8673** status int FALSE = success, TRUE = fail
8674**
8675** Called: eraTcgtt, vvd, viv
8676**
8677** This revision: 2013 August 7
8678*/
8679{
8680 double t1, t2;
8681 int j;
8682
8683
8684 j = eraTcgtt(2453750.5, 0.892862531, &t1, &t2);
8685
8686 vvd(t1, 2453750.5, 1e-6, "eraTcgtt", "t1", status);
8687 vvd(t2, 0.8928551387488816828, 1e-12, "eraTcgtt", "t2", status);
8688 viv(j, 0, "eraTcgtt", "j", status);
8689
8690}
8691
8692static void t_tdbtcb(int *status)
8693/*
8694** - - - - - - - - -
8695** t _ t d b t c b
8696** - - - - - - - - -
8697**
8698** Test eraTdbtcb function.
8699**
8700** Returned:
8701** status int FALSE = success, TRUE = fail
8702**
8703** Called: eraTdbtcb, vvd, viv
8704**
8705** This revision: 2013 August 7
8706*/
8707{
8708 double b1, b2;
8709 int j;
8710
8711
8712 j = eraTdbtcb(2453750.5, 0.892855137, &b1, &b2);
8713
8714 vvd( b1, 2453750.5, 1e-6, "eraTdbtcb", "b1", status);
8715 vvd( b2, 0.8930195997253656716, 1e-12, "eraTdbtcb", "b2", status);
8716 viv(j, 0, "eraTdbtcb", "j", status);
8717
8718}
8719
8720static void t_tdbtt(int *status)
8721/*
8722** - - - - - - - -
8723** t _ t d b t t
8724** - - - - - - - -
8725**
8726** Test eraTdbtt function.
8727**
8728** Returned:
8729** status int FALSE = success, TRUE = fail
8730**
8731** Called: eraTdbtt, vvd, viv
8732**
8733** This revision: 2013 August 7
8734*/
8735{
8736 double t1, t2;
8737 int j;
8738
8739
8740 j = eraTdbtt(2453750.5, 0.892855137, -0.000201, &t1, &t2);
8741
8742 vvd(t1, 2453750.5, 1e-6, "eraTdbtt", "t1", status);
8743 vvd(t2, 0.8928551393263888889, 1e-12, "eraTdbtt", "t2", status);
8744 viv(j, 0, "eraTdbtt", "j", status);
8745
8746}
8747
8748static void t_tf2a(int *status)
8749/*
8750** - - - - - - -
8751** t _ t f 2 a
8752** - - - - - - -
8753**
8754** Test eraTf2a function.
8755**
8756** Returned:
8757** status int FALSE = success, TRUE = fail
8758**
8759** Called: eraTf2a, vvd, viv
8760**
8761** This revision: 2013 August 7
8762*/
8763{
8764 double a;
8765 int j;
8766
8767
8768 j = eraTf2a('+', 4, 58, 20.2, &a);
8769
8770 vvd(a, 1.301739278189537429, 1e-12, "eraTf2a", "a", status);
8771 viv(j, 0, "eraTf2a", "j", status);
8772
8773}
8774
8775static void t_tf2d(int *status)
8776/*
8777** - - - - - - -
8778** t _ t f 2 d
8779** - - - - - - -
8780**
8781** Test eraTf2d function.
8782**
8783** Returned:
8784** status int FALSE = success, TRUE = fail
8785**
8786** Called: eraTf2d, vvd, viv
8787**
8788** This revision: 2013 August 7
8789*/
8790{
8791 double d;
8792 int j;
8793
8794
8795 j = eraTf2d(' ', 23, 55, 10.9, &d);
8796
8797 vvd(d, 0.9966539351851851852, 1e-12, "eraTf2d", "d", status);
8798 viv(j, 0, "eraTf2d", "j", status);
8799
8800}
8801
8802static void t_tr(int *status)
8803/*
8804** - - - - -
8805** t _ t r
8806** - - - - -
8807**
8808** Test eraTr function.
8809**
8810** Returned:
8811** status int FALSE = success, TRUE = fail
8812**
8813** Called: eraTr, vvd
8814**
8815** This revision: 2013 August 7
8816*/
8817{
8818 double r[3][3], rt[3][3];
8819
8820
8821 r[0][0] = 2.0;
8822 r[0][1] = 3.0;
8823 r[0][2] = 2.0;
8824
8825 r[1][0] = 3.0;
8826 r[1][1] = 2.0;
8827 r[1][2] = 3.0;
8828
8829 r[2][0] = 3.0;
8830 r[2][1] = 4.0;
8831 r[2][2] = 5.0;
8832
8833 eraTr(r, rt);
8834
8835 vvd(rt[0][0], 2.0, 0.0, "eraTr", "11", status);
8836 vvd(rt[0][1], 3.0, 0.0, "eraTr", "12", status);
8837 vvd(rt[0][2], 3.0, 0.0, "eraTr", "13", status);
8838
8839 vvd(rt[1][0], 3.0, 0.0, "eraTr", "21", status);
8840 vvd(rt[1][1], 2.0, 0.0, "eraTr", "22", status);
8841 vvd(rt[1][2], 4.0, 0.0, "eraTr", "23", status);
8842
8843 vvd(rt[2][0], 2.0, 0.0, "eraTr", "31", status);
8844 vvd(rt[2][1], 3.0, 0.0, "eraTr", "32", status);
8845 vvd(rt[2][2], 5.0, 0.0, "eraTr", "33", status);
8846
8847}
8848
8849static void t_trxp(int *status)
8850/*
8851** - - - - - - -
8852** t _ t r x p
8853** - - - - - - -
8854**
8855** Test eraTrxp function.
8856**
8857** Returned:
8858** status int FALSE = success, TRUE = fail
8859**
8860** Called: eraTrxp, vvd
8861**
8862** This revision: 2013 August 7
8863*/
8864{
8865 double r[3][3], p[3], trp[3];
8866
8867
8868 r[0][0] = 2.0;
8869 r[0][1] = 3.0;
8870 r[0][2] = 2.0;
8871
8872 r[1][0] = 3.0;
8873 r[1][1] = 2.0;
8874 r[1][2] = 3.0;
8875
8876 r[2][0] = 3.0;
8877 r[2][1] = 4.0;
8878 r[2][2] = 5.0;
8879
8880 p[0] = 0.2;
8881 p[1] = 1.5;
8882 p[2] = 0.1;
8883
8884 eraTrxp(r, p, trp);
8885
8886 vvd(trp[0], 5.2, 1e-12, "eraTrxp", "1", status);
8887 vvd(trp[1], 4.0, 1e-12, "eraTrxp", "2", status);
8888 vvd(trp[2], 5.4, 1e-12, "eraTrxp", "3", status);
8889
8890}
8891
8892static void t_trxpv(int *status)
8893/*
8894** - - - - - - - -
8895** t _ t r x p v
8896** - - - - - - - -
8897**
8898** Test eraTrxpv function.
8899**
8900** Returned:
8901** status int FALSE = success, TRUE = fail
8902**
8903** Called: eraTrxpv, vvd
8904**
8905** This revision: 2013 August 7
8906*/
8907{
8908 double r[3][3], pv[2][3], trpv[2][3];
8909
8910
8911 r[0][0] = 2.0;
8912 r[0][1] = 3.0;
8913 r[0][2] = 2.0;
8914
8915 r[1][0] = 3.0;
8916 r[1][1] = 2.0;
8917 r[1][2] = 3.0;
8918
8919 r[2][0] = 3.0;
8920 r[2][1] = 4.0;
8921 r[2][2] = 5.0;
8922
8923 pv[0][0] = 0.2;
8924 pv[0][1] = 1.5;
8925 pv[0][2] = 0.1;
8926
8927 pv[1][0] = 1.5;
8928 pv[1][1] = 0.2;
8929 pv[1][2] = 0.1;
8930
8931 eraTrxpv(r, pv, trpv);
8932
8933 vvd(trpv[0][0], 5.2, 1e-12, "eraTrxpv", "p1", status);
8934 vvd(trpv[0][1], 4.0, 1e-12, "eraTrxpv", "p1", status);
8935 vvd(trpv[0][2], 5.4, 1e-12, "eraTrxpv", "p1", status);
8936
8937 vvd(trpv[1][0], 3.9, 1e-12, "eraTrxpv", "v1", status);
8938 vvd(trpv[1][1], 5.3, 1e-12, "eraTrxpv", "v2", status);
8939 vvd(trpv[1][2], 4.1, 1e-12, "eraTrxpv", "v3", status);
8940
8941}
8942
8943static void t_tttai(int *status)
8944/*
8945** - - - - - - - -
8946** t _ t t t a i
8947** - - - - - - - -
8948**
8949** Test eraTttai function.
8950**
8951** Returned:
8952** status int FALSE = success, TRUE = fail
8953**
8954** Called: eraTttai, vvd, viv
8955**
8956** This revision: 2013 August 7
8957*/
8958{
8959 double a1, a2;
8960 int j;
8961
8962
8963 j = eraTttai(2453750.5, 0.892482639, &a1, &a2);
8964
8965 vvd(a1, 2453750.5, 1e-6, "eraTttai", "a1", status);
8966 vvd(a2, 0.892110139, 1e-12, "eraTttai", "a2", status);
8967 viv(j, 0, "eraTttai", "j", status);
8968
8969}
8970
8971static void t_tttcg(int *status)
8972/*
8973** - - - - - - - -
8974** t _ t t t c g
8975** - - - - - - - -
8976**
8977** Test eraTttcg function.
8978**
8979** Returned:
8980** status int FALSE = success, TRUE = fail
8981**
8982** Called: eraTttcg, vvd, viv
8983**
8984** This revision: 2013 August 7
8985*/
8986{
8987 double g1, g2;
8988 int j;
8989
8990
8991 j = eraTttcg(2453750.5, 0.892482639, &g1, &g2);
8992
8993 vvd( g1, 2453750.5, 1e-6, "eraTttcg", "g1", status);
8994 vvd( g2, 0.8924900312508587113, 1e-12, "eraTttcg", "g2", status);
8995 viv(j, 0, "eraTttcg", "j", status);
8996
8997}
8998
8999static void t_tttdb(int *status)
9000/*
9001** - - - - - - - -
9002** t _ t t t d b
9003** - - - - - - - -
9004**
9005** Test eraTttdb function.
9006**
9007** Returned:
9008** status int FALSE = success, TRUE = fail
9009**
9010** Called: eraTttdb, vvd, viv
9011**
9012** This revision: 2013 August 7
9013*/
9014{
9015 double b1, b2;
9016 int j;
9017
9018
9019 j = eraTttdb(2453750.5, 0.892855139, -0.000201, &b1, &b2);
9020
9021 vvd(b1, 2453750.5, 1e-6, "eraTttdb", "b1", status);
9022 vvd(b2, 0.8928551366736111111, 1e-12, "eraTttdb", "b2", status);
9023 viv(j, 0, "eraTttdb", "j", status);
9024
9025}
9026
9027static void t_ttut1(int *status)
9028/*
9029** - - - - - - - -
9030** t _ t t u t 1
9031** - - - - - - - -
9032**
9033** Test eraTtut1 function.
9034**
9035** Returned:
9036** status int FALSE = success, TRUE = fail
9037**
9038** Called: eraTtut1, vvd, viv
9039**
9040** This revision: 2013 August 7
9041*/
9042{
9043 double u1, u2;
9044 int j;
9045
9046
9047 j = eraTtut1(2453750.5, 0.892855139, 64.8499, &u1, &u2);
9048
9049 vvd(u1, 2453750.5, 1e-6, "eraTtut1", "u1", status);
9050 vvd(u2, 0.8921045614537037037, 1e-12, "eraTtut1", "u2", status);
9051 viv(j, 0, "eraTtut1", "j", status);
9052
9053}
9054
9055static void t_ut1tai(int *status)
9056/*
9057** - - - - - - - - -
9058** t _ u t 1 t a i
9059** - - - - - - - - -
9060**
9061** Test eraUt1tai function.
9062**
9063** Returned:
9064** status int FALSE = success, TRUE = fail
9065**
9066** Called: eraUt1tai, vvd, viv
9067**
9068** This revision: 2013 August 7
9069*/
9070{
9071 double a1, a2;
9072 int j;
9073
9074
9075 j = eraUt1tai(2453750.5, 0.892104561, -32.6659, &a1, &a2);
9076
9077 vvd(a1, 2453750.5, 1e-6, "eraUt1tai", "a1", status);
9078 vvd(a2, 0.8924826385462962963, 1e-12, "eraUt1tai", "a2", status);
9079 viv(j, 0, "eraUt1tai", "j", status);
9080
9081}
9082
9083static void t_ut1tt(int *status)
9084/*
9085** - - - - - - - -
9086** t _ u t 1 t t
9087** - - - - - - - -
9088**
9089** Test eraUt1tt function.
9090**
9091** Returned:
9092** status int FALSE = success, TRUE = fail
9093**
9094** Called: eraUt1tt, vvd, viv
9095**
9096** This revision: 2013 October 3
9097*/
9098{
9099 double t1, t2;
9100 int j;
9101
9102
9103 j = eraUt1tt(2453750.5, 0.892104561, 64.8499, &t1, &t2);
9104
9105 vvd(t1, 2453750.5, 1e-6, "eraUt1tt", "t1", status);
9106 vvd(t2, 0.8928551385462962963, 1e-12, "eraUt1tt", "t2", status);
9107 viv(j, 0, "eraUt1tt", "j", status);
9108
9109}
9110
9111static void t_ut1utc(int *status)
9112/*
9113** - - - - - - - - -
9114** t _ u t 1 u t c
9115** - - - - - - - - -
9116**
9117** Test eraUt1utc function.
9118**
9119** Returned:
9120** status int FALSE = success, TRUE = fail
9121**
9122** Called: eraUt1utc, vvd, viv
9123**
9124** This revision: 2013 August 7
9125*/
9126{
9127 double u1, u2;
9128 int j;
9129
9130
9131 j = eraUt1utc(2453750.5, 0.892104561, 0.3341, &u1, &u2);
9132
9133 vvd(u1, 2453750.5, 1e-6, "eraUt1utc", "u1", status);
9134 vvd(u2, 0.8921006941018518519, 1e-12, "eraUt1utc", "u2", status);
9135 viv(j, 0, "eraUt1utc", "j", status);
9136
9137}
9138
9139static void t_utctai(int *status)
9140/*
9141** - - - - - - - - -
9142** t _ u t c t a i
9143** - - - - - - - - -
9144**
9145** Test eraUtctai function.
9146**
9147** Returned:
9148** status int FALSE = success, TRUE = fail
9149**
9150** Called: eraUtctai, vvd, viv
9151**
9152** This revision: 2013 August 7
9153*/
9154{
9155 double u1, u2;
9156 int j;
9157
9158
9159 j = eraUtctai(2453750.5, 0.892100694, &u1, &u2);
9160
9161 vvd(u1, 2453750.5, 1e-6, "eraUtctai", "u1", status);
9162 vvd(u2, 0.8924826384444444444, 1e-12, "eraUtctai", "u2", status);
9163 viv(j, 0, "eraUtctai", "j", status);
9164
9165}
9166
9167static void t_utcut1(int *status)
9168/*
9169** - - - - - - - - -
9170** t _ u t c u t 1
9171** - - - - - - - - -
9172**
9173** Test eraUtcut1 function.
9174**
9175** Returned:
9176** status int FALSE = success, TRUE = fail
9177**
9178** Called: eraUtcut1, vvd, viv
9179**
9180** This revision: 2013 August 7
9181*/
9182{
9183 double u1, u2;
9184 int j;
9185
9186
9187 j = eraUtcut1(2453750.5, 0.892100694, 0.3341, &u1, &u2);
9188
9189 vvd(u1, 2453750.5, 1e-6, "eraUtcut1", "u1", status);
9190 vvd(u2, 0.8921045608981481481, 1e-12, "eraUtcut1", "u2", status);
9191 viv(j, 0, "eraUtcut1", "j", status);
9192
9193}
9194
9195static void t_xy06(int *status)
9196/*
9197** - - - - - - -
9198** t _ x y 0 6
9199** - - - - - - -
9200**
9201** Test eraXy06 function.
9202**
9203** Returned:
9204** status int FALSE = success, TRUE = fail
9205**
9206** Called: eraXy06, vvd
9207**
9208** This revision: 2013 August 7
9209*/
9210{
9211 double x, y;
9212
9213
9214 eraXy06(2400000.5, 53736.0, &x, &y);
9215
9216 vvd(x, 0.5791308486706010975e-3, 1e-15, "eraXy06", "x", status);
9217 vvd(y, 0.4020579816732958141e-4, 1e-16, "eraXy06", "y", status);
9218
9219}
9220
9221static void t_xys00a(int *status)
9222/*
9223** - - - - - - - - -
9224** t _ x y s 0 0 a
9225** - - - - - - - - -
9226**
9227** Test eraXys00a function.
9228**
9229** Returned:
9230** status int FALSE = success, TRUE = fail
9231**
9232** Called: eraXys00a, vvd
9233**
9234** This revision: 2013 August 7
9235*/
9236{
9237 double x, y, s;
9238
9239
9240 eraXys00a(2400000.5, 53736.0, &x, &y, &s);
9241
9242 vvd(x, 0.5791308472168152904e-3, 1e-14, "eraXys00a", "x", status);
9243 vvd(y, 0.4020595661591500259e-4, 1e-15, "eraXys00a", "y", status);
9244 vvd(s, -0.1220040848471549623e-7, 1e-18, "eraXys00a", "s", status);
9245
9246}
9247
9248static void t_xys00b(int *status)
9249/*
9250** - - - - - - - - -
9251** t _ x y s 0 0 b
9252** - - - - - - - - -
9253**
9254** Test eraXys00b function.
9255**
9256** Returned:
9257** status int FALSE = success, TRUE = fail
9258**
9259** Called: eraXys00b, vvd
9260**
9261** This revision: 2013 August 7
9262*/
9263{
9264 double x, y, s;
9265
9266
9267 eraXys00b(2400000.5, 53736.0, &x, &y, &s);
9268
9269 vvd(x, 0.5791301929950208873e-3, 1e-14, "eraXys00b", "x", status);
9270 vvd(y, 0.4020553681373720832e-4, 1e-15, "eraXys00b", "y", status);
9271 vvd(s, -0.1220027377285083189e-7, 1e-18, "eraXys00b", "s", status);
9272
9273}
9274
9275static void t_xys06a(int *status)
9276/*
9277** - - - - - - - - -
9278** t _ x y s 0 6 a
9279** - - - - - - - - -
9280**
9281** Test eraXys06a function.
9282**
9283** Returned:
9284** status int FALSE = success, TRUE = fail
9285**
9286** Called: eraXys06a, vvd
9287**
9288** This revision: 2013 August 7
9289*/
9290{
9291 double x, y, s;
9292
9293
9294 eraXys06a(2400000.5, 53736.0, &x, &y, &s);
9295
9296 vvd(x, 0.5791308482835292617e-3, 1e-14, "eraXys06a", "x", status);
9297 vvd(y, 0.4020580099454020310e-4, 1e-15, "eraXys06a", "y", status);
9298 vvd(s, -0.1220032294164579896e-7, 1e-18, "eraXys06a", "s", status);
9299
9300}
9301
9302static void t_zp(int *status)
9303/*
9304** - - - - -
9305** t _ z p
9306** - - - - -
9307**
9308** Test eraZp function.
9309**
9310** Returned:
9311** status int FALSE = success, TRUE = fail
9312**
9313** Called: eraZp, vvd
9314**
9315** This revision: 2013 August 7
9316*/
9317{
9318 double p[3];
9319
9320
9321 p[0] = 0.3;
9322 p[1] = 1.2;
9323 p[2] = -2.5;
9324
9325 eraZp(p);
9326
9327 vvd(p[0], 0.0, 0.0, "eraZp", "1", status);
9328 vvd(p[1], 0.0, 0.0, "eraZp", "2", status);
9329 vvd(p[2], 0.0, 0.0, "eraZp", "3", status);
9330
9331}
9332
9333static void t_zpv(int *status)
9334/*
9335** - - - - - -
9336** t _ z p v
9337** - - - - - -
9338**
9339** Test eraZpv function.
9340**
9341** Returned:
9342** status int FALSE = success, TRUE = fail
9343**
9344** Called: eraZpv, vvd
9345**
9346** This revision: 2013 August 7
9347*/
9348{
9349 double pv[2][3];
9350
9351
9352 pv[0][0] = 0.3;
9353 pv[0][1] = 1.2;
9354 pv[0][2] = -2.5;
9355
9356 pv[1][0] = -0.5;
9357 pv[1][1] = 3.1;
9358 pv[1][2] = 0.9;
9359
9360 eraZpv(pv);
9361
9362 vvd(pv[0][0], 0.0, 0.0, "eraZpv", "p1", status);
9363 vvd(pv[0][1], 0.0, 0.0, "eraZpv", "p2", status);
9364 vvd(pv[0][2], 0.0, 0.0, "eraZpv", "p3", status);
9365
9366 vvd(pv[1][0], 0.0, 0.0, "eraZpv", "v1", status);
9367 vvd(pv[1][1], 0.0, 0.0, "eraZpv", "v2", status);
9368 vvd(pv[1][2], 0.0, 0.0, "eraZpv", "v3", status);
9369
9370}
9371
9372static void t_zr(int *status)
9373/*
9374** - - - - -
9375** t _ z r
9376** - - - - -
9377**
9378** Test eraZr function.
9379**
9380** Returned:
9381** status int FALSE = success, TRUE = fail
9382**
9383** Called: eraZr, vvd
9384**
9385** This revision: 2013 August 7
9386*/
9387{
9388 double r[3][3];
9389
9390
9391 r[0][0] = 2.0;
9392 r[1][0] = 3.0;
9393 r[2][0] = 2.0;
9394
9395 r[0][1] = 3.0;
9396 r[1][1] = 2.0;
9397 r[2][1] = 3.0;
9398
9399 r[0][2] = 3.0;
9400 r[1][2] = 4.0;
9401 r[2][2] = 5.0;
9402
9403 eraZr(r);
9404
9405 vvd(r[0][0], 0.0, 0.0, "eraZr", "00", status);
9406 vvd(r[1][0], 0.0, 0.0, "eraZr", "01", status);
9407 vvd(r[2][0], 0.0, 0.0, "eraZr", "02", status);
9408
9409 vvd(r[0][1], 0.0, 0.0, "eraZr", "10", status);
9410 vvd(r[1][1], 0.0, 0.0, "eraZr", "11", status);
9411 vvd(r[2][1], 0.0, 0.0, "eraZr", "12", status);
9412
9413 vvd(r[0][2], 0.0, 0.0, "eraZr", "20", status);
9414 vvd(r[1][2], 0.0, 0.0, "eraZr", "21", status);
9415 vvd(r[2][2], 0.0, 0.0, "eraZr", "22", status);
9416
9417}
9418
9419int main(int argc, char *argv[])
9420/*
9421** - - - - -
9422** m a i n
9423** - - - - -
9424**
9425** This revision: 2016 March 12
9426*/
9427{
9428 int status;
9429
9430
9431/* If any command-line argument, switch to verbose reporting. */
9432 if (argc > 1) {
9433 verbose = 1;
9434 argv[0][0] += 0; /* to avoid compiler warnings */
9435 }
9436
9437/* Preset the &status to FALSE = success. */
9438 status = 0;
9439
9440/* Test all of the ERFA functions. */
9441 t_a2af(&status);
9442 t_a2tf(&status);
9443 t_ab(&status);
9444 t_af2a(&status);
9445 t_anp(&status);
9446 t_anpm(&status);
9447 t_apcg(&status);
9448 t_apcg13(&status);
9449 t_apci(&status);
9450 t_apci13(&status);
9451 t_apco(&status);
9452 t_apco13(&status);
9453 t_apcs(&status);
9454 t_apcs13(&status);
9455 t_aper(&status);
9456 t_aper13(&status);
9457 t_apio(&status);
9458 t_apio13(&status);
9459 t_atci13(&status);
9460 t_atciq(&status);
9461 t_atciqn(&status);
9462 t_atciqz(&status);
9463 t_atco13(&status);
9464 t_atic13(&status);
9465 t_aticq(&status);
9466 t_aticqn(&status);
9467 t_atio13(&status);
9468 t_atioq(&status);
9469 t_atoc13(&status);
9470 t_atoi13(&status);
9471 t_atoiq(&status);
9472 t_bi00(&status);
9473 t_bp00(&status);
9474 t_bp06(&status);
9475 t_bpn2xy(&status);
9476 t_c2i00a(&status);
9477 t_c2i00b(&status);
9478 t_c2i06a(&status);
9479 t_c2ibpn(&status);
9480 t_c2ixy(&status);
9481 t_c2ixys(&status);
9482 t_c2s(&status);
9483 t_c2t00a(&status);
9484 t_c2t00b(&status);
9485 t_c2t06a(&status);
9486 t_c2tcio(&status);
9487 t_c2teqx(&status);
9488 t_c2tpe(&status);
9489 t_c2txy(&status);
9490 t_cal2jd(&status);
9491 t_cp(&status);
9492 t_cpv(&status);
9493 t_cr(&status);
9494 t_d2dtf(&status);
9495 t_d2tf(&status);
9496 t_dat(&status);
9497 t_dtdb(&status);
9498 t_dtf2d(&status);
9499 t_eceq06(&status);
9500 t_ecm06(&status);
9501 t_ee00(&status);
9502 t_ee00a(&status);
9503 t_ee00b(&status);
9504 t_ee06a(&status);
9505 t_eect00(&status);
9506 t_eform(&status);
9507 t_eo06a(&status);
9508 t_eors(&status);
9509 t_epb(&status);
9510 t_epb2jd(&status);
9511 t_epj(&status);
9512 t_epj2jd(&status);
9513 t_epv00(&status);
9514 t_eqec06(&status);
9515 t_eqeq94(&status);
9516 t_era00(&status);
9517 t_fad03(&status);
9518 t_fae03(&status);
9519 t_faf03(&status);
9520 t_faju03(&status);
9521 t_fal03(&status);
9522 t_falp03(&status);
9523 t_fama03(&status);
9524 t_fame03(&status);
9525 t_fane03(&status);
9526 t_faom03(&status);
9527 t_fapa03(&status);
9528 t_fasa03(&status);
9529 t_faur03(&status);
9530 t_fave03(&status);
9531 t_fk52h(&status);
9532 t_fk5hip(&status);
9533 t_fk5hz(&status);
9534 t_fw2m(&status);
9535 t_fw2xy(&status);
9536 t_g2icrs(&status);
9537 t_gc2gd(&status);
9538 t_gc2gde(&status);
9539 t_gd2gc(&status);
9540 t_gd2gce(&status);
9541 t_gmst00(&status);
9542 t_gmst06(&status);
9543 t_gmst82(&status);
9544 t_gst00a(&status);
9545 t_gst00b(&status);
9546 t_gst06(&status);
9547 t_gst06a(&status);
9548 t_gst94(&status);
9549 t_h2fk5(&status);
9550 t_hfk5z(&status);
9551 t_icrs2g(&status);
9552 t_ir(&status);
9553 t_jd2cal(&status);
9554 t_jdcalf(&status);
9555 t_ld(&status);
9556 t_ldn(&status);
9557 t_ldsun(&status);
9558 t_lteceq(&status);
9559 t_ltecm(&status);
9560 t_lteqec(&status);
9561 t_ltp(&status);
9562 t_ltpb(&status);
9563 t_ltpecl(&status);
9564 t_ltpequ(&status);
9565 t_num00a(&status);
9566 t_num00b(&status);
9567 t_num06a(&status);
9568 t_numat(&status);
9569 t_nut00a(&status);
9570 t_nut00b(&status);
9571 t_nut06a(&status);
9572 t_nut80(&status);
9573 t_nutm80(&status);
9574 t_obl06(&status);
9575 t_obl80(&status);
9576 t_p06e(&status);
9577 t_p2pv(&status);
9578 t_p2s(&status);
9579 t_pap(&status);
9580 t_pas(&status);
9581 t_pb06(&status);
9582 t_pdp(&status);
9583 t_pfw06(&status);
9584 t_plan94(&status);
9585 t_pmat00(&status);
9586 t_pmat06(&status);
9587 t_pmat76(&status);
9588 t_pm(&status);
9589 t_pmp(&status);
9590 t_pmpx(&status);
9591 t_pmsafe(&status);
9592 t_pn(&status);
9593 t_pn00(&status);
9594 t_pn00a(&status);
9595 t_pn00b(&status);
9596 t_pn06a(&status);
9597 t_pn06(&status);
9598 t_pnm00a(&status);
9599 t_pnm00b(&status);
9600 t_pnm06a(&status);
9601 t_pnm80(&status);
9602 t_pom00(&status);
9603 t_ppp(&status);
9604 t_ppsp(&status);
9605 t_pr00(&status);
9606 t_prec76(&status);
9607 t_pv2p(&status);
9608 t_pv2s(&status);
9609 t_pvdpv(&status);
9610 t_pvm(&status);
9611 t_pvmpv(&status);
9612 t_pvppv(&status);
9613 t_pvstar(&status);
9614 t_pvtob(&status);
9615 t_pvu(&status);
9616 t_pvup(&status);
9617 t_pvxpv(&status);
9618 t_pxp(&status);
9619 t_refco(&status);
9620 t_rm2v(&status);
9621 t_rv2m(&status);
9622 t_rx(&status);
9623 t_rxp(&status);
9624 t_rxpv(&status);
9625 t_rxr(&status);
9626 t_ry(&status);
9627 t_rz(&status);
9628 t_s00a(&status);
9629 t_s00b(&status);
9630 t_s00(&status);
9631 t_s06a(&status);
9632 t_s06(&status);
9633 t_s2c(&status);
9634 t_s2p(&status);
9635 t_s2pv(&status);
9636 t_s2xpv(&status);
9637 t_sepp(&status);
9638 t_seps(&status);
9639 t_sp00(&status);
9640 t_starpm(&status);
9641 t_starpv(&status);
9642 t_sxp(&status);
9643 t_sxpv(&status);
9644 t_taitt(&status);
9645 t_taiut1(&status);
9646 t_taiutc(&status);
9647 t_tcbtdb(&status);
9648 t_tcgtt(&status);
9649 t_tdbtcb(&status);
9650 t_tdbtt(&status);
9651 t_tf2a(&status);
9652 t_tf2d(&status);
9653 t_tr(&status);
9654 t_trxp(&status);
9655 t_trxpv(&status);
9656 t_tttai(&status);
9657 t_tttcg(&status);
9658 t_tttdb(&status);
9659 t_ttut1(&status);
9660 t_ut1tai(&status);
9661 t_ut1tt(&status) ;
9662 t_ut1utc(&status);
9663 t_utctai(&status);
9664 t_utcut1(&status);
9665 t_xy06(&status);
9666 t_xys00a(&status);
9667 t_xys00b(&status);
9668 t_xys06a(&status);
9669 t_zp(&status);
9670 t_zpv(&status);
9671 t_zr(&status);
9672
9673/* Report, set up an appropriate exit status, and finish. */
9674 if (status) {
9675 printf("t_erfa_c validation failed!\n");
9676 } else {
9677 printf("t_erfa_c validation successful\n");
9678 }
9679 return status;
9680}
9681/*----------------------------------------------------------------------
9682**
9683**
9684** Copyright (C) 2013-2016, NumFOCUS Foundation.
9685** All rights reserved.
9686**
9687** This library is derived, with permission, from the International
9688** Astronomical Union's "Standards of Fundamental Astronomy" library,
9689** available from http://www.iausofa.org.
9690**
9691** The ERFA version is intended to retain identical functionality to
9692** the SOFA library, but made distinct through different function and
9693** file names, as set out in the SOFA license conditions. The SOFA
9694** original has a role as a reference standard for the IAU and IERS,
9695** and consequently redistribution is permitted only in its unaltered
9696** state. The ERFA version is not subject to this restriction and
9697** therefore can be included in distributions which do not support the
9698** concept of "read only" software.
9699**
9700** Although the intent is to replicate the SOFA API (other than
9701** replacement of prefix names) and results (with the exception of
9702** bugs; any that are discovered will be fixed), SOFA is not
9703** responsible for any errors found in this version of the library.
9704**
9705** If you wish to acknowledge the SOFA heritage, please acknowledge
9706** that you are using a library derived from SOFA, rather than SOFA
9707** itself.
9708**
9709**
9710** TERMS AND CONDITIONS
9711**
9712** Redistribution and use in source and binary forms, with or without
9713** modification, are permitted provided that the following conditions
9714** are met:
9715**
9716** 1 Redistributions of source code must retain the above copyright
9717** notice, this list of conditions and the following disclaimer.
9718**
9719** 2 Redistributions in binary form must reproduce the above copyright
9720** notice, this list of conditions and the following disclaimer in
9721** the documentation and/or other materials provided with the
9722** distribution.
9723**
9724** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
9725** the International Astronomical Union nor the names of its
9726** contributors may be used to endorse or promote products derived
9727** from this software without specific prior written permission.
9728**
9729** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9730** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9731** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
9732** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
9733** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
9734** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
9735** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9736** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
9737** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9738** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
9739** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
9740** POSSIBILITY OF SUCH DAMAGE.
9741**
9742*/
Note: See TracBrowser for help on using the repository browser.