Oblique Ascendant

1
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 all

function 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

4
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;

5
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

6
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

7
# 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,