source: trunk/MagicSoft/slalib/precl.c@ 9132

Last change on this file since 9132 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaPrecl ( double ep0, double ep1, double rmatp[3][3] )
4/*
5** - - - - - - - - -
6** s l a P r e c l
7** - - - - - - - - -
8**
9** Form the matrix of precession between two epochs, using the
10** model of Simon et al (1994), which is suitable for long
11** periods of time.
12**
13** (double precision)
14**
15** Given:
16** ep0 double beginning epoch
17** ep1 double ending epoch
18**
19** Returned:
20** rmatp double[3][3] precession matrix
21**
22** Notes:
23**
24** 1) The epochs are TDB (loosely ET) Julian epochs.
25**
26** 2) The matrix is in the sense v(ep1) = rmatp * v(ep0) .
27**
28** 3) The absolute accuracy of the model is limited by the
29** uncertainty in the general precession, about 0.3 arcsec per
30** 1000 years. The remainder of the formulation provides a
31** precision of 1 mas over the interval from 1000AD to 3000AD,
32** 0.1 arcsec from 1000BC to 5000AD and 1 arcsec from
33** 4000BC to 8000AD.
34**
35** Reference:
36** Simon, J.L., et al., 1994. Astron.Astrophys., 282, 663-683.
37**
38** Called: slaDeuler
39**
40** Defined in slamac.h: DAS2R
41**
42** Last revision: 23 August 1994
43**
44** Copyright P.T.Wallace. All rights reserved.
45*/
46{
47 double t0, t, tas2r, w, zeta, z, theta;
48
49/* Interval between basic epoch J2000.0 and beginning epoch (1000JY) */
50 t0 = ( ep0 - 2000.0 ) / 1000.0;
51
52/* Interval over which precession required (1000JY) */
53 t = ( ep1 - ep0 ) / 1000.0;
54
55/* Euler angles */
56 tas2r = t * DAS2R;
57 w = 23060.9097 +
58 ( 139.7459 +
59 ( - 0.0038 +
60 ( - 0.5918 +
61 ( - 0.0037 +
62 0.0007 * t0 ) * t0 ) * t0 ) * t0 ) * t0;
63
64 zeta = ( w +
65 ( 30.2226 +
66 ( - 0.2523 +
67 ( - 0.3840 +
68 ( - 0.0014 +
69 0.0007 * t0 ) * t0 ) * t0 ) * t0 +
70 ( 18.0183 +
71 ( - 0.1326 +
72 ( 0.0006 +
73 0.0005 * t0 ) * t0 ) * t0 +
74 ( - 0.0583 +
75 ( - 0.0001 +
76 0.0007 * t0 ) * t0 +
77 ( - 0.0285 +
78 ( - 0.0002 ) * t ) * t ) * t ) * t ) * t ) * tas2r;
79
80 z = ( w +
81 ( 109.5270 +
82 ( 0.2446 +
83 ( - 1.3913 +
84 ( - 0.0134 +
85 0.0026 * t0 ) * t0 ) * t0 ) * t0 +
86 ( 18.2667 +
87 ( - 1.1400 +
88 ( - 0.0173 +
89 0.0044 * t0 ) * t0 ) * t0 +
90 ( - 0.2821 +
91 ( - 0.0093 +
92 0.0032 * t0 ) * t0 +
93 ( -0.0301 +
94 0.0006 * t0
95 - 0.0001 * t ) * t ) * t ) * t ) * t ) * tas2r;
96
97 theta = ( 20042.0207 +
98 ( - 85.3131 +
99 ( - 0.2111 +
100 ( 0.3642 +
101 ( 0.0008 +
102 ( - 0.0005 ) * t0 ) * t0 ) * t0 ) * t0 ) * t0 +
103 ( - 42.6566 +
104 ( - 0.2111 +
105 ( 0.5463 +
106 ( 0.0017 +
107 ( - 0.0012 ) * t0 ) * t0 ) * t0 ) * t0 +
108 ( - 41.8238 +
109 ( 0.0359 +
110 ( 0.0027 +
111 ( - 0.0001 ) * t0 ) * t0 ) * t0 +
112 ( - 0.0731 +
113 ( 0.0019 +
114 0.0009 * t0 ) * t0 +
115 ( - 0.0127 +
116 0.0011 * t0 + 0.0004 * t ) * t ) * t ) * t ) * t ) * tas2r;
117
118/* Rotation matrix */
119 slaDeuler ( "ZYZ", -zeta, theta, -z, rmatp );
120}
Note: See TracBrowser for help on using the repository browser.