Add dynamic meteor shower calculations using PyEphem
- Replace hardcoded 2025 data with astronomically calculated dates - Use solar longitude to determine precise meteor shower peak dates - Calculate real-time moon phases for accurate viewing conditions - Support for any year with automatic date calculations - Include parent body information and meteor velocities - Remove caching layer for real-time calculations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
37e74404d5
commit
13bb753a0b
2 changed files with 269 additions and 72 deletions
74
web_view.py
74
web_view.py
|
|
@ -23,6 +23,7 @@ import agenda.data
|
|||
import agenda.error_mail
|
||||
import agenda.fx
|
||||
import agenda.holidays
|
||||
import agenda.meteors
|
||||
import agenda.stats
|
||||
import agenda.thespacedevs
|
||||
import agenda.trip
|
||||
|
|
@ -216,78 +217,7 @@ def launch_list() -> str:
|
|||
@app.route("/meteors")
|
||||
def meteor_list() -> str:
|
||||
"""Web page showing meteor shower information."""
|
||||
meteors = [
|
||||
{
|
||||
"name": "Quadrantids",
|
||||
"peak": "January 3-4",
|
||||
"active": "December 28 - January 12",
|
||||
"rate": "50-100 meteors per hour",
|
||||
"radiant": "Boötes",
|
||||
"moon_phase": "New Moon (excellent viewing)",
|
||||
"visibility": "Northern Hemisphere",
|
||||
"description": "The year kicks off with the Quadrantids, known for their brief but intense peak lasting only about 4 hours.",
|
||||
},
|
||||
{
|
||||
"name": "Lyrids",
|
||||
"peak": "April 21-22",
|
||||
"active": "April 14 - April 30",
|
||||
"rate": "10-15 meteors per hour",
|
||||
"radiant": "Lyra",
|
||||
"moon_phase": "Waning Crescent (good viewing)",
|
||||
"visibility": "Both hemispheres",
|
||||
"description": "The Lyrids are one of the oldest recorded meteor showers, with observations dating back 2,700 years.",
|
||||
},
|
||||
{
|
||||
"name": "Eta Aquariids",
|
||||
"peak": "May 5-6",
|
||||
"active": "April 15 - May 27",
|
||||
"rate": "30-60 meteors per hour",
|
||||
"radiant": "Aquarius",
|
||||
"moon_phase": "First Quarter (moderate viewing)",
|
||||
"visibility": "Southern Hemisphere (best)",
|
||||
"description": "Created by debris from Halley's Comet, these meteors are fast and often leave glowing trails.",
|
||||
},
|
||||
{
|
||||
"name": "Perseids",
|
||||
"peak": "August 12-13",
|
||||
"active": "July 17 - August 24",
|
||||
"rate": "50-100 meteors per hour",
|
||||
"radiant": "Perseus",
|
||||
"moon_phase": "Full Moon (poor viewing)",
|
||||
"visibility": "Northern Hemisphere",
|
||||
"description": "One of the most popular meteor showers, though 2025 viewing will be hampered by bright moonlight.",
|
||||
},
|
||||
{
|
||||
"name": "Orionids",
|
||||
"peak": "October 21-22",
|
||||
"active": "October 2 - November 7",
|
||||
"rate": "15-25 meteors per hour",
|
||||
"radiant": "Orion",
|
||||
"moon_phase": "Waning Crescent (good viewing)",
|
||||
"visibility": "Both hemispheres",
|
||||
"description": "Another shower created by Halley's Comet debris, known for their speed and brightness.",
|
||||
},
|
||||
{
|
||||
"name": "Geminids",
|
||||
"peak": "December 13-14",
|
||||
"active": "December 4 - December 20",
|
||||
"rate": "60-120 meteors per hour",
|
||||
"radiant": "Gemini",
|
||||
"moon_phase": "Waxing Gibbous (moderate viewing)",
|
||||
"visibility": "Both hemispheres",
|
||||
"description": "The best shower of 2025 with the highest rates. Unusual for being caused by an asteroid (3200 Phaethon) rather than a comet.",
|
||||
},
|
||||
{
|
||||
"name": "Ursids",
|
||||
"peak": "December 22-23",
|
||||
"active": "December 17 - December 26",
|
||||
"rate": "5-10 meteors per hour",
|
||||
"radiant": "Ursa Minor",
|
||||
"moon_phase": "New Moon (excellent viewing)",
|
||||
"visibility": "Northern Hemisphere",
|
||||
"description": "A minor shower that closes out the year, best viewed from dark locations away from city lights.",
|
||||
},
|
||||
]
|
||||
meteors = agenda.meteors.get_meteor_data()
|
||||
|
||||
return flask.render_template(
|
||||
"meteors.html",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue