Skip to content

zheimr/cooper-station

CI Pages License: MIT Rust WASM

Cooper Station

O'Neill Cylinder (Island III) space habitat — Rust physics engine, 12 engineering modules, WASM-compiled interactive dashboard.

32 km long, 8 km diameter, 0.473 RPM, 1g at rim. All parameters derived from a = ω²r.

Live Dashboard · Landing Page


Station Parameters

Parameter Value Derivation
Radius 4,000 m Design choice
Length 32,000 m Design choice
Target gravity 9.81 m/s² Earth-equivalent
ω 0.0495 rad/s √(g/r)
RPM 0.473 ω × 60/(2π)
Period 126.9 s 2π/ω
Rim velocity 198 m/s ωr
Habitable area ~402 km² πrL (3 of 6 strips)
Atmosphere 40% O₂ / 60% N₂ 0.5 atm at rim
Population 1,000,000 Design target

Engine

Rust physics engine in engine/. 29 unit tests, compiles to WASM.

cd engine
cargo test          # 29 tests
cargo clippy        # zero warnings
wasm-pack build --target web --features wasm

Modules: station.rs (core params), gravity.rs (g = ω²r, zones), coriolis.rs (deflection, drop trajectories), atmosphere.rs (pressure gradient, ECLSS), structure.rs (hoop stress, materials).

WASM API exports 20+ functions: gravity_at(r), coriolis_acceleration(v), pressure_at(r), structural_analysis_json(material, sf), etc.


Modules

12 independent engineering domains. Each has a SPEC.md with calculations and open questions.

# Module Status
01 Structure In Progress
02 Rotation & Gravity In Progress
03 Atmosphere & ECLSS Open
04 Agriculture Open
05 Power Systems Open
06 Radiation Shielding Open
07 Habitat Open
08 Transportation Open
09 Communications Open
10 Industrial Open
11 Docking Ports Open
12 Command & Control Open

Project Structure

cooper-station/
├── engine/                  # Rust physics engine (also compiles to WASM)
│   ├── src/
│   │   ├── station.rs       # Core config, derived params
│   │   ├── gravity.rs       # Gravity zones, g(r) = ω²r
│   │   ├── coriolis.rs      # Coriolis effects, drop sim
│   │   ├── atmosphere.rs    # Pressure gradient, ECLSS
│   │   ├── structure.rs     # Hoop stress, materials
│   │   └── wasm.rs          # WASM API (20+ exports)
│   └── Cargo.toml
├── modules/                 # 12 engineering module specifications
├── web/
│   ├── index.html           # Landing page (Three.js)
│   └── dashboard.html       # Interactive physics dashboard
├── .github/
│   ├── workflows/
│   │   ├── ci.yml           # Rust test + clippy + WASM build
│   │   └── pages.yml        # GitHub Pages deploy
│   ├── ISSUE_TEMPLATE/      # Issue templates (module, physics error, sim proposal)
│   └── PULL_REQUEST_TEMPLATE.md
├── docs/                    # Additional documentation
├── scripts/                 # Utility scripts (repo setup, issue creation)
└── simulations/             # Dashboard prototypes

Getting Started

Prerequisites

Clone & Build

git clone https://github.com/zheimr/cooper-station.git
cd cooper-station/engine

cargo build        # compile the physics engine
cargo test         # run all 29 unit tests
cargo clippy       # lint (should be zero warnings)

Build WASM

cd engine
wasm-pack build --target web --features wasm

Run the Dashboard Locally

The simplest option is to open web/dashboard.html directly in your browser. If you need WASM integration (which requires proper CORS headers), serve the files instead:

cd web
python -m http.server 8000
# then open http://localhost:8000/dashboard.html

Development Workflow

  1. Fork the repo and create a feature branch
  2. Implement your changes (engine code, module specs, dashboard, etc.)
  3. Test locally — cargo test and cargo clippy must pass
  4. Submit a PR — CI will run automatically

CI Checks

Every pull request runs:

  • cargo test — all engine unit tests
  • cargo clippy — zero warnings required
  • WASM build — wasm-pack build --target web --features wasm

All checks must pass before a PR can be merged.


Contributing

Live Site — explore the station and pick a module.

  1. Pick a module from the table above (10 of 12 are open)
  2. Read its SPEC.md for current state and open questions
  3. Do the math — cite sources, show work
  4. Submit a PR

Who we need: aerospace engineers, structural engineers, life scientists (ECLSS/agriculture), urban planners, Rust/WASM developers, anyone who can do the math.

Requirements: calculations must be reproducible, material choices must reference real data, gaps in feasibility must be documented as gaps (not glossed over).


References

  • O'Neill, G.K. (1976). The High Frontier: Human Colonies in Space
  • Johnson, R.D. & Holbrow, C. (1977). Space Settlements: A Design Study (NASA SP-413)
  • NASA ECLSS Technical Brief

MIT License

About

Open-source O'Neill Cylinder space habitat — Rust physics engine, 12 engineering modules, interactive dashboard

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors