;	(25-jan-91)
FUNCTION SUN_P,DAY79
;+
; NAME:
;	SUN_P
;	
; PURPOSE:
;	Calculate solar reference angle P date specified by D79
;
; CALLING SEQUENCE:
;	P = SUN_P(DAY79)
;
; INPUT:
;	DAY79 = Decimal days since 1 January, 1979
;
; OUTPUT:
;	P = Position angle of the northern extremity of the axis
;	    of the sun's rotation, measured eastward from the
;	    geographic north point of the solar disk.
;
; MODIFICATION HISTORY:
;	Version 1.0 - Jan, 1991, Written, G. L. Slater, LPARL
;
; NOTES:
;	See PB0R.PRO for more information on this calculation.
;-

dont_use_this, 'GET_RB0P', 'SUN_P', 'Sample calling sequence: r = get_rb0p(times, /p)'

  a0 = 0.01720197d*(day79-3.5)
  a1 = a0+0.033685d*sin(a0)
  return,p = atan(0.127216d*sin(a1-4.23986d)) - $
	     atan(0.433589d*cos(a1-1.35071d))
  end

