Repository navigation
Conversation
ArduPilot now supports a third harmonic notch, and a fourth on some boards (ArduPilot/ardupilot#30246). Add INS_HNTC3_* and INS_HNTC4_* to the notch parameters, their filters and plot tracking lines, and the logged notch frequencies for notches 3 and 4. The third and fourth notch inputs and show options are only shown if the log, or a loaded parameter file, has those parameters. Fixes ArduPilot#252
Previous review (2026-11-09)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Notch 3/4 support in FilterReview itself checks out: plot indexing, show/hide, reset and logged notch tracking all behaved correctly. Two nonblocking issues remain. Should fix
Minor (1)
|
… them Reloading a saved file would otherwise show the notch 3 and 4 panels with them disabled.
|
Save now skips notch 3 and 4 when the firmware doesn't have them. On the Filter Tool link: Filter Tool only has two notches, which the description mentions. I'd rather add notches 3 and 4 to Filter Tool in its own PR than grow this one. Happy to do that next if you want it. |
Filter Tool only has two harmonic notches.
Previous review (2026-11-09)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head FilterReview's four-notch support looks good at fddc708. One minor issue remains. Both earlier points are fixed. Saving now skips notches 3/4 when the firmware lacks them, and Open in filter tool warns about notches it can't pass on. Doing Filter Tool notch 3/4 support in its own PR is fine. Minor (1)
|
A popup blocker can stop the window opening if the alert is left open.
Previous review (2026-11-09)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head FilterReview's four-notch support looks good at c27ac68, with one minor issue. Since the last review, Open in filter tool now opens the Filter Tool tab before showing the notch 3/4 warning, so a slow-to-dismiss alert can no longer trip the popup blocker. Minor (1)
|
…s enabled Notches 3 and 4 are reset to MODE 1 when the firmware lacks them, and logs with no throttle source alerted for each on every calculate.
Previous review (2026-11-09)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head FilterReview's four-notch support looks good at c77f32f, with no open issues. Since the last review at c27ac68, the head moved to c77f32f, which fixes the earlier Minor: FilterReview/FilterReview.js:184 now only shows "Unsupported notch mode" for an enabled notch, so the hidden notches 3/4 no longer alert on logs without throttle data. |
|
The new params should be shown all the time. This is because you can use a old log to setup new filters, this saves people re-doing the filter logging every time we add a new filter feature. We track this in the filter version at the top, users can select a filter version ahead of the version in the log. I'm not sure exactly when the extra params were added to AP, I guess between versions 1 and 2. Because this will result in mostly showing all boxes only the enable params should be show unless the notch is enabled. Because there in rows you could show all the notch params for notch 3 and 4 if either 3 or 4 is enabled. |
An old log can be used to set up filters the firmware has gained since, so the third and fourth notches are always shown. Only their enable params are shown unless either is enabled, then all params of both are shown as they sit side by side. Their params are saved if the log has them or they are enabled.
|
Done. Notches 3 and 4 are always shown now, just the enable params until either is enabled, then all params for both. I didn't tie it to the filter version as I'm not sure which version added them either. Saving only skips them if the log doesn't have them and they're not enabled. |
Previous review (2026-11-19)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head FilterReview's four-notch support still looks good at 126e8f7, with no open issues. Since the last review at c77f32f, notches 3 and 4 are always shown as asked: only their enable params until either is enabled, then all params for both (FilterReview/FilterReview.js:1890, FilterReview/index.html:549). Saving now only skips them when the log lacks them and they're disabled (FilterReview/FilterReview.js:2026). Not tying this to the filter version is fine. |
| // Skip notch 3 and 4 if the firmware does not have them, unless they have been enabled | ||
| const skip = [3, 4].some((num) => name.startsWith("INS_HNTC" + num + "_") && !notch_in_firmware[num - 1] && | ||
| !(parseFloat(document.getElementById("INS_HNTC" + num + "_ENABLE").value) > 0)) |
There was a problem hiding this comment.
The file should always save because the user could be configuring based on a old log.
There was a problem hiding this comment.
done, it always saves all four now
| // Notches present in the log or parameter file, the third and fourth are only available on newer firmware | ||
| var notch_in_firmware = [true, true, false, false] |
There was a problem hiding this comment.
I think the whole notch_in_firmware thing can just be removed.
The params may be set up for newer firmware than the log was made with, so don't track which notches the firmware has.
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head FilterReview's four-notch support looks good at d277d91, with no open issues. Since the last review at 126e8f7, saving always writes all four notches as IamPete1 asked, and |
Fixes #252.
ArduPilot now supports a third harmonic notch, and a fourth on some boards (ArduPilot/ardupilot#30246). This adds
INS_HNTC3_*andINS_HNTC4_*to FilterReview: their filters in the estimated post-filter spectrum, the tracking lines on the FFT plot and spectrogram, and the logged notch frequencies.The third and fourth notch enable inputs are always shown, and their other params appear once either is enabled. All four notches are always saved, as the setup may be for newer firmware than the log.
Testing:
The Filter Tool link still only carries notches 1 and 2, as the Filter Tool supports two.