Skip to content

Battlefield: the last picture moves with the camera (steps 2 and 3); main camera parked high - #129

Open
ptescher wants to merge 5 commits into
battlefield-latency-6from
battlefield-latency-7
Open

ptescher wants to merge 5 commits into
battlefield-latency-6from
battlefield-latency-7

Conversation

@ptescher

Copy link
Copy Markdown
Owner

Stacked on #127. Steps 2 and 3 of plans/battlefield-latency.md, chosen after the frame-time experiment showed the 3D view cannot make a picture younger than about 80 ms (#95).

What changes

  • The picture moves with the camera (step 3). The app asks for a picture with a margin (10 % each side, 8 % above, 35 % below) and draws it as the camera now sees the flat ground, in 64 bands, each the picture moved and scaled (teleoperation_battlefield::warp). The map is drawn with the camera now, so a pan or a zoom shows in the same frame. A turn keeps the picture's heading until its own picture comes.
  • A picture is drawn when it comes (step 2). Battlefield::arrivals wakes the window. While the camera moves, the commander app moves it and draws on animation frames instead of the 33 ms timer.
  • The view's main camera is parked 10 km up with --hidden, so its shadow cascades hold no trees (−6 ms a frame in the experiment). The grass stays where the camera stood (ParkedFrom).
  • Measure: a new figure, the lag of the battlefield as drawn. A fix: a motion with none of its pictures on screen read as 0 ms late.

Tests

  • New expectation «The valley moves with the camera» (at most 20 ms): red at 429 ms before the warp, green at 0 ms after it.
  • The 7 battlefield camera expectations pass. «The picture keeps up with the camera» stays pending, now on a 5 s pan of its own: the harness skips every plan that shares an event with a pending expectation.
  • Unit tests for the warp: at rest within 0.5 px; after 0.15 s of a full-speed pan or a wheel step, within 1 px; the margin covers the battlefield.
  • Unit tests for the park, the grass centre, Rig::moving and a picture waking the window.
  • cargo clippy --workspace --all-targets is clean.

Not done

  • Not yet seen on screen: whether hills visibly slide during pans, and the app's draw rate on animation frames.
  • The console (ground station) still draws the picture unmoved.

🤖 Generated with Claude Code

ptescher and others added 5 commits November 13, 2026 22:53
…tood

In #127 the hidden main camera was parked looking up from where it stood,
among the trees, so its shadow cascades still held them: 6 ms a frame.
Now it is 10 km above that spot. The grass is streamed round where it
stood (ParkedFrom), so the drones' cameras near it still see it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as it is long

It read as 0 ms, so a pan with no picture on screen passed a limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While you pan or zoom, the battlefield (the picture and the map on it)
is drawn from the camera now: the lag of the battlefield's motion is at
most 20 ms. The picture's own age keeps its pending expectation, on a
5 s pan of its own: the harness skips every plan that shares an event
with a pending expectation.

Red before the warp: drawn 429 ms behind the camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn when it comes

- warp: the app asks for a picture with a margin (most of it below) and
  draws it as the camera now sees the flat ground, in 64 bands, each the
  picture moved and scaled under a content mask. A turn keeps the
  picture's heading until its picture comes.
- link: Battlefield::arrivals wakes the window when a picture comes; the
  measure of the battlefield as drawn (drawn_motion).
- camera: Rig::moving; while the camera moves, the commander app moves
  it and draws on animation frames.
- The driver observes the lag of the battlefield's motion, and pans for
  5 s as well as 3.

Green: «The valley moves with the camera» 0 ms (was 429 ms).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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