🪐 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, and Earth.

⚡ 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 218 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 & Quick Actions

Press Ctrl+K (or ⌘+K on macOS) to focus the Quick Command input at any time.

Shortcut / Command Action
Ctrl+K / Cmd+KFocus Quick Actions search box
Save SessionDownload current session (active layers, bookmarks, measurements) as JSON
Load SessionUpload and restore a saved JSMARS JSON session
Reset ViewReset map center to 0° Lat, 0° Lon at global zoom level
Toggle SidebarCollapse or expand the left sidebar controls

🌡️ 1D KRC Mars Thermal Simulation Model

Physics Engine

The KRC engine solves the 1D transient heat diffusion equation in the Martian regolith coupled with surface radiative energy balance and atmospheric downward thermal infrared flux (Hugh Kieffer KRC formulation).

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

Atmospheric Sounder

Generates vertical atmospheric soundings from surface datum to 120 km altitude, modeling hydrostatic scale height, dry adiabatic lapse rates ($4.5\text{ K/km}$), Conrath dust vertical distribution ($\nu = 0.007$), boundary layer friction velocity ($u_*$), and potential temperature ($\theta$).

☄️ 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)

💎 Hyperspectral Band Math & Mineralogy

Spectroscopy

Calculates CRISM summary parameters including ferric iron (BD530), hydration (BD1900), water ice (BD1500), smectite clays (D2300), sulfates (BD2100), and carbonates (BD2500/BD3900), plus Olivine Forsterite $\text{Fo\#}$ estimation from $1\ \mu\text{m}$ absorption center minimums.

🌐 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 (SHARAD / MARSIS)

Geophysics

Simulates synthetic 2D B-scope radargrams and 1D A-scope power traces for subsurface orbital radar sounding across polar ice caps and sedimentary deposits with dielectric mixing laws (Looyenga, Birchak, Lichtenecker) and two-way travel time dielectric depth conversion ($z = \frac{c \Delta t}{2 \sqrt{\epsilon_r}}$).

🚀 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 or the Moon to probe MOLA 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 thousands of IAU official planetary landmarks across Mars and the Moon, filter by morphological feature type (craters, mons, valles, chasmata, planitiae), and recenter the map with one click.

🗂️ 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.