ISS Tracker is a Python application that monitors the location of the International Space Station (ISS) and checks if it is near a specified location during nighttime. It utilizes the requests library to interact with the api.open-notify.org API for ISS location data.
- Tracks the real-time location of the ISS.
- Determines if the ISS is near your location (latitude/longitude).
- Verifies whether it is nighttime at your location using sunrise and sunset data.
- Sends notifications when the ISS is visible.
- Python 3.10+
- Libraries:
requestsdatetimetime
-
Clone the repository:
git clone https://github.com/MostafaHima/iss-tracker.git cd iss-tracker -
Install required libraries:
pip install -r requirements.txt
-
Run the script:
python main.py
-
The application fetches the ISS location using the API endpoint:
http://api.open-notify.org/iss-now.json -
Your location is compared to the ISS location based on latitude and longitude.
-
It checks if it is nighttime at your location by comparing the current time with sunrise and sunset times (can be fetched using additional APIs like Sunrise-Sunset API).
-
Sends a notification if the ISS is visible.
ISS is near your location! Look up at the sky!
- The API
api.open-notify.orgmay occasionally time out. Retry logic is implemented to handle this. - Network issues can prevent the script from running properly.