home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Education
/
collectionofeducationcarat1997.iso
/
SCIENCE
/
DE118I.ZIP
/
PRECESS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-30
|
13KB
|
473 lines
/* Precession of the equinox and ecliptic
* from epoch Julian date J to or from J2000.0
*
* Program by Steve Moshier.
*
*
* The IAU formula is not used in this version.
* IAU Coefficients are from:
* J. H. Lieske, T. Lederle, W. Fricke, and B. Morando,
* "Expressions for the Precession Quantities Based upon the IAU
* (1976) System of Astronomical Constants," Astronomy and
* Astrophysics 58, 1-16 (1977).
*
* Newer formulas that cover a much longer time span are from:
* J. Laskar, "Secular terms of classical planetary theories
* using the results of general theory," Astronomy and Astrophysics
* 157, 59070 (1986).
*
* See also:
* P. Bretagnon and G. Francou, "Planetary theories in rectangular
* and spherical variables. VSOP87 solutions," Astronomy and
* Astrophysics 202, 309-315 (1988).
*
* Laskar's expansions are said by Bretagnon and Francou
* to have "a precision of about 1" over 10000 years before
* and after J2000.0 in so far as the precession constants p^0_A
* and epsilon^0_A are perfectly known."
*
* Bretagnon and Francou's expansions for the node and inclination
* of the ecliptic were derived from Laskar's data but were truncated
* after the term in T**6. I have recomputed these expansions from
* Laskar's data, retaining powers up to T**10 in the result.
*
* The following table indicates the differences between the result
* of the IAU formula and Laskar's formula using four different test
* vectors, checking at J2000 plus and minus the indicated number
* of years.
*
* Years Arc
* from J2000 Seconds
* ---------- -------
* 0 0
* 100 .006
* 200 .006
* 500 .015
* 1000 .28
* 2000 6.4
* 3000 38.
* 10000 9400.
*/
#ifndef NOINCS
#include "mconf.h"
#include "prec.h"
#endif
#if LDOUBLE
#if UNK
/* Precession coefficients taken from Laskar's paper: */
static DOUBLE pAcof[10] = {
-8.66000000000000000000E-10L,
-4.75900000000000000000E-8L,
2.42400000000000000000E-7L,
1.30950000000000000000E-5L,
1.74510000000000000000E-4L,
-1.80550000000000000000E-3L,
-2.35316000000000000000E-1L,
7.73200000000000000000E-2L,
1.11197100000000000000E2L,
5.02909660000000000000E4L
};
/* Node and inclination of the earth's orbit computed from
* Laskar's data as done in Bretagnon and Francou's paper:
*/
static DOUBLE nodecof[11] = {
6.64020000000000000000E-16L,
-2.69151000000000000000E-15L,
-1.54702100000000000000E-12L,
7.52131300000000000000E-12L,
6.31901310000000000000E-10L,
-3.48388152000000000000E-9L,
-1.81306589600000000000E-7L,
2.75036225000000000000E-8L,
7.43945314260000000000E-5L,
-4.20786043170000000000E-2L,
3.05211265497500000000E0L
};
static DOUBLE inclcof[11] = {
1.21470000000000000000E-16L,
7.37590000000000000000E-17L,
-8.26287000000000000000E-14L,
2.50341000000000000000E-13L,
2.46508390000000000000E-11L,
-5.40004410000000000000E-11L,
1.32115526000000000000E-9L,
-5.99873702700000000000E-7L,
-1.62427970910000000000E-5L,
2.27849553700000000000E-3L,
0.00000000000000000000E0L
};
#endif
#if IBMPC
static short pAcof[] = {
0x3761,0xf547,0x551b,0xee0b,0xbfe0, XPD
0x6a6d,0x43d6,0xc224,0xcc65,0xbfe6, XPD
0x3ffe,0x5966,0x33cb,0x8223,0x3fe9, XPD
0x9413,0x06aa,0x98c4,0xdbb2,0x3fee, XPD
0xdda4,0x9c6c,0xabe2,0xb6fc,0x3ff2, XPD
0xc6e3,0xe62d,0x86e7,0xeca6,0xbff5, XPD
0xe8c0,0xe6f2,0xad70,0xf0f6,0xbffc, XPD
0x6018,0x9d1f,0xf2ba,0x9e59,0x3ffb, XPD
0x4c98,0x8c15,0xea4a,0xde64,0x4005, XPD
0xef9e,0xc6a7,0xf74b,0xc472,0x400e, XPD
};
static short nodecof[] = {
0x38c8,0xf647,0x072a,0xbf64,0x3fcc, XPD
0x9b76,0xc03f,0x989c,0xc1f1,0xbfce, XPD
0x88e7,0x5905,0x4e3b,0xd9b9,0xbfd7, XPD
0xa57c,0x25f2,0xfb80,0x8450,0x3fda, XPD
0xf7b9,0x5a5a,0x1a04,0xadb2,0x3fe0, XPD
0x41a8,0xe90f,0x1783,0xef69,0xbfe2, XPD
0x8c7c,0x7312,0x2d05,0xc2ad,0xbfe8, XPD
0xe099,0x5ad6,0x1b01,0xec41,0x3fe5, XPD
0x8ff0,0x1112,0x428b,0x9c04,0x3ff1, XPD
0xbe8d,0x7207,0x9d56,0xac5a,0xbffa, XPD
0xa4e6,0x34d2,0xd051,0xc355,0x4000, XPD
};
static short inclcof[] = {
0x0681,0xeffb,0x9db4,0x8c0b,0x3fca, XPD
0xf1e2,0xed33,0xa0f0,0xaa13,0x3fc9, XPD
0xcd60,0x3987,0x33db,0xba10,0xbfd3, XPD
0xb113,0x604a,0xf0b7,0x8ced,0x3fd5, XPD
0x206c,0xe1ba,0xc131,0xd8d4,0x3fdb, XPD
0xb3b2,0xfa51,0x176b,0xed7f,0xbfdc, XPD
0xd03a,0x5b5d,0x04ac,0xb594,0x3fe1, XPD
0xe322,0xf2f6,0x01c7,0xa107,0xbfea, XPD
0x7f4e,0x73db,0x2422,0x8841,0xbfef, XPD
0x9c64,0xc468,0xcfd0,0x9552,0x3ff6, XPD
0x0000,0x0000,0x0000,0x0000,0x0000, XPD
};
#endif
#if MIEEE
static long pAcof[30] = {
0xbfe00000,0xee0b551b,0xf5473761,
0xbfe60000,0xcc65c224,0x43d66a6d,
0x3fe90000,0x822333cb,0x59663ffe,
0x3fee0000,0xdbb298c4,0x06aa9413,
0x3ff20000,0xb6fcabe2,0x9c6cdda4,
0xbff50000,0xeca686e7,0xe62dc6e3,
0xbffc0000,0xf0f6ad70,0xe6f2e8c0,
0x3ffb0000,0x9e59f2ba,0x9d1f6018,
0x40050000,0xde64ea4a,0x8c154c98,
0x400e0000,0xc472f74b,0xc6a7ef9e
};
static long nodecof[33] = {
0x3fcc0000,0xbf64072a,0xf64738c8,
0xbfce0000,0xc1f1989c,0xc03f9b76,
0xbfd70000,0xd9b94e3b,0x590588e7,
0x3fda0000,0x8450fb80,0x25f2a57c,
0x3fe00000,0xadb21a04,0x5a5af7b9,
0xbfe20000,0xef691783,0xe90f41a8,
0xbfe80000,0xc2ad2d05,0x73128c7c,
0x3fe50000,0xec411b01,0x5ad6e099,
0x3ff10000,0x9c04428b,0x11128ff0,
0xbffa0000,0xac5a9d56,0x7207be8d,
0x40000000,0xc355d051,0x34d2a4e6
};
static long inclcof[33] = {
0x3fca0000,0x8c0b9db4,0xeffb0681,
0x3fc90000,0xaa13a0f0,0xed33f1e2,
0xbfd30000,0xba1033db,0x3987cd60,
0x3fd50000,0x8cedf0b7,0x604ab113,
0x3fdb0000,0xd8d4c131,0xe1ba206c,
0xbfdc0000,0xed7f176b,0xfa51b3b2,
0x3fe10000,0xb59404ac,0x5b5dd03a,
0xbfea0000,0xa10701c7,0xf2f6e322,
0xbfef0000,0x88412422,0x73db7f4e,
0x3ff60000,0x9552cfd0,0xc4689c64,
0x00000000,0x00000000,0x00000000
};
#endif
#else /* regular double */
#if UNK
static DOUBLE pAcof[10] = {
-8.66000000000000000000E-10,
-4.75900000000000000000E-8,
2.42400000000000000000E-7,
1.30950000000000000000E-5,
1.74510000000000000000E-4,
-1.80550000000000000000E-3,
-2.35316000000000000000E-1,
7.73200000000000000000E-2,
1.11197100000000000000E2,
5.02909660000000000000E4
};
static DOUBLE nodecof[11] = {
6.64020000000000000000E-16,
-2.69151000000000000000E-15,
-1.54702100000000000000E-12,
7.52131300000000000000E-12,
6.31901310000000000000E-10,
-3.48388152000000000000E-9,
-1.81306589600000000000E-7,
2.75036225000000000000E-8,
7.43945314260000000000E-5,
-4.20786043170000000000E-2,
3.05211265497500000000E0
};
static DOUBLE inclcof[11] = {
1.21470000000000000000E-16,
7.37590000000000000000E-17,
-8.26287000000000000000E-14,
2.50341000000000000000E-13,
2.46508390000000000000E-11,
-5.40004410000000000000E-11,
1.32115526000000000000E-9,
-5.99873702700000000000E-7,
-1.62427970910000000000E-5,
2.27849553700000000000E-3,
0.00000000000000000000E0
};
#endif
#if DEC
static short pAcof[40] = {
0130556,0005525,0015765,0043467,
0132114,0062702,0022103,0153152,
0032602,0021463,0145531,0063100,
0034133,0131230,0142006,0125224,
0035066,0176253,0161234,0066336,
0135754,0123206,0163746,0026707,
0137560,0173255,0070346,0171351,
0037236,0054762,0135235,0017540,
0041736,0062352,0045214,0012515,
0044104,0071367,0045706,0123760
};
static short nodecof[44] = {
0023477,0062007,0025366,0043471,
0124101,0170630,0116300,0037633,
0126331,0134516,0035531,0002611,
0027004,0050373,0100045,0171245,
0030455,0131032,0002132,0055370,
0131157,0064427,0101751,0007502,
0132502,0126455,0002563,0011214,
0031754,0040433,0000532,0153341,
0034634,0002102,0105421,0011220,
0137054,0055235,0053162,0003677,
0040503,0052720,0050464,0151245
};
static short inclcof[44] = {
0023014,0005635,0132357,0175406,
0022652,0011640,0170355,0031762,
0125272,0010063,0155471,0103715,
0025614,0166760,0133540,0045261,
0027330,0152301,0030741,0135040,
0127555,0077427,0065772,0050664,
0030665,0112004,0126133,0056720,
0133041,0003401,0143762,0173343,
0134210,0040444,0021163,0155577,
0036025,0051317,0150304,0064234,
0000000,0000000,0000000,0000000,
};
#endif
#if IBMPC
static short pAcof[40] = {
0xa8e7,0xa37e,0xc16a,0xbe0d,
0x7acd,0x4488,0x8cb8,0xbe69