Case Study

Building ORBITAL: A Real-Time ISS Tracker

An in-depth look at designing and developing a modern web application that tracks the International Space Station in real-time across the globe.

3 Weeks
Development Time
2,500+
Lines of Code
5
APIs Integrated
100%
Responsive
Scroll to Explore

Project Overview

Understanding the vision and goals behind ORBITAL

What is ORBITAL?

ORBITAL is a web-based real-time tracking application that displays the current position of the International Space Station (ISS) as it orbits Earth at approximately 27,580 km/h.

The project was born from a fascination with space exploration and a desire to make complex orbital data accessible and visually engaging for everyone.

๐ŸŒ
Real-Time Tracking
Updates every 5 seconds with live ISS coordinates
๐Ÿ“Š
Comprehensive Statistics
Altitude, velocity, orbital data, and more
๐Ÿ“
Location Awareness
Calculate distance from your location to ISS
๐ŸŽจ
Theme Customization
Multiple color themes for personalization
Latitude 42.3601ยฐ
Altitude 420 km
Velocity 27,580 km/h

Problem & Solution

Identifying the gap and creating value

๐Ÿ”

The Problem

Existing ISS trackers often suffer from poor user experience, outdated designs, and lack of engaging visual elements.

  • โœ• Cluttered interfaces with too much technical jargon
  • โœ• Slow update intervals (30+ seconds)
  • โœ• No mobile responsiveness
  • โœ• Lack of context (what does 27,580 km/h even mean?)
  • โœ• No personalization or user location integration
๐Ÿ’ก

The Solution

ORBITAL addresses these issues with a modern, user-centric approach to satellite tracking.

  • โœ“ Clean, modern UI with dark mode aesthetics
  • โœ“ Fast 5-second update intervals for real-time feel
  • โœ“ Fully responsive design for all devices
  • โœ“ Speed comparisons to make data relatable
  • โœ“ User location integration with distance calculation

Tech Stack

The tools and technologies powering ORBITAL

๐Ÿ—บ๏ธ

Leaflet.js

Open-source JavaScript library for interactive maps with excellent mobile support.

Maps Markers Polylines
๐Ÿ”Œ

Where The ISS At API

RESTful API providing real-time ISS position, velocity, and visibility data.

REST API JSON Real-time
๐Ÿ“

Nominatim API

OpenStreetMap's geocoding service for reverse geocoding ISS coordinates.

Geocoding OSM Free
๐ŸŽจ

CSS3 Variables

Custom properties enabling dynamic theming and consistent design tokens.

Theming Dark Mode Animations
๐Ÿ“ฑ

Geolocation API

Browser API for detecting user location to calculate distance to ISS.

Browser API GPS Privacy
โšก

Vanilla JavaScript

Pure JavaScript with modern ES6+ features, no framework dependencies.

ES6+ Async/Await DOM

Challenges & Solutions

Key obstacles encountered and how they were overcome

1
๐Ÿ”„

Real-Time Updates Without Performance Issues

The Problem: Updating the map every second caused performance degradation, especially on mobile devices. The marker animation was choppy, and memory usage kept increasing.

Solution

Implemented a 5-second update interval with a visual countdown timer to maintain the "real-time" feel while being resource-efficient. Used `setLatLng()` instead of recreating markers, and implemented orbit path limiting to prevent memory leaks.

// Limit orbit path array to prevent memory issues
if (STATE.orbitPath.length > 150) STATE.orbitPath.shift();
2
๐ŸŒ

API Rate Limiting & Error Handling

The Problem: The ISS API has rate limits, and the Nominatim geocoding API requires responsible usage. Too many requests would result in blocked access.

Solution

Implemented request debouncing for geocoding, caching for recently looked-up coordinates, and graceful error handling with fallback values. Added try-catch blocks around all API calls with user-friendly toast notifications.

try {
  const response = await fetch(CONFIG.ISS_API);
  if (!response.ok) throw new Error('API error');
} catch (error) {
  showToast('Connection Issue', 'Retrying...', 'warning');
}
3
๐Ÿ“ฑ

Responsive Design for Complex Layout

The Problem: The two-column layout with a full-screen map and statistics panel was challenging to adapt for mobile screens without losing functionality.

Solution

Created a mobile-first approach using CSS Grid with responsive breakpoints. On smaller screens, the layout transforms to a stacked view with the stats panel becoming a scrollable bottom section. Key information is surfaced in the mini-status bar.

@media (max-width: 1000px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 70px 1fr 50vh;
  }
}
4
๐ŸŽจ

Dynamic Theming System

The Problem: Implementing multiple color themes that affect not just CSS but also JavaScript-controlled elements like the Leaflet orbit path required a unified approach.

Solution

Used CSS custom properties (variables) as the single source of truth. Theme changes update the root element's data attribute, and JavaScript reads computed styles when needed for dynamic elements.

const newColor = getComputedStyle(document.documentElement)
  .getPropertyValue('--accent-primary').trim();
STATE.orbitPolyline.setStyle({ color: newColor });
5
๐Ÿ“

Accurate Distance Calculation

The Problem: Calculating the distance from a user's location to the ISS required 3D geometry, accounting for both ground distance and the ISS's altitude.

Solution

Implemented the Haversine formula for ground distance calculation, then used Pythagorean theorem to combine with altitude for true 3D distance. This provides accurate results accounting for Earth's curvature.

// Haversine formula for ground distance
const groundDistance = R * c;
// 3D distance including altitude
const totalDistance = Math.sqrt(
  groundDistanceยฒ + altitudeยฒ
);

Key Features

What makes ORBITAL stand out

๐Ÿ›ฐ๏ธ

Live ISS Tracking

Watch the International Space Station move in real-time with 5-second position updates and visual orbit path.

๐Ÿ“Š

Rich Statistics

Comprehensive data including altitude, velocity, orbital period, and days since launchโ€”all in an intuitive interface.

๐ŸŒ

Reverse Geocoding

Automatically identifies which country or ocean the ISS is currently flying over using OpenStreetMap data.

๐Ÿ“

User Location

Optional geolocation integration shows your position on the map and calculates distance to ISS in real-time.

โšก

Speed Comparison

Visualize ISS speed by comparing it to familiar objects like cars, planes, and the speed of sound.

๐ŸŽจ

Theme Customization

Four beautiful color themesโ€”Cosmic Blue, Nebula Purple, Mars Orange, and Aurora Green.

โŒจ๏ธ

Keyboard Shortcuts

Power users can navigate with shortcuts: C to center, O for orbit toggle, T for auto-track, R to refresh.

๐Ÿ“ค

Share Position

Native share functionality (or clipboard fallback) to share current ISS position with friends.

๐Ÿ’ก

Fun Facts Carousel

Educational rotating carousel with interesting ISS facts to enhance the learning experience.

By The Numbers

Project metrics and achievements

95+
Lighthouse Score
<3s
Load Time
0
Dependencies
100%
Responsive

Key Learnings

What I gained from this project

01

API Integration Best Practices

Learned to handle rate limits, implement caching strategies, and build resilient applications that gracefully handle API failures.

02

Real-Time UI Updates

Understanding the balance between update frequency and performance, and how visual feedback can make lower frequencies feel real-time.

03

Geospatial Mathematics

Implemented Haversine formula and 3D distance calculations, deepening understanding of coordinate systems and Earth geometry.

04

CSS Custom Properties

Discovered the power of CSS variables for creating dynamic theming systems that work seamlessly with JavaScript.

05

Interactive Map Libraries

Gained expertise in Leaflet.js for creating custom markers, polylines, popups, and handling map events efficiently.

06

User Experience Design

Importance of making complex data accessible through thoughtful design, comparisons, and progressive disclosure.

Future Enhancements

Ideas for future iterations

๐Ÿ””

Flyover Notifications

Push notifications when ISS is about to fly over user's location, with optimal viewing times.

Planned
๐ŸŒ™

Night Mode Detection

Automatic theme switching based on ISS day/night status or user's local time.

Planned
๐Ÿ‘จโ€๐Ÿš€

Crew Information

Display current astronauts aboard, their nationalities, and mission details.

Researching
๐Ÿ›ธ

Multiple Satellites

Track other satellites like Starlink, Hubble, and weather satellites.

Planned
๐Ÿ—“๏ธ

Historical Data

View past positions and predict future orbital paths with time slider.

Researching
๐ŸŽฎ

AR Integration

Point your phone at the sky to see where ISS is in augmented reality.

Exploring

Ready to Track the ISS?

Experience real-time satellite tracking with a beautiful, modern interface. The ISS is orbiting right now at 27,580 km/hโ€”don't miss it!