export interface UseIMUTranslationGateOptions { /** * Whether the gate is engaged. Pass `false` to skip the * subscription entirely — useful when the host is in AR mode * (where the gate gets pose-derived translation natively). * Hot-toggleable; subscribing/unsubscribing is cheap. */ enabled: boolean; /** * Translation budget in METRES along the device-X (pan) axis. * * Callers in `` pass `panoramaSettings.flowMaxTranslationCm / 100.0`, * whose default is **50 cm** (`PanoramaSettings.ts` `maxTranslationCm: 50`). * * DO NOT CONFUSE THIS WITH `lateralBudgetCm` (default 8 cm). They measure * orthogonal axes and drive different actions: * - this one — ALONG-pan translation -> forces a keyframe accept * - lateral — CROSS-pan drift -> STOPS the capture * Earlier revisions of this comment claimed both "0.40 m / 40 cm" and * "default 8 cm" in the same breath; both were wrong and they contradicted * each other. A 2026-08-26 device session peaked at 2.39 cm of measured * cross-pan drift, i.e. ~20x below this budget, so at the real default this * gate effectively never fires on hand-held capture. */ budgetMeters?: number; /** * Update interval in MILLISECONDS for the accelerometer. * Default 20 ms ≈ 50 Hz. Lower = more accurate integration; * higher = lower CPU + battery. */ sampleIntervalMs?: number; /** * Fired exactly once per "budget crossing" — i.e., when the * running translation along device-X crosses `budgetMeters` from * below. The host is responsible for both (a) calling * `IncrementalStitcher.markNextFrameAsLastKeyframe()` to force- * accept the next frame, and (b) invoking the returned * `resetAnchor()` once that next keyframe actually accepts, so * the integrator restarts from zero. */ onBudgetExceeded: () => void; } export interface UseIMUTranslationGateReturn { /** * Reset the position + velocity integrators to zero AND clear the * "already fired" latch so `onBudgetExceeded` can fire again. * The gravity IIR estimate is intentionally preserved — it * benefits from continuous history across anchors. */ resetAnchor: () => void; /** * 2026-05-22 (audit follow-up) — read the latest integrated * translation magnitude in METRES. Useful for debug overlays * that want to surface "how much translation has the operator * accumulated since the last keyframe accept" so they can sanity- * check whether the budget is going to fire. Cheap: returns the * ref value, no React state subscription (the integrator runs at * 50 Hz and we don't want to force a re-render every sample). * Callers that want a live UI value should poll on an interval * or use a frame-driven re-render trigger. */ getTranslationMetres: () => number; /** * 2026-05-22 (audit F2f) — cumulative |segment displacement| * across the entire capture, in METRES. Includes: * (a) magnitudes banked at every prior anchor reset (whether * triggered by IMU budget auto-rearm or by host-side * resetAnchor on a non-IMU frame accept), PLUS * (b) the magnitude of the current (unfinished) segment. * * This is the right input for the stitchMode auto-resolver in * non-AR mode — it captures total operator travel regardless of * which gate accepted intermediate frames. Resets to 0 only on * subscription start (new capture). */ getTotalAbsMetres: () => number; } export declare function useIMUTranslationGate({ enabled, budgetMeters, sampleIntervalMs, onBudgetExceeded, }: UseIMUTranslationGateOptions): UseIMUTranslationGateReturn; //# sourceMappingURL=useIMUTranslationGate.d.ts.map