ALGORITHM GUIDE FOR CREATING AN INDEPENDENT FUNCTION TO COMPUTE THE NUTATION
(Delta Psi) IN ECLIPTICAL LONGITUDE ACCORDING TO IAU SERIES 2000B

THERE ARE 77 TERMS IN THE SERIES

AUTHOR: Jay Tanner - 2011



A typical call to such a function might resemble:

dPsiDeg = Delta_Psi (JD)

The function would return the value of the nutation in longitude
in decimal degrees for the time indicated by the JD argument.


******************************************************************************
DATA TABLE FOR NUTATION IN LONGITUDE - IAU SERIES 2000B (77 TERMS)

The i column is NOT part of the actual data.  It is simply the reference index
number of the series term to which the subsequent 8 data elements apply.

   ARGUMENT MULTIPLIERS        LONGITUDE COMPONENTS
    L   Lp  F   D   Om          ARC SEC * 10000000
i   m1  m2  m3  m4  m5         AA        BB      CC
1    0   0   0   0   1    -172064161  -174666  33386
2    0   0   2  -2   2     -13170906    -1675  13696
3    0   0   2   0   2      -2276413     -234   2796
4    0   0   0   0   2       2074554      207   -698
5    0   1   0   0   0       1475877    -3633  11817
6    0   1   2  -2   2       -516821     1226   -524
7    1   0   0   0   0        711159       73   -872
8    0   0   2   0   1       -387298     -367    380
9    1   0   2   0   2       -301461      -36    816
10   0  -1   2  -2   2        215829     -494    111
11   0   0   2  -2   1        128227      137    181
12  -1   0   2   0   2        123457       11     19
13  -1   0   0   2   0        156994       10   -168
14   1   0   0   0   1         63110       63     27
15  -1   0   0   0   1        -57976      -63   -189
16  -1   0   2   2   2        -59641      -11    149
17   1   0   2   0   1        -51613      -42    129
18  -2   0   2   0   1         45893       50     31
19   0   0   0   2   0         63384       11   -150
20   0   0   2   2   2        -38571       -1    158
21   0  -2   2  -2   2         32481        0      0
22  -2   0   0   2   0        -47722        0    -18
23   2   0   2   0   2        -31046       -1    131
24   1   0   2  -2   2         28593        0     -1
25  -1   0   2   0   1         20441       21     10
26   2   0   0   0   0         29243        0    -74
27   0   0   2   0   0         25887        0    -66
28   0   1   0   0   1        -14053      -25     79
29  -1   0   0   2   1         15164       10     11
30   0   2   2  -2   2        -15794       72    -16
31   0   0  -2   2   0         21783        0     13
32   1   0   0  -2   1        -12873      -10    -37
33   0  -1   0   0   1        -12654       11     63
34  -1   0   2   2   1        -10204        0     25
35   0   2   0   0   0         16707      -85    -10
36   1   0   2   2   2         -7691        0     44
37  -2   0   2   0   0        -11024        0    -14
38   0   1   2   0   2          7566      -21    -11
39   0   0   2   2   1         -6637      -11     25
40   0  -1   2   0   2         -7141       21      8
41   0   0   0   2   1         -6302      -11      2
42   1   0   2  -2   1          5800       10      2
43   2   0   2  -2   2          6443        0     -7
44  -2   0   0   2   1         -5774      -11    -15
45   2   0   2   0   1         -5350        0     21
46   0  -1   2  -2   1         -4752      -11     -3
47   0   0   0  -2   1         -4940      -11    -21
48  -1  -1   0   2   0          7350        0     -8
49   2   0   0  -2   1          4065        0      6
50   1   0   0   2   0          6579        0    -24
51   0   1   2  -2   1          3579        0      5
52   1  -1   0   0   0          4725        0     -6
53  -2   0   2   0   2         -3075        0     -2
54   3   0   2   0   2         -2904        0     15
55   0  -1   0   2   0          4348        0    -10
56   1  -1   2   0   2         -2878        0      8
57   0   0   0   1   0         -4230        0      5
58  -1  -1   2   2   2         -2819        0      7
59  -1   0   2   0   0         -4056        0      5
60   0  -1   2   2   2         -2647        0     11
61  -2   0   0   0   1         -2294        0    -10
62   1   1   2   0   2          2481        0     -7
63   2   0   0   0   1          2179        0     -2
64  -1   1   0   1   0          3276        0      1
65   1   1   0   0   0         -3389        0      5
66   1   0   2   0   0          3339        0    -13
67  -1   0   2  -2   1         -1987        0     -6
68   1   0   0   0   2         -1981        0      0
69  -1   0   0   1   0          4026        0   -353
70   0   0   2   1   2          1660        0     -5
71  -1   0   2   4   2         -1521        0      9
72  -1   1   0   1   1          1314        0      0
73   0  -2   2  -2   1         -1283        0      0
74   1   0   2   2   1         -1331        0      8
75  -2   0   2   2   2          1383        0     -2
76  -1   0   0   0   2          1405        0      4
77   1   1   2  -2   2          1290        0      0
*****************************************************


===========================================================================
===========================================================================


--------------------------------------------
Define factor to convert degrees to radians.

DegToRad = 3.141592653589793 / 180.0

--------------------------------------------------
Given the JD number, ompute the corresponding time
in Julian centuries reckoned from J2000.0

T = (JD - 2451545.0) / 36525.0

-------------------
Compute powers of T

T2 = T * T
T3 = T * T2
T4 = T * T3

--------------------------------------------------------
COMPUTE FUNDAMENTAL DELAUNAY ARGUMENTS (L, Lp, F, D, Om)

-----------------------------------
Mean anomaly of the Moon in radians

L  = DegToRad*((485868.249036 + 1717915923.2178*T + 31.8792*T2
   + 0.051635*T3 - 0.00024470*T4) / 3600.0)


----------------------------------
Mean anomaly of the Sun in radians

Lp = DegToRad*((1287104.79305 + 129596581.0481*T
   - 0.5532*T2  + 0.000136*T3 - 0.00001149*T4) / 3600.0)


----------------------------------------------------
Mean argument of the latitude of the Moon in radians

F  = DegToRad*((335779.526232 + 1739527262.8478*T
   - 12.7512*T2 - 0.001037*T3 + 0.00000417*T4) / 3600.0)


---------------------------------------------------
Mean elongation of the Moon from the Sun in radians

D  = DegToRad*((1072260.70369 + 1602961601.2090*T
   - 6.3706*T2  + 0.006593*T3 - 0.00003169*T4) / 3600.0)


-----------------------------------------------------------
Mean longitude of the ascending node of the Moon in radians

Om = DegToRad*((450160.398036 - 6962890.5431*T
   + 7.4722*T2  + 0.007702*T3 - 0.00005939*T4) / 3600.0)

-------------------------------------------------------------------
EVALUATE THE SERIES FOR NUTATION IN LONGITUDE IN ARC SEC * 10000000

--------------------------------------------------------
Using the table data, the terms take the following form:

Let:
arg = (m1*L + m2*Lp + m3*F + m4*D + m5*Om)

then

dPsiTerm = (AA + BB*T)*sin(arg) + CC*cos(arg)

The computational angles are assumed to be in radians.

-------------------------------------------------------------------
Using the data table above, the following raw terms can be built.
Notice there are numerous elements that equate to zero.  Those
elements may subsequently be removed and most of the remaining
terms may be algebraically reduced to simpler forms.

Each line represents a single term in the nutation series.

Compare the data table values to the numbers used in raw series below.

The variable s is used to hold the accumulating sum (s) of the terms
as they are sequentially evaluated.  This value is converted into
decimal degrees at the end of the summation.

s = 0
s = s + (-172064161 - 174666*T)*sin(0*L + 0*Lp + 0*F + 0*D + 1*Om) + 33386*cos(0*L + 0*Lp + 0*F + 0*D + 1*Om)
s = s + (-13170906 - 1675*T)*sin(0*L + 0*Lp + 2*F - 2*D + 2*Om) - 13696*cos(0*L + 0*Lp + 2*F - 2*D + 2*Om)
s = s + (-2276413 - 234*T)*sin(0*L + 0*Lp + 2*F + 0*D + 2*Om) + 2796*cos(0*L + 0*Lp + 2*F + 0*D + 2*Om)
s = s + (2074554 + 207*T)*sin(0*L + 0*Lp + 0*F + 0*D + 2*Om) - 698*cos(0*L + 0*Lp + 0*F + 0*D + 2*Om)
s = s + (1475877 - 3633*T)*sin(0*L + 1*Lp + 0*F + 0*D + 0*Om) + 11817*cos(0*L + 1*Lp + 0*F + 0*D + 0*Om)
s = s + (-516821 + 1226*T)*sin(0*L + 1*Lp + 2*F - 2*D + 2*Om) - 524*cos(0*L + 1*Lp + 2*F - 2*D + 2*Om)
s = s + (711159 + 73*T)*sin(1*L + 0*Lp + 0*F + 0*D + 0*Om) - 872*cos(1*L + 0*Lp + 0*F + 0*D + 0*Om)
s = s + (-387298 - 367*T)*sin(0*L + 0*Lp + 2*F + 0*D + 1*Om) + 380*cos(0*L + 0*Lp + 2*F + 0*D + 1*Om)
s = s + (-301461 - 36*T)*sin(1*L + 0*Lp + 2*F + 0*D + 2*Om) + 816*cos(1*L + 0*Lp + 2*F + 0*D + 2*Om)
s = s + (215829 - 494*T)*sin(0*L - 1*Lp + 2*F - 2*D + 2*Om) + 111*cos(0*L - 1*Lp + 2*F - 2*D + 2*Om)
s = s + (128227 + 137*T)*sin(0*L + 0*Lp + 2*F - 2*D + 1*Om) + 181*cos(0*L + 0*Lp + 2*F - 2*D + 1*Om)
s = s + (123457 + 11*T)*sin(-1*L + 0*Lp + 2*F + 0*D + 2*Om) + 19*cos(-1*L + 0*Lp + 2*F + 0*D + 2*Om)
s = s + (156994 + 10*T)*sin(-1*L + 0*Lp + 0*F + 2*D + 0*Om) - 168*cos(-1*L + 0*Lp + 0*F + 2*D + 0*Om)
s = s + (63110 + 63*T)*sin(1*L + 0*Lp + 0*F + 0*D + 1*Om) + 27*cos(1*L + 0*Lp + 0*F + 0*D + 1*Om)
s = s + (-57976 - 63*T)*sin(-1*L + 0*Lp + 0*F + 0*D + 1*Om) - 189*cos(-1*L + 0*Lp + 0*F + 0*D + 1*Om)
s = s + (-59641 - 11*T)*sin(-1*L + 0*Lp + 2*F + 2*D + 2*Om) + 149*cos(-1*L + 0*Lp + 2*F + 2*D + 2*Om)
s = s + (-51613 - 42*T)*sin(1*L + 0*Lp + 2*F + 0*D + 1*Om) + 129*cos(1*L + 0*Lp + 2*F + 0*D + 1*Om)
s = s + (45893 + 50*T)*sin(-2*L + 0*Lp + 2*F + 0*D + 1*Om) + 31*cos(-2*L + 0*Lp + 2*F + 0*D + 1*Om)
s = s + (63384 + 11*T)*sin(0*L + 0*Lp + 0*F + 2*D + 0*Om) - 150*cos(0*L + 0*Lp + 0*F + 2*D + 0*Om)
s = s + (-38571 - 1*T)*sin(0*L + 0*Lp + 2*F + 2*D + 2*Om) + 158*cos(0*L + 0*Lp + 2*F + 2*D + 2*Om)
s = s + (32481 + 0*T)*sin(0*L - 2*Lp + 2*F - 2*D + 2*Om) + 0*cos(0*L - 2*Lp + 2*F - 2*D + 2*Om)
s = s + (-47722 + 0*T)*sin(-2*L + 0*Lp + 0*F + 2*D + 0*Om) - 18*cos(-2*L + 0*Lp + 0*F + 2*D + 0*Om)
s = s + (-31046 - 1*T)*sin(2*L + 0*Lp + 2*F + 0*D + 2*Om) + 131*cos(2*L + 0*Lp + 2*F + 0*D + 2*Om)
s = s + (28593 + 0*T)*sin(1*L + 0*Lp + 2*F - 2*D + 2*Om) - 1*cos(1*L + 0*Lp + 2*F - 2*D + 2*Om)
s = s + (20441 + 21*T)*sin(-1*L + 0*Lp + 2*F + 0*D + 1*Om) + 10*cos(-1*L + 0*Lp + 2*F + 0*D + 1*Om)
s = s + (29243 + 0*T)*sin(2*L + 0*Lp + 0*F + 0*D + 0*Om) - 74*cos(2*L + 0*Lp + 0*F + 0*D + 0*Om)
s = s + (25887 + 0*T)*sin(0*L + 0*Lp + 2*F + 0*D + 0*Om) - 66*cos(0*L + 0*Lp + 2*F + 0*D + 0*Om)
s = s + (-14053 - 25*T)*sin(0*L + 1*Lp + 0*F + 0*D + 1*Om) + 79*cos(0*L + 1*Lp + 0*F + 0*D + 1*Om)
s = s + (15164 + 10*T)*sin(-1*L + 0*Lp + 0*F + 2*D + 1*Om) + 11*cos(-1*L + 0*Lp + 0*F + 2*D + 1*Om)
s = s + (-15794 + 72*T)*sin(0*L + 2*Lp + 2*F - 2*D + 2*Om) - 16*cos(0*L + 2*Lp + 2*F - 2*D + 2*Om)
s = s + (21783 + 0*T)*sin(0*L + 0*Lp - 2*F + 2*D + 0*Om) + 13*cos(0*L + 0*Lp - 2*F + 2*D + 0*Om)
s = s + (-12873 - 10*T)*sin(1*L + 0*Lp + 0*F - 2*D + 1*Om) - 37*cos(1*L + 0*Lp + 0*F - 2*D + 1*Om)
s = s + (-12654 + 11*T)*sin(0*L - 1*Lp + 0*F + 0*D + 1*Om) + 63*cos(0*L - 1*Lp + 0*F + 0*D + 1*Om)
s = s + (-10204 + 0*T)*sin(-1*L + 0*Lp + 2*F + 2*D + 1*Om) + 25*cos(-1*L + 0*Lp + 2*F + 2*D + 1*Om)
s = s + (16707 - 85*T)*sin(0*L + 2*Lp + 0*F + 0*D + 0*Om) - 10*cos(0*L + 2*Lp + 0*F + 0*D + 0*Om)
s = s + (-7691 + 0*T)*sin(1*L + 0*Lp + 2*F + 2*D + 2*Om) + 44*cos(1*L + 0*Lp + 2*F + 2*D + 2*Om)
s = s + (-11024 + 0*T)*sin(-2*L + 0*Lp + 2*F + 0*D + 0*Om) - 14*cos(-2*L + 0*Lp + 2*F + 0*D + 0*Om)
s = s + (7566 - 21*T)*sin(0*L + 1*Lp + 2*F + 0*D + 2*Om) - 11*cos(0*L + 1*Lp + 2*F + 0*D + 2*Om)
s = s + (-6637 - 11*T)*sin(0*L + 0*Lp + 2*F + 2*D + 1*Om) + 25*cos(0*L + 0*Lp + 2*F + 2*D + 1*Om)
s = s + (-7141 + 21*T)*sin(0*L - 1*Lp + 2*F + 0*D + 2*Om) + 8*cos(0*L - 1*Lp + 2*F + 0*D + 2*Om)
s = s + (-6302 - 11*T)*sin(0*L + 0*Lp + 0*F + 2*D + 1*Om) + 2*cos(0*L + 0*Lp + 0*F + 2*D + 1*Om)
s = s + (5800 + 10*T)*sin(1*L + 0*Lp + 2*F - 2*D + 1*Om) + 2*cos(1*L + 0*Lp + 2*F - 2*D + 1*Om)
s = s + (6443 + 0*T)*sin(2*L + 0*Lp + 2*F - 2*D + 2*Om) - 7*cos(2*L + 0*Lp + 2*F - 2*D + 2*Om)
s = s + (-5774 - 11*T)*sin(-2*L + 0*Lp + 0*F + 2*D + 1*Om) - 15*cos(-2*L + 0*Lp + 0*F + 2*D + 1*Om)
s = s + (-5350 + 0*T)*sin(2*L + 0*Lp + 2*F + 0*D + 1*Om) + 21*cos(2*L + 0*Lp + 2*F + 0*D + 1*Om)
s = s + (-4752 - 11*T)*sin(0*L - 1*Lp + 2*F - 2*D + 1*Om) - 3*cos(0*L - 1*Lp + 2*F - 2*D + 1*Om)
s = s + (-4940 - 11*T)*sin(0*L + 0*Lp + 0*F - 2*D + 1*Om) - 21*cos(0*L + 0*Lp + 0*F - 2*D + 1*Om)
s = s + (7350 + 0*T)*sin(-1*L - 1*Lp + 0*F + 2*D + 0*Om) - 8*cos(-1*L - 1*Lp + 0*F + 2*D + 0*Om)
s = s + (4065 + 0*T)*sin(2*L + 0*Lp + 0*F - 2*D + 1*Om) + 6*cos(2*L + 0*Lp + 0*F - 2*D + 1*Om)
s = s + (6579 + 0*T)*sin(1*L + 0*Lp + 0*F + 2*D + 0*Om) - 24*cos(1*L + 0*Lp + 0*F + 2*D + 0*Om)
s = s + (3579 + 0*T)*sin(0*L + 1*Lp + 2*F - 2*D + 1*Om) + 5*cos(0*L + 1*Lp + 2*F - 2*D + 1*Om)
s = s + (4725 + 0*T)*sin(1*L - 1*Lp + 0*F + 0*D + 0*Om) - 6*cos(1*L - 1*Lp + 0*F + 0*D + 0*Om)
s = s + (-3075 + 0*T)*sin(-2*L + 0*Lp + 2*F + 0*D + 2*Om) - 2*cos(-2*L + 0*Lp + 2*F + 0*D + 2*Om)
s = s + (-2904 + 0*T)*sin(3*L + 0*Lp + 2*F + 0*D + 2*Om) + 15*cos(3*L + 0*Lp + 2*F + 0*D + 2*Om)
s = s + (4348 + 0*T)*sin(0*L - 1*Lp + 0*F + 2*D + 0*Om) - 10*cos(0*L - 1*Lp + 0*F + 2*D + 0*Om)
s = s + (-2878 + 0*T)*sin(1*L - 1*Lp + 2*F + 0*D + 2*Om) + 8*cos(1*L - 1*Lp + 2*F + 0*D + 2*Om)
s = s + (-4230 + 0*T)*sin(0*L + 0*Lp + 0*F + 1*D + 0*Om) + 5*cos(0*L + 0*Lp + 0*F + 1*D + 0*Om)
s = s + (-2819 + 0*T)*sin(-1*L - 1*Lp + 2*F + 2*D + 2*Om) + 7*cos(-1*L - 1*Lp + 2*F + 2*D + 2*Om)
s = s + (-4056 + 0*T)*sin(-1*L + 0*Lp + 2*F + 0*D + 0*Om) + 5*cos(-1*L + 0*Lp + 2*F + 0*D + 0*Om)
s = s + (-2647 + 0*T)*sin(0*L - 1*Lp + 2*F + 2*D + 2*Om) + 11*cos(0*L - 1*Lp + 2*F + 2*D + 2*Om)
s = s + (-2294 + 0*T)*sin(-2*L + 0*Lp + 0*F + 0*D + 1*Om) - 10*cos(-2*L + 0*Lp + 0*F + 0*D + 1*Om)
s = s + (2481 + 0*T)*sin(1*L + 1*Lp + 2*F + 0*D + 2*Om) - 7*cos(1*L + 1*Lp + 2*F + 0*D + 2*Om)
s = s + (2179 + 0*T)*sin(2*L + 0*Lp + 0*F + 0*D + 1*Om) - 2*cos(2*L + 0*Lp + 0*F + 0*D + 1*Om)
s = s + (3276 + 0*T)*sin(-1*L + 1*Lp + 0*F + 1*D + 0*Om) + 1*cos(-1*L + 1*Lp + 0*F + 1*D + 0*Om)
s = s + (-3389 + 0*T)*sin(1*L + 1*Lp + 0*F + 0*D + 0*Om) + 5*cos(1*L + 1*Lp + 0*F + 0*D + 0*Om)
s = s + (3339 + 0*T)*sin(1*L + 0*Lp + 2*F + 0*D + 0*Om) - 13*cos(1*L + 0*Lp + 2*F + 0*D + 0*Om)
s = s + (-1987 + 0*T)*sin(-1*L + 0*Lp + 2*F - 2*D + 1*Om) - 6*cos(-1*L + 0*Lp + 2*F - 2*D + 1*Om)
s = s + (-1981 + 0*T)*sin(1*L + 0*Lp + 0*F + 0*D + 2*Om) + 0*cos(1*L + 0*Lp + 0*F + 0*D + 2*Om)
s = s + (4026 + 0*T)*sin(-1*L + 0*Lp + 0*F + 1*D + 0*Om) - 353*cos(-1*L + 0*Lp + 0*F + 1*D + 0*Om)
s = s + (1660 + 0*T)*sin(0*L + 0*Lp + 2*F + 1*D + 2*Om) - 5*cos(0*L + 0*Lp + 2*F + 1*D + 2*Om)
s = s + (-1521 + 0*T)*sin(-1*L + 0*Lp + 2*F + 4*D + 2*Om) + 9*cos(-1*L + 0*Lp + 2*F + 4*D + 2*Om)
s = s + (1314 + 0*T)*sin(-1*L + 1*Lp + 0*F + 1*D + 1*Om) + 0*cos(-1*L + 1*Lp + 0*F + 1*D + 1*Om)
s = s + (-1283 + 0*T)*sin(0*L - 2*Lp + 2*F - 2*D + 1*Om) + 0*cos(0*L - 2*Lp + 2*F - 2*D + 1*Om)
s = s + (-1331 + 0*T)*sin(1*L + 0*Lp + 2*F + 2*D + 1*Om) + 8*cos(1*L + 0*Lp + 2*F + 2*D + 1*Om)
s = s + (1383 + 0*T)*sin(-2*L + 0*Lp + 2*F + 2*D + 2*Om) - 2*cos(-2*L + 0*Lp + 2*F + 2*D + 2*Om)
s = s + (1405 + 0*T)*sin(-1*L + 0*Lp + 0*F + 0*D + 2*Om) + 4*cos(-1*L + 0*Lp + 0*F + 0*D + 2*Om)
s = s + (1290 + 0*T)*sin(1*L + 1*Lp + 2*F - 2*D + 2*Om) + 0*cos(1*L + 1*Lp + 2*F - 2*D + 2*Om)

-----------------------------------------------------
Convert nutation in longitude from arc sec * 10000000
into decimal degrees. This is the value returned by
the function.

dPsiDeg = s / 36000000000.0

===========================================================================

Algebraic reduction of the above yields the following simplified terms in a
format suitable for conversion into the BASIC programming language.  Other
languages may also be able to use terms expressed in this format. Keep in
mind that the BASIC language is generally NOT case sensitive.

All variables used in the terms are double-precision floating point.

===========================================================================
s = 0
s = s + (-172064161 - 174666*T)*sin(Om) + 33386*cos(Om)
s = s + (-13170906 - 1675*T)*sin(2*(F - D + Om)) - 13696*cos(2*(F - D + Om))
s = s + (-2276413 - 234*T)*sin(2*(F + Om)) + 2796*cos(2*(F + Om))
s = s + (2074554 + 207*T)*sin(2*Om) - 698*cos(2*Om)
s = s + (1475877 - 3633*T)*sin(Lp) + 11817*cos(Lp)
s = s + (-516821 + 1226*T)*sin(Lp + 2*(F - D + Om)) - 524*cos(Lp + 2*(F - D + Om))
s = s + (711159 + 73*T)*sin(L) - 872*cos(L)
s = s + (-387298 - 367*T)*sin(2*F + Om) + 380*cos(2*F + Om)
s = s + (-301461 - 36*T)*sin(L + 2*(F + Om)) + 816*cos(L + 2*(F + Om))
s = s + (215829 - 494*T)*sin(2*(F - D + Om) - Lp) + 111*cos(2*(F - D + Om) - Lp)
s = s + (128227 + 137*T)*sin(2*(F - D) + Om) + 181*cos(2*(F - D) + Om)
s = s + (123457 + 11*T)*sin(2*(F + Om) - L) + 19*cos(2*(F + Om) - L)
s = s + (156994 + 10*T)*sin(2*D - L) - 168*cos(2*D - L)
s = s + (63110 + 63*T)*sin(L + Om) + 27*cos(L + Om)
s = s + (-57976 - 63*T)*sin(Om - L) - 189*cos(Om - L)
s = s + (-59641 - 11*T)*sin(2*(F + D + Om) - L) + 149*cos(2*(F + D + Om) - L)
s = s + (-51613 - 42*T)*sin(L + 2*F + Om) + 129*cos(L + 2*F + Om)
s = s + (45893 + 50*T)*sin(2*(F - L) + Om) + 31*cos(2*(F - L) + Om)
s = s + (63384 + 11*T)*sin(2*D) - 150*cos(2*D)
s = s + (-38571 - T)*sin(2*(F + D + Om)) + 158*cos(2*(F + D + Om))
s = s + 32481*sin(2*(F - Lp - D + Om))
s = s - 47722*sin(2*(D - L)) + 18*cos(2*(D - L))
s = s + (-31046 - T)*sin(2*(L + F + Om)) + 131*cos(2*(L + F + Om))
s = s + 28593*sin(L + 2*(F - D + Om)) - cos(L + 2*(F - D + Om))
s = s + (20441 + 21*T)*sin(2*F + Om - L) + 10*cos(2*F + Om - L)
s = s + 29243*sin(2*L) - 74*cos(2*L)
s = s + 25887*sin(2*F) - 66*cos(2*F)
s = s + (-14053 - 25*T)*sin(Lp + Om) + 79*cos(Lp + Om)
s = s + (15164 + 10*T)*sin(2*D - L + Om) + 11*cos(2*D - L + Om)
s = s + (-15794 + 72*T)*sin(2*(Lp + F - D + Om)) - 16*cos(2*(Lp + F - D + Om))
s = s + 21783*sin(2*(D - F)) + 13*cos(2*(D - F))
s = s + (-12873 - 10*T)*sin(L - 2*D + Om) - 37*cos(L - 2*D + Om)
s = s + (-12654 + 11*T)*sin(Om - Lp) + 63*cos(Om - Lp)
s = s - 10204*sin(2*(F + D) + Om - L) - 25*cos(2*(F + D) + Om - L)
s = s + (16707 - 85*T)*sin(2*Lp) - 10*cos(2*Lp)
s = s - 7691*sin(L + 2*(F + D + Om)) - 44*cos(L + 2*(F + D + Om))
s = s - 11024*sin(2*(F - L)) + 14*cos(2*(F - L))
s = s + (7566 - 21*T)*sin(Lp + 2*(F + Om)) - 11*cos(Lp + 2*(F + Om))
s = s + (-6637 - 11*T)*sin(2*(F + D) + Om) + 25*cos(2*(F + D) + Om)
s = s + (-7141 + 21*T)*sin(2*(F + Om) - Lp) + 8*cos(2*(F + Om) - Lp)
s = s + (-6302 - 11*T)*sin(2*D + Om) + 2*cos(2*D + Om)
s = s + (5800 + 10*T)*sin(L + 2*(F - D) + Om) + 2*cos(L + 2*(F - D) + Om)
s = s + 6443*sin(2*(L + F - D + Om)) - 7*cos(2*(L + F - D + Om))
s = s + (-5774 - 11*T)*sin(2*(D - L) + Om) - 15*cos(2*(D - L) + Om)
s = s - 5350*sin(2*(L + F) + Om) - 21*cos(2*(L + F) + Om)
s = s + (-4752 - 11*T)*sin(2*(F - D) + Om - Lp) - 3*cos(2*(F - D) + Om - Lp)
s = s + (-4940 - 11*T)*sin(Om - 2*D) - 21*cos(Om - 2*D)
s = s + 7350*sin(2*D - L - Lp) - 8*cos(2*D - L - Lp)
s = s + 4065*sin(2*(L - D) + Om) + 6*cos(2*(L - D) + Om)
s = s + 6579*sin(L + 2*D) - 24*cos(L + 2*D)
s = s + 3579*sin(Lp + 2*(F - D) + Om) + 5*cos(Lp + 2*(F - D) + Om)
s = s + 4725*sin(L - Lp) - 6*cos(L - Lp)
s = s - 3075*sin(2*(F + Om - L)) + 2*cos(2*(F + Om - L))
s = s - 2904*sin(3*L + 2*(F + Om)) - 15*cos(3*L + 2*(F + Om))
s = s + 4348*sin(2*D - Lp) - 10*cos(2*D - Lp)
s = s - 2878*sin(L - Lp + 2*(F + Om)) - 8*cos(L - Lp + 2*(F + Om))
s = s - 4230*sin(D) - 5*cos(D)
s = s - 2819*sin(2*(F + D + Om) - L - Lp) - 7*cos(2*(F + D + Om) - L - Lp)
s = s - 4056*sin(2*F - L) - 5*cos(2*F - L)
s = s - 2647*sin(2*(F + D + Om) - Lp) - 11*cos(2*(F + D + Om) - Lp)
s = s - 2294*sin(Om - 2*L) + 10*cos(Om - 2*L)
s = s + 2481*sin(L + Lp + 2*(F + Om)) - 7*cos(L + Lp + 2*(F + Om))
s = s + 2179*sin(2*L + Om) - 2*cos(2*L + Om)
s = s + 3276*sin(Lp + D - L) + cos(Lp + D - L)
s = s - 3389*sin(L + Lp) - 5*cos(L + Lp)
s = s + 3339*sin(L + 2*F) - 13*cos(L + 2*F)
s = s - 1987*sin(2*(F - D) + Om - L) + 6*cos(2*(F - D) + Om - L)
s = s - 1981*sin(L + 2*Om)
s = s + 4026*sin(D - L) - 353*cos(D - L)
s = s + 1660*sin(2*F + D + 2*Om) - 5*cos(D + 2*(F + Om))
s = s - 1521*sin(2*(F + 2*D + Om) - L) - 9*cos(2*(F + 2*D + Om) - L)
s = s + 1314*sin(Lp + D + Om - L)
s = s - 1283*sin(2*(F - D - Lp) + Om)
s = s - 1331*sin(L + 2*F + 2*D + Om) - 8*cos(L + 2*(F + D) + Om)
s = s + 1383*sin(2*(F - L + D + Om)) - 2*cos(2*(F - L + D + Om))
s = s + 1405*sin(2*Om - L) + 4*cos(2*Om - L)
s = s + 1290*sin(L + Lp + 2*(F - D + Om))

dPsiDeg = s / 36000000000.0





===========================================================================

For conversion into Java, CPP or PHP the following term structures may
prove to be more convenient for translation.

All variables used in the terms are double-precision floating point.

In some languages, it may be necessary to replace sin(x) with Math.sin(x)
and cos(x) with Math.cos(x) instead.

===========================================================================
s = 0;
s += (-172064161 - 174666*T)*sin(Om) + 33386*cos(Om);
s += (-13170906 - 1675*T)*sin(2*(F - D + Om)) - 13696*cos(2*(F - D + Om));
s += (-2276413 - 234*T)*sin(2*(F + Om)) + 2796*cos(2*(F + Om));
s += (2074554 + 207*T)*sin(2*Om) - 698*cos(2*Om);
s += (1475877 - 3633*T)*sin(Lp) + 11817*cos(Lp);
s += (-516821 + 1226*T)*sin(Lp + 2*(F - D + Om)) - 524*cos(Lp + 2*(F - D + Om));
s += (711159 + 73*T)*sin(L) - 872*cos(L);
s += (-387298 - 367*T)*sin(2*F + Om) + 380*cos(2*F + Om);
s += (-301461 - 36*T)*sin(L + 2*(F + Om)) + 816*cos(L + 2*(F + Om));
s += (215829 - 494*T)*sin(2*(F - D + Om) - Lp) + 111*cos(2*(F - D + Om) - Lp);
s += (128227 + 137*T)*sin(2*(F - D) + Om) + 181*cos(2*(F - D) + Om);
s += (123457 + 11*T)*sin(2*(F + Om) - L) + 19*cos(2*(F + Om) - L);
s += (156994 + 10*T)*sin(2*D - L) - 168*cos(2*D - L);
s += (63110 + 63*T)*sin(L + Om) + 27*cos(L + Om);
s += (-57976 - 63*T)*sin(Om - L) - 189*cos(Om - L);
s += (-59641 - 11*T)*sin(2*(F + D + Om) - L) + 149*cos(2*(F + D + Om) - L);
s += (-51613 - 42*T)*sin(L + 2*F + Om) + 129*cos(L + 2*F + Om);
s += (45893 + 50*T)*sin(2*(F - L) + Om) + 31*cos(2*(F - L) + Om);
s += (63384 + 11*T)*sin(2*D) - 150*cos(2*D);
s += (-38571 - T)*sin(2*(F + D + Om)) + 158*cos(2*(F + D + Om));
s += 32481*sin(2*(F - Lp - D + Om));
s -= 47722*sin(2*(D - L)) + 18*cos(2*(D - L));
s += (-31046 - T)*sin(2*(L + F + Om)) + 131*cos(2*(L + F + Om));
s += 28593*sin(L + 2*(F - D + Om)) - cos(L + 2*(F - D + Om));
s += (20441 + 21*T)*sin(2*F + Om - L) + 10*cos(2*F + Om - L);
s += 29243*sin(2*L) - 74*cos(2*L);
s += 25887*sin(2*F) - 66*cos(2*F);
s += (-14053 - 25*T)*sin(Lp + Om) + 79*cos(Lp + Om);
s += (15164 + 10*T)*sin(2*D - L + Om) + 11*cos(2*D - L + Om);
s += (-15794 + 72*T)*sin(2*(Lp + F - D + Om)) - 16*cos(2*(Lp + F - D + Om));
s += 21783*sin(2*(D - F)) + 13*cos(2*(D - F));
s += (-12873 - 10*T)*sin(L - 2*D + Om) - 37*cos(L - 2*D + Om);
s += (-12654 + 11*T)*sin(Om - Lp) + 63*cos(Om - Lp);
s -= 10204*sin(2*(F + D) + Om - L) - 25*cos(2*(F + D) + Om - L);
s += (16707 - 85*T)*sin(2*Lp) - 10*cos(2*Lp);
s -= 7691*sin(L + 2*(F + D + Om)) - 44*cos(L + 2*(F + D + Om));
s -= 11024*sin(2*(F - L)) + 14*cos(2*(F - L));
s += (7566 - 21*T)*sin(Lp + 2*(F + Om)) - 11*cos(Lp + 2*(F + Om));
s += (-6637 - 11*T)*sin(2*(F + D) + Om) + 25*cos(2*(F + D) + Om);
s += (-7141 + 21*T)*sin(2*(F + Om) - Lp) + 8*cos(2*(F + Om) - Lp);
s += (-6302 - 11*T)*sin(2*D + Om) + 2*cos(2*D + Om);
s += (5800 + 10*T)*sin(L + 2*(F - D) + Om) + 2*cos(L + 2*(F - D) + Om);
s += 6443*sin(2*(L + F - D + Om)) - 7*cos(2*(L + F - D + Om));
s += (-5774 - 11*T)*sin(2*(D - L) + Om) - 15*cos(2*(D - L) + Om);
s -= 5350*sin(2*(L + F) + Om) - 21*cos(2*(L + F) + Om);
s += (-4752 - 11*T)*sin(2*(F - D) + Om - Lp) - 3*cos(2*(F - D) + Om - Lp);
s += (-4940 - 11*T)*sin(Om - 2*D) - 21*cos(Om - 2*D);
s += 7350*sin(2*D - L - Lp) - 8*cos(2*D - L - Lp);
s += 4065*sin(2*(L - D) + Om) + 6*cos(2*(L - D) + Om);
s += 6579*sin(L + 2*D) - 24*cos(L + 2*D);
s += 3579*sin(Lp + 2*(F - D) + Om) + 5*cos(Lp + 2*(F - D) + Om);
s += 4725*sin(L - Lp) - 6*cos(L - Lp);
s -= 3075*sin(2*(F + Om - L)) + 2*cos(2*(F + Om - L));
s -= 2904*sin(3*L + 2*(F + Om)) - 15*cos(3*L + 2*(F + Om));
s += 4348*sin(2*D - Lp) - 10*cos(2*D - Lp);
s -= 2878*sin(L - Lp + 2*(F + Om)) - 8*cos(L - Lp + 2*(F + Om));
s -= 4230*sin(D) - 5*cos(D);
s -= 2819*sin(2*(F + D + Om) - L - Lp) - 7*cos(2*(F + D + Om) - L - Lp);
s -= 4056*sin(2*F - L) - 5*cos(2*F - L);
s -= 2647*sin(2*(F + D + Om) - Lp) - 11*cos(2*(F + D + Om) - Lp);
s -= 2294*sin(Om - 2*L) + 10*cos(Om - 2*L);
s += 2481*sin(L + Lp + 2*(F + Om)) - 7*cos(L + Lp + 2*(F + Om));
s += 2179*sin(2*L + Om) - 2*cos(2*L + Om);
s += 3276*sin(Lp + D - L) + cos(Lp + D - L);
s -= 3389*sin(L + Lp) - 5*cos(L + Lp);
s += 3339*sin(L + 2*F) - 13*cos(L + 2*F);
s -= 1987*sin(2*(F - D) + Om - L) + 6*cos(2*(F - D) + Om - L);
s -= 1981*sin(L + 2*Om);
s += 4026*sin(D - L) - 353*cos(D - L);
s += 1660*sin(2*F + D + 2*Om) - 5*cos(D + 2*(F + Om));
s -= 1521*sin(2*(F + 2*D + Om) - L) - 9*cos(2*(F + 2*D + Om) - L);
s += 1314*sin(Lp + D + Om - L);
s -= 1283*sin(2*(F - D - Lp) + Om);
s -= 1331*sin(L + 2*F + 2*D + Om) - 8*cos(L + 2*(F + D) + Om);
s += 1383*sin(2*(F - L + D + Om)) - 2*cos(2*(F - L + D + Om));
s += 1405*sin(2*Om - L) + 4*cos(2*Om - L);
s += 1290*sin(L + Lp + 2*(F - D + Om));

dPsiDeg = s / 36000000000.0;






Jay Tanner - 2011
Contact: Jay at PHPScienceLabs dot US
NO SPAM