@node-jhora/analytics 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -62
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/shadbala.js +10 -8
- package/dist/shadbala.js.map +1 -1
- package/dist/shadbala_time.js +75 -312
- package/dist/shadbala_time.js.map +1 -1
- package/package.json +29 -27
package/README.md
CHANGED
|
@@ -1,81 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @node-jhora/analytics
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Depth and strength analysis layer for the Node-Jhora Vedic astrology engine. Provides Shadbala (6-fold planetary strength), Ashtakavarga (BAV/SAV grids), an extensible Yoga detection engine, and KP Engine significators.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Part of the [node-jhora](../../README.md) monorepo. [📖 Full Documentation](../../docs/ANALYTICS.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
1. **Sthana Bala** (Positional): Uchcha, Saptavargaja, Kendra, Ojayugma.
|
|
12
|
-
2. **Dig Bala** (Directional): Strength based on proximity to specific house cusps.
|
|
13
|
-
3. **Kaala Bala** (Temporal): Natonata, Paksha, Tribhaga, Ayanabala.
|
|
14
|
-
4. **Chesta Bala** (Motional): Based on planetary speed and retrograde status.
|
|
15
|
-
5. **Naisargika Bala** (Natural): Constant strength inherent to each planet.
|
|
16
|
-
6. **Drig Bala** (Aspect): Strength derived from benefic and malefic aspects.
|
|
17
|
-
|
|
18
|
-
### Usage
|
|
19
|
-
```typescript
|
|
20
|
-
import { calculateShadbala } from '@node-jhora/analytics';
|
|
21
|
-
|
|
22
|
-
const result = calculateShadbala({
|
|
23
|
-
planet, allPlanets, houses, sun, moon,
|
|
24
|
-
timeDetails: { sunrise, sunset, birthHour },
|
|
25
|
-
vargaPositions // D1, D2, D3, D7, D9, D12, D30 for Saptavargaja
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
console.log(`Total Shadbala: ${result.total} Virupas`);
|
|
29
|
-
console.log(`Ishta Phala: ${result.ishtaPhala}`);
|
|
9
|
+
```bash
|
|
10
|
+
npm install @node-jhora/analytics @node-jhora/core
|
|
30
11
|
```
|
|
31
12
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## 🔢 Ashtakavarga
|
|
35
|
-
|
|
36
|
-
Calculates the "Eight-fold Grids" for planets and the combined Sarvashtakavarga (SAV).
|
|
13
|
+
## Quick Start
|
|
37
14
|
|
|
38
15
|
```typescript
|
|
39
|
-
import { Ashtakavarga } from '@node-jhora/analytics';
|
|
16
|
+
import { calculateShadbala, Ashtakavarga, YogaEngine, YOGA_LIBRARY } from '@node-jhora/analytics';
|
|
40
17
|
|
|
41
|
-
|
|
18
|
+
// Shadbala — 6-fold planetary strength (Virupas)
|
|
19
|
+
const strength = calculateShadbala({ planet, allPlanets, houses, sun, moon, timeDetails, vargaPositions });
|
|
42
20
|
|
|
43
|
-
// BAV
|
|
44
|
-
|
|
45
|
-
// Sarvashtakavarga (SAV)
|
|
46
|
-
console.log("SAV Points:", result.sav); // Array of 12 scores
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
21
|
+
// Ashtakavarga — BAV/SAV grids
|
|
22
|
+
const av = Ashtakavarga.calculate(planets, ascendantSign);
|
|
50
23
|
|
|
51
|
-
|
|
24
|
+
// Yogas — detect planetary combinations
|
|
25
|
+
const yogas = YogaEngine.findYogas(chartData, YOGA_LIBRARY);
|
|
26
|
+
```
|
|
52
27
|
|
|
53
|
-
|
|
28
|
+
## Features
|
|
54
29
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```
|
|
30
|
+
| Feature | Description |
|
|
31
|
+
| :--- | :--- |
|
|
32
|
+
| **Shadbala** | Full Parashara 6-fold strength (Sthana, Dig, Kaala, Chesta, Naisargika, Drig) |
|
|
33
|
+
| **Ashtakavarga** | Bhinnashtakavarga (BAV) and Sarvashtakavarga (SAV) |
|
|
34
|
+
| **Yoga Engine** | Rule-based, extensible via JSON-compatible `YogaDef` definitions |
|
|
35
|
+
| **YOGA_LIBRARY** | Built-in library of standard Raja, Dhana, Nabhasa Yogas |
|
|
36
|
+
| **KP Engine** | Extended KP planet and house significator analysis |
|
|
37
|
+
| **Aspects** | Aspect strength calculations for Drig Bala |
|
|
64
38
|
|
|
65
|
-
|
|
66
|
-
- `placement`: Planet in specific house or sign.
|
|
67
|
-
- `aspect`: Aspect from Planet A to Planet B.
|
|
68
|
-
- `conjunction`: Multiple planets in the same sign.
|
|
69
|
-
- `lordship`: Lord of House X placed in House Y.
|
|
39
|
+
## Exports
|
|
70
40
|
|
|
71
|
-
### Usage
|
|
72
41
|
```typescript
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
console.log("Detected Yogas:", foundYogas);
|
|
42
|
+
export { calculateShadbala, Ashtakavarga, YogaEngine, YOGA_LIBRARY, KPEngine };
|
|
43
|
+
export type { ShadbalaResult, VargaInfo, AshtakavargaResult, ChartData,
|
|
44
|
+
KPPlanetSignificator, KPHouseSignificator, YogaDef, YogaResult };
|
|
77
45
|
```
|
|
78
46
|
|
|
79
|
-
##
|
|
80
|
-
Shadbala, Ashtakavarga, Yoga Engine, Planetary Strength, Vedic Astrology, Jyotish, Parashara, BAV, SAV, Raja Yoga, Astrology Analytics, Bhava Bala, Dig Bala
|
|
47
|
+
## License
|
|
81
48
|
|
|
49
|
+
Source Available — Commercial License Required. See [LICENSE](../../LICENSE).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { calculateShadbala, ShadbalaResult } from './shadbala.js';
|
|
1
|
+
import { calculateShadbala, ShadbalaResult, VargaInfo } from './shadbala.js';
|
|
2
2
|
import { AshtakavargaCalculator, AshtakavargaResult } from './ashtakavarga/core.js';
|
|
3
3
|
import { YogaEngine, ChartData } from './yogas/engine.js';
|
|
4
4
|
import { YOGA_LIBRARY } from './yogas/library.js';
|
|
5
5
|
import { YogaDef, YogaResult } from './types/rules.js';
|
|
6
6
|
import { KPEngine, KPPlanetSignificator, KPHouseSignificator } from './kp_engine.js';
|
|
7
|
-
export type { ShadbalaResult, AshtakavargaResult, ChartData, KPPlanetSignificator, KPHouseSignificator, YogaDef, YogaResult };
|
|
7
|
+
export type { ShadbalaResult, VargaInfo, AshtakavargaResult, ChartData, KPPlanetSignificator, KPHouseSignificator, YogaDef, YogaResult };
|
|
8
8
|
export { calculateShadbala, AshtakavargaCalculator as Ashtakavarga, YogaEngine, YOGA_LIBRARY, KPEngine };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA6B,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAsB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAA6C,MAAM,gBAAgB,CAAC;AAIrF,OAAO,EACH,iBAAiB,EACjB,sBAAsB,IAAI,YAAY,EACtC,UAAU,EACV,YAAY,EACZ,QAAQ,EACX,CAAC"}
|
package/dist/shadbala.js
CHANGED
|
@@ -15,15 +15,17 @@ const EXALTATION_POINTS = {
|
|
|
15
15
|
};
|
|
16
16
|
const FEMALE_PLANETS = [1, 3]; // Moon, Venus
|
|
17
17
|
const MALE_PLANETS = [0, 2, 4, 5, 6]; // Sun, Mars, Jup, Merc, Sat
|
|
18
|
-
// Naisargika Bala (Natural Strength)
|
|
18
|
+
// Naisargika Bala (Natural Strength) in Virupas — BPHS exact fractions (60 * n/7)
|
|
19
|
+
// Sun=60*(7/7)=60, Moon=60*(6/7)≈51.4286, Venus=60*(5/7)≈42.8571
|
|
20
|
+
// Jupiter=60*(4/7)≈34.2857, Mercury=60*(3/7)≈25.7143, Mars=60*(2/7)≈17.1429, Saturn=60*(1/7)≈8.5714
|
|
19
21
|
const NAISARGIKA_BALA = {
|
|
20
|
-
0: 60.
|
|
21
|
-
1: 51.
|
|
22
|
-
3: 42.
|
|
23
|
-
5: 34.
|
|
24
|
-
2: 25.
|
|
25
|
-
4: 17.
|
|
26
|
-
6: 8.
|
|
22
|
+
0: 60.000000, // Sun
|
|
23
|
+
1: 60 * 6 / 7, // Moon ≈ 51.428571
|
|
24
|
+
3: 60 * 5 / 7, // Venus ≈ 42.857143
|
|
25
|
+
5: 60 * 4 / 7, // Jupiter ≈ 34.285714
|
|
26
|
+
2: 60 * 3 / 7, // Mercury ≈ 25.714286
|
|
27
|
+
4: 60 * 2 / 7, // Mars ≈ 17.142857
|
|
28
|
+
6: 60 * 1 / 7, // Saturn ≈ 8.571429
|
|
27
29
|
};
|
|
28
30
|
/**
|
|
29
31
|
* Calculates Full Shadbala for a single planet.
|
package/dist/shadbala.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadbala.js","sourceRoot":"","sources":["../src/shadbala.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,eAAe,EAAE,YAAY,EAAyC,MAAM,kBAAkB,CAAC;AAC3I,OAAO,EACH,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,6CAA6C;AAC7C,oEAAoE;A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,KAAK,YAAY,CAAC,WAAW;oBAAE,KAAK,GAAG,IAAI,CAAC;oBAAC,MAAM;gBACnD,KAAK,YAAY,CAAC,MAAM;oBAAE,KAAK,GAAG,EAAE,CAAC;oBAAC,MAAM;gBAC5C,KAAK,YAAY,CAAC,OAAO;oBAAE,KAAK,GAAG,KAAK,CAAC;oBAAC,MAAM;gBAChD,KAAK,YAAY,CAAC,KAAK;oBAAE,KAAK,GAAG,GAAG,CAAC;oBAAC,MAAM;gBAC5C,KAAK,YAAY,CAAC,UAAU;oBAAE,KAAK,GAAG,IAAI,CAAC;oBAAC,MAAM;YACtD,CAAC;QACL,CAAC;QACD,UAAU,IAAI,KAAK,CAAC;IACxB,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
|
package/dist/shadbala_time.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { normalize360, getShortestDistance } from '@node-jhora/core';
|
|
2
|
+
import { Decimal } from 'decimal.js';
|
|
2
3
|
const SUN = 0;
|
|
3
4
|
const MOON = 1;
|
|
4
5
|
const MERCURY = 2;
|
|
@@ -9,245 +10,91 @@ const SATURN = 6;
|
|
|
9
10
|
// ==========================================
|
|
10
11
|
// 1. Dig Bala (Directional Strength)
|
|
11
12
|
// ==========================================
|
|
12
|
-
// Power
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
// 1st House (Asc) = East.
|
|
20
|
-
// 10th House (MC) = South.
|
|
21
|
-
// 7th House (Desc) = West.
|
|
22
|
-
// 4th House (IC) = North.
|
|
23
|
-
// BUT: Ascendant is the intersection of Ecliptic and Horizon.
|
|
24
|
-
// Dig Bala is calculated based on the distance from the "Power Point".
|
|
25
|
-
// Power Points:
|
|
26
|
-
// Mercury, Jupiter: East (Ascendant).
|
|
27
|
-
// Sun, Mars: South (MC).
|
|
28
|
-
// Saturn: West (Descendant = Asc + 180).
|
|
29
|
-
// Moon, Venus: North (IC = MC + 180).
|
|
30
|
-
// Formula: (Arc Distance from Power Point) / 3. Max 60.
|
|
31
|
-
// We should use the ACTUAL Ascendant/MC degrees passed in.
|
|
13
|
+
// Power Points per BPHS:
|
|
14
|
+
// Mercury, Jupiter → East (Ascendant)
|
|
15
|
+
// Sun, Mars → South (MC)
|
|
16
|
+
// Saturn → West (Descendant = Asc + 180)
|
|
17
|
+
// Moon, Venus → North (IC = MC + 180)
|
|
18
|
+
// Formula: 60 - (ShortestArc / 3)
|
|
19
|
+
// Max 60 at power point (distance=0), min 0 at opposition (distance=180).
|
|
32
20
|
export function calculateDigBala(planet, ascendant, mc) {
|
|
33
21
|
let powerPoint = 0;
|
|
34
22
|
switch (planet.id) {
|
|
35
23
|
case MERCURY:
|
|
36
24
|
case JUPITER:
|
|
37
|
-
powerPoint = ascendant;
|
|
25
|
+
powerPoint = ascendant;
|
|
38
26
|
break;
|
|
39
27
|
case SUN:
|
|
40
28
|
case MARS:
|
|
41
|
-
powerPoint = mc;
|
|
29
|
+
powerPoint = mc;
|
|
42
30
|
break;
|
|
43
31
|
case SATURN:
|
|
44
|
-
powerPoint = normalize360(ascendant + 180);
|
|
32
|
+
powerPoint = normalize360(ascendant + 180);
|
|
45
33
|
break;
|
|
46
34
|
case MOON:
|
|
47
35
|
case VENUS:
|
|
48
|
-
powerPoint = normalize360(mc + 180);
|
|
36
|
+
powerPoint = normalize360(mc + 180);
|
|
49
37
|
break;
|
|
50
38
|
default:
|
|
51
39
|
return 0; // Rahu/Ketu
|
|
52
40
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// Basically shortest distance on circle.
|
|
56
|
-
const dist = getShortestDistance(planet.longitude, powerPoint);
|
|
57
|
-
// Result is (180 - dist) / 3 ???
|
|
58
|
-
// Wait. If planet is AT power point, strength is MAX (60).
|
|
59
|
-
// If planet is 180 away (weakest), strength is 0.
|
|
60
|
-
// So formula is: (180 - Distance) / 3?
|
|
61
|
-
// Let's check:
|
|
62
|
-
// Distance 0 -> 180/3 = 60. Correct.
|
|
63
|
-
// Distance 180 -> 0/3 = 0. Correct.
|
|
64
|
-
// User Formula says: "(Arc Distance from Power Angle) / 3" -- This implies Min 0 Max 60?
|
|
65
|
-
// Wait, if it is "Distance from Power Angle", then if Distance is 0, result is 0? No, that would mean 0 strength at Power Point.
|
|
66
|
-
// Dig Bala is Strength. So Strength must be high at Power Point.
|
|
67
|
-
// Therefore Formula must be: (180 - ShortestDist) / 3.
|
|
68
|
-
// OR: 60 - (ShortestDist / 3).
|
|
69
|
-
// Let's assume standard BPHS: 60 - (dist/3).
|
|
70
|
-
return (60 - (dist / 3));
|
|
41
|
+
const dist = new Decimal(getShortestDistance(planet.longitude, powerPoint));
|
|
42
|
+
return new Decimal(60).minus(dist.div(3)).toNumber();
|
|
71
43
|
}
|
|
72
44
|
// ==========================================
|
|
73
45
|
// 2. Kaala Bala (Temporal Strength)
|
|
74
46
|
// ==========================================
|
|
75
47
|
// 2a. Natonata Bala (Day/Night)
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
// Mercury
|
|
79
|
-
// Formula:
|
|
80
|
-
// Midnight Strong: 60 if Midnight. 0 if Noon.
|
|
81
|
-
// Noon Strong: 60 if Noon. 0 if Midnight.
|
|
82
|
-
// Time Diff from Zenith (Noon) or Nadir (Midnight).
|
|
83
|
-
// Since we have IsDayTime? Or better, use Sun's position relative to Meridian?
|
|
84
|
-
// Day/Night is usually determined by Sun's HAA (Hour Angle) or simply whether Sun is above horizon.
|
|
85
|
-
// Simple BPHS approach using Ascendant/Sun:
|
|
86
|
-
// Noon is when Sun is at MC. Midnight is when Sun is at IC.
|
|
87
|
-
// Difference between Sun and MC.
|
|
88
|
-
// If Sun at MC (Noon), Diff = 0.
|
|
89
|
-
// If Sun at IC (Midnight), Diff = 180.
|
|
90
|
-
//
|
|
91
|
-
// Group A (Noon Strong: Sun, Jup, Ven): (180 - Dist(Sun, MC)) / 3 ?
|
|
92
|
-
// No. At Noon (Dist=0), Strength=60. At Midnight (Dist=180), Strength=0.
|
|
93
|
-
// Yes: (180 - Dist(Sun, MC)) / 3.
|
|
94
|
-
//
|
|
95
|
-
// Group B (Midnight Strong: Moon, Mars, Sat): (180 - Dist(Sun, IC)) / 3 ?
|
|
96
|
-
// At Midnight (Sun at IC, Dist=0), Strength=60.
|
|
97
|
-
// Yes: (180 - Dist(Sun, IC)) / 3.
|
|
98
|
-
//
|
|
99
|
-
// Mercury: 60.
|
|
48
|
+
// Sun, Jupiter, Venus → strong at Noon (MC). Score = (180 - dist(Sun,MC)) / 3
|
|
49
|
+
// Moon, Mars, Saturn → strong at Midnight (IC). Score = (180 - dist(Sun,IC)) / 3
|
|
50
|
+
// Mercury → always 60.
|
|
100
51
|
export function calculateNatonataBala(planetId, sunLon, mcLon) {
|
|
101
52
|
if (planetId === MERCURY)
|
|
102
53
|
return 60;
|
|
103
|
-
const
|
|
104
|
-
|
|
54
|
+
const D180 = new Decimal(180);
|
|
55
|
+
const D3 = new Decimal(3);
|
|
56
|
+
const distSunMC = new Decimal(getShortestDistance(sunLon, mcLon));
|
|
105
57
|
if ([SUN, JUPITER, VENUS].includes(planetId)) {
|
|
106
|
-
|
|
107
|
-
// Score = (180 - distSunMC) / 3.
|
|
108
|
-
return (180 - distSunMC) / 3;
|
|
58
|
+
return D180.minus(distSunMC).div(D3).toNumber();
|
|
109
59
|
}
|
|
110
|
-
// Midnight Strong
|
|
111
60
|
if ([MOON, MARS, SATURN].includes(planetId)) {
|
|
112
|
-
// Max at Midnight (Dist=180 from MC, or 0 from IC).
|
|
113
|
-
// IC = MC + 180.
|
|
114
|
-
// Dist from IC.
|
|
115
61
|
const icLon = normalize360(mcLon + 180);
|
|
116
|
-
const distSunIC = getShortestDistance(sunLon, icLon);
|
|
117
|
-
return (
|
|
62
|
+
const distSunIC = new Decimal(getShortestDistance(sunLon, icLon));
|
|
63
|
+
return D180.minus(distSunIC).div(D3).toNumber();
|
|
118
64
|
}
|
|
119
65
|
return 0;
|
|
120
66
|
}
|
|
121
67
|
// 2b. Paksha Bala (Fortnight)
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
// *Classification:
|
|
127
|
-
// Moon: Benefic if Waxing? No, Paksha Bala defines specific rule.
|
|
128
|
-
// BPHS: "Benefics are strong in Sukla Paksha... Malefics in Krishna Paksha".
|
|
129
|
-
// Formula:
|
|
130
|
-
// Calculate PakshaAngle = (Moon - Sun). Normalize to 0-360.
|
|
131
|
-
// If > 180, it is Krishna Paksha (Waning). Angle becomes (360 - Angle) -> Dist from 0.
|
|
132
|
-
// Let's simplify:
|
|
133
|
-
// PakshaPoints = (Angle from Sun) / 3. (Max 60 at 180 deg).
|
|
134
|
-
// Benefics get PakshaPoints.
|
|
135
|
-
// Malefics get (60 - PakshaPoints).
|
|
136
|
-
//
|
|
137
|
-
// Notes on Benefic/Malefic dynamic:
|
|
138
|
-
// User said: Moon is Benefic if Waxing.
|
|
139
|
-
// Mercury: Assume Benefic for now (simplified).
|
|
140
|
-
// Benefics: Jup, Ven, Moon (if Waxing?), Merc.
|
|
141
|
-
// Malefics: Sun, Mars, Sat, Moon (if Waning?).
|
|
142
|
-
//
|
|
143
|
-
// Refined Logic:
|
|
144
|
-
// 1. Calculate Angle (Moon - Sun). 0 to 180 (Waxing), 180 to 360 (Waning).
|
|
145
|
-
// 2. Base Strength = (Angle from New Moon) / 3? No.
|
|
146
|
-
// At Full Moon (180), Strength should be 60.
|
|
147
|
-
// At New Moon (0/360), Strength should be 0.
|
|
148
|
-
// Effective Angle = Diff(Moon, Sun). If > 180, consider mirror?
|
|
149
|
-
// Angle used for strength = Is ShortestDist(Moon, Sun)?
|
|
150
|
-
// Yes. ShortestDist is 0..180.
|
|
151
|
-
// Strength = ShortestDist / 3. (0 at New Moon, 60 at Full Moon).
|
|
152
|
-
// 3. Assign:
|
|
153
|
-
// Benefics get `Strength` directly. (Strong at Full Moon).
|
|
154
|
-
// Malefics get `60 - Strength`. (Strong at New Moon).
|
|
155
|
-
//
|
|
156
|
-
// Who is Benefic?
|
|
157
|
-
// Jup, Ven: Always Benefic.
|
|
158
|
-
// Sun, Mars, Sat: Always Malefic.
|
|
159
|
-
// Merc: Benefic (Simplified as per user).
|
|
160
|
-
// Moon: Always Benefic context of this calculation?
|
|
161
|
-
// User said: "Moon: Is Benefic if Waxing, Malefic if Waning".
|
|
162
|
-
// If Moon is Waxing, it uses `Strength` (Strong at Full).
|
|
163
|
-
// If Moon is Waning, it uses `60 - Strength`?
|
|
164
|
-
// Wait. If Waning, ShortestDist is decreasing from 180 to 0.
|
|
165
|
-
// If Malefic, it gets `60 - Strength`.
|
|
166
|
-
// Example: Waning, Dist=170 (Just past Full). Strength=56. Malefic Score=4.
|
|
167
|
-
// Example: Waning, Dist=10 (Near New). Strength=3. Malefic Score=57.
|
|
168
|
-
// This implies Waning Moon is strong near New Moon?
|
|
169
|
-
// This contradicts "Moon is strong if Full".
|
|
170
|
-
// Usually Moon is ALWAYS considered strong if Full (Paksha Bala applies to Moon itself based on brightness).
|
|
171
|
-
// The "Benefic/Malefic" classification determines how OTHER planets get points from the Moon's state.
|
|
172
|
-
// BUT Paksha Bala is also applied to Moon itself.
|
|
173
|
-
// Moon gets 60 at Full, 0 at New. (Always acts as Benefic for ITS OWN strength calculation).
|
|
174
|
-
// So Moon is treated as Benefic in the assignment list.
|
|
175
|
-
// Wait, user said "Moon: Is Benefic if Waxing, Malefic if Waning".
|
|
176
|
-
// This might mean use the Benefic formula if Waxing, Malefic if Waning.
|
|
177
|
-
// Let's trace:
|
|
178
|
-
// Waxing (0->180). Dist=90. Strength=30. Benefic Formula -> 30.
|
|
179
|
-
// Waning (180->0). Dist=90. Strength=30. Malefic Formula -> 60-30 = 30.
|
|
180
|
-
// This results in Moon getting 30 at Half Moon regardless.
|
|
181
|
-
// At Full (Dist=180). Waxing/Waning boundary. Strength=60. Benefic->60. Malefic->0.
|
|
182
|
-
// If Moon is Malefic when Waning (just past Full), it drops to 0? That's wrong. Moon is bright.
|
|
183
|
-
// Standard BPHS: Moon gets 2 * Paksha points? Or Moon's Paksha bala is simply proportional to brightness.
|
|
184
|
-
// Let's stick to simple rule:
|
|
185
|
-
// Benefics (Jup, Ven, Merc, Moon): Get 60 at Full, 0 at New.
|
|
186
|
-
// Malefics (Sun, Mars, Sat): Get 60 at New, 0 at Full.
|
|
187
|
-
// (Ignoring the "Moon becomes Malefic" complexity for its own score for now, as it usually retains high Shadbala if bright).
|
|
68
|
+
// Benefics (Jupiter, Venus, Mercury, Moon) → strong at Full Moon (ShortestDist(Sun,Moon)=180).
|
|
69
|
+
// Malefics (Sun, Mars, Saturn) → strong at New Moon (distance=0).
|
|
70
|
+
// Base = ShortestDist(Sun,Moon) / 3 (0 at New → 60 at Full).
|
|
71
|
+
// Benefics get base; Malefics get (60 - base).
|
|
188
72
|
export function calculatePakshaBala(planetId, sunLon, moonLon) {
|
|
189
|
-
const dist = getShortestDistance(sunLon, moonLon);
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
|
|
73
|
+
const dist = new Decimal(getShortestDistance(sunLon, moonLon));
|
|
74
|
+
const D3 = new Decimal(3);
|
|
75
|
+
const D60 = new Decimal(60);
|
|
76
|
+
const beneficScore = dist.div(D3);
|
|
77
|
+
const maleficScore = D60.minus(beneficScore);
|
|
193
78
|
if ([JUPITER, VENUS, MERCURY, MOON].includes(planetId)) {
|
|
194
|
-
return beneficScore;
|
|
79
|
+
return beneficScore.toNumber();
|
|
195
80
|
}
|
|
196
|
-
|
|
197
|
-
return maleficScore;
|
|
81
|
+
return maleficScore.toNumber();
|
|
198
82
|
}
|
|
199
83
|
// 2c. Tribhaga Bala (Day/Night Parts)
|
|
200
|
-
//
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
// Day 2: Sun
|
|
205
|
-
// Day 3: Saturn
|
|
206
|
-
// Night 1: Moon
|
|
207
|
-
// Night 2: Venus
|
|
208
|
-
// Night 3: Mars
|
|
209
|
-
// Jupiter: Always gets 60 (in some texts, or if birth is in "tr संधि"?).
|
|
210
|
-
// User Prompt: "Assign 60 points to the lord of the current 'part' (e.g. Jup gets 60 if birth is in the middle of the day??)"
|
|
211
|
-
// Wait. User prompt example "Jup gets 60 if birth is in the middle of the day" CONTRADICTS standard BPHS (Sun is Day 2 lord).
|
|
212
|
-
// Standard BPHS Tribhaga Lords:
|
|
213
|
-
// Day: Mercury, Sun, Saturn.
|
|
214
|
-
// Night: Moon, Venus, Mars.
|
|
215
|
-
// Jupiter gets 60 always? Or only in Purna (Full) logic?
|
|
216
|
-
// Often Jupiter gets 60 points in "Tribhaga Bala" implies it is the lord of "something" or always gets it.
|
|
217
|
-
// BPHS Ch 27 Sl 16: "Jupiter has always 60 Rupas in Tribhaga".
|
|
218
|
-
// So Jupiter = 60.
|
|
219
|
-
// Others = 60 if in their part, 0 otherwise.
|
|
84
|
+
// Day (Sunrise → Sunset) lords: Mercury (1st), Sun (2nd), Saturn (3rd).
|
|
85
|
+
// Night (Sunset → Sunrise) lords: Moon (1st), Venus (2nd), Mars (3rd).
|
|
86
|
+
// Jupiter always receives 60 (BPHS Ch 27 Sl 16).
|
|
87
|
+
// Lords of their part receive 60; all others receive 0.
|
|
220
88
|
export function calculateTribhagaBala(planetId, birthHour, sunrise, sunset) {
|
|
221
89
|
if (planetId === JUPITER)
|
|
222
90
|
return 60;
|
|
223
|
-
|
|
224
|
-
let h = birthHour;
|
|
225
|
-
let rise = sunrise;
|
|
226
|
-
let set = sunset;
|
|
227
|
-
// Determine if Day or Night
|
|
228
|
-
// Simple check: is h between rise and set?
|
|
229
|
-
// Handle day rollover? Geocoder usually gives sunrise/set for the current day.
|
|
230
|
-
// Assuming standard times.
|
|
231
|
-
let isDay = false;
|
|
232
|
-
if (rise < set) {
|
|
233
|
-
if (h >= rise && h < set)
|
|
234
|
-
isDay = true;
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
// Crossover midnight (rare for sunrise/set unless polar)
|
|
238
|
-
// Assume standard lat/long
|
|
239
|
-
}
|
|
240
|
-
let partDuration = 0;
|
|
241
|
-
let partIndex = 0; // 0, 1, 2
|
|
91
|
+
const isDay = birthHour >= sunrise && birthHour < sunset;
|
|
242
92
|
if (isDay) {
|
|
243
|
-
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
partIndex = Math.
|
|
248
|
-
if (partIndex > 2)
|
|
249
|
-
partIndex = 2;
|
|
250
|
-
// Lords: 0=Merc, 1=Sun, 2=Sat
|
|
93
|
+
const dayLen = new Decimal(sunset - sunrise);
|
|
94
|
+
const partDuration = dayLen.div(3);
|
|
95
|
+
const timeFromRise = new Decimal(birthHour - sunrise);
|
|
96
|
+
const rawPart = timeFromRise.div(partDuration).floor().toNumber();
|
|
97
|
+
const partIndex = Math.min(rawPart, 2);
|
|
251
98
|
if (partIndex === 0 && planetId === MERCURY)
|
|
252
99
|
return 60;
|
|
253
100
|
if (partIndex === 1 && planetId === SUN)
|
|
@@ -256,24 +103,11 @@ export function calculateTribhagaBala(planetId, birthHour, sunrise, sunset) {
|
|
|
256
103
|
return 60;
|
|
257
104
|
}
|
|
258
105
|
else {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
let nightLen = (24 - set) + rise;
|
|
265
|
-
let timeFromSet = 0;
|
|
266
|
-
if (h >= set) {
|
|
267
|
-
timeFromSet = h - set;
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
timeFromSet = (h + 24) - set;
|
|
271
|
-
}
|
|
272
|
-
partDuration = nightLen / 3;
|
|
273
|
-
partIndex = Math.floor(timeFromSet / partDuration);
|
|
274
|
-
if (partIndex > 2)
|
|
275
|
-
partIndex = 2;
|
|
276
|
-
// Lords: 0=Moon, 1=Venus, 2=Mars
|
|
106
|
+
const nightLen = new Decimal(24 - sunset + sunrise);
|
|
107
|
+
const timeFromSet = new Decimal(birthHour >= sunset ? birthHour - sunset : birthHour + 24 - sunset);
|
|
108
|
+
const partDuration = nightLen.div(3);
|
|
109
|
+
const rawPart = timeFromSet.div(partDuration).floor().toNumber();
|
|
110
|
+
const partIndex = Math.min(rawPart, 2);
|
|
277
111
|
if (partIndex === 0 && planetId === MOON)
|
|
278
112
|
return 60;
|
|
279
113
|
if (partIndex === 1 && planetId === VENUS)
|
|
@@ -283,118 +117,47 @@ export function calculateTribhagaBala(planetId, birthHour, sunrise, sunset) {
|
|
|
283
117
|
}
|
|
284
118
|
return 0;
|
|
285
119
|
}
|
|
286
|
-
// 2d. Ayanabala (Equinoctial)
|
|
287
|
-
// (24
|
|
288
|
-
//
|
|
289
|
-
//
|
|
290
|
-
//
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
// Effectively: (24 + Declination) for North-lovers. (24 - Declination) for South-lovers.
|
|
296
|
-
// Wait. If Declination is Negative (South), then:
|
|
297
|
-
// For North-lover: 24 + (-10) = 14. Weaker.
|
|
298
|
-
// For South-lover: 24 - (-10) = 34. Stronger.
|
|
299
|
-
// This logic holds.
|
|
300
|
-
//
|
|
301
|
-
// Mercury: Always Strong?
|
|
302
|
-
// User: "Mercury (Always strong)".
|
|
303
|
-
// We'll give 60.
|
|
304
|
-
//
|
|
305
|
-
// Maximum?
|
|
306
|
-
// If Dec = 24. 24+24 = 48?
|
|
307
|
-
// Virupas usually max 60.
|
|
308
|
-
// Multiplier: (60 / 48) = 1.25?
|
|
309
|
-
// Or just sum is points?
|
|
310
|
-
// BPHS Formula:
|
|
311
|
-
// Score = (24 +/- Kranti) * 60 / 48 ? (i.e. * 1.25).
|
|
312
|
-
// Let's use 1.25 multiplier to normalize 48 -> 60.
|
|
120
|
+
// 2d. Ayanabala (Equinoctial Strength)
|
|
121
|
+
// North-lovers (Sun, Mars, Jupiter, Venus): Score = (24 + declination) × 1.25. Max ≈ 60.
|
|
122
|
+
// South-lovers (Moon, Saturn): Score = (24 - declination) × 1.25.
|
|
123
|
+
// Mercury: always 60 (BPHS).
|
|
124
|
+
// Scores clamped to [0, 60].
|
|
125
|
+
const D24 = new Decimal(24);
|
|
126
|
+
const D1_25 = new Decimal('1.25');
|
|
127
|
+
const D60 = new Decimal(60);
|
|
128
|
+
const D0 = new Decimal(0);
|
|
313
129
|
export function calculateAyanabala(planetId, declination) {
|
|
314
130
|
if (planetId === MERCURY)
|
|
315
|
-
return 60;
|
|
316
|
-
|
|
131
|
+
return 60;
|
|
132
|
+
const dec = new Decimal(declination);
|
|
317
133
|
if ([SUN, MARS, JUPITER, VENUS].includes(planetId)) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
// If Dec is +23 (North), becomes 47.
|
|
321
|
-
// Multiplier 1.25 => 47 * 1.25 = ~58.75.
|
|
322
|
-
// Min: Dec = -24 ( South Max). Score = 0.
|
|
323
|
-
return Math.max(0, (24 + declination) * 1.25);
|
|
134
|
+
const raw = D24.plus(dec).times(D1_25);
|
|
135
|
+
return Decimal.max(D0, Decimal.min(D60, raw)).toNumber();
|
|
324
136
|
}
|
|
325
|
-
// South Lovers: Moon, Sat
|
|
326
137
|
if ([MOON, SATURN].includes(planetId)) {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
// If Dec is +23 (North), becomes 24 - 23 = 1.
|
|
330
|
-
return Math.max(0, (24 - declination) * 1.25);
|
|
138
|
+
const raw = D24.minus(dec).times(D1_25);
|
|
139
|
+
return Decimal.max(D0, Decimal.min(D60, raw)).toNumber();
|
|
331
140
|
}
|
|
332
|
-
return 0;
|
|
141
|
+
return 0;
|
|
333
142
|
}
|
|
334
143
|
// ==========================================
|
|
335
144
|
// 3. Chesta Bala (Motional Strength)
|
|
336
145
|
// ==========================================
|
|
337
|
-
//
|
|
338
|
-
//
|
|
339
|
-
// Vikala
|
|
340
|
-
//
|
|
341
|
-
|
|
342
|
-
// Luminaries (Sun, Moon): 0 (User Spec).
|
|
343
|
-
// Implementation:
|
|
344
|
-
// Use `speed` from Ephemeris.
|
|
345
|
-
// Speed < 0: Retrograde. (Simple Vakra).
|
|
346
|
-
// Speed ~ 0: Stationary.
|
|
347
|
-
// Speed > 0: Direct.
|
|
348
|
-
// How to distinguish Mandatara/Mandaa/Anuvakra without time-series?
|
|
349
|
-
// User Prompt: "Classify motion based on speed." + "Simplification... Implement based on speed from Ephemeris".
|
|
350
|
-
// I will implement:
|
|
351
|
-
// Speed < -0.001 (Retrograde) -> 60.
|
|
352
|
-
// abs(Speed) < 0.001 (Stationary) -> 15.
|
|
353
|
-
// Speed > 0 (Direct) -> Need to check "Slow".
|
|
354
|
-
// Average speeds:
|
|
355
|
-
// Mars: 0.52, Merc: 1.2, Jup: 0.08, Ven: 1.2, Sat: 0.03.
|
|
356
|
-
// If speed < AvgSpeed?
|
|
357
|
-
// BPHS Chesta is actually complex (8 types).
|
|
358
|
-
// User simplified spec: "Mandatara (Slow Direct)... Mandaa (Slowest)".
|
|
359
|
-
// Without data histories, I can't detect "Entering Retro" (Anuvakra).
|
|
360
|
-
// I will default Direct motion to standard mean value? Or 0?
|
|
361
|
-
// User chart says: "Vakra=60... Mandaa=15".
|
|
362
|
-
// If moving slow direct?
|
|
363
|
-
// Let's implement basics:
|
|
364
|
-
// Retro (<0) = 60.
|
|
365
|
-
// Stationary (approx 0) = 15.
|
|
366
|
-
// Direct (>0) = 30? (Assume average motion is somewhat 'slow' compared to Vakra? No.
|
|
367
|
-
// Usually Direct planets get Chesta via Avg Speed comparison.
|
|
368
|
-
// If Speed > Avg (Sighra/Fast) -> usually less Bal? Or More?
|
|
369
|
-
// User instructions didn't specify "Fast" points.
|
|
370
|
-
// Only "Slow Direct" (Mandatara/Mandaa).
|
|
371
|
-
// Implication: Fast Direct gets ?? (Normally 7.5 or 0).
|
|
372
|
-
// I will assign 30 for Retrograde. Wait, User said "Vakra: 60".
|
|
373
|
-
// I will assign:
|
|
374
|
-
// Speed < 0: 60.
|
|
375
|
-
// Speed approx 0: 15.
|
|
376
|
-
// Speed > 0: 7.5 (Neutral/Fast - minimal strength).
|
|
377
|
-
// Sun/Moon: 0.
|
|
146
|
+
// Luminaries (Sun, Moon): 0 (they never retrograde).
|
|
147
|
+
// Speed < 0 (Vakra / Retrograde): 60
|
|
148
|
+
// |Speed| ≤ ε (Vikala / Stationary): 15
|
|
149
|
+
// Speed > 0 (Direct): 15 (conservative baseline per BPHS mean-motion logic)
|
|
150
|
+
const STATIONARY_EPSILON = new Decimal('0.001');
|
|
378
151
|
export function calculateChestaBala(planet) {
|
|
379
152
|
if (planet.id === SUN || planet.id === MOON)
|
|
380
153
|
return 0;
|
|
381
|
-
const speed = planet.speed;
|
|
382
|
-
if (speed
|
|
154
|
+
const speed = new Decimal(planet.speed);
|
|
155
|
+
if (speed.isNegative() && speed.abs().gt(STATIONARY_EPSILON)) {
|
|
383
156
|
return 60; // Vakra
|
|
384
157
|
}
|
|
385
|
-
if (
|
|
386
|
-
return 15; // Vikala (
|
|
158
|
+
if (speed.abs().lte(STATIONARY_EPSILON)) {
|
|
159
|
+
return 15; // Vikala (stationary)
|
|
387
160
|
}
|
|
388
|
-
// Direct
|
|
389
|
-
// Without Anuvakra detection, assume standard Direct.
|
|
390
|
-
// User didn't give points for "Normal/Fast".
|
|
391
|
-
// I'll return 0 or low value?
|
|
392
|
-
// Often 15 or 30 is applied for direct planets depending on context.
|
|
393
|
-
// BPHS: "mean motion" logic.
|
|
394
|
-
// I'll return 15 (Mandaa) as a safe baseline for Direct planets, or 0?
|
|
395
|
-
// Shadbala should sum to ~350-450.
|
|
396
|
-
// If I give 0, it might be too low.
|
|
397
|
-
// Leaning on 15.
|
|
398
|
-
return 15;
|
|
161
|
+
return 15; // Direct — conservative baseline
|
|
399
162
|
}
|
|
400
163
|
//# sourceMappingURL=shadbala_time.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadbala_time.js","sourceRoot":"","sources":["../src/shadbala_time.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,E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qC;AACrC,6CAA6C;AAC7C,qDAAqD;AACrD,uCAAuC;AACvC,wCAAwC;AACxC,0FAA0F;AAE1F,MAAM,kBAAkB,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhD,MAAM,UAAU,mBAAmB,CAAC,MAAsB;IACtD,IAAI,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAEtD,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAExC,IAAI,KAAK,CAAC,UAAU,EAAE,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC3D,OAAO,EAAE,CAAC,CAAC,QAAQ;IACvB,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC,CAAC,sBAAsB;IACrC,CAAC;IACD,OAAO,EAAE,CAAC,CAAC,iCAAiC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@node-jhora/analytics",
|
|
3
|
-
"version": "
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist",
|
|
16
|
-
"LICENSE"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@node-jhora/analytics",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@node-jhora/core": "^2.0.0",
|
|
24
|
+
"decimal.js": "^10.4.3",
|
|
25
|
+
"luxon": "^3.7.2"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "*"
|
|
29
|
+
}
|
|
28
30
|
}
|