MP: peer accel/decel "snap" MEASURED ~0.64u (not ~2.9u) -- effectively resolved (task #50)
Went after the flagged ~2.9u peer-motion snap. Added a BT_SNAPLOG diagnostic
(mech4.cpp: logs the re-anchor drift eMag = |authority - dead-reckon| absorbed per
frame) and ran a controlled accel/decel soak: node B BT_AUTODRIVE + BT_DRIVE_SWEEP0
sweeping the throttle through STOP, node A observing, affinity-pinned.
Result: peer drift maxes at ~0.64u (median 0.54u, 18 events >0.5u over 48s), gently
absorbed at k~0.24/frame -- SUB-UNIT, at the noise floor. The ~2.9u figure was stale:
it predated the peer body-channel swap (96a896a, which put the peer on the same
channel the master's mirror predicts) AND was measured without the CPU-affinity fix
(packet-jitter-sparse records inflate the drift). The old "run the master mirror on a
leg-channel prediction" plan is moot now the peer is on the body channel.
No motion-code change -- just the measurement + the BT_SNAPLOG diagnostic (retained).
KB (multiplayer.md, open-questions.md) corrected to the measured value. checkctx CLEAN.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
bc4d6e5597
commit
3224009dc1
@@ -2207,6 +2207,13 @@ void
|
||||
const float eMag = (float)rmErr.Length();
|
||||
float k = 0.15f + eMag * 0.15f; // error-proportional catch-up
|
||||
if (k > 0.6f) k = 0.6f;
|
||||
// DIAG (BT_SNAPLOG, task #50): the peer drift = |authority - dead-reckon|
|
||||
// absorbed this frame -- the "snap" magnitude. Log > 0.5u so an accel/decel
|
||||
// soak (BT_DRIVE_SWEEP0) measures the residual.
|
||||
static const int s_snapLog = getenv("BT_SNAPLOG") ? 1 : 0;
|
||||
if (s_snapLog && eMag > 0.5f)
|
||||
DEBUG_STREAM << "[snap] drift=" << eMag << " k=" << k
|
||||
<< " legAdv=" << replLegAdv << "\n" << std::flush;
|
||||
// AT-REST snap (user "gliding stops"): when the legs have wound down
|
||||
// (replLegAdv ~0), gliding the body to absorb the residual offset is
|
||||
// VISIBLE because no leg motion masks it. With the feet planted a
|
||||
|
||||
Reference in New Issue
Block a user