Inspiration
For more than two months, I've been trying to capture a decent image of the full moon. It's too cloudy outside whenever I recall that it's a full moon, though! I intended to create a service alerting me to noteworthy celestial events on clear evenings. We that additional photographers and astronomers will utilize this server-side program to enjoy the stunning night sky.
What it does
It text messages the client when their selected celestial events are happening on a clear night at their location e.g. Jupiter is in clear view from their house. The client creates an account on our website, and then registers their location and the celestial bodies they are interested in tracking. Our tool then creates a visualization of these celestial bodies as they appear in the sky at the current time, and allows the client to estimate the visibility of each over a period of twelve hours by plotting the calculated airmass.
How we built it
We used the Django framework to create the website. The production website was deployed in an Ubuntu-based Docker environment, which allowed us to fine-tune the necessary Python dependencies. Reaching production-ready performance and multithreading for Python-based web applications requires interfacing with web server software using WSGI. For this we used WSGI, routed through an NGINX reverse-proxy for handling TLS certificates. After gathering the pertinent geographic data, we utilized the Python astropy module to determine when the client's location will be in view of the next astronomical event. Next, we used OpenWeatherMap to determine whether the object was visible when a pertinent event occurred close to the client. The customer then receives a text message from the Twilio API informing them of what things to watch out for and when a suitable viewing time based on the local weather, assuming everything had lined up appropriately. The text notifications are handled by a cron script on the host server which checks the appropriate conditions over regularly scheduled intervals.
Challenges we ran into
Deploying this application involved tackling many technical hurdles due to the complicated set of dependencies. No available pre-built Docker image was suitable, so a custom Docker image was created from the base Ubuntu environment, which required extensive troubleshooting.
Accomplishments that we're proud of
The final product is a sleek looking piece of web software which uses modern web development techniques such as JSON AJAX and interaction with RESTful APIs.
What we learned
Web software involves a lot of moving parts. Each piece can easily get entangled with others, and creating a maintainable web codebase means minimizing unintended consequences when making (seemingly innocent) changes.
What's next for Starcaster
I would like to find a light pollution data set and use that to suggest to the client where would be an ideal viewing location near them.
Built With
- astropy
- django
- docker
- openweathermap
- python
- twilio
- uwsgi
Log in or sign up for Devpost to join the conversation.