Commit 18be472c authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: fake previous pose for the seed scene - real finite-difference rates (MB+ERS) for scene 0

Backward step from the first two known stored poses (prev_pose/prev_ts
pre-initialized before the loop; the in-loop rate code is untouched): the
seed scene's rate becomes exactly (stored[next]-stored[first])/dt instead
of the zero-rate special case that left scene 0 with mb=(0,0) and the
uncompensated v*tau bias. Using a difference of actual poses avoids any
hand-derived rotation rate and its sign-convention risk. In RT production
the continuous stream always has a real previous frame; this seam also
covers stream (re)starts, where the nominal-rotation config can feed the
same prev_pose/prev_ts initialization. Deliberate consequence: the next
full-sequence run is NOT digit-identical to the 07/13 baseline in scene 0
(expected equal or better - the seed previously carried the v*tau bias).
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 88bd939a
......@@ -1054,6 +1054,41 @@ public class CuasPoseRT {
int num_cmp = 0;
double prev_ts = Double.NaN;
double [][] prev_pose = null;
// FAKE PREVIOUS pose for the seed scene (Andrey 07/13/2026): step BACK from the
// first two known stored poses so scene 0 gets real finite-difference rates
// (uniform MB + ERS) like every other scene, instead of the zero-rate special
// case (mb=(0,0) left the seed fit carrying the uncompensated v*tau bias).
// Backward difference of two ACTUAL poses - no hand-derived rotation rate, no
// sign-convention risk. In RT production a continuous stream always has a real
// previous frame; this covers batch runs and stream (re)starts, where the
// nominal-rotation config can feed the same prev_pose/prev_ts seam.
// Note: changes ONLY the seed scene's rates -> the next full-sequence run is
// deliberately NOT digit-identical to the 07/13 baseline in scene 0.
// By Claude on 07/13/2026, from Andrey's design.
if (stored[earliest] != null) {
final double ts0 = Double.parseDouble(quadCLTs[earliest].getImageName().replace("_", "."));
for (int ns2 = earliest + 1; ns2 < quadCLTs.length; ns2++) {
if ((quadCLTs[ns2] == null) || (stored[ns2] == null)) continue;
final double ts2 = Double.parseDouble(quadCLTs[ns2].getImageName().replace("_", "."));
if (!(ts2 > ts0)) break; // non-monotonic names - keep the legacy zero-rate seed
prev_ts = ts0 - (ts2 - ts0);
prev_pose = new double [][] {predicted[0].clone(), new double [3]};
for (int j = 0; j < 3; j++) { // rate at the seed = exactly (stored[ns2]-stored[earliest])/(ts2-ts0)
prev_pose[1][j] = predicted[1][j] - (stored[ns2][1][j] - stored[earliest][1][j]);
}
if (debugLevel > -4) {
System.out.println(String.format(
"CuasPoseRT.testPoseSequence(): FAKE previous for seed scene %s from stored poses"+
" %s/%s: atr_dt=(%.4g, %.4g, %.4g) rad/s",
quadCLTs[earliest].getImageName(), quadCLTs[earliest].getImageName(),
quadCLTs[ns2].getImageName(),
(stored[ns2][1][0] - stored[earliest][1][0]) / (ts2 - ts0),
(stored[ns2][1][1] - stored[earliest][1][1]) / (ts2 - ts0),
(stored[ns2][1][2] - stored[earliest][1][2]) / (ts2 - ts0)));
}
break;
}
}
for (int nscene = earliest; nscene < quadCLTs.length; nscene++) {
if (quadCLTs[nscene] == null) continue;
final String ts_name = quadCLTs[nscene].getImageName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment