feat(units): typed angular Δt helpers (MulDt/DivDt) #38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "patman/uom-angular-helpers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this does
Adds typed angular Δt helpers so the rotary derivative chain composes cleanly in the
dimcurrency.uom tags angular quantities with
AngleKind, which the bare*//operators drop — soAngle / Timedoes not directly yieldAngularVelocityand every step of the angular jerk→accel→vel→pos chain otherwise needs a hand-written.into()(documented in #37). This PR wraps that:MulDt::mul_dt— integrate one step up:AngularJerk → AngularAcceleration → AngularVelocity → Angle.DivDt::div_dt— differentiate one step down:Angle → AngularVelocity → AngularAcceleration → AngularJerk.Extension traits on the
dimcurrency types, each encapsulating the.into(). These are the per-step building blocks the jerk-constant motion integrator composes. World/base frame, per project convention.Stack position
PR 3 of 3, based on #37 (uom two-layer integration). #37 is based on #36 (wait-timeout fix). Merge order: #36 → #37 → #38.
Verification
buck2 test //common:common-tests→ 89 passed (3 new: one-step integrate, one-step differentiate, and a full jerk→angle→jerk round-trip).Review focus
(self * dt).into()/(self / dt).into()bodies — confirm theAngleKindre-application is correct for each step and theOutputassociated types match the derivative chain.mul_dt/div_dtare the right surface, or you want named per-pair methods.