Jupitermonde in MV eingabuet
This commit is contained in:
@@ -67,6 +67,7 @@ $innerPlanetElongationEvents = [];
|
||||
$venusPeakMagnitudeEvents = [];
|
||||
$outerPlanetEvents = [];
|
||||
$outerPlanetStationEvents = [];
|
||||
$jupiterMoonSideEvents = [];
|
||||
$moonOccultations = [];
|
||||
$meteorShowerPeaks = [];
|
||||
$seasonChanges = [];
|
||||
@@ -616,6 +617,23 @@ if (is_array($outerPlanetStationDecoded) && ($outerPlanetStationDecoded['ok'] ??
|
||||
$outerPlanetStationEvents = is_array($outerPlanetStationDecoded['events'] ?? null) ? $outerPlanetStationDecoded['events'] : [];
|
||||
}
|
||||
|
||||
$jupiterMoonSideOutput = [];
|
||||
$jupiterMoonSideExitCode = 0;
|
||||
$jupiterMoonSideArgs = [
|
||||
$pythonScriptPath,
|
||||
'jupiter_moons_one_side_for_month',
|
||||
(string) $selectedYear,
|
||||
(string) $selectedMonth,
|
||||
$chartTimezone,
|
||||
];
|
||||
$jupiterMoonSideCommand = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', $jupiterMoonSideArgs)) . ' 2>&1';
|
||||
exec($jupiterMoonSideCommand, $jupiterMoonSideOutput, $jupiterMoonSideExitCode);
|
||||
$jupiterMoonSideRaw = trim(implode("\n", $jupiterMoonSideOutput));
|
||||
$jupiterMoonSideDecoded = json_decode($jupiterMoonSideRaw, true);
|
||||
if (is_array($jupiterMoonSideDecoded) && ($jupiterMoonSideDecoded['ok'] ?? false)) {
|
||||
$jupiterMoonSideEvents = is_array($jupiterMoonSideDecoded['events'] ?? null) ? $jupiterMoonSideDecoded['events'] : [];
|
||||
}
|
||||
|
||||
$moonPlanetOutput = [];
|
||||
$moonPlanetExitCode = 0;
|
||||
$moonPlanetArgs = [
|
||||
@@ -930,6 +948,26 @@ foreach ($outerPlanetStationEvents as $outerPlanetStationEvent) {
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($jupiterMoonSideEvents as $jupiterMoonSideEvent) {
|
||||
if (!is_array($jupiterMoonSideEvent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$durationLabel = trim((string) ($jupiterMoonSideEvent['duration_label'] ?? ''));
|
||||
$eventLabel = trim((string) ($jupiterMoonSideEvent['label'] ?? 'Alle 4 Jupitermonde auf einer Seite von Jupiter'));
|
||||
if ($durationLabel !== '') {
|
||||
$eventLabel .= ' (' . $durationLabel . ')';
|
||||
}
|
||||
|
||||
$monthEventList[] = [
|
||||
'event' => $eventLabel,
|
||||
'date' => (string) ($jupiterMoonSideEvent['local_date'] ?? ''),
|
||||
'time' => (string) ($jupiterMoonSideEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($jupiterMoonSideEvent['local_iso'] ?? ''),
|
||||
'type' => 'jupiter_moons_one_side',
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($moonPlanetApproaches as $approachEvent) {
|
||||
if (!is_array($approachEvent)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user