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