Konjunktionen erweitert
This commit is contained in:
@@ -26,7 +26,7 @@ $shouldRunForecast = isset($_GET['run']) && $_GET['run'] === '1';
|
||||
// - Jahreszeitenwechsel und Zeitumstellungen
|
||||
// - Sonnen- und Mondfinsternisse
|
||||
// - Perigäum/Apogäum des Mondes sowie Perihel/Aphel der Sonne
|
||||
// - Größte Elongationen von Merkur/Venus und größte Venushelligkeit
|
||||
// - Größte Elongationen sowie untere/obere Konjunktionen von Merkur/Venus und größte Venushelligkeit
|
||||
// - Ereignisse äußerer Planeten und deren Stillstände
|
||||
// - Jupitermonde auf nur einer Planetenseite
|
||||
// - Annäherungen Mond-Planet, Mond-Deep-Sky und Planet-heller-Stern
|
||||
@@ -877,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', 'golden_gate_of_ecliptic'], true),
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_event', 'venus_peak_magnitude', 'outer_planet_event', 'planet_conjunction', 'planet_parade', 'mercury_good_visibility', 'golden_gate_of_ecliptic'], true),
|
||||
5
|
||||
);
|
||||
if ($planetObservationEvents !== []) {
|
||||
@@ -1990,7 +1990,7 @@ foreach ($innerPlanetElongationEvents as $elongationEvent) {
|
||||
'date' => (string) ($elongationEvent['local_date'] ?? ''),
|
||||
'time' => (string) ($elongationEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($elongationEvent['local_iso'] ?? ''),
|
||||
'type' => 'planet_elongation',
|
||||
'type' => 'inner_planet_event',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -652,7 +652,7 @@ if (!function_exists('monthForecastBuildNarrativeText')) {
|
||||
|
||||
$planetEvents = $findEvents(
|
||||
$filteredEvents,
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_elongation', 'venus_peak_magnitude', 'outer_planet_event', 'outer_planet_station', 'planet_conjunction', 'planet_constellation_change', 'planet_parade', 'mercury_good_visibility'], true),
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_event', 'venus_peak_magnitude', 'outer_planet_event', 'outer_planet_station', 'planet_conjunction', 'planet_constellation_change', 'planet_parade', 'mercury_good_visibility'], true),
|
||||
5
|
||||
);
|
||||
if ($planetEvents !== []) {
|
||||
@@ -1579,7 +1579,7 @@ foreach ($innerPlanetElongationEvents as $elongationEvent) {
|
||||
'date' => (string) ($elongationEvent['local_date'] ?? ''),
|
||||
'time' => (string) ($elongationEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($elongationEvent['local_iso'] ?? ''),
|
||||
'type' => 'planet_elongation',
|
||||
'type' => 'inner_planet_event',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -3791,6 +3791,31 @@ def action_inner_planet_elongations_for_month(args: list[str]) -> dict:
|
||||
|
||||
event = astronomy.SearchMaxElongation(body, event.time.AddDays(1.0))
|
||||
|
||||
for event_kind, target_lon, event_label in [
|
||||
("inferior_conjunction", 0.0, "unterer Konjunktion"),
|
||||
("superior_conjunction", 180.0, "oberer Konjunktion"),
|
||||
]:
|
||||
event_time = astronomy.SearchRelativeLongitude(body, target_lon, scan_start)
|
||||
while True:
|
||||
event_dt_utc = time_to_datetime(event_time)
|
||||
local_dt = event_dt_utc.astimezone(tz)
|
||||
if local_dt >= local_end:
|
||||
break
|
||||
|
||||
if local_dt >= local_start:
|
||||
events.append({
|
||||
"planet_key": key,
|
||||
"planet_label": label,
|
||||
"kind": event_kind,
|
||||
"label": f"{label} in {event_label}",
|
||||
"utc_iso": event_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_time = astronomy.SearchRelativeLongitude(body, target_lon, event_time.AddDays(10.0))
|
||||
|
||||
events.sort(key=lambda item: item["local_iso"])
|
||||
|
||||
return {
|
||||
|
||||
@@ -776,7 +776,7 @@ if (!function_exists('monthForecastBuildNarrativeText')) {
|
||||
|
||||
$planetEvents = $findEvents(
|
||||
$filteredEvents,
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_elongation', 'venus_peak_magnitude', 'outer_planet_event', 'outer_planet_station', 'planet_conjunction', 'planet_constellation_change', 'planet_parade', 'mercury_good_visibility'], true),
|
||||
static fn (array $event): bool => in_array((string) ($event['type'] ?? ''), ['inner_planet_event', 'venus_peak_magnitude', 'outer_planet_event', 'outer_planet_station', 'planet_conjunction', 'planet_constellation_change', 'planet_parade', 'mercury_good_visibility'], true),
|
||||
5
|
||||
);
|
||||
if ($planetEvents !== []) {
|
||||
@@ -1712,7 +1712,7 @@ foreach ($innerPlanetElongationEvents as $elongationEvent) {
|
||||
'date' => (string) ($elongationEvent['local_date'] ?? ''),
|
||||
'time' => (string) ($elongationEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($elongationEvent['local_iso'] ?? ''),
|
||||
'type' => 'planet_elongation',
|
||||
'type' => 'inner_planet_event',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user