Skip to content

longTauGnssCoupling: engine wiring for the coast-cap (--coast-cap, default off)#85

Closed
bobvan wants to merge 1 commit into
bravo/longtau-coast-cap-wiringfrom
bravo/longtau-coast-cap-engine
Closed

longTauGnssCoupling: engine wiring for the coast-cap (--coast-cap, default off)#85
bobvan wants to merge 1 commit into
bravo/longtau-coast-cap-wiringfrom
bravo/longtau-coast-cap-engine

Conversation

@bobvan
Copy link
Copy Markdown
Owner

@bobvan bobvan commented May 29, 2026

Summary

Feeds the scheduler-side coast-cap (#84) with real inputs so the adaptive coast is bounded by the DO's stochastic wander on hardware — the tau~64–256 s hump fix end-to-end. Behind --coast-cap, default off.

Stacked on #84 (scheduler API). Runtime-depends on #83 (honest Q[3,3]) for the p22 path.

Three parts:

  • do_state.derive_coast_tdev_from_char — log-log power-law fit of the DO's characterized freerun TDEV curve (tdev_ns_by_tau_s) → (tdev_ref_ns, tdev_slope, 1.0) for coast_cap_from_tdev.
  • DOFreqEst.project_p22_coast(max_tau) — predict-only P[2,2] over the coast as a precomputed table (one O(max_tau) projection/epoch; the coast_cap_from_p22 closure looks it up — addresses Charlie's perf nit). Honest only with Q-from-char (qFromCharPerActuator: derive Q[3,3] (sigma_do_freq) from char ADEV #83).
  • engine — when --coast-cap: derive coast_tdev from the DO char → DisciplineScheduler ctor; each epoch build the p22_at_tau closure from project_p22_coast and pass it to compute_adaptive_interval. --coast-cap-k-sigma sets the confidence factor.

Scope

  • Wires the coast-cap (tdev + p22). The graded taper (distance_to_lock) is deferred to the disciplineModeFsm work, which defines the convergence metric + thresholds.
  • Only the main DOFreqEst servo path; the CM_TDC path is unchanged.
  • Default-off / byte-identical when --coast-cap absent.

Test plan

  • 11 new tests (TDEV power-law fit incl. WFM/RWFM/skips/source-preference; project_p22_coast quadratic-from-constant-freq, RWFM super-linear, length/index0/zero-τ). Full suite 1428 passed. Both flags verified in --help.
  • closedLoopServoSim A/B (Charlie) on honest Q[3,3] (qFromCharPerActuator: derive Q[3,3] (sigma_do_freq) from char ADEV #83): --coast-cap on vs off — confirm the tau~64–256 s hump drops and the >60 s coast no longer diverges.
  • Lab A/B on PiFace/clkPoC3 (have freerun chars) after the sim validates (Main coordinates).

Merge order: #83 + #80#84 → this → sim A/B → lab.

🤖 Generated with Claude Code

…fault off)

Feeds the scheduler-side coast-cap (PR #84) with real inputs so the
adaptive coast is bounded by the DO's STOCHASTIC wander on hardware,
targeting the tau~64-256s long-tau hump.

Three parts:
 - do_state.derive_coast_tdev_from_char: log-log power-law fit of the
   DO's characterized freerun TDEV curve (tdev_ns_by_tau_s) ->
   (tdev_ref_ns, tdev_slope, 1.0) for coast_cap_from_tdev.
 - DOFreqEst.project_p22_coast(max_tau): predict-only P[2,2] over the
   coast (one O(max_tau) projection/epoch, precomputed table -> the
   coast_cap_from_p22 closure looks it up; addresses charlie's perf
   nit).  Honest only with Q-from-char (PR #83).
 - engine: when --coast-cap, derive coast_tdev from the DO char ->
   DisciplineScheduler ctor; each epoch build the p22_at_tau closure
   from project_p22_coast and pass it to compute_adaptive_interval.
   --coast-cap-k-sigma sets the confidence factor.

Scope: wires the COAST-CAP (tdev + p22).  The graded taper
(distance_to_lock) is left for the disciplineModeFsm work, which
defines the convergence metric + thresholds.  Only the main DOFreqEst
servo path is wired; the CM_TDC path is unchanged.

DEFAULT-OFF: --coast-cap absent -> coast_tdev=None + no per-call args
-> compute_adaptive_interval byte-identical to today.  Validate in
closedLoopServoSim before enabling on hardware.

11 new tests (TDEV power-law fit incl WFM/RWFM/skips/source-pref;
project_p22_coast quadratic-from-constant-freq, RWFM super-linear,
length/index0/zero-tau).  Full suite 1428 pass.  Both flags verified
in --help.

Stacked on PR #84 (scheduler wiring); runtime-depends on PR #83
(honest Q[3,3]) for the p22 path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bobvan
Copy link
Copy Markdown
Owner Author

bobvan commented May 29, 2026

Superseded by #86 (longTau stack squashed into one PR per Bob, 2026-05-29). Engine wiring is included there. Closing tip-first to avoid the stacked-PR auto-close gotcha.

@bobvan bobvan closed this May 29, 2026
@bobvan bobvan deleted the bravo/longtau-coast-cap-engine branch May 29, 2026 19:53
bobvan added a commit that referenced this pull request May 29, 2026
… + engine) (#86)

Squash of the reviewed #80/#84/#85 stack. coast-cap bounds the adaptive coast by the DO's stochastic wander (targets the tau~64-256s hump); --coast-cap default off. Main: APPROVE. p22 cap honest only on Q-from-char (#83).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant