Skip to content

FilterReview: show estimated post-filter after recalculating filters - #375

Open
j-w9 wants to merge 4 commits into
ArduPilot:mainfrom
j-w9:filter-review-estimate-prompt
Open

j-w9 wants to merge 4 commits into
ArduPilot:mainfrom
j-w9:filter-review-estimate-prompt

Conversation

@j-w9

@j-w9 j-w9 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

"Prompt to select estimated post filter if not shown and filter param change is done" from #10.

After recalculating filters, the estimated post-filter is shown if no estimate is shown yet:

  • if an estimate is already shown, nothing changes
  • otherwise, only for gyros with some pre-filter shown, the estimate is shown for each axis whose logged post-filter line is shown
  • if no post-filter line is shown for those gyros, all their axes are shown

This runs on Recalculate filters, on loading a param file and on changing the filter version, all of which change the estimate. Loading a log doesn't change what is shown.

Checked on a batch log: estimates mirror the shown post-filter axes after a recalculate, a manually chosen estimate is left alone, all axes are shown when no post-filter is selected, and gyros with no pre-filter shown are left alone.

@tridge tridge added the AIReview label Nov 9, 2026
@AP-Review

AP-Review commented Nov 9, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-09)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head e50cb8fb16.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/375/1.html#prWebTools-375

The Show estimated hint works as intended for the Recalculate filters button; three small nonblocking follow-ups remain.

Suggestions

  • FilterReview/FilterReview.js:1883: only the Recalculate filters button updates the hint. Load Parameters (load_parameters() calls re_calc() directly and leaves Recalculate disabled) and the filter-version radios recompute the estimate without ever showing it. Route them through recalculate_filters() too.
Minor (2)
  • FilterReview/FilterReview.js:1850: load() enables PostEst for every sensor once any sensor has pre-filter data. With a pre-only gyro and a post-only primary gyro, Show estimated ticks only the empty post-only estimates and the hint disappears with nothing drawn. Skipping checkboxes whose batch has no FFT.H would fix it.
  • FilterReview/FilterReview.js:1878: show_estimated() calls update_hidden() per checkbox, so the fallback redraws the FFT plot up to 9 times. Set each trace's visibility, then redraw once, as the legend path does.

Show the hint after loading parameters or changing filter version too,
only offer estimates for gyros with pre-filter data, and redraw once
when showing them.
@AP-Review

AP-Review commented Nov 9, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-09)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head 6aa6b1d026.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/375/2.html#prWebTools-375

No remaining issues found at head 6aa6b1d: the Show estimated hint works for Recalculate filters, Load Parameters and the filter-version radios.

Since the last review (at e50cb8f), all three earlier suggestions are fixed. Load Parameters and the version radios now go through recalculate_filters(). Show estimated skips gyros without pre-filter data. The plot redraws once instead of once per checkbox.

@IamPete1

Copy link
Copy Markdown
Member

How do you feel about just automatically showing the estimated after recalculate is hit? If there is already a estimated selected then don't change anything. If there is no estimated then mirror the axis that the user has selected with the logged post filter. If there are none selected at the end then just show all.

Rather than prompting, recalculating filters shows the estimated post-filter
if none is shown: for the axes the logged post-filter is shown for, or all
if that is none.
@j-w9 j-w9 changed the title FilterReview: prompt to show estimated post-filter after recalculating filters FilterReview: show estimated post-filter after recalculating filters Nov 19, 2026
@j-w9

j-w9 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Done, it now shows the estimate automatically after recalculating: nothing changes if one is already shown, otherwise it mirrors the shown post-filter axes, or shows all if none are.

@AP-Review

AP-Review commented Nov 20, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-20)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head 3bf09a86e4.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/375/3.html#prWebTools-375

No issues found at head 3bf09a8: the estimated post-filter now shows automatically after Recalculate filters, Load Parameters and the filter-version radios, as IamPete1 asked.

Since the last review (at 6aa6b1d), the Show estimated hint has been replaced by automatic display. An estimate that is already shown is left alone; otherwise the estimate mirrors the logged post-filter axes, or shows all of them. The three earlier fixes still hold.

@IamPete1 IamPete1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only enable stuff if there is some pre-filter selected for the IMU. Currently it turns on the other two IMUs too.

image

@j-w9

j-w9 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

fixed, it only turns on the estimate for IMUs with some pre-filter selected now

@AP-Review

Copy link
Copy Markdown

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head a2ee02d22c.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/375/4.html#prWebTools-375

No issues found at head a2ee02d: the estimated post-filter still shows automatically after Recalculate filters, Load Parameters and the filter-version radios, and an estimate that is already shown is left alone.

Since the last review (at 3bf09a8), show_estimated() only turns on estimates for IMUs that have some pre-filter shown, so the other IMUs IamPete1 saw switched on now stay off.

The previous review's "no issues" call at 3bf09a8 missed that case; it is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants