A real-time GNSS satellite tracking application with Python backend and minimal JavaScript frontend.
This application is built with Python doing the heavy lifting:
- Backend: Flask REST API with Skyfield for orbital calculations
- Frontend: Minimal JavaScript (only for 3D visualization)
- All satellite calculations done in Python
pip install -r requirements.txtpython app.pyNavigate to http://localhost:5000
satellite/
├── app.py # Python Flask backend (main application)
├── requirements.txt # Python dependencies
├── templates/
│ └── index.html # Flask template
├── static/
│ ├── js/
│ │ └── main.js # Minimal JS (visualization only)
│ └── css/
│ └── style.css # Styling
Get all GNSS satellites with current positions
- Query param:
time(ISO format, optional) - Returns: Array of satellites with positions, velocities, etc.
Get detailed information for a specific satellite
- Query param:
time(ISO format, optional) - Returns: Full satellite data including orbital path
Get orbital path for visualization
- Query param:
time(ISO format, optional) - Returns: Array of 3D coordinates
Get list of available GNSS constellations
- Returns: Array of constellation metadata
- Flask: Web framework and REST API
- Skyfield: High-precision satellite position calculations
- NumPy: Numerical computations
- Requests: TLE data fetching from CelesTrak
- GPS (USA) - 31 satellites
- GLONASS (Russia) - 24 satellites
- Galileo (EU) - 30 satellites
- BeiDou (China) - 35+ satellites
✅ Real-time orbital calculations using Skyfield
✅ TLE data caching (5-minute cache)
✅ RESTful API design
✅ Accurate position/velocity calculations
✅ Orbital path generation
✅ Time travel support (any date/time)
✅ 3D Earth visualization (Three.js)
✅ Satellite point rendering
✅ Orbital path display
✅ Click to select satellites
✅ Real-time updates via API
app.py: 300+ lines of Pythonmain.js: ~200 lines of JavaScript (minimal)
Python handles:
- TLE data fetching and parsing
- Satellite position calculations (lat/lon/alt)
- Velocity calculations
- Orbital period calculations
- Orbital path generation
- Time-based propagation
JavaScript handles:
- 3D visualization only
- User interface interactions
- API calls to Python backend
from app import calculate_satellite_position, parse_tle
from datetime import datetime
# Load satellites
tle_data = fetch_tle_data('gps-ops')
satellites = parse_tle(tle_data, 'gps-ops')
# Calculate position
sat = satellites[0]['satellite']
time_obj = ts.utc(2025, 11, 29, 12, 0, 0)
position = calculate_satellite_position(sat, time_obj)
print(f"Latitude: {position['latitude']}°")
print(f"Longitude: {position['longitude']}°")
print(f"Altitude: {position['altitude']} km"){
"satellites": [
{
"name": "GPS BIIA-10 (PRN 32)",
"group": "gps-ops",
"groupName": "GPS (USA)",
"color": "#00FF00",
"position": {
"x": 12345.67,
"y": -8901.23,
"z": 15678.90
},
"latitude": 45.1234,
"longitude": -122.5678,
"altitude": 20180.5,
"speed": 3.87
}
],
"count": 120,
"timestamp": "2025-11-29T21:00:00"
}- User Action → JavaScript frontend
- API Request → Python Flask backend
- TLE Fetch → CelesTrak (cached)
- Skyfield Calculation → Satellite positions
- JSON Response → JavaScript frontend
- 3D Rendering → Three.js visualization
flask- Web frameworkflask-cors- CORS supportskyfield- Satellite calculationsnumpy- Numerical operationsrequests- HTTP requests
three.js- 3D renderingsatellite.js- TLE parsing (minimal use)
MIT License - Feel free to use for learning and projects!
Built with Python 🐍 | Powered by Skyfield & Flask