Oblique Ascendant 1 by stcisz I'm writing an astrological application based on "Radix System" by V.E. Robson. One of the thing to be computed is oblique ascendant i.e. the ascendant position when M.C, and location is given. I wrote following procedure: Code: Select allfunction computeAsc(mc) { var T = (hor.jdate - 2451545.0) / 36525; var eta = 23 + 26/60 + 21.45/(60*60) - 46.815/60 * T - 0.0006/60 * T * T + 0.00181/60 * T * T * T; var RAMC = Math.atan(Math.tan(mc * Math.PI / 180) * Math.cos(eta * Math.PI/180)); y = -(Math.sin( RAMC) + Math.tan(eta * Math.PI / 180) * Math.tan(hor.latitude * Math.PI / 180)) * Math.cos(eta * Math.PI / 180) x = Math.cos(RAMC); asc = Math.atan2(x,y); return asc * 180 /Math.PI; } and got strange results. Could anyone point me where is an error. Best regards, Staszek Quote Mon Nov 21, 2016 6:22 pm
4 by Ursa Major I have changed your function in the following. Hope it helps. var T = ( hor.jdate - 2451545.0 ) / 36525; var eta = ( 84391.45 - 46.815 * T - 0.0006 * T * T + 0.00181 * T * T * T ) / 3600.0; var RAMC = Math.atan( Math.tan( mc * Math.PI / 180 ) * Math.cos( eta * Math.PI / 180 )); var OB = eta * Math.PI / 180; y = -Math.sin( RAMC ) * Math.cos( OB ) - Math.tan( hor.latitude * Math.PI / 180 ) * Math.sin( OB ); x = Math.cos( RAMC ); asc = Math.atan2( x, y ); return asc * 180 / Math.PI; Quote Tue Nov 22, 2016 9:07 am
5 by stcisz Thank you for interest. Unfortunately after change procedure the problem persist. For value of latitude 49.60889, jdate 2440704.6493055555 and mc 214.29666062554156 procedure returns 138.385708051255. This is close to directional Desc or about 180 degrees from an expected position. Best regards, Staszek Quote Tue Nov 22, 2016 6:36 pm
6 by Ursa Major You have to add lines between Var RAMC en Var OB See the mail I send to you. In short: if RAMC less then 0 you have to add Math.PI to RAMC if mc greater then Math.PI you have again add Math.PI to RAMC Quote Tue Nov 22, 2016 7:37 pm
7 by Ursa Major # Input given by you mc = 214.29666062554156 hor.latitude = 49.60889 hor.jdate = 2440704.64931 I change your function in the following: ------------------------------------------------------------ Var T = ( hor.jdate - 2451545.0 ) / 36525; Var eta = ( 84391.45 - 46.815 * T - 0.0006 * T * T + 0.00181 * T * T * T ) / 3600.0; Var ob = Math.radians( eta ); y = - Math.sin( Math.radians( mc )) * Math.cos( ob ) - Math.tan( Math.radians( hor.latitude )) * Math.sin( ob ) ; x = Math.cos( Math.radians( mc )); asc = Math.atan2( x, y ) ; asc = Math.degrees( asc ) ; if asc < 0 : asc = asc + 360; return asc; -------------------------------------------- It gives as result: 273.414872 ... With best regards, Quote Wed Nov 23, 2016 1:36 pm
8 by stcisz Looks that those formulas works. Thank you very much. Best regards, Staszek Quote Wed Nov 23, 2016 2:57 pm