Planeten helle Sterne begegnung rein
This commit is contained in:
@@ -18,6 +18,9 @@ $messierDatabaseMagnitudeLimit = 4.0;
|
||||
$messierDisplayMagnitudeLimit = 1.0;
|
||||
$moonPlanetMaxSeparationDeg = 1.5;
|
||||
$moonDeepSkyMaxSeparationDeg = 1.0;
|
||||
$planetBrightStarMaxSeparationDeg = 1.0;
|
||||
// Maximaler Winkelabstand fuer Begegnungen zwischen hellen Planeten und
|
||||
// ausgewaehlten hellen Sternen wie Regulus oder Spica.
|
||||
$planetConjunctionMaxSeparationDeg = 1.0;
|
||||
$moonOccultationMaxMag = 2.0;
|
||||
// Gute Merkur-Sichtbarkeit wird nicht nur über Elongation, sondern über echte
|
||||
@@ -78,6 +81,7 @@ $moonPhaseEvents = [];
|
||||
$goldenHandleEvents = [];
|
||||
$moonPlanetApproaches = [];
|
||||
$moonDeepSkyApproaches = [];
|
||||
$planetBrightStarApproaches = [];
|
||||
$mercuryGoodVisibilityEvents = [];
|
||||
$planetConjunctions = [];
|
||||
$eclipseEvents = [];
|
||||
@@ -696,6 +700,27 @@ if (is_array($moonDeepSkyDecoded) && ($moonDeepSkyDecoded['ok'] ?? false)) {
|
||||
$moonDeepSkyApproaches = is_array($moonDeepSkyDecoded['approaches'] ?? null) ? $moonDeepSkyDecoded['approaches'] : [];
|
||||
}
|
||||
|
||||
$planetBrightStarOutput = [];
|
||||
$planetBrightStarExitCode = 0;
|
||||
$planetBrightStarArgs = [
|
||||
$pythonScriptPath,
|
||||
'planet_bright_star_approaches_for_month',
|
||||
(string) $chartLatitude,
|
||||
(string) $chartLongitude,
|
||||
(string) $chartElevation,
|
||||
(string) $selectedYear,
|
||||
(string) $selectedMonth,
|
||||
$chartTimezone,
|
||||
(string) $planetBrightStarMaxSeparationDeg,
|
||||
];
|
||||
$planetBrightStarCommand = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', $planetBrightStarArgs)) . ' 2>&1';
|
||||
exec($planetBrightStarCommand, $planetBrightStarOutput, $planetBrightStarExitCode);
|
||||
$planetBrightStarRaw = trim(implode("\n", $planetBrightStarOutput));
|
||||
$planetBrightStarDecoded = json_decode($planetBrightStarRaw, true);
|
||||
if (is_array($planetBrightStarDecoded) && ($planetBrightStarDecoded['ok'] ?? false)) {
|
||||
$planetBrightStarApproaches = is_array($planetBrightStarDecoded['approaches'] ?? null) ? $planetBrightStarDecoded['approaches'] : [];
|
||||
}
|
||||
|
||||
$planetConjunctionOutput = [];
|
||||
$planetConjunctionExitCode = 0;
|
||||
$planetConjunctionArgs = [
|
||||
@@ -1069,6 +1094,24 @@ foreach ($moonDeepSkyApproaches as $approachEvent) {
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($planetBrightStarApproaches as $approachEvent) {
|
||||
if (!is_array($approachEvent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$distanceText = isset($approachEvent['separation_deg'])
|
||||
? number_format((float) ($approachEvent['separation_deg']), 2, ',', '') . ' Grad'
|
||||
: '';
|
||||
|
||||
$monthEventList[] = [
|
||||
'event' => trim((string) ($approachEvent['label'] ?? 'Planet nahe hellem Stern') . ($distanceText !== '' ? ' (' . $distanceText . ')' : '')),
|
||||
'date' => (string) ($approachEvent['local_date'] ?? ''),
|
||||
'time' => (string) ($approachEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($approachEvent['local_iso'] ?? ''),
|
||||
'type' => 'planet_bright_star',
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($planetConjunctions as $conjunctionEvent) {
|
||||
if (!is_array($conjunctionEvent)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user