Walker McGilvary

A collection of my projects

4 February 2024

Building OrbitQuest: AuburnHacks 2024

by Walker McGilvary

OrbitQuest is a web application that tracks the ISS location in real-time. The 3D scene is rendered with three.js, which is based on WebGL. After learning about C++ OpenGL programming a few weeks ago, I felt very comfortable using a higher-level graphics framework.

Overview of the Project

The main feature of the web app is the 3D visualization of the ISS location in real-time. This is done through periodic API requests to accurately represent the ISS position. There is also a “Picture of the Day” page which shows NASA’s picture of the day.

Homepage

Tracker

APOD

The website also renders very well on a mobile viewport, as seen above.

3D Render with three.js

My experience with OpenGL made three.js easy to pick up. After applying an Earth texture to a sphere, and using an ISS model I found from NASA’s website, the scene already looks very nice. Next, I had to pull Latitude/Longitude from an API, which is done every 20 seconds.
Converting latitude and longitude to rectangular coordinates in 3D space was actually pretty straight forward. Apparently longitude corresponds to theta and latitude corresponds to phi in spherical coordinates.

Math

With theta and phi, we just need rho, which I set to a constant about 2x the radius of the Earth. The conversion of spherical to rectangular is what allows the 2D coordinates to be visualized in 3D space.

3D Graphics Source

Architecture of the Web App

Conclusion

Overall, this project further developed my understanding of web development. Most importantly, I learned a lot of about writing JavaScript. Because of how prevalent JavaScript is, I’m glad I took the time to learn client-side development with JavaScript.


tags: