File Coverage

palsrc/palNut.c
Criterion Covered Total %
statement 4 4 100.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             /*
2             *+
3             * Name:
4             * palNut
5              
6             * Purpose:
7             * Form the matrix of nutation
8              
9             * Language:
10             * Starlink ANSI C
11              
12             * Type of Module:
13             * Library routine
14              
15             * Invocation:
16             * void palNut( double date, double rmatn[3][3] );
17              
18             * Arguments:
19             * date = double (Given)
20             * TT as modified Julian date (JD-2400000.5)
21             * rmatn = double [3][3] (Returned)
22             * Nutation matrix in the sense v(true)=rmatn * v(mean)
23             * where v(true) is the star vector relative to the
24             * true equator and equinox of date and v(mean) is the
25             * star vector relative to the mean equator and equinox
26             * of date.
27              
28             * Description:
29             * Form the matrix of nutation for a given date using
30             * the IAU 2006 nutation model and palDeuler.
31              
32             * Authors:
33             * PTW: Patrick T. Wallace
34             * TIMJ: Tim Jenness (JAC, Hawaii)
35             * {enter_new_authors_here}
36              
37             * Notes:
38             * - Uses eraNut06a via palNutc
39             * - The distinction between TDB and TT is negligible. For all but
40             * the most critical applications UTC is adequate.
41              
42             * History:
43             * 2012-03-07 (TIMJ):
44             * Initial version
45             * Adapted with permission from the Fortran SLALIB library.
46             * {enter_further_changes_here}
47              
48             * Copyright:
49             * Copyright (C) 2005 Patrick T. Wallace
50             * Copyright (C) 2012 Science and Technology Facilities Council.
51             * All Rights Reserved.
52              
53             * Licence:
54             * This program is free software; you can redistribute it and/or
55             * modify it under the terms of the GNU General Public License as
56             * published by the Free Software Foundation; either version 3 of
57             * the License, or (at your option) any later version.
58             *
59             * This program is distributed in the hope that it will be
60             * useful, but WITHOUT ANY WARRANTY; without even the implied
61             * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
62             * PURPOSE. See the GNU General Public License for more details.
63             *
64             * You should have received a copy of the GNU General Public License
65             * along with this program; if not, write to the Free Software
66             * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
67             * MA 02110-1301, USA.
68              
69             * Bugs:
70             * {note_any_bugs_here}
71             *-
72             */
73              
74             #include "pal.h"
75              
76 10           void palNut( double date, double rmatn[3][3]) {
77             double dpsi, deps, eps0;
78              
79             /* Nutation component and mean obliquity */
80 10           palNutc( date, &dpsi, &deps, &eps0 );
81              
82             /* Rotation matrix */
83 10           palDeuler( "XZX", eps0, -dpsi, -(eps0+deps), rmatn );
84              
85 10           }