Browse Source

Minor changes in Dyanic SNR name, Abs time removed from radar overlay (it was redundant)

refactor/sync-centralize
RUSHIL AMBARISH KADU 6 months ago
parent
commit
1b699018de
  1. 2
      steps/index.html
  2. 18
      steps/src/dom.js

2
steps/index.html

@ -259,7 +259,7 @@
<label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" id="toggle-ego-speed" <label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" id="toggle-ego-speed"
class="form-checkbox h-4 w-4 text-blue-600 rounded focus:ring-blue-500" checked /> Show Ego Speed</label> class="form-checkbox h-4 w-4 text-blue-600 rounded focus:ring-blue-500" checked /> Show Ego Speed</label>
<label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" id="toggle-frame-norm" <label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" id="toggle-frame-norm"
class="form-checkbox h-4 w-4 text-blue-600 rounded focus:ring-blue-500" /> Per-Frame SNR</label>
class="form-checkbox h-4 w-4 text-blue-600 rounded focus:ring-blue-500" checked /> Dynamic SNR</label>
<label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" id="toggle-debug-overlay" <label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" id="toggle-debug-overlay"
class="form-checkbox h-4 w-4 text-blue-600 rounded focus:ring-blue-500" /> Show Debug Info</label> class="form-checkbox h-4 w-4 text-blue-600 rounded focus:ring-blue-500" /> Show Debug Info</label>
<label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox" <label class="flex items-center gap-2 text-sm cursor-pointer"><input type="checkbox"

18
steps/src/dom.js

@ -225,7 +225,7 @@ export function updateDebugOverlay(currentMediaTime) {
// This function checks the state of the color toggles and returns the active mode. // This function checks the state of the color toggles and returns the active mode.
function getCurrentColorMode() { function getCurrentColorMode() {
if (toggleSnrColor.checked) return "Color by SNR (1)"; if (toggleSnrColor.checked) return "Color by SNR (1)";
if (toggleClusterColor.checked) return "Color by Cluster (2)";
if (toggleClusterColor.checked) return "Cluster Mode (2)";
if (toggleInlierColor.checked) return "Color by Inlier (3)"; if (toggleInlierColor.checked) return "Color by Inlier (3)";
if (toggleStationaryColor.checked) return "Color by Stationary (4)"; if (toggleStationaryColor.checked) return "Color by Stationary (4)";
return "Default"; // The default mode when no specific color toggle is checked return "Default"; // The default mode when no specific color toggle is checked
@ -249,7 +249,7 @@ export function updatePersistentOverlays(currentMediaTime) {
radarInfoOverlay.classList.remove("hidden"); radarInfoOverlay.classList.remove("hidden");
videoInfoOverlay.classList.remove("hidden"); videoInfoOverlay.classList.remove("hidden");
// --- Update Radar Overlay ---
// --- Update Radar Persistent Overlay ---
const currentRadarFrame = appState.vizData.radarFrames[appState.currentFrame]; const currentRadarFrame = appState.vizData.radarFrames[appState.currentFrame];
const frameData = appState.vizData.radarFrames[appState.currentFrame]; const frameData = appState.vizData.radarFrames[appState.currentFrame];
const motionState = frameData.motionState; const motionState = frameData.motionState;
@ -265,20 +265,14 @@ export function updatePersistentOverlays(currentMediaTime) {
radarInfoOverlay.innerHTML = ` radarInfoOverlay.innerHTML = `
Frame: ${appState.currentFrame + 1} Frame: ${appState.currentFrame + 1}
Motion State: ${motionState}
| Motion State: ${motionState}
| FPS: <b style="color: ${fpsColor};">${fps.toFixed(1)}</b> | FPS: <b style="color: ${fpsColor};">${fps.toFixed(1)}</b>
| Abs Time: ${formatUTCTime(absRadarTime)}
| Color Mode: <b>${colorMode}</b> | Color Mode: <b>${colorMode}</b>
| Drift: <b style="color: ${driftColor};">${driftMs.toFixed(
0
)}ms </b>
`;
| Drift: <b style="color: ${driftColor};">${driftMs.toFixed(0)}ms</b>`;
} }
// --- Update Video Overlay ---
const absVideoTime = new Date(
appState.videoStartDate.getTime() + currentMediaTime * 1000
);
// --- Update Video Persistent Overlay ---
const absVideoTime = new Date(appState.videoStartDate.getTime() + currentMediaTime * 1000);
const videoFrame = Math.floor(currentMediaTime * VIDEO_FPS); const videoFrame = Math.floor(currentMediaTime * VIDEO_FPS);
let timeDisplay = `Elapsed Time: ${currentMediaTime.toFixed(2)}s`; let timeDisplay = `Elapsed Time: ${currentMediaTime.toFixed(2)}s`;

Loading…
Cancel
Save