Earth from ISS/CSS in VR

A WebXR experience simulating the view of Earth from the International Space Station (ISS) or the Chinese Space Station (CSS/Tiangong).

Enter VR

Description

This application places you aboard the International Space Station (ISS) or the Chinese Space Station (CSS/Tiangong), looking at Earth as it passes below. Station positions are tracked in real-time using OMM (Orbit Mean-Elements Message) data and the SGP4 orbital propagation algorithm, providing smooth and physically accurate orbital movement at 90fps. Press B button on Quest controller (or S on keyboard) to switch between stations.

Earth is rendered with high-resolution tiled NASA Blue Marble (day) and Black Marble (night) textures, dynamically loaded based on the station position. Day/night blending at the terminator reveals city lights on the dark side. A realistic atmospheric glow with exponential density falloff and orange terminator coloring is visible at Earth's limb. The Moon is rendered as a textured sphere with correct phase illumination from a directional sunlight. Five naked-eye planets (Mercury, Venus, Mars, Jupiter, Saturn) are shown at their correct positions, computed from Keplerian orbital elements. A starfield (from the HYG star catalog) and sun provide the backdrop.

Two camera views are available (press A button on Quest controller to cycle or V on keyboard): forward (HDEV-style pitched view) and nadir (straight down). A heads-up display shows the active station name, current latitude, longitude, altitude, orbital speed, and the name of the country, ocean, or sea being passed over.

Sources

Technical Information

Station orbital positions are computed using the SGP4 algorithm from OMM (Orbit Mean-Elements Message) data sourced from Space-Track.org. A Cloudflare Worker fetches the OMM data every 2 hours and caches it in an R2 bucket; the application loads the cached OMM on page load and refreshes it when the page becomes visible again (e.g. when removing and re-wearing the VR headset). SGP4 propagation runs every frame, producing smooth orbital movement without polling any position API.

Earth textures are split into an 8x8 tile grid (64 tiles of 5400x2700 each, downsampled from 86400x43200 sources at 1000m/pixel). Each tile covers 45° longitude x 22.5° latitude, so a few tiles cover the entire visible hemisphere from orbital altitude. Tiles are loaded on demand based on the station position with omnidirectional sampling, with an LRU cache and boundary preloading for seamless transitions. Day tiles use the month-appropriate Blue Marble Topography and Bathymetry imagery. Custom GLSL shaders handle day/night blending at the terminator and additive city light rendering on the dark side.

The atmosphere uses a ray-sphere intersection test to distinguish the limb band (over space) from the overlay (over Earth surface). An exponential density falloff provides realistic thinning with altitude, and a Gaussian terminator function adds warm orange coloring at sunrise/sunset.

The coordinate system uses ECI (Earth-Centered Inertial) for station positioning. Earth textures are rotated by GMST (Greenwich Mean Sidereal Time) each frame to correctly align surface features. The sun direction is computed from the current date using astronomical formulas for solar declination and hour angle. The Moon position is computed using simplified Meeus lunar theory, and planetary positions use Keplerian orbital elements with secular perturbation rates — all from pure analytical formulas with the date as the only input. The starfield contains 5,070 stars from the HYG catalog with accurate positions and magnitude-based brightness.

Scale: 1 Three.js unit = 1 km. Earth radius = 6,371 units. ISS orbital altitude ~408 km, CSS orbital altitude ~390 km.

Contact

Please send an email to: info at metebalci dot com

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.