This script retrieves the International Space Station's (ISS) live position using a public API and generates a KML file to visualize its trajectory in Google Earth, combining Python programming, API integration, and geospatial visualization.
In this screenshot from Google Earth, the ISS trajectory is above the Pacific Ocean, about 1000 km East of Kiribati islands, moving approximately from NNW to SSE.
-Real-Time Data Acquisition: Uses the "Where the ISS at?" API to get the exact -coordinates (latitude, longitude, altitude) of the ISS.
-Geospatial Visualization: Converts the data into a KML file that can be imported into Google Earth for a dynamic 3D visualization.
-Temporal Data Handling: Each tracked point includes a UTC timestamp for a -precise log of the path.
-Custom Icons: The KML file includes a custom icon representing the ISS, enhancing the visual experience.
To run this script, ensure you have the following installed: -Python 3.x
-Python Modules: requests (for API calls) and simplekml (for KML file generation). You can install them via pip: pip install requests simplekml
-Google Earth: To visualize the generated KML file.
-
Clone this repository to your local machine or download the script. git clone https://github.com/Forren70/python-iss-tracker-kml.git
-
Navigate to the project directory. cd python-iss-tracker-kml
-
Execute the script from the command line: python iss_tracker.py
-
The script will automatically generate a file named iss_trajectory.kml and open it in Google Earth, showing the ISS's path.