View the website >> Welcome to the Space Calcuator! This web application allows you to perform various space-related calculations, including:
- Calculating when planets are aligned.
- Determining the Schwarzschild radius of black holes.
- Choosing between predefined stars or custom star masses.
- 🌍 Planet Alignment Calculation: Input two planets and a date (or let the system automatically calculate future alignments within a specified number of years).
- 🌌 Schwarzschild Radius Calculation: Choose from a list of stars or input a custom mass to calculate the Schwarzschild radius of a black hole. and more to come!
Ensure you have the following installed:
- Python 3.x
- Flask
- Astropy
-
Clone the repository:
git clone https://github.com/sudo-arash/space-calculator.git
-
Navigate to the project directory:
cd space-calculator
-
Install the required packages:
pip install astropy flask
-
Start the Flask server:
python app.py
-
Open your browser and visit:
http://127.0.0.1:5000
-
Planet Alignment:
- Select two planets from the dropdown menu.
- Choose a specific date or let the application find the next alignment automatically.
- Click "Calculate" to see the results!
-
Schwarzschild Radius:
- Choose a star from the list or enter a custom mass in solar masses.
- Click "Calculate" to find out the Schwarzschild radius of a black hole for the selected star or mass.
app.py
: Contains the Flask routes and logic for calculations.templates/index.html
: The main HTML file with forms and results display.static/
: Contains static files like CSS and JavaScript.
If you would like to contribute to this project, please follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature-branch
-
Make your changes and commit:
git commit -m "Add feature"
-
Push to the branch:
git push origin feature-branch
-
Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the Astropy library for its powerful astronomical computations.
- Special thanks to all contributors and users who provide feedback!
Feel free to reach out if you have any questions or suggestions 🌠