Now that we can track position and time, we can determine how fast the ISS is moving. Speed is simply the distance traveled divided by the time it took.
Your task is to measure the speed of the ISS. You will take a reading, wait for a short interval, take another reading, and then perform the necessary physics calculations.
Speed = Distance / Time.Objective: Calculate the real-time speed of the ISS in km/s.
Instructions:
time_diff by subtracting time1 from time2.distance by calling calculate_distance with the latitude and longitude from pos1 and pos2.speed by dividing distance by time_diff.Provides real-time (simulated) coordinate data.
| Usage | Description |
|---|---|
| iss.get_coordinates() | Returns latitude, longitude, altitude, and timestamp. |
Standard Python library for time-related functions.
| Usage | Description |
|---|---|
| time.sleep(seconds) | Pauses execution for the specified number of seconds. |
Mathematical functions for calculations.
| Usage | Description |
|---|---|
| math.radians(degrees) | Converts degrees to radians. |
| math.sin(x), math.cos(x) | Trigonometric functions. |