planetsfactory 0.0.1

Planet factory — classify, build and catalogue planets for any star system: Solar System, TRAPPIST-1, Kepler-90, Proxima Centauri, or fully custom worlds.
Documentation
# PlanetsFactory

A Rust planet factory — classify, build, and catalogue planets for any star system. From terrestrial worlds and gas giants to ice giants, with full orbital mechanics, atmospheric physics, interior models, formation scenarios, evolution, observables, and procedural system generation. Includes Solar System, TRAPPIST-1, Kepler-90, and Proxima Centauri presets.

## Features

- **Type system** — Terrestrial planets, gas giants, and ice giants with class-specific physics and presets
- **Terrestrial planets** — Mercury, Venus, Earth, Mars with iron core fraction, magnetic moment, tidal locking time
- **Gas giants** — Jupiter, Saturn, hot Jupiters with ring Roche limits, metallic hydrogen pressure, Kelvin-Helmholtz timescale
- **Ice giants** — Uranus, Neptune with ice/rock mantle, magnetic dipole offset, wind speed estimates
- **Gravitation** — Surface acceleration, escape velocity, Hill sphere, Roche limit, Tisserand parameter, Laplace radius
- **Atmospheres** — Barometric law, Jeans escape rate, greenhouse effect, effective temperature, scale height
- **Interior models** — Core/mantle structure, central pressure, moment of inertia factor, Adams-Williamson density
- **Orbital mechanics** — Kepler solver, elements ↔ Cartesian, vis-viva, period, mean anomaly propagation
- **Formation** — Core accretion, disk instability, pebble accretion, snow line, isolation mass, MMSN density
- **Evolution** — Cooling luminosity, radius contraction, photo-evaporation, tidal migration, habitable zone boundaries
- **System generator** — Procedural systems via Titius-Bode spacing for solar-type and M-dwarf stars
- **Photometry** — Albedo conversion, flux ratios, equilibrium temperature, day-night contrast, bolometric magnitude
- **Transits** — Depth, duration, ingress/egress, impact parameter, limb darkening correction, TTV
- **Radial velocity** — Semi-amplitude K, minimum mass, Rossiter-McLaughlin effect, activity jitter
- **Presets** — Solar System (8 planets), TRAPPIST-1 (7 planets), Kepler-90 (8 planets), Proxima Centauri (2 planets)

## Quick Start

```bash
cargo build
cargo test
```

## Examples

```bash
cargo run --example solar_system_demo      # Solar System planets, physical properties, orbital elements
cargo run --example validation             # Cross-module validation with sanity checks
cargo run --example exoplanet_generation   # Procedural exoplanet system generation
```

## Testing

```bash
cargo test --all-targets
```

77 integration tests across types, physics, and engine modules.

## Project Structure

```
src/
├── config/          # Physical constants, unit conversions, planetary mass/radius constants
├── types/           # Terrestrial, gas giant, and ice giant planet types with presets
├── physics/         # Gravitation, atmospheres, interior structure models
├── engine/          # Orbital mechanics, formation, evolution, system generator
├── observables/     # Photometry, transits, radial velocity
├── presets/         # Solar System, TRAPPIST-1, Kepler-90, Proxima Centauri presets
└── utils/           # Math helpers (lerp, RK4, Simpson), I/O
```

## Dependencies

- [sciforge]https://crates.io/crates/sciforge — Physical constants, astronomical utilities

## License

MIT — see [LICENSE](LICENSE).