MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / ChartInfluence

Function ChartInfluence

intrpret.cpp:1378–1580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376// specified with the -j "find influences" switch.
1377
1378void ChartInfluence(void)
1379{
1380 real power[objMax], power1[objMax], power2[objMax],
1381 total, total1, total2;
1382 int rank[objMax], rank1[objMax], rank2[objMax], i, j;
1383 char sz[cchSzDef];
1384 flag fSignOnly = us.fIndian;
1385
1386 ComputeInfluence(power1, power2);
1387
1388 // Calculate total power of each planet.
1389
1390 total = total1 = total2 = 0.0;
1391 for (i = 0; i <= is.nObj; i++) if (!FIgnore(i)) {
1392 power[i] = power1[i]+power2[i]; total1 += power1[i]; total2 += power2[i];
1393 }
1394 total = total1+total2;
1395
1396 // Finally, determine ranks of the arrays, then print everything out.
1397
1398 SortRank(power1, rank1, is.nObj, fTrue);
1399 SortRank(power2, rank2, is.nObj, fTrue);
1400 SortRank(power, rank, is.nObj, fTrue);
1401 sprintf(sz, " Planet: Position Aspects Total Rank %sPercent\n",
1402 us.fSeconds ? " " : ""); PrintSz(sz);
1403 for (j = 0; j <= is.nObj; j++) {
1404 i = rgobjList[j];
1405 if (FIgnore(i))
1406 continue;
1407 AnsiColor(kObjA[i]);
1408 sprintf(sz, "%8.8s: ", szObjDisp[i]); PrintSz(sz);
1409 sprintf(sz, "%6.1f (%2d) +%6.1f (%2d) =%7.1f (%2d) /",
1410 power1[i], rank1[i], power2[i], rank2[i], power[i], rank[i]);
1411 PrintSz(sz);
1412 sprintf(sz, us.fSeconds ? "%7.2f%%\n" : "%6.1f%%\n",
1413 total > 0.0 ? power[i]/total*100.0 : 0.0); PrintSz(sz);
1414 }
1415 AnsiColor(kDefault);
1416 sprintf(sz, " Total: %6.1f +%6.1f =%7.1f / 100.0%s%%\n",
1417 total1, total2, total, us.fSeconds ? "0" : ""); PrintSz(sz);
1418
1419 // Now, print out a list of power values and relative rankings, based on the
1420 // power of each sign of the zodiac, as indicated by the placement of the
1421 // planets above, as specified with the -j0 switch.
1422
1423 if (!us.fInfluenceSign)
1424 return;
1425 for (i = 1; i <= cSign; i++)
1426 power1[i] = power2[i] = 0.0;
1427
1428 // For each sign, determine its power based on the power of the objects.
1429
1430 for (i = 0; i <= is.nObj; i++) if (!FIgnore(i)) {
1431 power1[SFromZ(planet[i])] += power[i] / 2.0;
1432 if (us.fListDecan)
1433 power1[SFromZ(Decan(planet[i]))] += power[i] / 6.0;
1434 if (fSignOnly)
1435 power1[inhouse[i]] += power[i] / 4.0;

Callers 1

PrintChartFunction · 0.85

Calls 8

ComputeInfluenceFunction · 0.85
SortRankFunction · 0.85
PrintSzFunction · 0.85
AnsiColorFunction · 0.85
DecanFunction · 0.85
ExpSetNFunction · 0.85
ExpSetRFunction · 0.85
RExpGetFunction · 0.85

Tested by

no test coverage detected