# Project Structure

Structure map for the Phoboss crate.

```text
Phoboss/
├── 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 — Phobos diagnostics: orbit, Stickney crater, tidal decay
│   ├── lib.rs                          # Library root, PHOBOSMASS (1.07e16 kg), mean radius 11.3 km, constants
│   │
│   ├── environment/                    # Surface environment
│   │   ├── mod.rs                      # Exports dust, radiation, thermal
│   │   ├── dust.rs                     # Regolith dust layer, electrostatic mobilization on low-gravity body
│   │   ├── radiation.rs                # Unshielded solar + GCR exposure at 1.52 AU, Mars shadow partial shield
│   │   └── thermal.rs                  # Surface ~233 K (day) / ~160 K (night), rapid thermal cycling (7.66 h)
│   │
│   ├── exosphere/                      # Tenuous atmosphere
│   │   ├── mod.rs                      # Exports charging, escape, species
│   │   ├── charging.rs                 # Solar-wind charging, Mars magnetotail passage effects
│   │   ├── escape.rs                   # Near-zero escape velocity (~11 m/s), dust easily lofted
│   │   └── species.rs                  # No measurable exosphere, possible transient outgassing from impacts
│   │
│   ├── geodata/                        # Geographic reference data
│   │   ├── mod.rs                      # Exports coordinates, elevation, landing_sites, regions
│   │   ├── coordinates.rs              # Body-fixed frame, IAU Phobos-fixed reference, triaxial shape
│   │   ├── elevation.rs                # Shape model from Viking/MRO/MEX imagery, Stickney depression
│   │   ├── landing_sites.rs            # MMX sample-return touchdown sites, smooth regolith plains
│   │   └── regions.rs                  # Stickney crater (9 km), grooved terrain, Limtoc/Reldresal craters
│   │
│   ├── geology/                        # Surface and interior geology
│   │   ├── mod.rs                      # Exports craters, erosion, mountains, regolith, volcanism
│   │   ├── craters.rs                  # Stickney (9 km, nearly catastrophic), Hall (5 km), groove-associated pits
│   │   ├── erosion.rs                  # Impact gardening, regolith migration in low gravity
│   │   ├── mountains.rs                # Stickney rim peaks, irregular shape ridges, no significant mountains
│   │   ├── regolith.rs                 # ~100 m regolith layer, fine-grained, blanketing grooves
│   │   └── volcanism.rs               # No volcanism — undifferentiated interior, possible rubble pile
│   │
│   ├── interactions/                   # Gravitational interactions
│   │   ├── mod.rs                      # Exports earth_tides, marss, orbital_dynamics
│   │   ├── earth_tides.rs              # Earth–Phobos perturbation (negligible at 1.52 AU)
│   │   ├── marss.rs                    # Mars gravitational influence, tidally decaying orbit at 6 000 km altitude
│   │   └── orbital_dynamics.rs         # Spiraling inward, Roche limit breakup in ~50 Myr, tidal deceleration
│   │
│   ├── lighting/                       # Illumination model
│   │   ├── mod.rs                      # Exports eclipses, marsshine, solar_position
│   │   ├── eclipses.rs                 # Frequent Mars shadow transits (~1 300/yr), annular eclipses from Mars
│   │   ├── marsshine.rs                # Reflected Martian light, reddish illumination, Mars fills ~42° of sky
│   │   └── solar_position.rs           # Solar zenith angle, 7.66 h rapid rotation/orbital cycle
│   │
│   ├── missions/                       # Exploration missions
│   │   ├── mod.rs                      # Exports landers, orbiters, relay
│   │   ├── landers.rs                  # MMX sample return (JAXA), Phobos-Grunt (failed), future ISRU scouts
│   │   ├── orbiters.rs                 # Viking imaging, Phobos 2 flyby, Mars Express close flybys (<100 km)
│   │   └── relay.rs                    # Mars relay network, low-altitude orbit advantageous for surface ops
│   │
│   ├── observation/                    # Remote observation
│   │   ├── mod.rs                      # Exports communications, mars_view, navigation
│   │   ├── communications.rs           # Mars-relay link, 1.52 AU Earth light-time delay (3–22 min)
│   │   ├── mars_view.rs               # Mars apparent size from Phobos (~42°), enormous disk dominates sky
│   │   └── navigation.rs              # Irregular gravity field, MEGANE gamma-ray spectrometer mapping
│   │
│   ├── physics/                        # Orbital and impact mechanics
│   │   ├── mod.rs                      # Exports collisions, orbit, rotation, tides
│   │   ├── collisions.rs               # Impact flux at 1.52 AU, secondary ejecta from Mars impacts
│   │   ├── orbit.rs                    # a = 9 376 km, e = 0.0151, period 0.32 d (7.66 h), vis-viva
│   │   ├── rotation.rs                 # Synchronous rotation, orbits faster than Mars rotates (rises in west)
│   │   └── tides.rs                    # Tidal deceleration, approaching Roche limit, structural stress
│   │
│   ├── rendering/                      # Visual rendering pipeline
│   │   ├── mod.rs                      # Exports dust, materials, shaders
│   │   ├── dust.rs                     # Regolith dust rendering, very dark surface albedo (0.07)
│   │   ├── materials.rs                # PBR dark C/D-type material, phyllosilicate/carbon spectral match
│   │   └── shaders.rs                  # GPU shader programs — Stickney crater, groove system rendering
│   │
│   ├── resources/                      # Extractable resources
│   │   ├── mod.rs                      # Exports minerals, regolith, water_ice
│   │   ├── minerals.rs                 # Phyllosilicates, carbon-bearing minerals, possible chondritic composition
│   │   ├── regolith.rs                 # Thick fine-grained regolith — ISRU feedstock, radiation shielding
│   │   └── water_ice.rs               # Possible bound water in hydrated minerals, MMX will constrain
│   │
│   ├── surface/                        # Surface mapping
│   │   ├── mod.rs                      # Exports heightmaps, mapping, zones
│   │   ├── heightmaps.rs               # Shape model 27 × 22 × 18 km triaxial from MEX/MRO
│   │   ├── mapping.rs                  # Albedo maps, groove maps, spectral unit mapping (red/blue units)
│   │   └── zones.rs                    # Stickney region, grooved terrain, smooth regolith plains
│   │
│   ├── temporal/                       # Time systems
│   │   ├── mod.rs                      # Exports calendar, epoch, time_scale
│   │   ├── calendar.rs                 # Phobos calendar — 7.66 h orbital period, Mars year reference
│   │   ├── epoch.rs                    # J2000 epoch, Viking encounter dates, MMX mission timeline
│   │   └── time_scale.rs              # TDB/UT1/TAI conversions at 1.52 AU light-time delay
│   │
│   └── terrain/                        # Terrain mesh generation
│       ├── mod.rs                      # Exports lod, mesh, texturing
│       ├── lod.rs                      # Level-of-detail streaming for irregular body and groove detail
│       ├── mesh.rs                     # Triaxial mesh, 27 × 22 × 18 km, Stickney concavity
│       └── texturing.rs               # Viking/MRO/MEX imagery drape, dark surface with red/blue spectral units
│
├── tests/                              # Integration tests
│   ├── environment_tests.rs            # Tests rapid thermal cycling, dust mobilization, radiation dose
│   ├── exosphere_tests.rs              # Tests near-zero exosphere, dust lofting escape threshold
│   ├── geodata_tests.rs                # Tests coordinate transforms, Stickney location, groove positions
│   ├── geology_tests.rs                # Tests Stickney formation energy, groove origin models, regolith depth
│   ├── interactions_tests.rs           # Tests tidal decay rate, Roche limit timeline (~50 Myr)
│   ├── lighting_tests.rs              # Tests Mars shadow transit frequency, marsshine from 42° disk
│   ├── missions_tests.rs              # Tests Mars Express flyby parameters, MMX trajectory
│   ├── observation_tests.rs            # Tests Mars apparent size (42°), relay link budget
│   ├── physics_tests.rs                # Tests orbital period (7.66 h), tidal stress, escape velocity
│   ├── rendering_tests.rs              # Tests surface albedo (0.07), spectral unit contrast
│   ├── resources_tests.rs              # Tests phyllosilicate fraction, bound water estimates
│   ├── surface_tests.rs                # Tests shape model accuracy, groove pattern mapping
│   ├── temporal_tests.rs               # Tests epoch conversions, rapid orbital period sync
│   └── terrain_tests.rs               # Tests irregular mesh accuracy, Stickney rim LOD
│
└── examples/                           # Runnable examples
    ├── check_landing_site.rs           # Evaluate MMX touchdown candidates on smooth regolith
    ├── crater_sim.rs                   # Stickney near-catastrophic impact, groove formation models
    ├── eclipse_sim.rs                  # Frequent Mars shadow transits, annular solar eclipses
    ├── exosphere_sim.rs                # Dust lofting simulation in near-zero gravity
    ├── mars_observation.rs             # Mars as seen from Phobos — enormous 42° reddish disk
    ├── orbital_sim.rs                  # 7.66-hour orbit propagation, tidal inspiral toward Roche limit
    ├── radiation_sim.rs                # Solar + GCR environment, intermittent Mars shadow shielding
    ├── resource_survey.rs              # Phyllosilicate and bound water abundance mapping
    └── tidal_effects.rs               # Tidal decay analysis — orbital inspiral and breakup timeline
```
