🪐 JSMARS Documentation & Handbook

Browser-native planetary GIS & analytical suite inspired by ASU JMARS. Zero build step, 100% pure ES modules.

Launch App GitHub Repo LinkedIn

📖 Introduction & Architecture

JSMARS is an open-source, client-side web application providing high-performance geospatial data visualization, orbital tracking, planetary climatology, and geophysical modeling for Mars, the Moon, Earth, and Europa.

⚡ Zero Build Step

Written in standard Vanilla JavaScript (ES6+ Modules), Leaflet, HTML5 Canvas, and WebGL Three.js. No Webpack, Vite, or npm compilation required.

🔬 Desktop Parity (~91%)

Faithfully ports mathematical models, physical constants, and analytical pipelines from Java-based JMARS desktop into fast client-side JavaScript.

🛡️ Continuous Automated CI

Covered by 1,200+ automated unit tests (100% passing) and automated headless browser verification pipelines ensuring 0 console errors.

🚀 Getting Started

To use JSMARS locally or in production:

  1. Open index.html in any modern browser (Chrome, Firefox, Safari, Edge) via an HTTP server or GitHub Pages.
  2. Use the Sidebar on the left to toggle analytical tools, add base maps from USGS/OpenPlanetary WMS feeds, and customize layers.
  3. Use the Panner Overview (bottom-right) or standard map controls to pan and zoom across the planetary surface.

⌨️ Keyboard Shortcuts

Use global keyboard shortcuts to quickly navigate the map, adjust zoom, manage sessions, and trigger GIS tools.

Shortcut Action
+ / -Zoom In / Zoom Out
1 - 5Quick Zoom Levels (Global to Regional)
RReset Map View to Global Center
Ctrl+GGo to Coordinates (Lat, Lon Prompt)
Ctrl+SSave Current Session (JSON)
Ctrl+OLoad Saved Session File
Ctrl+Shift+EExport Map View as High-Res PNG
EscCancel Active Drawing / Tool
FToggle Fullscreen Mode
?Show Keyboard Shortcuts Modal

🛰️ Lunar Base Site Planner (LRO LOLA South Pole)

Artemis & Lunar Architecture Measured LRO LOLA DEM

Full-screen polar stereographic engineering workbench for siting lunar south-pole surface habitats, landing pads, solar arrays, and pressurized rover traverses on authentic NASA GSFC LRO LOLA digital elevation models (Barker et al. 2021; Mazarico et al. 2011).

Moon2000 South Polar Stereographic (R = 1,737,400 m):
r = 2 * R * tan((90 deg + lat) / 2), x = r * sin(lon), y = r * cos(lon)

Key Capabilities:

  • 10 High-Resolution 20 m/px Site Windows + 100 m/px Regional Overview: Instant switching between the 85°S–90°S overview and 10 candidate sites (Shackleton Rim, Connecting Ridge, de Gerlache Rim, Faustini Rim, Haworth, Cabeus, Amundsen Rim, Malapert Massif, Nobile Rim 1, Slater Plain), plus user-supplied GeoTIFF DEM upload.
  • Co-Registered Environmental Overlays: Horn (1981) 3×3 slope & aspect, dynamic hillshade, average solar illumination, average Earth visibility, and 795 Permanently Shadowed Region (PSR) polygons.
  • Flat-Area Finder & Corridor Profiler: Exact 2D Euclidean Distance Transform (Felzenszwalb & Huttenlocher 2012) ranks the largest contiguous circles with slope ≤ threshold; multi-waypoint rover traverses compute cumulative grade and directional along-track slope vs. local terrain slope.
  • Landing Pad Blast Rings & Horizon Sun-Path Envelope: Places landing pads with inner/outer ejecta safety rings and ray-marches the 360° topographic horizon against the $\pm 1.54^\circ$ lunar sub-solar declination band.
  • 2D DXF/SVG CAD Overlay & 3D Mesh Export: Import architectural footprints (ASCII DXF / SVG) with live unit, scale, rotation, and layer controls; audit per-footprint elevation & slope limits; export terrain + draped CAD to Wavefront .obj (Rhino / Grasshopper / NVIDIA Isaac Sim), single-band Float32 GeoTIFF (.tif), 3D .dxf, and full JSON plans. See the Lunar Base Site Planner Guide.

🌡️ 1D KRC Mars Thermal Simulation Model

Physics Engine Model

The KRC engine is a client-side simulation (Hugh Kieffer KRC analog). It solves the 1D transient heat diffusion equation in Martian regolith coupled with surface radiative energy balance. Output is modeled temperature, not TES, THEMIS, or lander measurements.

rho * c_p * (dT/dt) = d/dz [ k(z, P) * (dT/dz) ]
Surface Boundary: (1 - A)*F_sun + F_IR,down - eps*sigma*T^4 + k*(dT/dz)|_0 = 0

Key Capabilities:

  • Diurnal & Seasonal Curves: Simulates diurnal temperature swings ($T(t)$) and full orbital seasonal curves across Solar Longitude ($L_s = 0^\circ - 360^\circ$).
  • CO2 Frost Condensation: Accurately clamps surface temperatures to the Clausius-Clapeyron dry ice condensation point ($T \approx 145-148\text{ K}$) and models sublimation mass flux.
  • Two-Layer Apparent Thermal Inertia ($\Gamma_{\text{app}}$): Disentangles fine airfall dust mantles over high-conductivity volcanic basalt bedrock.
  • Fourier Harmonics Deconvolution: Extracts fundamental harmonic amplitudes ($C_k$) and phase lag hours from diurnal temperature waves.

⏱️ Mars Time Slider & Orbital Ephemeris

Astronomical Engine

Computes orbital mechanics, Keplerian true anomaly, Solar Longitude ($L_s$), Mars Year (MY), Mars Sol Date (MSD), and Local True Solar Time (LTST) using high-precision Allison & McEwen (2000) formulations.

LTST = MTC + (Lon_E / 15 degrees) [hours]
True Solar Sol Duration: delta_t(Ls) = 88775.244 * [1 + 2e*cos(Ls - 251 deg) / (1 - e^2)]

💨 Mars Climate Database (MCD) Profiler

Atmosphere Model or Live GCM

Offers an explicit choice of a 1D analytical physics model (offline) or live LMD MCD v6.1 GCM (climate model, not a spacecraft profile). If the live fetch fails, the analytical model is used and labeled Offline Fallback.

☄️ Crater Counting CSFD & Isochron Dating

Geochronology

Implements the Neukum Production Function (NPF 11th-order polynomial) and Hartmann-Neukum Mars Chronology Function to date planetary surface units:

N(D > 1km) / km^2 = 2.68e-14 * (exp(6.93 * t) - 1) + 4.13e-4 * t [t in Ga]
Croft & Ivanov Collapse: D_f = 1.17 * D_t^1.13 / D_*^0.13 (D_* = 7 km)

💎 Educational Mineral-Index Visualizer

Spectroscopy Model / Educational

Approximate, client-side CRISM-style band-depth formulas (BD530 ferric iron, BD1900 hydration, BD1500 water ice, D2300 smectite, olivine index) rendered as illustrative overlays. Does not ingest per-pixel CRISM, OMEGA, or THEMIS cubes. Treat as a teaching visualizer until real multi-band rasters are wired in. Measured products: PDS CRISM and THEMIS archives.

🌐 3D Terrain & Globe Viewer (WebGL)

3D Graphics

Renders regional elevation displacement meshes and 3D planetary globes with dynamic vertical exaggeration scaling ($1\times - 20\times$), real-time solar terminator illumination, Lambertian/Lommel-Seeliger/Minnaert photometric models, camera FOV ground swath width footprint ($W = 2 h \tan(\text{FOV}/2)$), and facet normals.

📡 Subsurface Radar Sounder (simulation)

Geophysics Model

Physically-based synthetic 2D B-scope radargrams and 1D A-scope traces using illustrative dielectric presets (Planum Boreum, Planum Australe, Medusae Fossae, Utopia Planitia, Europa ice-shell analogs). Not observed SHARAD, MARSIS, REASON, or RIME radargrams. Two-way travel time conversion $z = \frac{c \Delta t}{2 \sqrt{\epsilon_r}}$ is a model. For measured data see the PDS Geosciences Node SHARAD and MARSIS archives.

🚀 Interplanetary Astrodynamics & Trajectories

Mission Planning

Calculates heliocentric Hohmann transfer orbits, Trans-Mars Injection ($\Delta v_1$), Mars Orbit Insertion ($\Delta v_2$), characteristic launch energy ($C_3$), synodic transfer opportunities, and Areostationary synchronous orbit altitudes.

⛰️ Topographic Contours, Slopes & Landing Hazards

Cartography

Generates client-side Marching Squares elevation isocontours, 3x3 Zevenbergen-Thorne slope & aspect gradients, Topographic Wetness Index (TWI), Stream Power Index (SPI), and automated landing site hazard safety classification.

🗺️ Map Projections & Coordinate Systems

Geodesy

Supports Cylindrical Equirectangular, North/South Polar Stereographic, Albers Equal-Area Conic, Lambert Azimuthal Equal-Area, Sinusoidal, and Mollweide projections with real-time coordinate transformations across $0^\circ-360^\circ\text{ E}$, $\pm 180^\circ$, and West longitude.

📍 Investigate Probe Tool & Potential Fields

Geophysics

Click anywhere on Mars, the Moon, Earth, or Europa to probe DEM elevations, WMS layer attributes, Complete Bouguer gravity anomalies ($\Delta g_B$), Airy-Heiskanen isostatic crustal roots ($t_{\text{root}} = h \frac{\rho_c}{\rho_m - \rho_c}$), and thermal diffusivity ($\kappa = \frac{k}{\rho c_p}$).

📏 Geodesy & Distance Measurements

Navigation

Calculates planetary radius-calibrated geodesic line lengths, closed polygon surface areas, great-circle waypoint interpolation, cross-track/along-track offsets, direct destination points, and 3D interior straight-line tunnel chords.

✏️ Vector Shapes (ROIs) & GIS Formats

GIS Interoperability

Digitize points, polylines, polygons, circles, and bounding boxes. Export to GeoJSON, CSV, WKT (Well-Known Text), and generate 6-line affine transformation world files (.pgw / .jgw) for QGIS, ArcGIS, and GDAL.

🏷️ Planetary Nomenclature & Gazetteer

Gazetteer

Search over official IAU planetary landmarks across Mars, the Moon, Europa, and Earth with typo-tolerant fuzzy matching, direct coordinate parsing, automatic cross-body switching, and morphological feature filtering (craters, mons, valles, chasmata, planitiae, maria, lineae).

🗂️ Layer Manager & Overlays

Map Composition

Reorder layer stacking via drag-and-drop, adjust transparency with real-time opacity sliders, toggle adaptive coordinate graticules, north arrows, and physical scale bars.

💾 Session Management & Serialization

Persistence

Save entire workspaces—including active layer stack, opacity settings, viewport center, zoom, spatial bookmarks, measurements, and vector shapes—into compact JSON session files with instant restore.