The inherited formula
The cell came from the workbook left by someone who left years ago. Nobody can say what datum or convention it assumes.
haql-coords · Free library
Copy-pasted trigonometry sits in a hundred spreadsheets, and every one is a potential off-by-one in a well record. haql-coords gives you coordinate distance, offsets and well-bore geometry as checked, round-trippable functions — the same geometry the haql suite relies on. Free, MIT-licensed, no account, no cloud.
Try it now: pip install haql-coords — seconds to first distance.
Read the public guide: what it does, what it checks and what it does not do →
# install pip install haql-coords # distance between two well-bore coordinates from haql_coords import distance # import shape shown as an example distance((0, 0), (3, 4)) 5.0 m # round-tripping an offset proves the result before it feeds QC offset((5.0, 0), bearing=90, length=5) (0.0, 5.0) ✓ reversible
Same geometry library used to sanity-check well records inside the production suite — and to audit the whole survey and certify the as-drilled path deterministically.
Why you need it
The cell came from the workbook left by someone who left years ago. Nobody can say what datum or convention it assumes.
One well's coordinates shifted by a digit and the nearest-well calculation quietly changes. Geometry checks are how that surfaces.
A distance is a number; being able to invert it is a proof. Copied formulas rarely round-trip cleanly, which is exactly the slip you want caught before it matters.
QC rules that compare wells need trustworthy geometry upstream. haql-coords is that upstream, shared across the suite.
How it works
Deliberately small API: minimum-curvature well paths, UTM conversion, dog-leg severity, and a survey certificate that recomputes the as-drilled path. No dependencies pulling a whole analysis stack behind them.
Minimum-curvature points from survey stations — TVD, NS/EW displacement, DLS per segment.
check_survey() flags depth-order, inclination/azimuth range, and dog-legs above the 2.0°/100 ft limit — each with a stable rule id.
survey_certificate() emits a deterministic as-drilled certificate — final TVD, horizontal closure, max DLS, and a sha256 over the canonical station list. Same stations in, byte-identical certificate out.
Free, MIT
No license manager, no seat count, no telemetry. It is the geometry foundation of the suite, and it is free on purpose.
github.com/haql-lab