diff --git a/public/satellitenhimmel.php b/public/satellitenhimmel.php index 41719aa..979f960 100644 --- a/public/satellitenhimmel.php +++ b/public/satellitenhimmel.php @@ -695,6 +695,12 @@ if (!empty($currentLocation) && is_array($currentLocation)) { }; } + function isPeakVisible(pass) { + if (!(pass.peakTime instanceof Date) || Number.isNaN(pass.peakTime.getTime())) return false; + if ((pass.peakElevation ?? -1) < 0) return false; + return !pass.shadowEntry || pass.peakTime <= pass.shadowEntry.time; + } + function buildObservationSummary(satName, pass, visibility) { if (visibility.sky.key === 'day') return `${satName} ist bei diesem Überflug tagsüber nicht zu sehen.`; const visiblePhase = getVisiblePhase(pass); @@ -906,6 +912,14 @@ if (!empty($currentLocation) && is_array($currentLocation)) { ctx.beginPath(); ctx.arc(endPt.x,endPt.y,3.5,0,Math.PI*2); ctx.fillStyle=trackColor; ctx.fill(); drawEndpointLabel(startPt, formatTime(pass.aosTime), trackColor, cx, cy, radius); drawEndpointLabel(endPt, formatTime(pass.losTime), trackColor, cx, cy, radius); + if (isPeakVisible(pass)) { + const peakPt = projectPoint(pass.peakAzimuth, pass.peakElevation, radius, cx, cy); + ctx.beginPath(); ctx.arc(peakPt.x,peakPt.y,4.5,0,Math.PI*2); + ctx.fillStyle = trackColor; ctx.fill(); + ctx.strokeStyle = invertSky ? 'rgba(248,248,244,0.95)' : 'rgba(8,12,20,0.92)'; + ctx.lineWidth = 1.5; ctx.stroke(); + drawEndpointLabel(peakPt, formatTime(pass.peakTime), trackColor, cx, cy, radius); + } if (pass.shadowEntry) { const sp = projectPoint(pass.shadowEntry.azimuthDeg, pass.shadowEntry.elevationDeg, radius, cx, cy); ctx.beginPath(); ctx.arc(sp.x,sp.y,4,0,Math.PI*2); diff --git a/todo.md b/todo.md index fd27c66..8e076ed 100644 --- a/todo.md +++ b/todo.md @@ -1,3 +1,5 @@ +Startseite, DeepSky beobachtungszeit angeben, Astronomische Dämmerung! + # Monatsvorschau TODO - Sichtbare ISS-Ueberfluege fuer den Standort ergaenzen - Hesiodusstrahl als eigenes Mondlichtphaenomen fuer die Monatsvorschau ergaenzen