Goldenes Tor der Ekliptik eingebaut in die Monatsvorhersage
This commit is contained in:
@@ -230,6 +230,7 @@ $goldenHandleEvents = [];
|
||||
$moonPlanetApproaches = [];
|
||||
$moonDeepSkyApproaches = [];
|
||||
$planetBrightStarApproaches = [];
|
||||
$goldenGatePlanetEvents = [];
|
||||
$mercuryGoodVisibilityEvents = [];
|
||||
$planetParadeEvents = [];
|
||||
$planetConstellationChangeEvents = [];
|
||||
@@ -876,7 +877,7 @@ if (!function_exists('monthForecastBuildNarrativeText')) {
|
||||
|
||||
$planetObservationEvents = $findEvents(
|
||||
$filteredEvents,
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_elongation', 'venus_peak_magnitude', 'outer_planet_event', 'planet_conjunction', 'planet_parade', 'mercury_good_visibility'], true),
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_elongation', 'venus_peak_magnitude', 'outer_planet_event', 'planet_conjunction', 'planet_parade', 'mercury_good_visibility', 'golden_gate_of_ecliptic'], true),
|
||||
5
|
||||
);
|
||||
if ($planetObservationEvents !== []) {
|
||||
@@ -1662,6 +1663,26 @@ if (is_array($planetBrightStarDecoded) && ($planetBrightStarDecoded['ok'] ?? fal
|
||||
$planetBrightStarApproaches = is_array($planetBrightStarDecoded['approaches'] ?? null) ? $planetBrightStarDecoded['approaches'] : [];
|
||||
}
|
||||
|
||||
$goldenGateOutput = [];
|
||||
$goldenGateExitCode = 0;
|
||||
$goldenGateArgs = [
|
||||
$pythonScriptPath,
|
||||
'golden_gate_of_ecliptic_for_month',
|
||||
(string) $chartLatitude,
|
||||
(string) $chartLongitude,
|
||||
(string) $chartElevation,
|
||||
(string) $selectedYear,
|
||||
(string) $selectedMonth,
|
||||
$chartTimezone,
|
||||
];
|
||||
$goldenGateCommand = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', $goldenGateArgs)) . ' 2>&1';
|
||||
exec($goldenGateCommand, $goldenGateOutput, $goldenGateExitCode);
|
||||
$goldenGateRaw = trim(implode("\n", $goldenGateOutput));
|
||||
$goldenGateDecoded = json_decode($goldenGateRaw, true);
|
||||
if (is_array($goldenGateDecoded) && ($goldenGateDecoded['ok'] ?? false)) {
|
||||
$goldenGatePlanetEvents = is_array($goldenGateDecoded['events'] ?? null) ? $goldenGateDecoded['events'] : [];
|
||||
}
|
||||
|
||||
$planetConjunctionOutput = [];
|
||||
$planetConjunctionExitCode = 0;
|
||||
$planetConjunctionArgs = [
|
||||
@@ -2099,6 +2120,20 @@ foreach ($planetBrightStarApproaches as $approachEvent) {
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($goldenGatePlanetEvents as $goldenGateEvent) {
|
||||
if (!is_array($goldenGateEvent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$monthEventList[] = [
|
||||
'event' => (string) ($goldenGateEvent['label'] ?? 'Planet im Goldenen Tor der Ekliptik'),
|
||||
'date' => (string) ($goldenGateEvent['local_date'] ?? ''),
|
||||
'time' => (string) ($goldenGateEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($goldenGateEvent['local_iso'] ?? ''),
|
||||
'type' => 'golden_gate_of_ecliptic',
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($planetConjunctions as $conjunctionEvent) {
|
||||
if (!is_array($conjunctionEvent)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user