Your LogoMwami42

ISSTracker

By Mwami42 on Feb 26, 2023
Image post
Current state of the project: Pre-Alpha

Live Demo

Explore the ISS Tracker Live! 🚀
View GitHub Repository

Table of Contents

Introduction

The ISSTracker project is a sophisticated web-based application designed to provide a 3D representation of Earth, along with the real-time position of the International Space Station (ISS). This project leverages the capabilities of React, Three.js, Node.js, and GeoJson files to deliver a dynamic and interactive user experience. By incorporating Two-Line Element (TLE) data, the ISSTracker offers precise tracking of the ISS, displaying its current location, altitude, longitude, latitude, and velocity.

A key feature of the ISSTracker is its ability to visualize the Earth in three dimensions, enabling users to grasp the scale and movement of the ISS in relation to our planet. This 3D model is enriched with GeoJson overlays that detail the geographical features over which the ISS flies, including countries, oceans, and seas. This integration not only enhances the visual appeal of the application but also provides educational value by contextualizing the ISS’s orbit in geographical terms.

Project Overview

Inspiration

The inspiration for the ISSTracker project came from the International Space Station (ISS) Tracker developed by the European Space Agency (ESA), accessible at https://isstracker.spaceflight.esa.int/index_portal.php. While the ESA’s tracker provides a comprehensive 2D overview of the ISS’s orbit and key data points, there was a compelling opportunity to enhance the user experience by transitioning from a 2D to a 3D visualization. The idea was to create a more immersive and dynamic platform that not only tracks the ISS in real time but also offers users a three-dimensional perspective of Earth, thereby providing a richer, more engaging way to understand the ISS’s path and its relation to the planet below. This evolution from 2D to 3D aims to bring users closer to the experience of space, making the ISS’s journey around Earth more tangible and inspiring.

Objectives

The primary objectives for the ISSTracker project were multifaceted, aiming not only to enhance the existing 2D ISS tracking experience provided by ESA but also to expand its capabilities and serve as a comprehensive learning platform for its users:

  • Develop a 3D Visualization: Elevate the user experience by transitioning from the 2D model of the ESA’s ISS Tracker to a 3D representation of Earth, offering a more immersive and interactive way to track the ISS in real-time.

  • Integrate Geolocation Features: Go beyond simple tracking by incorporating geolocation capabilities to identify and display the specific countries, oceans, and seas over which the ISS is flying, providing users with geographical context.

  • Explore GIS and GeoJson: This project serves as an introduction into Geographic Information Systems (GIS) and to learn how to effectively utilize GeoJson files for mapping and spatial data manipulation.

  • Expand Web Development Skills: Use this project as a platform to enhance my web development expertise, focusing on mastering technologies such as React and Three.js, along with libraries related to TLE and GeoJson data handling.

Through these objectives, the ISSTracker project aspires not only to provide a unique and educational tool for tracking the ISS but also to serve as a comprehensive learning experience in web development, GIS, and 3D visualization.

Technologies Used

The ISSTracker project is built upon a robust stack of technologies, frameworks, and libraries, meticulously chosen to deliver a seamless and dynamic 3D visualization of the Earth and real-time ISS tracking. The project is structured into client and server-side components, each leveraging specific tools to fulfill its role. Below is a detailed breakdown of the technologies utilized:

Client Side

  • HTML/CSS/JavaScript: The core technologies for building web applications, HTML, CSS, and JavaScript, are used to structure, style, and add interactivity to the ISSTracker, ensuring a robust and engaging user experience.

  • React: Employed as the foundational UI library, React enables the development of a responsive and dynamic user interface, making the application interactive and user-friendly.

  • Three.js: This JavaScript library is crucial for rendering 3D graphics in the web browser, allowing for the detailed visualization of the Earth and the ISS’s orbit.

  • Satellite.js: For processing TLE data to accurately track satellite positions, Satellite.js is utilized. This library provides the necessary calculations to determine the ISS’s real-time location and orbit around the Earth.

  • Turf.js: To handle and manipulate GeoJson data for mapping geographical features on the 3D Earth model, Turf.js, an advanced geospatial analysis library, is employed.

Satellite.js

Satellite.js is an essential library in the ISSTracker project, playing a critical role in interpreting and utilizing Two-Line Element (TLE) data for accurate satellite tracking, particularly for the International Space Station (ISS). This library offers a suite of functions capable of parsing TLE data, performing satellite orbit predictions, and calculating satellite positions in real-time. Its integration into the ISSTracker enables the application to provide users with a dynamic representation of the ISS’s current location and trajectory around the Earth.

TLE data is a concise format used to convey the orbital elements of an Earth-orbiting object, such as a satellite. This data format is crucial for satellite tracking and is widely used by astronomers, satellite enthusiasts, and space agencies around the world. A TLE set consists of two lines of numerical data, which encapsulate information about the satellite’s orbit at a specific point in time, including its inclination, right ascension of the ascending node, eccentricity, argument of perigee, mean anomaly, mean motion, and the number of orbits completed. These elements are essential for calculating the satellite’s position and predicting its future path.

TLE Parameters Explanation

The importance of TLE data in satellite tracking cannot be overstated. It serves as the foundation for understanding the complex movements of satellites and is key to various applications, from scientific research and telecommunications to navigation and Earth observation. The precision and reliability of TLE data are vital for the accurate tracking of satellites, making it an indispensable resource for projects like the ISSTracker.

Satellite.js leverages this data to perform complex orbital mechanics calculations within the web environment, making it possible to project the satellite’s position onto the 3D Earth model rendered by the application. By parsing the TLE data and applying sophisticated algorithms, Satellite.js computes the ISS’s position in real-time, accounting for factors such as Earth’s rotation and gravitational influences. This allows the ISSTracker to visualize the ISS’s orbit with high accuracy, providing users with an engaging and informative experience.

Turf.js

Turf.js is integral to the ISSTracker project for its advanced geospatial capabilities, particularly in identifying the specific countries, oceans, and seas over which the International Space Station (ISS) flies. This JavaScript library excels in spatial analysis and processing GeoJson data, enabling complex geographical computations to be performed efficiently in a web environment.

GeoJson, a format widely adopted for encoding various geographical data structures, is pivotal for representing features such as countries and bodies of water in a structured, easily accessible manner. It is ideal for web applications due to its compatibility with JavaScript Object Notation (JSON), facilitating the integration of geographical information into web-based platforms.

In the ISSTracker, Turf.js leverages this GeoJson data to pinpoint the ISS’s location relative to Earth’s geographical features in real-time. Unlike applications that might use spatial data to render detailed maps or outlines, the ISSTracker utilizes Turf.js to perform point-in-polygon tests. These operations determine whether the ISS, represented as a point based on its current latitude and longitude, is above any specific geographical feature defined in the GeoJson data.

    const point = turf.point([longitude, latitude]);

    let matchedFeature = geojsonData.features.find((feature) =>
      turf.booleanPointInPolygon(point, feature)
        );

This functionality enriches the user experience by providing immediate, context-rich information about the area beneath the ISS’s path. For instance, as the ISS orbits the Earth, Turf.js calculates its position relative to the GeoJson-defined boundaries of countries, oceans, and seas. When the ISS passes over a new area, Turf.js identifies the feature and updates the application’s display to inform users about the geographical region the ISS is currently flying over.

Geo Display

Server Side

Node.js

The server side of the ISSTracker project is using Node.js, a versatile and efficient JavaScript runtime that’s particularly well-suited for building scalable network applications. In this project, Node.js serves as the backbone for the server environment, leveraging its event-driven, non-blocking I/O model to handle numerous connections simultaneously, which is paramount for real-time applications like the ISSTracker. The use of Express, a lightweight framework for Node.js, further streamlines the creation of web applications and APIs by offering a robust set of features for web and mobile applications.

The implementation of Node.js in the ISSTracker involves setting up scheduled tasks with node-cron to regularly fetch Two-Line Element (TLE) data, essential for tracking the ISS’s orbit. This approach ensures that the application always has access to the most current data, maintaining the accuracy of the ISS’s position. Additionally, the use of node-fetch allows for efficient handling of external API requests, facilitating the retrieval of TLE data from reliable sources. By incorporating these libraries, the server can process and respond to client requests swiftly, providing a seamless user experience.

Google Cloud Platform

For hosting and data storage, the ISSTracker utilizes Google Cloud Platform (GCP), specifically leveraging its Datastore service, a highly scalable NoSQL database for web and mobile applications. Google Cloud Datastore provides a robust infrastructure for storing and querying non-relational data, which in the context of ISSTracker, is used to persistently store the fetched TLE data. The choice of Google Cloud Datastore is strategic, offering seamless scalability and integration with other Google Cloud services, ensuring that the application can efficiently handle the dynamic nature of real-time data and user requests.

The integration of GCP into the ISSTracker project underscores a commitment to leveraging cloud technologies to enhance application performance and reliability. Google Cloud’s global infrastructure ensures low-latency access to the application, a critical factor for real-time tracking applications like ISSTracker. Furthermore, the platform’s powerful management tools and services facilitate smooth deployment and monitoring of the application, ensuring high availability and security.

In summary, the server-side architecture of the ISSTracker, built on Node.js and integrated with Google Cloud Platform, exemplifies a modern, efficient approach to developing and hosting real-time web applications. This combination provides a solid foundation for the ISSTracker, ensuring it can deliver accurate, up-to-date information to users worldwide with minimal latency.

QGIS

In the ISSTracker project, QGIS, an open-source Geographic Information System, was used specifically for its Simplify tool. This tool was instrumental in reducing the complexity of the GeoJson files for oceans and seas, which were initially too large and detailed, impacting the application’s performance. By simplifying these files, the ISSTracker achieved a balance between geographical accuracy and optimal web performance, ensuring fast loading times and a smooth user experience without compromising the integrity of the geographical data presented.

Features and Functionality

3D Earth Visualization

The cornerstone of the ISSTracker project is its 3D Earth visualization, which provides a dynamic and immersive view of our planet. Leveraging the power of Three.js, a JavaScript library for rendering 3D graphics in the web browser, the application presents a detailed model of Earth. This visualization includes realistic textures, lighting, and atmospheric effects, enhancing the user’s experience and providing a contextual backdrop for the ISS’s orbit. The 3D model allows users to interact with the Earth, including rotating and zooming, to explore different regions and perspectives.

Real-time ISS Tracking

A key feature of the ISSTracker is its ability to track the ISS in real-time, displaying its current position, altitude, velocity, and trajectory as it orbits the Earth. This functionality is achieved by processing TLE data with the help of Satellite.js, ensuring accurate and up-to-date tracking information. Users can see the ISS’s path in relation to the Earth’s surface, offering insights into its orbit patterns and the timing of its passovers over specific locations.

ISS Tracker Info

Geographical Overlay using GeoJson files

An innovative aspect of the ISSTracker is its use of GeoJson files in conjunction with Turf.js to identify and display the specific geographical features—such as countries, oceans, and seas—over which the ISS is currently flying. By integrating precise ISS positional data, calculated using longitude and latitude with Satellite.js, the application utilizes Turf.js to determine the ISS’s exact location relative to the Earth’s surface features stored in GeoJson format. When the ISS passes over a new geographical feature, the application dynamically updates to display the name of the feature in an information box. This functionality not only enhances the user experience by providing contextual geographical information in real-time but also serves an educational purpose by connecting the ISS’s orbit with tangible locations on Earth.

Challenges and Solutions

TLE Data Handling

One of the initial challenges faced in the development of the ISSTracker was the handling of TLE (Two-Line Element) data for accurate ISS tracking. Initially, the project relied on an external API to provide the ISS’s longitude and latitude. However, this approach had its limitations, including dependency on the availability of the external service and potential latency or downtime issues. To overcome these challenges and gain more control over the tracking process, a strategic decision was made to directly use TLE data for the ISS.

The shift to using TLE data not only mitigated the risks associated with relying on an external service but also provided an invaluable learning opportunity. It necessitated a deep dive into understanding the intricacies of TLE data and how it can be used to calculate the position of satellites in orbit. This involved integrating libraries such as Satellite.js, which specializes in parsing TLE data and performing the complex calculations required to determine the real-time position of the ISS. This approach enhanced the robustness and reliability of the ISS tracking feature, ensuring that the application could continue to function independently of third-party services.

Oceans and Seas GeoJson Size

The challenge with incorporating detailed GeoJson data for oceans and seas into the ISSTracker was the prohibitive size of these files. Initially, the sheer volume of data made it impossible to even load the files into the web application, let alone use them effectively. The high level of detail, while valuable for accuracy, resulted in file sizes that were unmanageable for a web-based platform, leading to significant performance issues and rendering the data practically unusable.

To resolve this, a strategic decision was made to employ QGIS’s simplify tool. This approach allowed for a substantial reduction in the GeoJson files’ complexity by minimizing the number of vertices in the polygon shapes representing oceans and seas. The simplification process was carefully managed to ensure that while the file sizes were significantly reduced, the geographical integrity and recognizability of the features were maintained. This solution enabled the successful integration of oceans and seas into the ISSTracker, allowing the application to display the names of these geographical features beneath the ISS’s path without compromising the application’s performance or user experience.

Future Directions: Enhancing the ISS Tracker Experience

Feature Expansion

Looking ahead, the ISSTracker project envisions a series of enhancements aimed at enriching the user experience and broadening the educational scope of the platform. One of the key upcoming features is the integration of interesting facts about the geographical locations over which the ISS is currently flying. This addition will provide users with contextual knowledge, making the tracking experience more informative and engaging.

Another significant enhancement in the pipeline is the implementation of a day and night cycle on the 3D Earth visualization. This feature will reflect the Earth’s rotation in real-time, offering users a more realistic view of the planet and the ISS’s trajectory in relation to the day and night zones.

The project also aims to include detailed information about the current astronauts aboard the ISS, providing insights into the crew’s composition, their missions, and daily life in space. This will personalize the ISS tracking experience, fostering a deeper connection between users and the astronauts.

Additionally, the expansion will encompass various relevant information about the ISS itself, such as its modules, history, and the scientific research being conducted aboard. This will further the educational value of the ISSTracker, making it a comprehensive resource for space enthusiasts and educators alike.

A particularly ambitious feature under consideration is the ability for users to control time within the application – to fast-forward or rewind the ISS’s orbit and view its future or past positions. This could include predictive functionality to inform users when the ISS will be visible from their specific location, enhancing the interactive and personalized aspects of the ISS tracking experience.

© Copyright 2024 by Mwami42.