diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/astutil/asttools/astdsun.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/astutil/asttools/astdsun.x')
-rw-r--r-- | noao/astutil/asttools/astdsun.x | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/noao/astutil/asttools/astdsun.x b/noao/astutil/asttools/astdsun.x new file mode 100644 index 00000000..89af95f7 --- /dev/null +++ b/noao/astutil/asttools/astdsun.x @@ -0,0 +1,19 @@ +include <math.h> + +# AST_DSUN -- Distance to Sun in AU +# Taken from Astronomical Almanac 1984, page C24. + +double procedure ast_dsun (epoch) + +double epoch # Epoch desired + +double n, g, r +double ast_julday() + +begin + n = ast_julday (epoch) - 2451545d0 + g = DEGTORAD (357.528d0 + 0.9856003d0 * n) + r = 1.00014d0 - 0.01671d0 * cos (g) - 0.00014d0 * cos (2 * g) + + return (r) +end |