>  Docs Center  >  Libraries  >  ASTROLIB  >  SUNPOS

SUNPOS

SUNPOS

Name


      SUNPOS

Purpose


      To compute the RA and Dec of the Sun at a given date.

Calling Sequence


      SUNPOS, jd, ra, dec, [elong, obliquity, /RADIAN ]

Inputs


      jd - The Julian date of the day (and time), scalar or vector
              usually double precision

Outputs


      ra - The right ascension of the sun at that date in DEGREES
              double precision, same number of elements as jd
      dec - The declination of the sun at that date in DEGREES

Optional Outputs


      elong - Ecliptic longitude of the sun at that date in DEGREES.
      obliquity - the obliquity of the ecliptic, in DEGREES

Optional Input Keyword


      /RADIAN - If this keyword is set and non-zero, then all output variables
              are given in Radians rather than Degrees

Notes


      Patrick Wallace (Rutherford Appleton Laboratory, UK) has tested the
      accuracy of a C adaptation of the sunpos.pro code and found the
      following results. From 1900-2100 SUNPOS gave 7.3 arcsec maximum
      error, 2.6 arcsec RMS. Over the shorter interval 1950-2050 the figures
      were 6.4 arcsec max, 2.2 arcsec RMS.
      The returned RA and Dec are in the given date's equinox.
      Procedure was extensively revised in May 1996, and the new calling
      sequence is incompatible with the old one.

Method


      Uses a truncated version of Newcomb's Sun. Adapted from the IDL
      routine SUN_POS by CD Pike, which was adapted from a FORTRAN routine
      by B. Emerson (RGO).

Example


      (1) Find the apparent RA and Dec of the Sun on May 1, 1982
     
      IDL> jdcnv, 1982, 5, 1,0 ,jd ;Find Julian date jd = 2445090.5
      IDL> sunpos, jd, ra, dec
      IDL> print,adstring(ra,dec,2)
                02 31 32.61 +14 54 34.9
      The Astronomical Almanac gives 02 31 32.58 +14 54 34.9 so the error
              in SUNPOS for this case is < 0.5".
      (2) Find the apparent RA and Dec of the Sun for every day in 1997
      IDL> jdcnv, 1997,1,1,0, jd ;Julian date on Jan 1, 1997
      IDL> sunpos, jd+ dindgen(365), ra, dec ;RA and Dec for each day

Modification History


      Written by Michael R. Greason, STX, 28 October 1988.
      Accept vector arguments, W. Landsman April,1989
      Eliminated negative right ascensions. MRG, Hughes STX, 6 May 1992.
      Rewritten using the 1993 Almanac. Keywords added. MRG, HSTX,
              10 February 1994.
      Major rewrite, improved accuracy, always return values in degrees
      W. Landsman May, 1996
      Added /RADIAN keyword, W. Landsman August, 1997
      Converted to IDL V5.0 W. Landsman September 1997



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us