From 2660bb35177a0898f87810849b8d46c389532dc0 Mon Sep 17 00:00:00 2001 From: jessikitty Date: Wed, 8 Jul 2026 20:24:50 +1000 Subject: [PATCH] Confirm tilts --- public/exhibit.html | 2 +- public/orient-debug.html | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/public/exhibit.html b/public/exhibit.html index 2606dbc..28af26a 100644 --- a/public/exhibit.html +++ b/public/exhibit.html @@ -97,6 +97,6 @@ } } - + diff --git a/public/orient-debug.html b/public/orient-debug.html index bb1bc10..fa149a0 100644 --- a/public/orient-debug.html +++ b/public/orient-debug.html @@ -146,13 +146,14 @@ const pose = posit.pose(centredCorners(m, grab.width, grab.height)); if (!pose) return null; const R = pose.bestRotation, t = pose.bestTranslation; + // NEW conversion (matches exhibit.js fix): rotation as-is, flip only + // translation Y and Z. Preserves correct orientation. poseMatrix.set( - R[0][0], R[0][1], R[0][2], t[0], - R[1][0], R[1][1], R[1][2], t[1], - R[2][0], R[2][1], R[2][2], t[2], + R[0][0], R[0][1], R[0][2], t[0], + R[1][0], R[1][1], R[1][2], -t[1], + R[2][0], R[2][1], R[2][2], -t[2], 0, 0, 0, 1 ); - poseMatrix.premultiply(flip); // F*M (ar-head convention) anchor.matrix.copy(poseMatrix); anchor.matrixWorldNeedsUpdate = true; @@ -258,7 +259,7 @@ function buildLog() { const L = []; L.push('=== NEWBURY ORIENTATION LOG ==='); - L.push('conversion: F*M (premultiply flip) marker:' + MARKER_SIZE_MM + 'mm cam:' + grab.width + 'x' + grab.height); + L.push('conversion: NEW (rotation as-is, flip translation Y/Z) marker:' + MARKER_SIZE_MM + 'mm cam:' + grab.width + 'x' + grab.height); L.push('cols: t,id,dist, RAW(pitch,roll,yaw), RENDER(pitch,roll,yaw), GYRO(beta,gamma,alpha)'); L.push('gyro beta=front/back tilt, gamma=left/right tilt, alpha=compass'); L.push('samples:' + log.length);