A Python-based system for tracking the position of Venus and modeling its atmosphere.
This project provides tools to:
- Calculate the position of Venus in the sky from any location on Earth
- Model Venus's atmospheric conditions
- Log position and atmospheric data over time
- Generate visualizations of tracking data
- View Venus-centric perspectives of Earth and the Sun
-
Clone this repository:
git clone https://github.com/PranavTamada/Venus-Tracking.git cd Venus-Tracking -
Create and activate a virtual environment (optional but recommended):
# Using conda conda create -n venus python=3.9 conda activate venus # Or using venv python -m venv venv # On Windows venv\Scripts\activate # On Linux/Mac source venv/bin/activate
-
Install required packages:
pip install -r requirements.txt
The easiest way to explore the functionality is through the enhanced demo script:
python demo_enhanced.pyThis will:
- Initialize the application with default settings
- Demonstrate location management
- Show Venus position calculations
- Generate sample data and visualizations
- Provide instructions for real-time tracking
To track Venus's current position from your location:
python venus_app.py --location "New York City"Or with coordinates:
python venus_app.py --location "51.4778,-0.0015,0"To track Venus over a period of time:
python venus_app.py --mode track --location "New York City" --duration 60 --interval 10This will track Venus's position for 60 minutes, taking measurements every 10 seconds.
To calculate Venus's position at a specific time:
python venus_app.py --time "2025-06-01 12:00:00" --location "New York City"All tracking data is automatically saved to CSV and can be exported in various formats:
python venus_app.py --mode export --format jsonTo generate visualizations from collected data:
python venus_app.py --mode visualizeThe default configuration is in config/default.yml. You can create custom config files based on this template.
Key configuration options:
location: Observer's location (latitude, longitude, elevation)tracking_interval: Time between position calculations in secondsreal_time: Whether to track in real-time or as fast as possibleatmospheric_model: Settings for the atmospheric modelvisualization: Options for data visualization
venus_app.py: Main application entry pointdemo_enhanced.py: Interactive demonstration of all featuressrc/position_tracking/: Venus position calculationsrc/atmospheric_model/: Venus atmosphere modelingsrc/data_logging/: Data logging and visualizationsrc/config/: Configuration managementconfig/: Configuration filesdata/: Stored tracking dataplots/: Generated visualizations
- Fixed calculation of Venus perspective using Skyfield's proper coordinate system
- Corrected phase angle calculations using
separation_frominstead of deprecatedfrom_star - Improved orbital parameter calculations using ecliptic coordinates
- Enhanced error handling and encoding issue detection
- Python 3.9+
- skyfield
- numpy
- pandas
- matplotlib
- pyyaml
- astropy
- geopy (for location lookups)
- plotly (for interactive visualizations)
The full list of dependencies is available in requirements.txt.
If you encounter errors related to null bytes or encoding issues, run the provided fix script:
python fix_null_bytes.pyIf you receive errors about missing modules, ensure all dependencies are installed:
pip install -r requirements.txtWhen working with celestial coordinates, be aware that:
- Altitude/azimuth calculations require an observer on a defined celestial body
- Venus-centric views use right ascension/declination coordinates instead of altitude/azimuth
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- The Skyfield library for astronomical calculations
- NASA JPL for providing the planetary ephemeris data