Tom Willshare
Mechanical Engineer, VP R&D, Product Development, CTO. That sort of thing.
Building an International Space Station Tracker.
My son and I watched the International Space Station (ISS) zoom across the sky here in Newcastle-Upon-Tyne (UK) and he asked where it was going next, and I didn’t know.
I did some digging about found this http://api.open-notify.org/iss-now.json which returns the live location of the ISS each time you refresh.
Then I remembered seeing these cool globes made by the Google Data Arts Team and thought I’d see if I could overlay the two to show the path of the ISS. The example globes pulled in .json files with population data so I tried pulling in the live ISS data instead. Unfortunately the ISS API endpoint is being requested via HTTP, and with my page being loaded over HTTPS my browser kept blocking it, I briefly considered using a proxy but eventually decided I didn’t really need a live location, just some historic information on the flight path.
After some digging I found Skyfield, a python library with computes positions for the stars, planets, and satellites in orbit around the Earth. It claims results should agree with the positions generated by the United States Naval Observatory and their Astronomical Almanac to within 0.0005 arcseconds which sounds good enough for me!
The International Space Station (ISS) orbits Earth every 90 minutes ( about 16 orbits per day). The orbit path shifts to the west by about 22.9° of longitude with each orbit meaning it tracks repeat over the same area on the ground every about 3 days.
So I used Skyfield to pull 10 day’s worth of orbit data (I chose 1-11th November 2024 – which was roughly when we saw it) and saved it as a .json file. With this in place of the default populayion data, and some tweaks to the .html to cycle through the timestamps every second to show the ISS orbit I was done! You can see the result here
Looks a bit like this
TomWillshare.com