The ISS orbits the Earth every 90 minutes, experiencing 16 sunrises and sunsets every day. To take good photos, we must know if we are in sunlight.
We need to write a program that checks the lighting conditions before attempting to take a photo. Taking photos in the dark wastes storage space and power.
if sunlit: runs code only when it is day.Objective: Continuously check the sunlight status over a period of time.
Instructions:
for loop that runs 5 times.iss.get_status() to get the latest data.if/else statement to check the sunlit property.time.sleep(1) delay to simulate time passing between checks.Provides information about the ISS orbit and position.
| Usage | Description |
|---|---|
| iss = ISS() | Initialize the ISS interface. |
| iss.get_position() | Returns the current latitude and longitude. |
| iss.get_status() | Returns a dictionary with orbital info (sunlit, eclipse, etc). |
Standard Python library for time-related functions.
| Usage | Description |
|---|---|
| time.sleep(seconds) | Pauses execution for the specified number of seconds. |