Skip to content
4jeehPublic

About

3D WebGL2 Orbital Mechanics & Aerospace Telemetry Instrumentation (Evolution of OpenGL/GLUT C++ Satellite Simulation)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

SATLAB // 3D WebGL Orbital Mechanics & Aerospace Telemetry System

System Revision Heritage Kernel Live Mission Control License: MIT

TECHNICAL DATASHEET // DOCUMENT ID: JPL-SATLAB-2026-REV2
Live Telemetry Terminal (GitHub Pages): https://4jeeh.github.io/satlab/
Source Repository: https://github.com/4jeeh/satlab


1.0 SYSTEM OVERVIEW

satlab is a real-time 3D WebGL2 orbital mechanics visualizer and aerospace telemetry instrument built with Three.js and Vite. It represents the direct architectural evolution of the original fixed-function C++ OpenGL/GLUT satellite simulation (legacy/opengl-cpp/main.cpp) into a modern, interactive Earth-Centered Inertial (J2000 ECI) mission control interface.

1.1 Design Philosophy (Strict Aerospace Instrumentation)

Designed in accordance with NASA JPL and SpaceX Flight Software human-factors standards:

  • Zero Decorative Noise: No synthetic gradients, no heavy glassmorphism blur, and no marketing filler.
  • High-Contrast Instrument Palette:
    • Deep Void (#050508) — Deep-space viewport background and oscilloscope substrate
    • Stark White (#F8FAFC) — Primary tabular numeric readouts
    • Hairline Border (#1A1F2C) — 1px structural cell dividers and reticle framing
    • Phosphor Green (#10B981) — Nominal telemetry lock, velocity vectors, and active orbital plasma trail
    • Tactical Amber (#F59E0B) — Inclination plane geometry, ascending/descending nodes, and wireframe mode accents
  • Tabular Monospace Typography: Uses Space Mono / JetBrains Mono with font-variant-numeric: tabular-nums to guarantee zero horizontal jitter at 60 Hz refresh rates.

2.0 SYSTEM ARCHITECTURE

flowchart LR
  subgraph Legacy["Legacy Kernel (C++ / GLUT)"]
    CPP["legacy/opengl-cpp/main.cpp\nglRotatef + glTranslatef\nglutSolidSphere (60 FPS Timer)"]
  end

  subgraph Core["SATLAB WebGL2 Core Engine"]
    PHY["Keplerian Astrodynamics\nsrc/physics/orbitalMechanics.js\nv = sqrt(μ/r), T = 2π·sqrt(r³/μ)"]
    SCN["Three.js Scene Graph\nsrc/main.js"]
    PLN["Earth / Terra System\nsrc/scene/createPlanet.js\nProcedural Albedo + Graticule + Fresnel"]
    SAT["SATLAB-01 Spacecraft\nsrc/scene/createSatellite.js\nMLI Bus + Articulated Solar Arrays"]
    ORB["Orbit & Nadir Vector System\nsrc/scene/createOrbitSystem.js\nGlowing Trail + Line of Nodes"]
  end

  subgraph HUD["Mission Control Telemetry HUD"]
    TL["Top-Left Grid\nAltitude / Velocity / Inclination / Period"]
    TR["Top-Right Diagnostics\nECI Vectors / Lat-Lon / 60Hz Oscilloscope"]
    BL["Bottom-Left Radar\nMercator Ground-Track + GLUT Matrix Bridge"]
    BR["Bottom-Right Command\nPBR vs Wireframe / Speed / Inclination / Camera"]
  end

  CPP -. "Architectural Evolution" .-> PHY
  PHY --> SCN
  SCN --> PLN
  SCN --> SAT
  SCN --> ORB
  PHY --> TL
  PHY --> TR
  PHY --> BL
  BR --> PHY
  BR --> SCN
Loading

3.0 ASTRODYNAMICS & HERITAGE SPECIFICATION

3.1 Heritage Parameter Mapping (C++ GLUT $\rightarrow$ WebGL2 ECI)

Parameter Legacy OpenGL C++ (main.cpp) satlab WebGL2 Implementation Physical Equivalent
Central Body glutSolidSphere(0.5f, 20, 20) Procedural PBR Sphere + Fresnel Limb + $15^\circ$ Graticule $R_\oplus = 6,371.0\text{ km}$
Spacecraft glutSolidSphere(0.1f, 20, 20) Multi-body SATLAB-01 with MLI foil, solar arrays, dish & thruster Nadir-locked 3-axis stabilized bus
Orbit Trajectory GL_LINE_LOOP (360 vertices) Tilted ECI Orbital Ring + $135^\circ$ Additive Glowing Trail + Nadir Beam $a = 1.35,R_\oplus \text{ to } 3.20,R_\oplus$
Transform Pipeline glRotatef(angle, 0, 0, 1) $\cdot$ glTranslatef(2.0f, 0, 0) 3D ECI Quaternion Basis $[\hat{\mathbf{r}}, \hat{\mathbf{n}}, \hat{\mathbf{v}}]$ with variable inclination $i$ Real-time state vector $\mathbf{r}{\text{ECI}}, \mathbf{v}{\text{ECI}}$
Camera System Fixed gluLookAt(0, 0, 5, ...) 360° damped OrbitControls + Earth/Satellite target lock Interactive spherical gimbal

3.2 Governing Keplerian Equations

Given semi-major axis $r = \text{orbitRadiusRe} \cdot R_\oplus$ and Earth standard gravitational parameter $\mu = 398,600.4418\text{ km}^3/\text{s}^2$:

$$v_{\text{orb}} = \sqrt{\frac{\mu}{r}}, \qquad T_{\text{orb}} = 2\pi \sqrt{\frac{r^3}{\mu}}$$

In the Three.js right-handed inertial frame ($+Y$ North Pole, $XZ$ Equatorial Plane, $+X$ Ascending Node):

$$\mathbf{r}_{\text{ECI}}(\nu, i) = \begin{bmatrix} r \cos\nu \ r \sin\nu \sin i \ -r \sin\nu \cos i \end{bmatrix}$$


4.0 SUBSYSTEM DIRECTORY STRUCTURE

satlab/
├── index.html                        # Aerospace HUD layout & corner telemetry DOM
├── package.json                      # Vite + Three.js dependencies & build scripts
├── vite.config.js                    # Relative base path config for GitHub Pages
├── LICENSE                           # MIT Open Source License
├── CHANGELOG.md                      # Revision history (v1.0 C++ GLUT -> v2.0 WebGL2)
├── CONTRIBUTING.md                   # Engineering & design guidelines
├── SECURITY.md                       # Security policy & vulnerability reporting
├── CODE_OF_CONDUCT.md                # Contributor Covenant Code of Conduct
├── legacy/
│   └── opengl-cpp/
│       ├── main.cpp                  # Preserved original C++ OpenGL/GLUT source code
│       └── README.md                 # Legacy C++ GLUT compilation & freeglut.dll guide
└── src/
    ├── main.js                       # 60 FPS WebGL2 render loop, OrbitControls & HUD sync
    ├── styles/
    │   └── telemetry.css             # Mission control telemetry stylesheet
    ├── physics/
    │   └── orbitalMechanics.js       # Keplerian solver, ECI vectors & geodetic Lat/Lon
    └── scene/
        ├── createPlanet.js           # Procedural Earth textures, graticule & atmosphere
        ├── createSatellite.js        # SATLAB-01 spacecraft bus & photovoltaic wings
        └── createOrbitSystem.js      # Glowing orbit trail, degree ticks & nadir tether

5.0 LOCAL OPERATION & VERIFICATION

# 1. Install dependencies
npm install

# 2. Launch local telemetry server (http://localhost:5173)
npm run dev

# 3. Build production bundle for GitHub Pages
npm run build

Operator Controls

  • LMB Drag: 360° orbital camera rotation around active target (EARTH or SAT-01)
  • RMB Drag: Camera lateral pan
  • Scroll Wheel: Precision zoom (1.45 R⊕ to 16.0 R⊕)
  • DEFAULT PBR / TACTICAL WIREFRAME: Switch between Physically Based Rendering and NORAD/JPL vector wireframe mode
  • ORBIT SPEED (ω): Adjust simulation propagation multiplier (0.00× to 5.00×)
  • INCLINATION ANGLE (i): Tilt orbital plane in real time (-90.0° retrograde to +90.0° polar)
  • ORBITAL RADIUS (r): Adjust semi-major axis (1.35 R⊕ LEO to 3.20 R⊕ MEO) with live Keplerian velocity & period recalculation
  • SPACEBAR: Hold / Resume orbital propagation

6.0 LICENSE & GOVERNANCE

About

3D WebGL2 Orbital Mechanics & Aerospace Telemetry Instrumentation (Evolution of OpenGL/GLUT C++ Satellite Simulation)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages