source: trunk/FACT++/pal/palPrebn.c@ 19340

Last change on this file since 19340 was 18347, checked in by tbretz, 9 years ago
File size: 2.8 KB
Line 
1/*
2*+
3* Name:
4* palPrebn
5
6* Purpose:
7* Generate the matrix of precession between two objects (old)
8
9* Language:
10* Starlink ANSI C
11
12* Type of Module:
13* Library routine
14
15* Invocation:
16* void palPrebn ( double bep0, double bep1, double rmatp[3][3] );
17
18* Arguments:
19* bep0 = double (Given)
20* Beginning Besselian epoch.
21* bep1 = double (Given)
22* Ending Besselian epoch
23* rmatp = double[3][3] (Returned)
24* precession matrix in the sense V(BEP1) = RMATP * V(BEP0)
25
26* Description:
27* Generate the matrix of precession between two epochs,
28* using the old, pre-IAU1976, Bessel-Newcomb model, using
29* Kinoshita's formulation
30
31* Authors:
32* PTW: Pat Wallace (STFC)
33* TIMJ: Tim Jenness (JAC, Hawaii)
34* {enter_new_authors_here}
35
36* See Also:
37* Kinoshita, H. (1975) 'Formulas for precession', SAO Special
38* Report No. 364, Smithsonian Institution Astrophysical
39* Observatory, Cambridge, Massachusetts.
40
41* History:
42* 2012-02-12(TIMJ):
43* Initial version with documentation taken from Fortran SLA
44* Adapted with permission from the Fortran SLALIB library.
45* {enter_further_changes_here}
46
47* Copyright:
48* Copyright (C) 1996 Rutherford Appleton Laboratory
49* Copyright (C) 2012 Science and Technology Facilities Council.
50* All Rights Reserved.
51
52* Licence:
53* This program is free software: you can redistribute it and/or
54* modify it under the terms of the GNU Lesser General Public
55* License as published by the Free Software Foundation, either
56* version 3 of the License, or (at your option) any later
57* version.
58*
59* This program is distributed in the hope that it will be useful,
60* but WITHOUT ANY WARRANTY; without even the implied warranty of
61* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62* GNU Lesser General Public License for more details.
63*
64* You should have received a copy of the GNU Lesser General
65* License along with this program. If not, see
66* <http://www.gnu.org/licenses/>.
67
68* Bugs:
69* {note_any_bugs_here}
70*-
71*/
72
73#include "pal.h"
74#include "palmac.h"
75
76void palPrebn ( double bep0, double bep1, double rmatp[3][3] ) {
77
78 double t,bigt, zeta, theta, z, tas2r, w;
79
80 /* Interval between basic epoch B1850.0 and beginning epoch in TC */
81 bigt = (bep0-1850)/100.;
82
83 /* Interval over which precession required, in tropical centuries */
84 t = (bep1-bep0)/100.;
85
86 /* Euler angles */
87 tas2r = t * PAL__DAS2R;
88 w = 2303.5548 + ( 1.39720 + 0.000059 * bigt) * bigt;
89
90 zeta = ( w + ( 0.30242 - 0.000269 * bigt + 0.017996 * t ) * t ) * tas2r;
91 z = ( w + ( 1.09478 + 0.000387 * bigt + 0.018324 * t ) * t ) * tas2r;
92 theta = ( 2005.1125 + ( -0.85294 - 0.000365 * bigt ) * bigt +
93 (-0.42647 - 0.000365 * bigt - 0.041802 * t ) * t ) * tas2r;
94
95 /* Rotation matrix */
96 palDeuler("ZYZ", -zeta, theta, -z, rmatp);
97
98}
Note: See TracBrowser for help on using the repository browser.