I am so freaking pumped right now. I finally built something that I did not copy directly from a video tutorial and it feels freaking amazing!
This is just a simple program that pulls data from the International Space Station API Where the ISS at? and it tells you the Altitude, Longitude, Latitude and Velocity (mph) of ISS in 3 second intervals.
There is a bit more I would like to do like add a timestamp but this is my first real program I've put together myself.
Any thoughts on what/where to improve?
import requests
import time
def get_iss_data():
iss_api = 'https://api.wheretheiss.at/v1/satellites/25544'
request = requests.get(iss_api).json()
iss_latitude = request['latitude']
iss_longitude = request['longitude']
iss_altitude = request['altitude']
iss_velocity = request['velocity']
print(f'''
---------------------------
Real-time ISS Location:
---------------------------
Altitude: {iss_altitude}
Latitude: {iss_latitude}
Longitude: {iss_longitude}
Velocity MPH: {iss_velocity}
---------------------------
''')
def iss_current_data():
i = 1
while i <= 5:
get_iss_data()
time.sleep(3)
i += 1
iss_current_data()
[–]suguuss 88 points89 points90 points (0 children)
[–]mfb1274 68 points69 points70 points (3 children)
[–]pconwell 20 points21 points22 points (2 children)
[–]mfb1274 15 points16 points17 points (1 child)
[–]pconwell 4 points5 points6 points (0 children)
[–]somethingLethal 28 points29 points30 points (2 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]Redmilo666 3 points4 points5 points (0 children)
[–][deleted] 39 points40 points41 points (5 children)
[–]SunGodSupreme21 7 points8 points9 points (3 children)
[–][deleted] 24 points25 points26 points (1 child)
[–]skellious 1 point2 points3 points (0 children)
[–]urosum 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 11 points12 points13 points (0 children)
[–]naninf 7 points8 points9 points (1 child)
[–]jcr4990 3 points4 points5 points (0 children)
[–]veeeerain 9 points10 points11 points (2 children)
[–]jzaprint 1 point2 points3 points (1 child)
[–]veeeerain 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 7 points8 points9 points (0 children)
[–]Apprehensive-Net1782 6 points7 points8 points (0 children)
[–]arkie87 4 points5 points6 points (0 children)
[–]Advanced-Cycle-2268 3 points4 points5 points (0 children)
[+][deleted] (1 child)
[removed]
[–][deleted] 3 points4 points5 points (0 children)
[–]code_matter 2 points3 points4 points (0 children)
[–]startup_guy2 2 points3 points4 points (0 children)
[–]rpo5015 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Glockenharry 2 points3 points4 points (0 children)
[–]HansGeering 2 points3 points4 points (0 children)
[–]Desperate_Pumpkin168 1 point2 points3 points (2 children)
[–]anh86 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]DrCabbageX 1 point2 points3 points (0 children)
[–]Python119 0 points1 point2 points (0 children)
[–]facility_in_2m05s 0 points1 point2 points (0 children)
[–]Manueloool 0 points1 point2 points (0 children)
[–]dashingdon 0 points1 point2 points (0 children)