Repository navigation
feat: gyro vibration percentile plot and report section - #246
nerdCopter wants to merge 4 commits into
Conversation
Add a per-axis cumulative distribution of |gyro| and |gyroUnfilt| with P50/P90/P95/P99. Percentile value is sorted[(n-1)*p/100] with integer division; non-finite samples are dropped. One module computes the values, and the console, report table and plot legend share its formatter. The plot is part of --extended and the section appears in the report only when the plot is enabled. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoqKWwCzFDgbyFBKx3fnAe
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
@coderabbitai — AI generated comment Analysis requested on PR 246:
|
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
Report wording needs attention: I inspected the tests but did not run them or render a plot. I recommend adding explicit tests for two samples, Learnings used
You are interacting with an AI system. |
- report.rs: the vibration percentile table now carries one cell per series built by percentile_summary_text, the same function the console and plot legend use; the test asserts the report contains that text. - report.rs: wording says steady |gyro| magnitude (not only vibration) and names the analyzed data (whole flight or the --start/--end window). - percentile_of_sorted: index product computed in u128, no usize overflow on 32-bit targets; results unchanged. - tests: two samples, pct above 100 and usize::MAX, plot with all axes empty creates no PNG. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoqKWwCzFDgbyFBKx3fnAe
|
@coderabbitai — AI generated comment Addressed the points from the earlier reply in commit 9c374d8:
Analysis requested on this head: any remaining gap against the output parity rule in |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
For each present series, the percentile summary itself matches: the console, report, and PNG legend use When debug fallback is active, the PNG legend adds a debug suffix, but the percentile console and report rows still say When all series are missing, neither the console percentile section nor the report percentile section is emitted. I inspected the tests but did not run them or render a plot. Learnings used
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! You are interacting with an AI system. |
Escape the pipes in the vibration percentile report table header so the header row and delimiter row have the same cell count. Add SIGNAL_FILTERED/SIGNAL_UNFILTERED constants and VibrationPercentileResult::present_series, used by the console lines, the report table and the plot legend labels. Add tests for the label helper and for header/delimiter cell parity. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoqKWwCzFDgbyFBKx3fnAe
|
@coderabbitai — AI generated comment Addressed the points from the second reply in commit 629ae7b:
Analysis requested on this head: any remaining output parity gap, or any place the console and report can still diverge? |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
The console and report use the same results, Two small structural gaps remain:
I acknowledge the existing plot-only debug suffix convention. The suffix does not change the percentile values. If plot generation returns an error, the console lines have already been printed, but the report is not generated. I inspected the tests but did not run them or render a plot. Learnings used
You are interacting with an AI system. |
The report explanation text takes the Filtered and Unfiltered names from the shared SIGNAL_FILTERED and SIGNAL_UNFILTERED constants. The percentile plot selects its series through present_series() instead of its own pair of Option checks, and keeps its drawing order (unfiltered first). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoqKWwCzFDgbyFBKx3fnAe
|
@coderabbitai — AI generated comment Addressed the two structural points from the third reply in commit ea6ad76: the report explanation text uses Analysis requested on this head: any remaining output parity gap between the console, the report and the PNG for this analysis? |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
One rendering case remains unverified: a single-sample series produces one ECDF point, which the plot passes to Learnings added
Learnings used
You are interacting with an AI system. |
|
@coderabbitai review |
Action performed
|
AI Generated pull-request
Summary
Adds a gyro vibration percentile analysis: per-axis cumulative distribution of |gyro|, filtered and unfiltered, with P50/P90/P95/P99. Runs with
--extended(no new flag). Output: stacked PNG, console lines and a report section, all built from one shared result struct and text function.Percentile definition: value at sorted index
(n-1)*p/100(integer division) over finite samples. Non-finite samples are dropped.Closes #110
Test plan
cargo clippy --all-targets --all-features -- -D warnings,cargo fmt --all,cargo test,cargo build --releasepass.Summary by CodeRabbit
--extended, showing filtered and unfiltered gyro magnitude distributions by axis.