source: trunk/MagicSoft/slalib/dt.c@ 10337

Last change on this file since 10337 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3double slaDt ( double epoch )
4/*
5** - - - - - -
6** s l a D t
7** - - - - - -
8**
9** Estimate the offset between dynamical time and Universal Time
10** for a given historical epoch.
11**
12** (double precision)
13**
14** Given:
15** epoch double (Julian) epoch (e.g. 1850.0)
16**
17** The result is a rough estimate of ET-UT (after 1984, TT-UT1) at
18** the given epoch, in seconds.
19**
20** Notes:
21**
22** 1 Depending on the epoch, one of three parabolic approximations
23** is used:
24**
25** before 979 Stephenson & Morrison's 390 BC to AD 948 model
26** 979 to 1708 Stephenson & Morrison's 948 to 1600 model
27** after 1708 McCarthy & Babcock's post-1650 model
28**
29** The breakpoints are chosen to ensure continuity: they occur
30** at places where the adjacent models give the same answer as
31** each other.
32**
33** 2 The accuracy is modest, with errors of up to 20 sec during
34** the interval since 1650, rising to perhaps 30 min by 1000 BC.
35** Comparatively accurate values from AD 1600 are tabulated in
36** the Astronomical Almanac (see section K8 of the 1995 AA).
37**
38** 3 The use of double-precision for both argument and result is
39** purely for compatibility with other SLALIB time routines.
40**
41** 4 The models used are based on a lunar tidal acceleration value
42** of -26.00 arcsec per century.
43**
44** Reference: Explanatory Supplement to the Astronomical Almanac,
45** ed P.K.Seidelmann, University Science Books (1992),
46** section 2.553, p83. This contains references to
47** the Stephenson & Morrison and McCarthy & Babcock
48** papers.
49**
50** Last revision: 14 February 1995
51**
52** Copyright P.T.Wallace. All rights reserved.
53*/
54{
55 double t, w, s;
56
57
58/* Centuries since 1800 */
59 t = ( epoch - 1800.0 ) / 100.0;
60
61/* Select model */
62 if ( epoch >= 1708.185161980887 ) {
63
64 /* Post-1708: use McCarthy & Babcock */
65 w = t - 0.19;
66 s = 5.156 + 13.3066 * w * w;
67 } else {
68 if ( epoch >= 979.0258204760233 ) {
69
70 /* 979-1708: use Stephenson & Morrison's 948-1600 model */
71 s = 25.5 * t * t;
72 } else {
73
74 /* Pre-979: use Stephenson & Morrison's 390 BC to AD 948 model */
75 s = 1360.0 + ( 320.0 + 44.3 * t ) * t;
76 }
77 }
78
79/* Result */
80 return s;
81}
Note: See TracBrowser for help on using the repository browser.