# lake-elevation

Reservoir and lake elevation math: percent-of-pool, storage conversions (acre-foot <-> cubic
meter), datum conversions (feet <-> meters), and the full-pool / conservation-pool
calculations used by USACE, USGS, and Bureau of Reclamation reservoir operations. Pure Rust,
no dependencies.

The same math behind the [LakeLevelNow](https://lakelevelnow.com/) live US lake-level tracker.

## Conventions

- Elevations are in feet or meters above a datum (e.g. NGVD29 / NAVD88).
- A reservoir's **conservation pool** is the normal operating range between a minimum
  (inactive / dead pool) elevation and the **full-pool** (top of conservation) elevation.
- **Percent of pool** is the fraction of that usable range currently filled.
- An **acre-foot** is the volume covering 1 acre to a depth of 1 ft (exactly 43,560 ft^3).
- Conversions are **exact** under the 1959 international yard agreement: 1 ft = 0.3048 m.

## Usage

```rust
use lake_elevation::{percent_of_pool, feet_to_meters, acre_feet_to_cubic_meters};

// Halfway through the conservation pool (800-900 ft operating range)
let pct = percent_of_pool(850.0, 800.0, 900.0); // 50.0

// Exact datum conversion
let meters = feet_to_meters(900.0); // 274.32

// Storage in SI units
let m3 = acre_feet_to_cubic_meters(100_000.0); // ~123,348,184 m^3
```

## Why this matters

Reservoir operators report "percent of conservation pool" daily. LakeLevelNow surfaces the
same number for the public so boaters, anglers, and downstream water users can see at a glance
whether a lake is full, drawn down, or spilling into the flood pool. This crate is the
reference implementation of that arithmetic.

License: MIT
