# Project Structure
Structure map for the Marss crate.
```text
Marss/
├── README.md # Project overview and usage
├── LICENSE # MIT license
├── ChangeLog.md # Version history
├── ComingSoon.md # Planned features
├── Contributing # Contribution guidelines
├── lastest_versions.sh # Restore wildcard dependency versions
│
├── src/
│ ├── main.rs # Entry point — Mars simulation loop with biome materials, orbital/climate/geology
│ ├── lib.rs # Library root, MARS_MASS (6.417e23), radii, SURFACE_GRAVITY (3.72), AXIAL_TILT (25.19°)
│ │
│ ├── atmosphere/ # Atmospheric science (CO₂ dominated)
│ │ ├── mod.rs # Exports climate, heatwaves, layers, storms, winds
│ │ ├── climate.rs # CO₂-dominated climate, greenhouse effect, energy balance
│ │ ├── heatwaves.rs # Global mean thermal inertia, temperature anomalies
│ │ ├── layers.rs # Barometric pressure, CO₂ condensation point, standard atmosphere profile
│ │ ├── storms.rs # DustStorm — global storm frequency per Mars year, optical depths
│ │ └── winds.rs # Saltation threshold velocity, Coriolis for Mars rotation
│ │
│ ├── biosphere/ # Hypothetical living systems
│ │ ├── mod.rs # Exports ecosystems, fauna, vegetation
│ │ ├── ecosystems.rs # Hypothetical habitability scoring — temperature/water availability
│ │ ├── fauna.rs # Logistic growth projection (hypothetical extremophile modeling)
│ │ └── vegetation.rs # Survival checks vs Mars surface conditions, required greenhouse warming
│ │
│ ├── geodata/ # Geographic data
│ │ ├── mod.rs # Exports bathymetry, coordinates, elevation, regions
│ │ ├── bathymetry.rs # AncientBasin — Hellas Planitia (−7152 m), Argyre Planitia impact basins
│ │ ├── coordinates.rs # LatLon/Cartesian — Mars oblate ellipsoid (f = 0.00589), geodetic conversion
│ │ ├── elevation.rs # Global DEM from heightmap, bilinear sampling
│ │ └── regions.rs # MarsRegion — Volcanic, Impact, Polar, Lowland, Highland, Canyon
│ │
│ ├── geology/ # Geologic processes
│ │ ├── mod.rs # Exports earthquakes, erosion, mountains, plate_tectonics, volcanism
│ │ ├── earthquakes.rs # Marsquake — seismic moment from magnitude, Gutenberg-Richter, wave velocities
│ │ ├── erosion.rs # Aeolian saltation threshold (25 m/s), sand flux, thin-atmosphere transport
│ │ ├── mountains.rs # Olympus Mons (peak > 21 km), Airy root depth, isostatic equilibrium
│ │ ├── plate_tectonics.rs # Single-plate stagnant lid, core/mantle/crust radii, heat flow
│ │ └── volcanism.rs # Tharsis/Elysium provinces, currently inactive, differentiation
│ │
│ ├── hydrology/ # Water systems (past and present)
│ │ ├── mod.rs # Exports glaciers, lakes, oceans, rivers
│ │ ├── glaciers.rs # PolarCap — north/south caps, water ice + CO₂ ice volumes, total mass estimates
│ │ ├── lakes.rs # Paleolake — Jezero crater lake, volume estimate, residence time
│ │ ├── oceans.rs # AncientOcean — Oceanus Borealis (1.56e7 km³, Late Hesperian), Arabia Ocean
│ │ └── rivers.rs # AncientChannel — Kasei Valles, estimated discharge, depth-from-width scaling
│ │
│ ├── lighting/ # Illumination and day cycles
│ │ ├── mod.rs # Exports day_night, seasons, solar_position
│ │ ├── day_night.rs # Daylight state from solar longitude (Ls) and local time
│ │ ├── seasons.rs # NorthernSpring/Summer/Autumn/Winter from Ls, solar declination
│ │ └── solar_position.rs # Solar declination, equation of time (minutes), SolarPosition from Ls/lat/lon
│ │
│ ├── physics/ # Orbital and impact mechanics
│ │ ├── mod.rs # Exports collisions, orbit, rotation, tides
│ │ ├── collisions.rs # Asteroid impact on Mars, kinetic energy, crater scaling
│ │ ├── orbit.rs # Semi-major 1.524 AU, e = 0.0934, vis-viva, Kepler period (~687 d)
│ │ ├── rotation.rs # Sidereal day 88 642 s, sol 88 775 s, tilt 25.19°, precession (170 kyr)
│ │ └── tides.rs # Solar tidal acceleration, Phobos tidal contribution
│ │
│ ├── rendering/ # Visual rendering (butterscotch sky)
│ │ ├── mod.rs # Exports atmosphere_scattering, dust_rendering, materials, shaders, sky
│ │ ├── atmosphere_scattering.rs # Rayleigh coefficients (butterscotch sky), dust optical depth
│ │ ├── dust_rendering.rs # Background/global storm dust optical depth, single scatter albedo, asymmetry
│ │ ├── materials.rs # PBR materials — regolith, bright dust, basalt, dark dune, polar ice
│ │ ├── shaders.rs # ShaderData — "mars_terrain" uniforms: sun direction, camera, lighting
│ │ └── sky.rs # Zenith color from sun elevation and dust optical depth (pinkish-butterscotch)
│ │
│ ├── satellites/ # Natural and artificial satellites
│ │ ├── mod.rs # Exports artificial, deimos, phobos
│ │ ├── artificial.rs # Orbital parameters, period, semi-major axis for artificial probes
│ │ ├── deimos.rs # DeimosState — mass (1.476e15 kg), dims (15 × 12.2 × 10.4 km), a = 23 463 km
│ │ └── phobos.rs # PhobosState — mass (1.066e16 kg), dims (27 × 22 × 18 km), a = 9376 km, e = 0.0151
│ │
│ ├── temporal/ # Time and calendar
│ │ ├── mod.rs # Exports calendar, epoch, time_scale
│ │ ├── calendar.rs # MarsSolDate — Mars Year 1 epoch, sol-of-year, Julian date conversion
│ │ ├── epoch.rs # J2000 reference, centuries-since-J2000
│ │ └── time_scale.rs # Simulation clock with sol-length speed multiplier
│ │
│ └── terrain/ # Terrain generation
│ ├── mod.rs # Exports heightmap, lod, mesh, texturing
│ ├── heightmap.rs # Olympus Mons (21 900 m), Ascraeus (18 200), Hellas floor (−7152 m), global DEM
│ ├── lod.rs # Cube-face quadtree LOD subdivision
│ ├── mesh.rs # Spherical mesh from lat/lon bounds, normals, tangents
│ └── texturing.rs # MarsBiome — DarkDune, BrightDust, Regolith, Basalt, PolarIce, Co2Frost, VolcanicSummit
│
├── tests/ # Integration tests
│ ├── atmosphere_tests.rs # Tests barometric model, CO₂ condensation, saltation, dust storm frequency
│ ├── geology_tests.rs # Tests stagnant lid, Olympus Mons > 20 km, volcano count, magma viscosity
│ ├── hydrology_tests.rs # Tests Oceanus Borealis size, Kasei Valles, Jezero volume, polar water GEL
│ └── physics_tests.rs # Tests orbital period ~687 d, escape velocity ~5 km/s, Phobos/solar tide ratio
│
└── examples/ # Runnable examples
├── climate_sim.rs # Atmospheric layers, CO₂ climate, dust storm forcing
├── earthquake_sim.rs # Marsquake modeling, seismic moment, stagnant lid
└── tidal_sim.rs # Orbital mechanics, Phobos tidal interaction
```