@node-jhora/analytics 1.4.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 CHANGED
@@ -1,81 +1,49 @@
1
- # Package: `@node-jhora/analytics`
1
+ # @node-jhora/analytics
2
2
 
3
- The `@node-jhora/analytics` package provides deep insights into planetary strengths, mathematical patterns (Ashtakavarga), and combination detection (Yogas).
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
- ## 💪 Shadbala (Six-fold Strength)
5
+ > Part of the [node-jhora](../../README.md) monorepo. [📖 Full Documentation](../../docs/ANALYTICS.md)
6
6
 
7
- A complete implementation of the complex Parashari Shadbala system.
7
+ ## Installation
8
8
 
9
- ### Calculation Components
10
- Shadbala is calculated in **Virupas** (points) and consists of:
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
- const result = Ashtakavarga.calculate(planets, ascendantSign);
18
+ // Shadbala 6-fold planetary strength (Virupas)
19
+ const strength = calculateShadbala({ planet, allPlanets, houses, sun, moon, timeDetails, vargaPositions });
42
20
 
43
- // BAV for Sun
44
- console.log("Sun BAV:", result.bav[0]);
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
- ## 🧘 Yoga Engine
24
+ // Yogas detect planetary combinations
25
+ const yogas = YogaEngine.findYogas(chartData, YOGA_LIBRARY);
26
+ ```
52
27
 
53
- A powerful, rule-based engine to identify hundreds of planetary yogas.
28
+ ## Features
54
29
 
55
- ### Configuration
56
- Yogas are defined using a structured `YogaDefinition` interface:
57
- ```typescript
58
- interface YogaDefinition {
59
- name: string;
60
- category: 'Raja' | 'Dhana' | 'Nabhasa' | 'Other';
61
- conditions: Condition[]; // Logical AND of conditions
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
- **Supported Conditions:**
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
- import { YogaEngine, YOGA_LIBRARY } from '@node-jhora/analytics';
74
-
75
- const foundYogas = YogaEngine.findYogas(chartData, YOGA_LIBRARY);
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
- ## 🏷️ Keywords
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,EAAkB,MAAM,eAAe,CAAC;AAClE,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"}
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) - virupas
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.00,
21
- 1: 51.43,
22
- 3: 42.85,
23
- 5: 34.28,
24
- 2: 25.71,
25
- 4: 17.14,
26
- 6: 8.57
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.
@@ -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;AACpE,+CAA+C;AAC/C,MAAM,iBAAiB,GAA8B;IACjD,CAAC,EAAE,EAAE,EAAI,iBAAiB;IAC1B,CAAC,EAAE,EAAE,EAAI,0BAA0B;IACnC,CAAC,EAAE,GAAG,EAAG,+BAA+B;IACxC,CAAC,EAAE,GAAG,EAAG,8BAA8B;IACvC,CAAC,EAAE,GAAG,EAAG,gCAAgC;IACzC,CAAC,EAAE,EAAE,EAAI,6BAA6B;IACtC,CAAC,EAAE,GAAG,CAAG,8BAA8B;CAC1C,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAA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I,CAAC;oBAAC,MAAM;YACtD,CAAC;QACL,CAAC;QACD,UAAU,IAAI,KAAK,CAAC;IACxB,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -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 Angles (Note: These correspond to Houses 1, 10, 7, 4 roughly)
13
- // Sun/Mars: South (Meridian/MC) -> 10th House Cusp approximately.
14
- // User Spec: Sun/Mars (180 - 10th?? No. MC is usually South).
15
- // User Spec says: "Sun/Mars (180 - 10th), Jup/Mer (0 - 1st), Ven/Moon (270 - 4th), Sat (90 - 7th)"
16
- // Let's interpret '180' as the angle in the abstract circle starting from Ascendant?
17
- // No, the user likely means the angle relative to the Ascendant or simply the House Cusp itself.
18
- // Better interpretation:
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; // East
25
+ powerPoint = ascendant;
38
26
  break;
39
27
  case SUN:
40
28
  case MARS:
41
- powerPoint = mc; // South
29
+ powerPoint = mc;
42
30
  break;
43
31
  case SATURN:
44
- powerPoint = normalize360(ascendant + 180); // West
32
+ powerPoint = normalize360(ascendant + 180);
45
33
  break;
46
34
  case MOON:
47
35
  case VENUS:
48
- powerPoint = normalize360(mc + 180); // North
36
+ powerPoint = normalize360(mc + 180);
49
37
  break;
50
38
  default:
51
39
  return 0; // Rahu/Ketu
52
40
  }
53
- // Arc Distance
54
- // BPHS: "Subtract the longitude of the planet from the power point (or vice versa), take the difference... if > 180 take 360-diff"
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
- // Moon, Mars, Sat: Strong at Midnight.
77
- // Sun, Jup, Ven: Strong at Noon.
78
- // Mercury: Always 60.
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 distSunMC = getShortestDistance(sunLon, mcLon); // 0 at Noon, 180 at Midnight
104
- // Noon Strong
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
- // Max at Noon (Dist=0).
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 (180 - distSunIC) / 3;
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
- // Angle Moon - Sun.
123
- // If 0 (New Moon) -> 180 (Full Moon) -> 360 (New Moon).
124
- // Benefics (Jup, Ven, Moon*, Merc*): Max at Full Moon (180).
125
- // Malefics (Sun, Mars, Sat, Merc*): Max at New Moon (0).
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); // 0 to 180
190
- const beneficScore = dist / 3; // 0 (New) to 60 (Full)
191
- const maleficScore = 60 - beneficScore; // 60 (New) to 0 (Full)
192
- // Benefics: Jup, Ven, Merc, Moon
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
- // Malefics: Sun, Mars, Sat
197
- return maleficScore;
81
+ return maleficScore.toNumber();
198
82
  }
199
83
  // 2c. Tribhaga Bala (Day/Night Parts)
200
- // Divide Day (Sunrise-Sunset) into 3, Night (Sunset-Sunrise) into 3.
201
- // Total 6 parts.
202
- // Lordship (Standard BPHS):
203
- // Day 1: Mercury
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 (SunriseSunset) 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
- // Normalize times to 0-24
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
- // Day Parts
244
- const dayLen = set - rise;
245
- partDuration = dayLen / 3;
246
- const timeFromRise = h - rise;
247
- partIndex = Math.floor(timeFromRise / partDuration);
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
- // Night Parts
260
- // Need to handle time math carefully.
261
- // Night length = 24 - (set - rise).
262
- // If h < rise, timeFromSet = (h + 24) - set?
263
- // If h > set, timeFromSet = h - set.
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 +/- Declination) * Constant.
288
- // Declination is in degrees.
289
- // Direction:
290
- // Sun, Mars, Jup, Ven: North (+Dec) Strong. Formula: (24 + Dec) * C?
291
- // Moon, Sat: South (-Dec) Strong. Formula: (24 + (-Dec)) * C ? (i.e., |Dec - South|?)
292
- // Formula usually:
293
- // If N-Strong: (23.45 + Dec) * Scale?
294
- // BPHS: "Add the declination to 24 if North... Subtract if South..."
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; // Usually specific rules, but simplistic is 60 or Median. User said "Always Strong".
316
- // North Lovers: Sun, Mars, Jup, Ven
131
+ return 60;
132
+ const dec = new Decimal(declination);
317
133
  if ([SUN, MARS, JUPITER, VENUS].includes(planetId)) {
318
- // (24 + Dec)
319
- // If Dec is -10 (South), becomes 14.
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
- // (24 - Dec)
328
- // If Dec is -23 (South), becomes 24 - (-23) = 47.
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; // Fallback
141
+ return 0;
333
142
  }
334
143
  // ==========================================
335
144
  // 3. Chesta Bala (Motional Strength)
336
145
  // ==========================================
337
- // Vakra (Retrograde): 60
338
- // Anuvakra (Entering Retro - tricky to detect without history): 30
339
- // Vikala (Stationary): 15
340
- // Mandatara (Slow Direct): 30
341
- // Mandaa (Slowest Direct): 15
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 < -0.001) {
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 (Math.abs(speed) <= 0.001) {
386
- return 15; // Vikala (Stationary)
158
+ if (speed.abs().lte(STATIONARY_EPSILON)) {
159
+ return 15; // Vikala (stationary)
387
160
  }
388
- // Direct Motion
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,EAAkB,MAAM,kBAAkB,CAAC;AAErF,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,IAAI,GAAG,CAAC,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pC,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC7D,CAAC;IAED,OAAO,CAAC,CAAC;AACb,CAAC;AAED,6CAA6C;AAC7C,qCAAqC;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": "1.4.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
- ],
18
- "scripts": {
19
- "build": "tsc"
20
- },
21
- "dependencies": {
22
- "@node-jhora/core": "^1.4.0",
23
- "luxon": "^3.7.2"
24
- },
25
- "devDependencies": {
26
- "typescript": "*"
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
  }