1 /*
2  *  - - - - - - - - - - - - - - -
3  *   g a l _ p n 0 0 a _ t e s t
4  *  - - - - - - - - - - - - - - -
5  *
6  *  This routine is part of the General Astrodynamics Library
7  *
8  *  Description:
9  *
10  *     Test gal_pn00a routine.
11  *
12  *  Status:
13  *
14  *     Internal test routine
15  *
16  *  Called:
17  *
18  *     gal_pn00a
19  *     gal_vdv
20  *
21  *  This Revision:
22  *
23  *     2008 January 11 ( c version 2008 June 14 )
24  *
25  *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.
26  */
27 
28 #include "gal_pn00a.h"
29 #include "gal_pn00a_test.h"
30 #include "gal_test.h"
31 
32 void
gal_pn00a_test()33 gal_pn00a_test
34  (
35  )
36 {
37 
38     double dpsi, deps, epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3] ;
39 
40     extern int gal_tfunc ;
41 
42 /*
43  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44  */
45 
46     gal_pn00a ( 2400000.5, 53736, &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn ) ;
47 
48     gal_vdv ( dpsi, -0.9630909107115582393e-05, 1e-12, "gal_pn00a", "dpsi" ) ;
49     gal_vdv ( deps,  0.4063239174001678826e-04, 1e-12, "gal_pn00a", "deps" ) ;
50     gal_vdv ( epsa,      0.4090791789404230050, 1e-12, "gal_pn00a", "epsa" ) ;
51 
52     gal_vdv ( rb[0][0],       0.9999999999999942268, 1e-12, "gal_pn00a", "rb[0][0]" ) ;
53     gal_vdv ( rb[0][1],  -0.7078279744199198018e-07, 1e-12, "gal_pn00a", "rb[0][1]" ) ;
54     gal_vdv ( rb[0][2],    0.805621714697613378e-07, 1e-12, "gal_pn00a", "rb[0][2]" ) ;
55     gal_vdv ( rb[1][0],   0.7078279477857337520e-07, 1e-12, "gal_pn00a", "rb[1][0]" ) ;
56     gal_vdv ( rb[1][1],       0.9999999999999968914, 1e-12, "gal_pn00a", "rb[1][1]" ) ;
57     gal_vdv ( rb[1][2],   0.3306041454222136412e-07, 1e-12, "gal_pn00a", "rb[1][2]" ) ;
58     gal_vdv ( rb[2][0],  -0.8056217380986970351e-07, 1e-12, "gal_pn00a", "rb[2][0]" ) ;
59     gal_vdv ( rb[2][1],  -0.3306040883980552342e-07, 1e-12, "gal_pn00a", "rb[2][1]" ) ;
60     gal_vdv ( rb[2][2],       0.9999999999999962252, 1e-12, "gal_pn00a", "rb[2][2]" ) ;
61 
62     gal_vdv ( rp[0][0],       0.9999989300532289294, 1e-12, "gal_pn00a", "rp[0][0]" ) ;
63     gal_vdv ( rp[0][1],  -0.1341647226791824318e-02, 1e-12, "gal_pn00a", "rp[0][1]" ) ;
64     gal_vdv ( rp[0][2],  -0.5829880927190296070e-03, 1e-12, "gal_pn00a", "rp[0][2]" ) ;
65     gal_vdv ( rp[1][0],   0.1341647231069758878e-02, 1e-12, "gal_pn00a", "rp[1][0]" ) ;
66     gal_vdv ( rp[1][1],       0.9999990999908749956, 1e-12, "gal_pn00a", "rp[1][1]" ) ;
67     gal_vdv ( rp[1][2],  -0.3837444442040669602e-06, 1e-12, "gal_pn00a", "rp[1][2]" ) ;
68     gal_vdv ( rp[2][0],   0.5829880828740958195e-03, 1e-12, "gal_pn00a", "rp[2][0]" ) ;
69     gal_vdv ( rp[2][1],  -0.3984203267164176162e-06, 1e-12, "gal_pn00a", "rp[2][1]" ) ;
70     gal_vdv ( rp[2][2],       0.9999998300623537117, 1e-12, "gal_pn00a", "rp[2][2]" ) ;
71 
72     gal_vdv ( rbp[0][0],      0.9999989300052244401, 1e-12, "gal_pn00a", "rbp[0][0]" ) ;
73     gal_vdv ( rbp[0][1], -0.1341717990239703687e-02, 1e-12, "gal_pn00a", "rbp[0][1]" ) ;
74     gal_vdv ( rbp[0][2], -0.5829075749891683873e-03, 1e-12, "gal_pn00a", "rbp[0][2]" ) ;
75     gal_vdv ( rbp[1][0],  0.1341718013831739780e-02, 1e-12, "gal_pn00a", "rbp[1][0]" ) ;
76     gal_vdv ( rbp[1][1],      0.9999990998959190636, 1e-12, "gal_pn00a", "rbp[1][1]" ) ;
77     gal_vdv ( rbp[1][2], -0.3505759734022375336e-06, 1e-12, "gal_pn00a", "rbp[1][2]" ) ;
78     gal_vdv ( rbp[2][0],  0.5829075206857718639e-03, 1e-12, "gal_pn00a", "rbp[2][0]" ) ;
79     gal_vdv ( rbp[2][1], -0.4315219954653950261e-06, 1e-12, "gal_pn00a", "rbp[2][1]" ) ;
80     gal_vdv ( rbp[2][2],      0.9999998301093036002, 1e-12, "gal_pn00a", "rbp[2][2]" ) ;
81 
82     gal_vdv ( rn[0][0],       0.9999999999536227646, 1e-12, "gal_pn00a", "rn[0][0]" ) ;
83     gal_vdv ( rn[0][1],   0.8836238544090931790e-05, 1e-12, "gal_pn00a", "rn[0][1]" ) ;
84     gal_vdv ( rn[0][2],   0.3830835237722426404e-05, 1e-12, "gal_pn00a", "rn[0][2]" ) ;
85     gal_vdv ( rn[1][0],  -0.8836082880798628965e-05, 1e-12, "gal_pn00a", "rn[1][0]" ) ;
86     gal_vdv ( rn[1][1],       0.9999999991354655560, 1e-12, "gal_pn00a", "rn[1][1]" ) ;
87     gal_vdv ( rn[1][2],  -0.4063240865362905655e-04, 1e-12, "gal_pn00a", "rn[1][2]" ) ;
88     gal_vdv ( rn[2][0],  -0.3831194272066021376e-05, 1e-12, "gal_pn00a", "rn[2][0]" ) ;
89     gal_vdv ( rn[2][1],   0.4063237480213339396e-04, 1e-12, "gal_pn00a", "rn[2][1]" ) ;
90     gal_vdv ( rn[2][2],       0.9999999991671660871, 1e-12, "gal_pn00a", "rn[2][2]" ) ;
91 
92     gal_vdv ( rbpn[0][0],   9.999989440476103608e-1, 1e-12, "gal_pn00a", "rbpn[0][0]" ) ;
93     gal_vdv ( rbpn[0][1], -0.1332881761240011518e-2, 1e-12, "gal_pn00a", "rbpn[0][1]" ) ;
94     gal_vdv ( rbpn[0][2], -0.5790767434730085097e-3, 1e-12, "gal_pn00a", "rbpn[0][2]" ) ;
95     gal_vdv ( rbpn[1][0],  0.1332858254308954453e-2, 1e-12, "gal_pn00a", "rbpn[1][0]" ) ;
96     gal_vdv ( rbpn[1][1],   9.999991109044505944e-1, 1e-12, "gal_pn00a", "rbpn[1][1]" ) ;
97     gal_vdv ( rbpn[1][2], -0.4097782710401555759e-4, 1e-12, "gal_pn00a", "rbpn[1][2]" ) ;
98     gal_vdv ( rbpn[2][0], 0.5791308472168153320e-03, 1e-12, "gal_pn00a", "rbpn[2][0]" ) ;
99     gal_vdv ( rbpn[2][1],   4.020595661593994396e-5, 1e-12, "gal_pn00a", "rbpn[2][1]" ) ;
100     gal_vdv ( rbpn[2][2],   9.999998314954572365e-1, 1e-12, "gal_pn00a", "rbpn[2][2]" ) ;
101 
102     gal_tfunc++ ;
103 
104 /*
105  * Finished.
106  */
107 
108  }
109 
110 /*
111  *  gal - General Astrodynamics Library
112  *  Copyright (C) 2008 Paul C. L. Willmott
113  *
114  *  This program is free software; you can redistribute it and/or modify
115  *  it under the terms of the GNU General Public License as published by
116  *  the Free Software Foundation; either version 2 of the License, or
117  *  (at your option) any later version.
118  *
119  *  This program is distributed in the hope that it will be useful,
120  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
121  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
122  *  GNU General Public License for more details.
123  *
124  *  You should have received a copy of the GNU General Public License along
125  *  with this program; if not, write to the Free Software Foundation, Inc.,
126  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
127  *
128  *  Contact:
129  *
130  *  Paul Willmott
131  *  vp9mu@amsat.org
132  */
133