![]() Also display the current location time and latitude, longitude as text on the screen.Reverse the colors - display the world map in red, and the ISS location and trajectory in black.Here are a few suggestions on how you can take this project forward: Once you get comfortable playing around with the code sample and understanding the code, it is always nice to try to extend your learning with doing more. These 15 minute markers help us to see how fast the ISS is actually moving! It completes a full orbit in about 90 minutes, and a little less than 16 orbits a day. The other positions get plotted as little circles (just plotting a point is too small for us to see), and every 15 minutes, the position gets plotted as small rectangle. We then plot the positions in the list in red - the last position in the list is the current location, and so we show that using an ISS icon. We transform the latitude, longitude data of each position to our XY Coordinate system. The position of the ISS gets updated every 30 seconds, and gets appended to a list. We have two equations, and two unknowns each, and each has two data points, which we can therefore very easily solve for (I'll leave that as an exercise for you!) Since the ISS does not fly over the poles, I can rest assured that the latitude/longitude mapped onto this coordinate system will not spill outside of our 264x176 display. We also need a map that is reasonably accurate with latitude and longitude depictions.Īfter a bit of search, I found a world map with latitude and longitude lines, which I was able to shrink to a size of 264 x 181. We need a map that can be displayed on the ePaper Display and give a reasonably accurate depiction of the latitude, longitude of the ISS on the world map. The next point to note is that world maps don't typically have this aspect ratio. The 2.7 inch display from Waveshare has a screen resolution of 264 x 176. These need to get mapped to the XY coordinates of our ePaper Display. These range from -180 to 180 (longitude) and 90 to -90 (latitude). The location of the ISS is in latitude and longitude coordinates. The code has a couple of nuances to bear in mind. Here is the ISS Tracker in action (speeded up a bit): 15 minute markers (red rectangles) are also added, to get a sense of how fast the ISS is traveling! If all the steps above have been done correctly you should see the World Map with the current location of the International Space Station on your ePaper Display! Every 30 seconds, the current location gets updated (which the previous locations are plotted as the trajectory). Run the iss.py python script (using python3): $ python3 iss.py Install spidev, RPi.gpio, Pillow and requests dependencies as follows: $ sudo apt-get install python3-spidev $ sudo apt-get install rpi.gpio $ sudo apt-get install python3-pil $ sudo pip3 install requestsĬd to the directory that was created with you cloned the git repository above. The code also depends on other libraries. The code expects Python 3+ - if you are using an older version of python, you will need to install python3 ![]() If SPI has been properly enabled, the /boot/config.txt entry should show up as above AND you should also see the device connected when you list the SPI devices. ![]() Should show something! (like /dev/spidev0.0 /dev/spidev0.1 above) If it doesn’t, try sudo rpi-update and reboot. Search for an entry like the following: dtparam=spi=onĪnd check that you can see the SPI device connected: $ ls /dev/spi* /dev/spidev0.0 /dev/spidev0.1 Some people have encountered issues where the SPI interface doesn't get enabled properly.ĭouble check that SPI is actually "on" in your /boot/config.txt. Step 2 - Double-check that the SPI interface is working This installs the demo code as well as the requisite Waveshare ePaper library. Install the ProtoStax ISS Tracker code from the GitHub Repository (link below) $ git clone ![]()
0 Comments
Leave a Reply. |