From 8c51076fc19b8ab730f9391c76038d36fd6b150e Mon Sep 17 00:00:00 2001 From: Eskimue Date: Fri, 3 Apr 2026 14:44:59 +0200 Subject: [PATCH] Elongation von Veuns und Merkur drin --- .codex-temp/php-server.err.log | 204 ++++++++++++++++++++++ public/monatsvorhersage_old.php | 43 +++++ public/py/__pycache__/api.cpython-314.pyc | Bin 119168 -> 123041 bytes public/py/api.py | 85 ++++++++- 4 files changed, 330 insertions(+), 2 deletions(-) diff --git a/.codex-temp/php-server.err.log b/.codex-temp/php-server.err.log index cc1a430..ef6c2ae 100644 --- a/.codex-temp/php-server.err.log +++ b/.codex-temp/php-server.err.log @@ -281,3 +281,207 @@ Stack trace: [Fri Apr 3 13:40:28 2026] 127.0.0.1:63117 Accepted [Fri Apr 3 13:40:30 2026] 127.0.0.1:63117 [200]: GET /favicon.ico [Fri Apr 3 13:40:30 2026] 127.0.0.1:63117 Closing +[Fri Apr 3 13:43:20 2026] 127.0.0.1:61568 Accepted +[Fri Apr 3 13:43:29 2026] 127.0.0.1:61568 [200]: GET /monatsvorhersage_old.php?year=2026&month=4 +[Fri Apr 3 13:43:29 2026] 127.0.0.1:61568 Closing +[Fri Apr 3 13:44:59 2026] 127.0.0.1:63182 Accepted +[Fri Apr 3 13:45:07 2026] 127.0.0.1:63182 [200]: GET /monatsvorhersage_old.php?year=2026&month=8 +[Fri Apr 3 13:45:07 2026] 127.0.0.1:63182 Closing +[Fri Apr 3 13:45:07 2026] 127.0.0.1:51825 Accepted +[Fri Apr 3 13:45:07 2026] 127.0.0.1:51825 [200]: GET /css/style.css +[Fri Apr 3 13:45:07 2026] 127.0.0.1:51825 Closing +[Fri Apr 3 13:45:07 2026] 127.0.0.1:56032 Accepted +[Fri Apr 3 13:45:07 2026] 127.0.0.1:56032 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:45:07 2026] 127.0.0.1:56032 Closing +[Fri Apr 3 13:45:07 2026] 127.0.0.1:63778 Accepted +[Fri Apr 3 13:45:07 2026] 127.0.0.1:63778 [200]: GET /images/star16x16.png +[Fri Apr 3 13:45:07 2026] 127.0.0.1:59176 Accepted +[Fri Apr 3 13:45:07 2026] 127.0.0.1:59176 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:45:07 2026] 127.0.0.1:63778 Closing +[Fri Apr 3 13:45:07 2026] 127.0.0.1:59176 Closing +[Fri Apr 3 13:45:08 2026] 127.0.0.1:50275 Accepted +[Fri Apr 3 13:45:09 2026] 127.0.0.1:50275 [200]: GET /favicon.ico +[Fri Apr 3 13:45:09 2026] 127.0.0.1:50275 Closing +[Fri Apr 3 13:46:38 2026] 127.0.0.1:58386 Accepted +[Fri Apr 3 13:46:53 2026] 127.0.0.1:58386 [200]: GET /monatsvorhersage_old.php?year=2026&month=1 +[Fri Apr 3 13:46:53 2026] 127.0.0.1:58386 Closing +[Fri Apr 3 13:46:53 2026] 127.0.0.1:64800 Accepted +[Fri Apr 3 13:47:02 2026] 127.0.0.1:64800 [200]: GET /monatsvorhersage_old.php?year=2026&month=8 +[Fri Apr 3 13:47:02 2026] 127.0.0.1:64800 Closing +[Fri Apr 3 13:47:02 2026] 127.0.0.1:58666 Accepted +[Fri Apr 3 13:47:02 2026] 127.0.0.1:58666 [200]: GET /css/style.css +[Fri Apr 3 13:47:02 2026] 127.0.0.1:57926 Accepted +[Fri Apr 3 13:47:02 2026] 127.0.0.1:57926 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:47:02 2026] 127.0.0.1:58666 Closing +[Fri Apr 3 13:47:02 2026] 127.0.0.1:57926 Closing +[Fri Apr 3 13:47:02 2026] 127.0.0.1:56331 Accepted +[Fri Apr 3 13:47:02 2026] 127.0.0.1:58939 Accepted +[Fri Apr 3 13:47:02 2026] 127.0.0.1:56331 [200]: GET /images/star16x16.png +[Fri Apr 3 13:47:02 2026] 127.0.0.1:58939 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:47:02 2026] 127.0.0.1:56331 Closing +[Fri Apr 3 13:47:02 2026] 127.0.0.1:58939 Closing +[Fri Apr 3 13:47:02 2026] 127.0.0.1:50616 Accepted +[Fri Apr 3 13:47:03 2026] 127.0.0.1:50616 [200]: GET /favicon.ico +[Fri Apr 3 13:47:03 2026] 127.0.0.1:50616 Closing +[Fri Apr 3 13:47:15 2026] 127.0.0.1:57631 Accepted +[Fri Apr 3 13:47:30 2026] 127.0.0.1:57631 [200]: GET /monatsvorhersage_old.php?year=2026&month=1 +[Fri Apr 3 13:47:30 2026] 127.0.0.1:57631 Closing +[Fri Apr 3 13:47:30 2026] 127.0.0.1:55628 Accepted +[Fri Apr 3 13:47:30 2026] 127.0.0.1:58335 Accepted +[Fri Apr 3 13:47:30 2026] 127.0.0.1:55628 [200]: GET /css/style.css +[Fri Apr 3 13:47:30 2026] 127.0.0.1:58335 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:47:30 2026] 127.0.0.1:55628 Closing +[Fri Apr 3 13:47:30 2026] 127.0.0.1:58335 Closing +[Fri Apr 3 13:47:30 2026] 127.0.0.1:49979 Accepted +[Fri Apr 3 13:47:30 2026] 127.0.0.1:64153 Accepted +[Fri Apr 3 13:47:30 2026] 127.0.0.1:49979 [200]: GET /images/star16x16.png +[Fri Apr 3 13:47:30 2026] 127.0.0.1:64153 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:47:30 2026] 127.0.0.1:49979 Closing +[Fri Apr 3 13:47:30 2026] 127.0.0.1:64153 Closing +[Fri Apr 3 13:47:30 2026] 127.0.0.1:58580 Accepted +[Fri Apr 3 13:47:31 2026] 127.0.0.1:58580 [200]: GET /favicon.ico +[Fri Apr 3 13:47:31 2026] 127.0.0.1:58580 Closing +[Fri Apr 3 13:48:57 2026] 127.0.0.1:62922 Accepted +[Fri Apr 3 13:49:05 2026] 127.0.0.1:62922 [200]: GET /monatsvorhersage_old.php?year=2026&month=6 +[Fri Apr 3 13:49:05 2026] 127.0.0.1:62922 Closing +[Fri Apr 3 13:49:05 2026] 127.0.0.1:57024 Accepted +[Fri Apr 3 13:49:05 2026] 127.0.0.1:57025 Accepted +[Fri Apr 3 13:49:05 2026] 127.0.0.1:57024 [200]: GET /css/style.css +[Fri Apr 3 13:49:21 2026] 127.0.0.1:57025 [200]: GET /monatsvorhersage_old.php?year=2026&month=1 +[Fri Apr 3 13:49:21 2026] 127.0.0.1:57025 Closing +[Fri Apr 3 13:49:21 2026] 127.0.0.1:51002 Accepted +[Fri Apr 3 13:49:21 2026] 127.0.0.1:51002 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:49:21 2026] 127.0.0.1:57024 Closing +[Fri Apr 3 13:49:21 2026] 127.0.0.1:51002 Closing +[Fri Apr 3 13:49:21 2026] 127.0.0.1:54937 Accepted +[Fri Apr 3 13:49:21 2026] 127.0.0.1:54937 [200]: GET /images/star16x16.png +[Fri Apr 3 13:49:21 2026] 127.0.0.1:54119 Accepted +[Fri Apr 3 13:49:21 2026] 127.0.0.1:54119 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:49:21 2026] 127.0.0.1:54937 Closing +[Fri Apr 3 13:49:21 2026] 127.0.0.1:54119 Closing +[Fri Apr 3 13:49:21 2026] 127.0.0.1:61998 Accepted +[Fri Apr 3 13:49:22 2026] 127.0.0.1:61998 [200]: GET /favicon.ico +[Fri Apr 3 13:49:22 2026] 127.0.0.1:61998 Closing +[Fri Apr 3 13:49:39 2026] 127.0.0.1:50955 Accepted +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50955 [200]: GET /monatsvorhersage_old.php?year=2026&month=6 +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50955 Closing +[Fri Apr 3 13:49:47 2026] 127.0.0.1:57414 Accepted +[Fri Apr 3 13:49:47 2026] 127.0.0.1:57414 [200]: GET /css/style.css +[Fri Apr 3 13:49:47 2026] 127.0.0.1:57414 Closing +[Fri Apr 3 13:49:47 2026] 127.0.0.1:51870 Accepted +[Fri Apr 3 13:49:47 2026] 127.0.0.1:51870 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:49:47 2026] 127.0.0.1:51870 Closing +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50802 Accepted +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50802 [200]: GET /images/star16x16.png +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50540 Accepted +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50540 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50802 Closing +[Fri Apr 3 13:49:47 2026] 127.0.0.1:50540 Closing +[Fri Apr 3 13:49:47 2026] 127.0.0.1:51123 Accepted +[Fri Apr 3 13:49:48 2026] 127.0.0.1:51123 [200]: GET /favicon.ico +[Fri Apr 3 13:49:48 2026] 127.0.0.1:51123 Closing +[Fri Apr 3 13:50:26 2026] 127.0.0.1:57344 Accepted +[Fri Apr 3 13:50:34 2026] 127.0.0.1:57344 [200]: GET /monatsvorhersage_old.php?year=2026&month=7 +[Fri Apr 3 13:50:34 2026] 127.0.0.1:57344 Closing +[Fri Apr 3 13:50:34 2026] 127.0.0.1:63748 Accepted +[Fri Apr 3 13:50:34 2026] 127.0.0.1:56800 Accepted +[Fri Apr 3 13:50:34 2026] 127.0.0.1:63748 [200]: GET /css/style.css +[Fri Apr 3 13:50:34 2026] 127.0.0.1:56800 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:50:34 2026] 127.0.0.1:63748 Closing +[Fri Apr 3 13:50:34 2026] 127.0.0.1:56800 Closing +[Fri Apr 3 13:50:34 2026] 127.0.0.1:64411 Accepted +[Fri Apr 3 13:50:34 2026] 127.0.0.1:65386 Accepted +[Fri Apr 3 13:50:34 2026] 127.0.0.1:64411 [200]: GET /images/star16x16.png +[Fri Apr 3 13:50:34 2026] 127.0.0.1:65386 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:50:34 2026] 127.0.0.1:64411 Closing +[Fri Apr 3 13:50:34 2026] 127.0.0.1:65386 Closing +[Fri Apr 3 13:50:34 2026] 127.0.0.1:57436 Accepted +[Fri Apr 3 13:50:36 2026] 127.0.0.1:57436 [200]: GET /favicon.ico +[Fri Apr 3 13:50:36 2026] 127.0.0.1:57436 Closing +[Fri Apr 3 13:51:49 2026] 127.0.0.1:57952 Accepted +[Fri Apr 3 13:51:57 2026] 127.0.0.1:57952 [200]: GET /monatsvorhersage_old.php?year=2026&month=7 +[Fri Apr 3 13:51:57 2026] 127.0.0.1:57952 Closing +[Fri Apr 3 13:51:57 2026] 127.0.0.1:61080 Accepted +[Fri Apr 3 13:51:57 2026] 127.0.0.1:60174 Accepted +[Fri Apr 3 13:51:57 2026] 127.0.0.1:61080 [200]: GET /css/style.css +[Fri Apr 3 13:51:57 2026] 127.0.0.1:60174 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:51:57 2026] 127.0.0.1:61080 Closing +[Fri Apr 3 13:51:57 2026] 127.0.0.1:60174 Closing +[Fri Apr 3 13:51:57 2026] 127.0.0.1:58447 Accepted +[Fri Apr 3 13:51:57 2026] 127.0.0.1:64622 Accepted +[Fri Apr 3 13:51:57 2026] 127.0.0.1:58447 [200]: GET /images/star16x16.png +[Fri Apr 3 13:51:57 2026] 127.0.0.1:64622 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:51:57 2026] 127.0.0.1:58447 Closing +[Fri Apr 3 13:51:57 2026] 127.0.0.1:64622 Closing +[Fri Apr 3 13:51:57 2026] 127.0.0.1:49389 Accepted +[Fri Apr 3 13:51:59 2026] 127.0.0.1:49389 [200]: GET /favicon.ico +[Fri Apr 3 13:51:59 2026] 127.0.0.1:49389 Closing +[Fri Apr 3 13:52:20 2026] 127.0.0.1:62560 Accepted +[Fri Apr 3 13:52:28 2026] 127.0.0.1:62560 [200]: GET /monatsvorhersage_old.php?year=2026&month=6 +[Fri Apr 3 13:52:28 2026] 127.0.0.1:62560 Closing +[Fri Apr 3 13:52:28 2026] 127.0.0.1:50216 Accepted +[Fri Apr 3 13:52:28 2026] 127.0.0.1:50216 [200]: GET /css/style.css +[Fri Apr 3 13:52:28 2026] 127.0.0.1:61695 Accepted +[Fri Apr 3 13:52:28 2026] 127.0.0.1:61695 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:52:28 2026] 127.0.0.1:50216 Closing +[Fri Apr 3 13:52:28 2026] 127.0.0.1:61695 Closing +[Fri Apr 3 13:52:28 2026] 127.0.0.1:61670 Accepted +[Fri Apr 3 13:52:28 2026] 127.0.0.1:61670 [200]: GET /images/star16x16.png +[Fri Apr 3 13:52:28 2026] 127.0.0.1:62407 Accepted +[Fri Apr 3 13:52:28 2026] 127.0.0.1:62407 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:52:28 2026] 127.0.0.1:61670 Closing +[Fri Apr 3 13:52:28 2026] 127.0.0.1:62407 Closing +[Fri Apr 3 13:52:29 2026] 127.0.0.1:51933 Accepted +[Fri Apr 3 13:52:30 2026] 127.0.0.1:51933 [200]: GET /favicon.ico +[Fri Apr 3 13:52:30 2026] 127.0.0.1:51933 Closing +[Fri Apr 3 13:53:00 2026] 127.0.0.1:52753 Accepted +[Fri Apr 3 13:53:09 2026] 127.0.0.1:52753 [200]: GET /monatsvorhersage_old.php?year=2026&month=4 +[Fri Apr 3 13:53:09 2026] 127.0.0.1:52753 Closing +[Fri Apr 3 13:53:09 2026] 127.0.0.1:52304 Accepted +[Fri Apr 3 13:53:24 2026] 127.0.0.1:52304 [200]: GET /monatsvorhersage_old.php?year=2026&month=1 +[Fri Apr 3 13:53:24 2026] 127.0.0.1:52304 Closing +[Fri Apr 3 13:53:24 2026] 127.0.0.1:61207 Accepted +[Fri Apr 3 13:53:24 2026] 127.0.0.1:65071 Accepted +[Fri Apr 3 13:53:24 2026] 127.0.0.1:61207 [200]: GET /css/style.css +[Fri Apr 3 13:53:24 2026] 127.0.0.1:54477 Accepted +[Fri Apr 3 13:53:25 2026] 127.0.0.1:65071 [200]: GET /.well-known/appspecific/com.chrome.devtools.json +[Fri Apr 3 13:53:25 2026] 127.0.0.1:65071 Closing +[Fri Apr 3 13:53:25 2026] 127.0.0.1:54477 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:53:25 2026] 127.0.0.1:61207 Closing +[Fri Apr 3 13:53:25 2026] 127.0.0.1:54477 Closing +[Fri Apr 3 13:53:25 2026] 127.0.0.1:53519 Accepted +[Fri Apr 3 13:53:25 2026] 127.0.0.1:64233 Accepted +[Fri Apr 3 13:53:25 2026] 127.0.0.1:53519 [200]: GET /images/star16x16.png +[Fri Apr 3 13:53:25 2026] 127.0.0.1:64233 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:53:25 2026] 127.0.0.1:53519 Closing +[Fri Apr 3 13:53:25 2026] 127.0.0.1:64233 Closing +[Fri Apr 3 13:53:25 2026] 127.0.0.1:62437 Accepted +[Fri Apr 3 13:53:27 2026] 127.0.0.1:62437 [200]: GET /favicon.ico +[Fri Apr 3 13:53:27 2026] 127.0.0.1:62437 Closing +[Fri Apr 3 13:53:58 2026] 127.0.0.1:49351 Accepted +[Fri Apr 3 13:54:07 2026] 127.0.0.1:49351 [200]: GET /monatsvorhersage_old.php?year=2026&month=4 +[Fri Apr 3 13:54:07 2026] 127.0.0.1:49351 Closing +[Fri Apr 3 13:54:53 2026] 127.0.0.1:52140 Accepted +[Fri Apr 3 13:55:08 2026] 127.0.0.1:52140 [200]: GET /monatsvorhersage_old.php?year=2026&month=1 +[Fri Apr 3 13:55:08 2026] 127.0.0.1:52140 Closing +[Fri Apr 3 13:55:08 2026] 127.0.0.1:57912 Accepted +[Fri Apr 3 13:55:08 2026] 127.0.0.1:61820 Accepted +[Fri Apr 3 13:55:08 2026] 127.0.0.1:57912 [200]: GET /css/style.css +[Fri Apr 3 13:55:09 2026] 127.0.0.1:61820 [200]: GET /.well-known/appspecific/com.chrome.devtools.json +[Fri Apr 3 13:55:09 2026] 127.0.0.1:61820 Closing +[Fri Apr 3 13:55:09 2026] 127.0.0.1:64502 Accepted +[Fri Apr 3 13:55:09 2026] 127.0.0.1:64502 [200]: GET /js/astronomy.browser.min.js +[Fri Apr 3 13:55:09 2026] 127.0.0.1:57912 Closing +[Fri Apr 3 13:55:09 2026] 127.0.0.1:64502 Closing +[Fri Apr 3 13:55:09 2026] 127.0.0.1:59606 Accepted +[Fri Apr 3 13:55:09 2026] 127.0.0.1:59674 Accepted +[Fri Apr 3 13:55:09 2026] 127.0.0.1:59606 [200]: GET /images/star16x16.png +[Fri Apr 3 13:55:09 2026] 127.0.0.1:59674 [200]: GET /images/star16x16_rays.png +[Fri Apr 3 13:55:09 2026] 127.0.0.1:59606 Closing +[Fri Apr 3 13:55:09 2026] 127.0.0.1:59674 Closing +[Fri Apr 3 13:55:09 2026] 127.0.0.1:56830 Accepted +[Fri Apr 3 13:55:10 2026] 127.0.0.1:56830 [200]: GET /favicon.ico +[Fri Apr 3 13:55:10 2026] 127.0.0.1:56830 Closing +[Fri Apr 3 13:56:21 2026] 127.0.0.1:63611 Accepted +[Fri Apr 3 13:56:30 2026] 127.0.0.1:63611 [200]: GET /monatsvorhersage_old.php?year=2026&month=4 +[Fri Apr 3 13:56:30 2026] 127.0.0.1:63611 Closing diff --git a/public/monatsvorhersage_old.php b/public/monatsvorhersage_old.php index e571afd..d18dbba 100644 --- a/public/monatsvorhersage_old.php +++ b/public/monatsvorhersage_old.php @@ -62,6 +62,7 @@ $planetConjunctions = []; $eclipseEvents = []; $moonApsisEvents = []; $sunApsisEvents = []; +$innerPlanetElongationEvents = []; $moonOccultations = []; $seasonChanges = []; $monthEventList = []; @@ -404,6 +405,23 @@ if (is_array($sunApsisDecoded) && ($sunApsisDecoded['ok'] ?? false)) { $sunApsisEvents = is_array($sunApsisDecoded['events'] ?? null) ? $sunApsisDecoded['events'] : []; } +$elongationOutput = []; +$elongationExitCode = 0; +$elongationArgs = [ + $pythonScriptPath, + 'inner_planet_elongations_for_month', + (string) $selectedYear, + (string) $selectedMonth, + $chartTimezone, +]; +$elongationCommand = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', $elongationArgs)) . ' 2>&1'; +exec($elongationCommand, $elongationOutput, $elongationExitCode); +$elongationRaw = trim(implode("\n", $elongationOutput)); +$elongationDecoded = json_decode($elongationRaw, true); +if (is_array($elongationDecoded) && ($elongationDecoded['ok'] ?? false)) { + $innerPlanetElongationEvents = is_array($elongationDecoded['events'] ?? null) ? $elongationDecoded['events'] : []; +} + $moonPlanetOutput = []; $moonPlanetExitCode = 0; $moonPlanetArgs = [ @@ -597,6 +615,31 @@ foreach ($sunApsisEvents as $sunApsisEvent) { ]; } +foreach ($innerPlanetElongationEvents as $elongationEvent) { + if (!is_array($elongationEvent)) { + continue; + } + + $elongationPlanet = (string) ($elongationEvent['planet_label'] ?? 'Planet'); + $elongationKind = (string) ($elongationEvent['kind'] ?? ''); + $elongationText = isset($elongationEvent['elongation_deg']) + ? number_format((float) $elongationEvent['elongation_deg'], 2, ',', '') . ' Grad' + : ''; + $elongationLabel = $elongationKind === 'western' + ? $elongationPlanet . ' größte westliche Elongation' + : ($elongationKind === 'eastern' + ? $elongationPlanet . ' größte östliche Elongation' + : (string) ($elongationEvent['label'] ?? 'Elongation')); + + $monthEventList[] = [ + 'event' => trim($elongationLabel . ($elongationText !== '' ? ' (' . $elongationText . ')' : '')), + 'date' => (string) ($elongationEvent['local_date'] ?? ''), + 'time' => (string) ($elongationEvent['local_time'] ?? ''), + 'local_iso' => (string) ($elongationEvent['local_iso'] ?? ''), + 'type' => 'planet_elongation', + ]; +} + foreach ($moonPlanetApproaches as $approachEvent) { if (!is_array($approachEvent)) { continue; diff --git a/public/py/__pycache__/api.cpython-314.pyc b/public/py/__pycache__/api.cpython-314.pyc index b42173168bdc1d352d84b03103735369da82baa4..40ecfa3d06eec4cd6fd42e6f985526f48f7ff8bb 100644 GIT binary patch delta 6185 zcmaJ_3s@9avhM1kdte4(U}gZ3H;4=md8kB0M2Qd;QEYG&kqiTjI0!S7Govh+L^Lrm zFB9#X9Nmqp-o&VD5_M5J@A$|XlNcj`EM%^Ef4lc4`L2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aenWkT~*ILh3ML<75B!mw0+bOa~ikuMy@60DPP$M7mF z@||P&F=T@oliMTK$v+)O>Wb~`B6LD^ty_3=gm4T0A?HITxT=MfbN(x{cX()scahtS zLo5`W9w8a-%MP==D#2AHxE{n2c46LfW0^7^lbm(x@4aPtvkW$H*`P^B=1s%}XWESMDRY+;Rl@TPrK8yIkm?@zDbsc4g zbC`|@S$+3+& zP%qo?xcH#HvJHRfe!hQHvSn5vrON!+qwSriS?tR1EOt(UV(&PZHj6*>my#@PUF4NZ z$PVq!TXumr_K@6m8R^O$$l}XLiwF}>kg;g1Z-0j$6;a{^R=y)Yy^QYRe1nTjE@*yE z(Y+pV1^uAOaaYhgB$&3-+{ImT;T0r@Rcp5_maH1>w#5?c){Na(Fi??J9|nb0u_mQj z`^jQaYc!eX!y8>UlWSXzILb4`@s#GP^fa^Y$Szmuq_301ucBM{85X_EV7_#F%c`r$ z)&9frY?E(Z#S1GmrpE1y~O30BF}y%(4H*fJkh{C7tD%#rX5 z)c+PWAI|2Rc^}Kn$F%uy{eW3BCyKIyNHbC9MKyvW9mz18VH(3?2J-@}XUc3I_xgs} zYYJI$uW#^O;=eo0Zeey6E+4^3rz=>maa22X-TVh5AGwC8kQh?X>ZzuT#n+%HyC3@m hNHh!U7QJGv?bbG24CwMVYtWk9?*c5=SP@Ca{|9`^S%Lrn diff --git a/public/py/api.py b/public/py/api.py index aa99651..f46121e 100644 --- a/public/py/api.py +++ b/public/py/api.py @@ -1154,6 +1154,82 @@ def action_sun_apsides_for_month(args: list[str]) -> dict: } +def action_inner_planet_elongations_for_month(args: list[str]) -> dict: + if len(args) != 3: + fail( + "Aktion inner_planet_elongations_for_month erwartet 3 Argumente: year month timezone", + extra={"argv": args}, + ) + + try: + year = int(args[0]) + month = int(args[1]) + except ValueError as exc: + fail("Jahr oder Monat sind ungueltig.", extra={"details": str(exc), "argv": args}) + + if month < 1 or month > 12: + fail("Monat muss zwischen 1 und 12 liegen.", extra={"month": month}) + + timezone_name = args[2] + try: + tz = ZoneInfo(timezone_name) + except Exception as exc: + fail("Zeitzone ist ungueltig oder auf dem Server nicht verfuegbar.", extra={"details": str(exc)}) + + local_start = datetime(year, month, 1, 0, 0, 0, tzinfo=tz) + if month == 12: + local_end = datetime(year + 1, 1, 1, 0, 0, 0, tzinfo=tz) + else: + local_end = datetime(year, month + 1, 1, 0, 0, 0, tzinfo=tz) + + utc_start = local_start.astimezone(timezone.utc) + scan_start = dt_to_time(utc_start - timedelta(days=80)) + + planet_defs = [ + ("Merkur", astronomy.Body.Mercury, "mercury"), + ("Venus", astronomy.Body.Venus, "venus"), + ] + + events: list[dict] = [] + for label, body, key in planet_defs: + event = astronomy.SearchMaxElongation(body, scan_start) + while event is not None: + dt_utc = time_to_datetime(event.time) + local_dt = dt_utc.astimezone(tz) + if local_dt >= local_end: + break + + if local_dt >= local_start: + visibility_label = "westliche" if event.visibility == astronomy.Visibility.Morning else "oestliche" + events.append({ + "planet_key": key, + "planet_label": label, + "kind": "western" if event.visibility == astronomy.Visibility.Morning else "eastern", + "label": f"{label} groesste {visibility_label} Elongation", + "elongation_deg": float(event.elongation), + "ecliptic_separation_deg": float(event.ecliptic_separation), + "utc_iso": dt_utc.isoformat().replace("+00:00", "Z"), + "local_iso": local_dt.isoformat(), + "local_date": local_dt.strftime("%d.%m.%Y"), + "local_time": local_dt.strftime("%H:%M"), + }) + + event = astronomy.SearchMaxElongation(body, event.time.AddDays(1.0)) + + events.sort(key=lambda item: item["local_iso"]) + + return { + "ok": True, + "action": "inner_planet_elongations_for_month", + "selected": { + "year": year, + "month": month, + "timezone": timezone_name, + }, + "events": events, + } + + def action_moon_star_occultations_for_month(args: list[str]) -> dict: if len(args) != 7: fail( @@ -2210,7 +2286,7 @@ def action_satellite_passes(args: list[str]) -> dict: def main() -> None: if len(sys.argv) < 2: - fail("Es wurde keine Aktion uebergeben.", extra={"available_actions": ["sun_moon_rise_set", "moon_star_occultations", "moon_phase_details", "satellite_passes", "planet_rise_set", "month_sky_context", "moon_phases_for_month", "season_changes_for_month", "moon_planet_approaches", "planet_conjunctions_for_month", "eclipses_for_month", "moon_apsides_for_month", "sun_apsides_for_month", "moon_star_occultations_for_month"]}) + fail("Es wurde keine Aktion uebergeben.", extra={"available_actions": ["sun_moon_rise_set", "moon_star_occultations", "moon_phase_details", "satellite_passes", "planet_rise_set", "month_sky_context", "moon_phases_for_month", "season_changes_for_month", "moon_planet_approaches", "planet_conjunctions_for_month", "eclipses_for_month", "moon_apsides_for_month", "sun_apsides_for_month", "inner_planet_elongations_for_month", "moon_star_occultations_for_month"]}) action = sys.argv[1] args = sys.argv[2:] @@ -2280,12 +2356,17 @@ def main() -> None: print(json.dumps(result, ensure_ascii=False)) return + if action == "inner_planet_elongations_for_month": + result = action_inner_planet_elongations_for_month(args) + print(json.dumps(result, ensure_ascii=False)) + return + if action == "moon_star_occultations_for_month": result = action_moon_star_occultations_for_month(args) print(json.dumps(result, ensure_ascii=False)) return - fail("Unbekannte Aktion.", extra={"action": action, "available_actions": ["sun_moon_rise_set", "moon_star_occultations", "moon_phase_details", "satellite_passes", "planet_rise_set", "month_sky_context", "moon_phases_for_month", "season_changes_for_month", "moon_planet_approaches", "planet_conjunctions_for_month", "eclipses_for_month", "moon_apsides_for_month", "sun_apsides_for_month", "moon_star_occultations_for_month"]}) + fail("Unbekannte Aktion.", extra={"action": action, "available_actions": ["sun_moon_rise_set", "moon_star_occultations", "moon_phase_details", "satellite_passes", "planet_rise_set", "month_sky_context", "moon_phases_for_month", "season_changes_for_month", "moon_planet_approaches", "planet_conjunctions_for_month", "eclipses_for_month", "moon_apsides_for_month", "sun_apsides_for_month", "inner_planet_elongations_for_month", "moon_star_occultations_for_month"]}) if __name__ == "__main__":