From 6b92ee8ceb20f7b6a778b5fd109e62359ba8b9a4 Mon Sep 17 00:00:00 2001 From: SanjayP Date: Thu, 20 Apr 2017 17:35:31 +0530 Subject: [PATCH] Trimshamsa added --- SJPv4/Notes.txt | 1 - SJPv4/www/SJPamsha.htm | 28 ++++++++++++++++------------ SJPv4/www/jyotish.js | 12 +++++++++++- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/SJPv4/Notes.txt b/SJPv4/Notes.txt index 758f8cd..3ffc833 100644 --- a/SJPv4/Notes.txt +++ b/SJPv4/Notes.txt @@ -1,4 +1,3 @@ - 1) For npm command get http://nodejs.org/ diff --git a/SJPv4/www/SJPamsha.htm b/SJPv4/www/SJPamsha.htm index c49117d..17a888c 100644 --- a/SJPv4/www/SJPamsha.htm +++ b/SJPv4/www/SJPamsha.htm @@ -47,16 +47,6 @@
- - - - - - - - - - + + - + + + + + + + + + + + + +
Lagna
Sun
Moon
Mars
Merc
Jup
Ven
Sat
Rahu
Ketu
Division

Lagna
Sun
Moon
Mars
Merc
Jup
Ven
Sat
Rahu
Ketu
diff --git a/SJPv4/www/jyotish.js b/SJPv4/www/jyotish.js index 57f51f5..e9e3970 100644 --- a/SJPv4/www/jyotish.js +++ b/SJPv4/www/jyotish.js @@ -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); @@ -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": @@ -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; }