Skip to content

Commit

Permalink
Trimshamsa added
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjayPrabhakaran authored Apr 20, 2017
1 parent 74cefb3 commit 6b92ee8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
1 change: 0 additions & 1 deletion SJPv4/Notes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

1) For npm command get http://nodejs.org/


Expand Down
28 changes: 16 additions & 12 deletions SJPv4/www/SJPamsha.htm
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@
<div id=form>
<form id=forminput method=get>
<table id=formtable cellspacing=0 cellpadding=0 border=0>
<tr><td>Lagna</td><td><input id=Lagna name="Lagna" type=text value=138.01></td></tr>
<tr><td>Sun</td><td><input id=Sun name="Sun" type=text value=92.38></td></tr>
<tr><td>Moon</td><td><input id=Moon name="Moon" type=text value=53></td></tr>
<tr><td>Mars</td><td><input id=Mars name="Mars" type=text value=298.1></td></tr>
<tr><td>Merc</td><td><input id=Merc name="Merc" type=text value=117.1></td></tr>
<tr><td>Jup</td><td><input id=Jup name="Jup" type=text value=213.18></td></tr>
<tr><td>Ven</td><td><input id=Ven name="Ven" type=text value=81.51></td></tr>
<tr><td>Sat</td><td><input id=Sat name="Sat" type=text value=39.86></td></tr>
<tr><td>Rahu</td><td><input id=Rahu name="Rahu" type=text value=291.95></td></tr>
<tr><td>Ketu</td><td><input id=Ketu name="Ketu" type=text value=111.95></td></tr>
<tr><td><b>Division</b></td><td><select id=Division name=Division><option selected>Rashi</option>
<option>Navamsa</option>
<option>Dreshkana</option>
Expand All @@ -66,14 +56,28 @@
<option>Shodashamsa</option>
<option>Vimsamsa</option>
<option>ChaturVimshamsha</option>
<option>Trimshamsha</option>
<option>KhaVedamsa</option>
<option>AkshaVedamsa</option>
<option>Shastiamsha</option>
<option>Dasamsa-EvenReverse</option>
<option>ChaturVimshamsha-EvenReverse</option>
</select></td></tr>
</select></td>
</tr>
<tr><td colspan=2 align=center><input type=button id=AddChart name=AddChart value=AddChart onclick=Refresh()></td></tr>
<tr><td colspan=2 align=center><input type="submit" id=Submit name="submit" value=Calculate></td></tr>
<tr><td><br/> </td></tr>
<tr><td>Lagna</td><td><input id=Lagna name="Lagna" type=text value=138.01></td></tr>
<tr><td>Sun</td><td><input id=Sun name="Sun" type=text value=92.38></td></tr>
<tr><td>Moon</td><td><input id=Moon name="Moon" type=text value=53></td></tr>
<tr><td>Mars</td><td><input id=Mars name="Mars" type=text value=298.1></td></tr>
<tr><td>Merc</td><td><input id=Merc name="Merc" type=text value=117.1></td></tr>
<tr><td>Jup</td><td><input id=Jup name="Jup" type=text value=213.18></td></tr>
<tr><td>Ven</td><td><input id=Ven name="Ven" type=text value=81.51></td></tr>
<tr><td>Sat</td><td><input id=Sat name="Sat" type=text value=39.86></td></tr>
<tr><td>Rahu</td><td><input id=Rahu name="Rahu" type=text value=291.95></td></tr>
<tr><td>Ketu</td><td><input id=Ketu name="Ketu" type=text value=111.95></td></tr>

<tr><td colspan=2 align=center><input type="submit" id=Submit name="submit" value=Re-Calculate></td></tr>
</table>
</form>
</div>
Expand Down
12 changes: 11 additions & 1 deletion SJPv4/www/jyotish.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//Functions for Jyotish
//By : Sanjay Prabhakaran
//1 Aries, 2 Taurus....12/0 Pisces
//Signs: 1 Aries, 2 Taurus....12/0 Pisces
function GetDivisionalSign(degrees,division,object)//For a given degree get the division (D1,D2, etc) sign
{
//alert(object);
Expand All @@ -9,6 +9,10 @@ function GetDivisionalSign(degrees,division,object)//For a given degree get the
var SignOdd = Sign%2;//1=Odd 0=Even
var SignDeg = degrees%30;
var Amsha = 0;
var ParasharaTrimshamsa=[
[ 2,2,2,2,2, 6,6,6,6,6,6,6, 12,12,12,12,12,12,12,12, 10,10,10,10,10, 8,8,8,8,8 ], //For Even Signs
[1,1,1,1,1, 11,11,11,11,11, 9,9,9,9,9,9,9,9, 3,3,3,3,3,3,3, 7,7,7,7,7 ] //For Odd Signs
];
switch(division){
case "Rashi":
case "D1":
Expand Down Expand Up @@ -99,6 +103,12 @@ function GetDivisionalSign(degrees,division,object)//For a given degree get the
k%=12;
if(k==0)k=12;
break;
case "Trimshamsha":
case "D30":
AmshaPortion = 1;
Amsha = parseInt(SignDeg/AmshaPortion+0.999999999);
k=ParasharaTrimshamsa[SignOdd][Amsha];
break;
}
return k;
}

0 comments on commit 6b92ee8

Please sign in to comment.