function jd_bo_fn, xx ;Converts from (Julian date -2440000) to B angle incl = double(7.25) JD_DD = double(xx) ;nn = JD_DD - 2451545.0 ; 2440000 - 2451545 = 11545 nn = JD_DD - double(11545.0) LL = double(280.472) + double(0.9856474)*nn gg = double(357.528) + double(0.9856003)*nn sun = LL + double(1.915)*sin(gg*!pi/double(180.0)) $ + double(0.020)*sin(double(2.0)*gg*!pi/double(180.0)) ; Explains where the number 43243.25 comes from ; omega = 73.0 + 40.0/60.0+ 50.25*(JD_DD + 2440000.0 - $ ; 2396756.75)/365.25)/3600.0 omega = double(73.0) + double(40.0)/double(60.0)+$ double(50.25)*((JD_DD + double(43243.25))/double(365.25))/double(3600.0) ; Explains where the number 41780.0 comes from ; ww = 360.0/25.38*(JD_DD+2440000.0 - 2398220.0) ww = double(360.0)/double(25.38)*(JD_DD+double(41780.0)) ww = (ww/double(360.0) - long(ww/double(360.0)))*double(360.0) Bosin = sin((sun-omega)*!pi/double(180.0))*sin(incl*!pi/double(180.0)) Bocos = sqrt(double(1.0) - Bosin^2) Bo = atan(Bosin,Bocos)*double(180.0)/!pi LoWsin = cos(incl*!pi/double(180.0))*sin((omega-sun)*!pi/double(180.0))/cos(Bo*!pi/double(180.0)) LoWcos = -cos((omega-sun)*!pi/180.0)/cos(Bo*!pi/180.0) LoW = atan(LoWsin,LoWcos)*double(180.0)/!pi if LoW lt 0.0 then LoW = LoW + double(360.0) Lo = LoW - ww if Lo lt 0.0 then Lo = Lo + double(360.0) return,Bo end