Skip to content

FilterReview: only use armed raw IMU data if disarmed logging is rate limited - #367

Open
j-w9 wants to merge 1 commit into
ArduPilot:mainfrom
j-w9:filter-review-rate-limit
Open

j-w9 wants to merge 1 commit into
ArduPilot:mainfrom
j-w9:filter-review-rate-limit

Conversation

@j-w9

@j-w9 j-w9 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #259, following your diagnosis there: with LOG_DARM_RATEMAX set, raw GYR samples logged while disarmed are rate limited, and the loader's batch sample rate no longer matches the data.

Reproduced in SITL (LOG_DISARMED 1, LOG_DARM_RATEMAX 10, INS_RAW_LOG_OPT 1, raw IMU logging on, takeoff, hover, land). GYR runs at ~25 Hz disarmed and 1000 Hz armed. The step from 25 Hz to 1000 Hz isn't a gap, so the whole log becomes one batch with a mean rate of 793.5 Hz, and every frequency is scaled by 0.79 (spectrum ends at 397 Hz). If a gap does split off a disarmed first batch, run_batch_fft takes its rate from data_set[0], which gives the very low rate and the oversized spectrogram from the issue.

When LOG_DARM_RATEMAX > 0 and the log has ARM messages, raw samples logged while disarmed are dropped before batching. The gap left behind splits the armed sections as before. Logs without LOG_DARM_RATEMAX, or with no armed data, take the existing path unchanged.

I don't have the log from the issue, so it would be good to check it against that one.

Before and after

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.

Error when trying to open certain logs

1 participant