Skip to content

feat(viz): reset correlation-curtain baseline on Shift+T entry#99

Open
MikePehel wants to merge 1 commit into
PX4:mainfrom
MikePehel:fix/curtain-baseline-reset
Open

feat(viz): reset correlation-curtain baseline on Shift+T entry#99
MikePehel wants to merge 1 commit into
PX4:mainfrom
MikePehel:fix/curtain-baseline-reset

Conversation

@MikePehel

Copy link
Copy Markdown
Contributor

What

When entering correlation curtain mode (Shift+T), each vehicle's trail_count is snapshotted as a baseline; the ruled surface only spans samples added since that baseline.

Why

Previously, toggling curtain mid-flight dragged the entire accumulated trail through the surface. Now it starts empty from "now" and grows forward — what you want when inspecting correlation from a point in time.

Changes

  • src/main.c — per-vehicle curtain_baseline[] snapshot on transition into curtain mode
  • src/vehicle.c / .hvehicle_draw_correlation_curtain takes baseline_a/baseline_b, clips to the post-baseline window (ring-buffer aware); pass 0/0 for legacy full-trail
  • src/ortho_panel.c / .h — thread baseline through to the render call

Trails / ribbons unaffected. Falls back to full trail once the live trail rolls past the baseline by more than the ring length.

Test

  • Enter curtain mid-flight → surface starts from now, not the whole trail
  • Trails/ribbons unchanged by the toggle
  • Verified on a 7-drone swarm replay

… entry

Correlation curtain clips to samples added since the baseline taken when
curtain mode is entered, so toggling mid-flight starts the ruled surface
from now instead of dragging the full accumulated trail through it.
Trails/ribbons unaffected. Pass 0/0 for legacy full-trail behavior.
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