E3 ยท Publication Volume 25
Minimum Curvature Step by Step
dogleg, ratio factor, incremental vectors and edge cases
Learning objectives
- Explain the decision and evidence boundary for dogleg, ratio factor, incremental vectors and edge cases.
- Design and implement the relevant drillhole data or algorithm contract without hidden conventions.
- Separate hard release gates from diagnostics, interpretation and authorised review.
- Produce an independently verified minimum-curvature kernel with golden cases from synthetic evidence.
The lesson is complete only when the learner can defend the data model, algorithm, tests and release decision. An attractive trajectory or clean interval table without source evidence and executable invariants remains unverified.
This is a general, institution-neutral tutorial with no relationship to any company or individual. All borehole identifiers, coordinates, depths, directions, intervals, values and review events in the lesson are synthetic and must not be used for an operational decision.
Decision context
The algorithm must convert two accepted survey stations into a displacement without hidden units, unstable inverse trigonometry or undefined zero-dogleg behaviour. The implementation boundary accepts measured depth in one declared length unit and angles already converted to radians under the canonical convention. It returns displacement components, dogleg, ratio factor and diagnostic status; it does not silently repair invalid stations.
Write the intended use, consequence of error, required evidence and release authority before selecting a transformation. The same source can be suitable for exploratory display and unsuitable for a released derivative. Fitness is evaluated against a versioned contract and use, not attached permanently to a file.
Core concept
Minimum curvature represents the course as a circular arc whose endpoint tangents equal the two station directions. First compute course length. Next compute the angular separation, or dogleg, between the unit tangents. Then compute a ratio factor that converts the mean endpoint tangent into the correct arc displacement. Finally accumulate East, North and vertical components in a fixed order. The geometry is simple enough to test independently of file parsing or user interfaces.
Keep received observations, accepted evidence views and derived results as distinct objects. This separation allows corrected evidence or a changed method to generate a new result without rewriting history. Every derived coordinate or interval therefore answers both a scientific question and a provenance question.
Algorithm and data model
Use vector geometry to reduce convention mistakes. Let \mathbf{t}_1 and \mathbf{t}_2 be canonical unit tangents. Compute c=\mathrm{clamp}(\mathbf{t}_1\cdot\mathbf{t}_2,-1,1) before \arccos, because finite precision can otherwise produce a value just outside the valid domain. Treat non-positive course length, non-finite input, out-of-range inclination and unresolved duplicate stations as validation failures before entering the kernel.
Define the transformation as a pure, testable operation wherever practical. Parsing, semantic validation, evidence selection, numeric calculation and release evaluation are separate stages. Each stage emits structured output and does not depend on interface state, filename order or an undocumented default.
Constraints and invariants
| Invariant | Executable or review test | | --- | --- | | Course length is strictly positive. | Reject or quarantine any record that violates this condition and record the exact affected identity. | | The inverse-cosine argument is clamped, not the resulting angle. | Evaluate this condition before producing a derived trajectory or interval result. | | The zero-dogleg limit is implemented explicitly. | Preserve received evidence and create a new version for every correction. | | Golden cases verify components and diagnostics, not only endpoints. | Include the rule identifier, observed value and resolution state in audit output. |
An invariant must survive import, conversion, processing, export and rerun. A failed hard invariant produces no apparently valid substitute. Diagnostic checks remain visible with their threshold, scope and evidence, and require a reviewed rule before they can trigger correction.
Quantitative reasoning
With \beta=\arccos(c) and \Delta MD=MD_2-MD_1, use RF=\frac{2}{\beta}\tan(\beta/2). Its limit at zero is one; for very small \beta, evaluate the stable series RF\approx1+\beta^2/12+\beta^4/120. The displacement is \Delta\mathbf{r}=\frac{\Delta MD}{2}RF(\mathbf{t}_1+\mathbf{t}_2). In components, \Delta E uses \sin I\sin A, \Delta N uses \sin I\cos A, and downward vertical displacement uses \cos I. Dogleg severity is \beta L_n/\Delta MD, converted to a declared angular unit per normalisation length L_n.
Every reported metric includes units, numerator and denominator where applicable, exclusions, comparison policy and evaluation version. Aggregate values are stratified when pooling could hide a local failure. A quantitative diagnostic supports a decision but cannot overrule missing identity, invalid geometry, unresolved conflict or broken lineage.
Evidence and uncertainty
Keep observation uncertainty, interpolation uncertainty, numeric approximation and metadata uncertainty separate. A smooth trajectory can be numerically precise while still poorly constrained between widely spaced stations. An exact interval overlay can still be unfit when a source depth datum is unknown. The assessed result states which uncertainty belongs to the phenomenon, the measurement, the algorithm and the interpretation.
Build an evidence packet containing immutable received records, semantic declarations, validation findings, algorithm inputs and outputs, test results, reviewer decisions and fingerprints. Contradictory evidence remains available. When a required dependency cannot be resolved, return an explicit unknown, conflict or blocked status rather than choosing the most convenient value.
Interfaces and storage
Interfaces transmit identities, units, coordinate and depth references, conventions, value states, versions and lineage beside numeric values. A trajectory exchange includes collar and datum context, accepted station identities, algorithm identity, numerical policy and output coordinates. An interval exchange includes support type, boundary convention and source links. Structured errors identify the record, field, observed value, expected condition and rule.
Store authoritative received evidence separately from reproducible derivatives and disposable views. Indexes, caches and visualisations may improve access but cannot become the only copy of angle conventions, accepted-station decisions or interval lineage. Export round trips verify that identifiers, precision, ordering and missing states survive encoding changes.
Governance and review
Assign responsibilities to roles rather than named organisations or people: evidence custodian, rule author, implementation maintainer, independent validator and release reviewer. A role may propose a correction but cannot erase source evidence. Rule and algorithm changes are reviewed, versioned and evaluated against fixed regression fixtures before they affect a release.
Exceptions are explicit decisions with scope, rationale, evidence, approving role, affected versions and review trigger. They never rewrite a failed rule and never propagate automatically. The host website has no ownership or scientific-authority role in this workflow; it only delivers the tutorial.
Integration checkpoint
Read the figure as a reasoning map from preserved evidence through explicit conventions, deterministic calculation, validation and release. Each arrow represents a declared relationship or transformation. Integrate an independently verified minimum-curvature kernel with golden cases into the evolving synthetic drillhole package, rerun all earlier fixtures and record any changed assumption.
Synthetic worked example
A golden fixture uses two identical directions 30 m apart and must return RF=1 with displacement exactly parallel to the tangent within tolerance. A second fixture crosses azimuth 359 degrees to 1 degree and must produce a small dogleg, not 358 degrees. A third fixture turns from vertical to an inclined eastward direction. Independent vector and component implementations agree, and every intermediate value is included in the audit output.
- Preserve the received records and state the intended decision without correction.
- Resolve identities, units, conventions and evidence eligibility; mark every unresolved item.
- Run the versioned algorithm and tests while retaining intermediate diagnostics.
- Issue accept, reject or quarantine and show how an independent reviewer can reproduce it.
Practice task
Implement the chapter artefact against a synthetic fixture containing one normal case, one boundary case, one invalid case and one unresolved-evidence case. Preserve the received fixture. Produce canonical input, validation findings, derivative output, processing manifest and a short release decision.
Acceptance criteria:
- Every input identity, unit and convention required by the rule is explicit.
- The implementation is deterministic under stable ordering and the declared numerical policy.
- No correction overwrites received evidence or turns unknown into a guessed value.
- All hard failures block the affected derivative and remain machine-readable.
- A second implementation or reviewer can reproduce the result from the package alone.
Submit an independently verified minimum-curvature kernel with golden cases, the golden and adversarial fixtures, exact findings and a limitations note. A screenshot is not sufficient evidence because it does not identify the input version, algorithm or rule configuration.
Common failure modes
- Dividing by dogleg without a small-angle branch.
- Passing degrees into trigonometric functions expecting radians.
- Computing ordinary azimuth difference across north.
- Hiding a non-positive course by taking its absolute value.
These failures share a pattern: an implicit convenience is substituted for evidence. Diagnose the earliest boundary where the assumption entered, restore the source statement, make the convention or rule explicit, rerun every dependent derivative and supersede rather than overwrite the affected release.
Review questions
- Why is the dot product clamped before inverse cosine?
- What is the zero-dogleg limit of the ratio factor?
- How do East and North components depend on azimuth?
- Which golden cases expose angle-wrap and singularity bugs?
For every answer, identify the governing invariant, the evidence needed to evaluate it, the numerical or semantic policy involved and the correct behaviour when the condition fails.
Sources and further reading
- USGS Water-Resources Investigations Report 83-4275, documenting tangential and minimum-curvature borehole-survey calculations.
- Directional-calculation compendium, DOI 10.2118/84246-PA, a primary technical treatment of minimum-curvature geometry and related calculations.
- WITSML 2.0 trajectory data object, describing trajectory stations and measured directional observations.
- IEEE 754-2019 floating-point arithmetic, specifying floating-point formats, operations, rounding and exception behaviour.