Close

Webpage

A project log for ISS overpass indicator

Lamp that warns you when a satellite, like the ISS, is overhead.

hopperpopHopperpop 07/10/2016 at 18:510 Comments

With all those calculations running it the background, I needed a way to display all the gathered information in some proper form. I also needed a way to configure the device. The solution, a web server running on the ESP.

The construction of the site wasn't done in one evening. It was a collection of small improvements over some months. This was because I never build a site before and it also took some effort to let it run smoothly on the ESP.

The first thing I added was a table with the next 10 overpass predictions. The ESP calculates the first 10 overpasses on startup, and keeps them in memory. When an overpass ends, it calculates a new prediction and add it to the list. I later added two buttons below the table to request more predictions (past and future). These predictions are calculated on the fly, so the ESP freezes for 1 à 2 seconds to do the work.

After that I added a web socket for showing the current satellite position. The ESP was capable of running one client at 100Hz (this while it constantly recalculates the satellite position). In the current program is the refresh rate limited to 30Hz because more isn't really useful.

The position is also displayed in real time on a world map. It's an equirectangular map projection so that it's easy to translate latitude and longitude to map coordinates. Then I wanted to add the satellite footprint. That's the region where the satellite is overhead. But drawing circles on an equirectangular map isn't that easy. I came up with my own formules for doing this after some trial and error, and added them in javascript. I found GChristensen script to show the day/night on a map, and added that to my project.

The red dot is the satellite, the yellow dot the location of the observer.

I still have some plans in improving the website. Drawing the orbit on the map could be useful, and I still need to add the time when the satellite enters/leaves the earth shadow.


Discussions