Current Latitude & Longitude of User
Use geocoder.ip(‘me’) to know your current location in terms of latitude and longitude and after that using write the data in the file and then close the file using the file.close() function.
Python3
# print long and lat g = geocoder.ip( 'me' ) file .write( "\nYour current lat / long is: " + str (g.latlng)) file .close() webbrowser. open ( "iss.txt" ) |
How To Track ISS (International Space Station) Using Python?
In this article, we will discuss how to track the current location of ISS(International Space Station) and then maps the location. We will write a script that will display the current location of ISS along with onboarded crew names. It works on API, it takes the current location of ISS in the form of latitude and longitude and then locates that value onto the map. It takes the value from the website at every 5 sec and then updates the value of latitude and longitude and thus also moves the ISS icon on the world map. The movement visible is very little but you can notice that movement in the gif below. This is possible by using some of the modules of python like JSON, urllib.requests, Webbrowser, Geocoder etc. Numerous functions are used to create this script.
Contact Us