Repository navigation
Add DockKind architecture and a g-g friction circle dock - #22
Merged
Merged
Conversation
0x0Anna
force-pushed
the
gg-friction-circle
branch
from
September 16, 2026 02:02
bd5f7cb to
301d1f2
Compare
Introduces graph::DockKind so a worksheet dock can render something other than a per-channel time-series line graph, kept as a vector parallel to AppState::dock_channels in main.rs so every existing index-based dock-list operation (reorder, merge, remove) stays Vec<Vec<String>>-only and unaware dock kinds exist. Builds the g-g friction circle as the first consumer of that seam: a new "Add g-g circle dock" button resolves lateral/longitudinal g-force channels (ACR/ACC's g_force_x/y, iRacing's LatAccel/LongAccel, deliberately excluding RBR/NGP's buggy vecLinearAccelerationCar.* — see LAT_G_CANDIDATES' doc comment), converts to g, and plots an equal-scale scatter with a 1g reference circle. Claude-Session: https://claude.ai/code/session_019DvUhHPz4qmusxqSDqagLd
0x0Anna
force-pushed
the
gg-friction-circle
branch
from
September 16, 2026 02:35
301d1f2 to
79a1dab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graph::DockKind(TimeSeries/GgCircle { lat_channel, long_channel }), kept as a vector parallel toAppState::dock_channelsinmain.rs(lockstep helpers for reorder/merge/remove) so the existing pure, index-based dock-list functions ingraph.rsstay untouched.g_force_x/g_force_y, iRacingLatAccel/LongAccel; deliberately excludes RBR/NGP'svecLinearAccelerationCar.*, which real-capture investigation found reads implausible ~3000-magnitude values), converts to g, and renders an equal-scale scatter with a 1g reference circle (fit: contain, notfill, so the circle can't stretch into an ellipse).DockPanelbranches onkind: the g-g branch has no cursor-drag/scroll-zoom wiring, since a friction circle has no meaningful shared linear cursor fraction.Part 2+3 of the graph value display + g-g friction circle plan, combined into one PR since Part 2 (the
DockKindseam) has no independent user-facing value on its own.Test plan
cargo test --workspace(includes a regression test against the real iRacing.ibtfixture'sLatAccel/LongAccel, bounding converted values to catch a raw-unit bug like RBR/NGP's)cargo build -p sde-appcargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningssde-app.exewithSLINT_BACKEND=winit-software, loaded a real ACR/ACC.ldcapture, resolvedg_force_x/g_force_y, created a g-g circle dock and confirmed it renders an aspect-correct scatter (that capture's one ~55g outlier — a data artifact in the recording, not this code — shrinks the 1g reference circle to sub-pixel; the real-fixture unit test independently confirms the scaling math against iRacing's more reasonable ~15g spike).Follow-up (not implemented this pass)
GPS/position track map and heading/yaw polar rose, both noted as follow-ups reusing this
DockKindgroundwork in the original plan.