# Project Structure

Structure map for the Mercurys crate.

```text
Mercurys/
├── 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 — Mercury diagnostics: subsolar longitude, solar flux, surface temp, orbit
│   ├── lib.rs                          # Library root, SURFACE_GRAVITY (3.7), MEAN_DENSITY (5427), BOND_ALBEDO (0.068)
│   │
│   ├── atmosphere/                     # Exosphere (no true atmosphere)
│   │   ├── mod.rs                      # Exports climate, heatwaves, layers, storms, winds
│   │   ├── climate.rs                  # Thermal equilibrium at 0.387 AU, Stefan-Boltzmann flux
│   │   ├── heatwaves.rs                # Subsolar/nightside temp extremes (700 K / 100 K), thermal inertia, hot/warm poles
│   │   ├── layers.rs                   # ExosphericSpecies — Na, K, Ca, O, H₂ column densities, scale heights, Jeans escape
│   │   ├── storms.rs                   # CmeImpact — coronal mass ejection impacts (800 km/s), SEP flux enhancement
│   │   └── winds.rs                    # Solar wind dynamic pressure (60/cm³, 400 km/s), magnetopause standoff, IMF (35 nT)
│   │
│   ├── biosphere/                      # Abiotic confirmation
│   │   ├── mod.rs                      # Exports ecosystems, fauna, vegetation
│   │   ├── ecosystems.rs               # has_ecosystems() → false, surface UV flux relative to Earth (1/r² at 0.387 AU)
│   │   ├── fauna.rs                    # has_fauna() → false, has_extremophile_potential() → false
│   │   └── vegetation.rs               # has_vegetation() → false, PAR flux relative to Earth
│   │
│   ├── geodata/                        # Geographic data
│   │   ├── mod.rs                      # Exports bathymetry, coordinates, elevation, regions
│   │   ├── bathymetry.rs               # has_oceans() → false, null bathymetry (depth = 0 everywhere)
│   │   ├── coordinates.rs              # LatLon — Mercury spherical (nearly zero-flattening) coordinate system
│   │   ├── elevation.rs                # ElevationGrid from heightmap, crater/basin topography
│   │   └── regions.rs                  # NamedRegion — Basin, Planitia, Crater, Rupes named features
│   │
│   ├── geology/                        # Geologic processes
│   │   ├── mod.rs                      # Exports earthquakes, erosion, mountains, plate_tectonics, volcanism
│   │   ├── earthquakes.rs              # LobateScarp — fault-generated seismicity, seismic moment from scarp length/height
│   │   ├── erosion.rs                  # SpaceWeathering — micrometeorite flux, solar wind sputtering, nanophase iron
│   │   ├── mountains.rs                # CraterRim — depth-to-diameter ratio, Airy isostatic root, major crater rims
│   │   ├── plate_tectonics.rs          # Giant iron core (> 60 % mass), inner/outer core, thin mantle/crust
│   │   └── volcanism.rs                # Past volcanic plains, hollow fields, crystal settling velocity
│   │
│   ├── hydrology/                      # Water and ice
│   │   ├── mod.rs                      # Exports glaciers, lakes, oceans, rivers
│   │   ├── glaciers.rs                 # PolarIceDeposit — PSR ice at poles (radar-bright craters), ice stability depth
│   │   ├── lakes.rs                    # has_lakes() → false, has_subsurface_liquid() → false
│   │   ├── oceans.rs                   # has_oceans() → false, triple_point_achievable() → false
│   │   └── rivers.rs                   # has_rivers() → false, has_paleochannels() → false
│   │
│   ├── lighting/                       # Illumination and day cycles
│   │   ├── mod.rs                      # Exports day_night, seasons, solar_position
│   │   ├── day_night.rs                # Solar day (176 Earth days), sidereal day (58.6 d), 3:2 spin-orbit resonance
│   │   ├── seasons.rs                  # Near-zero tilt (0.034°), extreme flux variation from e = 0.2056
│   │   └── solar_position.rs           # Azimuth/elevation from true anomaly, highly eccentric orbit effects
│   │
│   ├── physics/                        # Orbital and impact mechanics
│   │   ├── mod.rs                      # Exports collisions, orbit, rotation, tides
│   │   ├── collisions.rs               # Caloris basin impactor, mean impact speed 42.5 km/s, iron/stony densities
│   │   ├── orbit.rs                    # Mass (3.30e23), radius (2440 km), a = 0.387 AU, e = 0.2056, GR precession
│   │   ├── rotation.rs                 # 3:2 spin-orbit resonance angular velocity, near-zero axial tilt
│   │   └── tides.rs                    # Strong solar tidal force at 0.387 AU, perihelion/aphelion ratio, dissipation
│   │
│   ├── rendering/                      # Visual rendering (airless body)
│   │   ├── mod.rs                      # Exports atmosphere_scattering, clouds, materials, ocean_rendering, shaders
│   │   ├── atmosphere_scattering.rs    # Null scattering — all coefficients zero (no atmosphere)
│   │   ├── clouds.rs                   # cloud_coverage() → 0.0, has_clouds() → false
│   │   ├── materials.rs                # PBR — dark regolith (albedo 0.106), high roughness (0.85), minimal metallic
│   │   ├── ocean_rendering.rs          # ocean_fraction() → 0.0, has_oceans() → false
│   │   └── shaders.rs                  # ShaderConfig — Depth/Color/Shadow/Thermal passes, no atmosphere/ocean flags
│   │
│   ├── satellites/                     # Natural and artificial satellites
│   │   ├── mod.rs                      # Exports artificial, none
│   │   ├── artificial.rs               # MESSENGER/BepiColombo mission orbital parameters
│   │   └── none.rs                     # has_natural_satellite() → false, Hill sphere radius calculation
│   │
│   ├── temporal/                       # Time and calendar
│   │   ├── mod.rs                      # Exports calendar, epoch, time_scale
│   │   ├── calendar.rs                 # Mercury year (87.969 Earth d), solar day counting
│   │   ├── epoch.rs                    # J2000, perihelion epoch, mean longitude/anomaly polynomials (°/century)
│   │   └── time_scale.rs               # Simple factor-based time scaling
│   │
│   └── terrain/                        # Terrain generation
│       ├── mod.rs                      # Exports heightmap, lod, mesh, texturing
│       ├── heightmap.rs                # Procedural crater/basin depth model, named basins (Caloris, Rachmaninoff)
│       ├── lod.rs                      # Cube-face quadtree LOD subdivision
│       ├── mesh.rs                     # Spherical terrain mesh generation
│       └── texturing.rs                # SurfaceType — IntercraterPlains, SmoothPlains, CrateredHighlands, Hollows, PolarIce
│
├── tests/                              # Integration tests
│   ├── atmosphere_tests.rs             # Tests exosphere species ≥ 5, thermal state, CME impact, magnetopause standoff
│   ├── geology_tests.rs                # Tests core mass fraction > 60 %, lobate scarps, crater rims, hollow fields
│   ├── hydrology_tests.rs              # Tests no oceans/rivers/lakes, polar ice present, PSR temperatures
│   └── physics_tests.rs                # Tests orbital period ~88 d, Caloris impactor, GR precession, tidal dissipation
│
└── examples/                           # Runnable examples
    ├── climate_sim.rs                  # Exosphere species densities, escape rates, thermal cycle, hot/warm poles
    ├── earthquake_sim.rs               # Interior structure, scarps, thermal fatigue, hollow fields, heat flux
    └── tidal_sim.rs                    # Orbital mechanics, GR precession, tidal forces, Hill sphere, missions
```
