Opposition und Konjunktion eingebaut

This commit is contained in:
Eskimue
2026-04-03 14:52:18 +02:00
parent 8c51076fc1
commit e7dae6667f
4 changed files with 258 additions and 2 deletions
+32
View File
@@ -63,6 +63,7 @@ $eclipseEvents = [];
$moonApsisEvents = [];
$sunApsisEvents = [];
$innerPlanetElongationEvents = [];
$outerPlanetEvents = [];
$moonOccultations = [];
$seasonChanges = [];
$monthEventList = [];
@@ -422,6 +423,23 @@ if (is_array($elongationDecoded) && ($elongationDecoded['ok'] ?? false)) {
$innerPlanetElongationEvents = is_array($elongationDecoded['events'] ?? null) ? $elongationDecoded['events'] : [];
}
$outerPlanetOutput = [];
$outerPlanetExitCode = 0;
$outerPlanetArgs = [
$pythonScriptPath,
'outer_planet_events_for_month',
(string) $selectedYear,
(string) $selectedMonth,
$chartTimezone,
];
$outerPlanetCommand = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', $outerPlanetArgs)) . ' 2>&1';
exec($outerPlanetCommand, $outerPlanetOutput, $outerPlanetExitCode);
$outerPlanetRaw = trim(implode("\n", $outerPlanetOutput));
$outerPlanetDecoded = json_decode($outerPlanetRaw, true);
if (is_array($outerPlanetDecoded) && ($outerPlanetDecoded['ok'] ?? false)) {
$outerPlanetEvents = is_array($outerPlanetDecoded['events'] ?? null) ? $outerPlanetDecoded['events'] : [];
}
$moonPlanetOutput = [];
$moonPlanetExitCode = 0;
$moonPlanetArgs = [
@@ -640,6 +658,20 @@ foreach ($innerPlanetElongationEvents as $elongationEvent) {
];
}
foreach ($outerPlanetEvents as $outerPlanetEvent) {
if (!is_array($outerPlanetEvent)) {
continue;
}
$monthEventList[] = [
'event' => (string) ($outerPlanetEvent['label'] ?? 'Planetenereignis'),
'date' => (string) ($outerPlanetEvent['local_date'] ?? ''),
'time' => (string) ($outerPlanetEvent['local_time'] ?? ''),
'local_iso' => (string) ($outerPlanetEvent['local_iso'] ?? ''),
'type' => 'outer_planet_event',
];
}
foreach ($moonPlanetApproaches as $approachEvent) {
if (!is_array($approachEvent)) {
continue;