-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_InertialSensor: use batch logging options to allow pre-post raw gyro logging #24311
Conversation
Nice, any idea what the logging data rate is with this? |
Its a 32 byte log packet, so 3 IMUs, pre and post at 2khz would be 32 * 2 * 3 * 2000 = 384000 Bps, 3.072 Mb/s. Its a lot, but I think we can keep up, certainly on the faster boards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right to me - presumably you have tested all the different options?
ea0ab5d
to
d5ddaba
Compare
Rebased. |
Test logs here: https://drive.google.com/file/d/1tcZ5kfnru_8Pl9n58yfHzoi30Kmpyj5Q/view?usp=sharing Log1, batch logging pre filter: Log2, batch logging post filter: Log3, batch logging pre and post: Log4, raw sensor logging pre: Log5, raw sensor logging post: Log6, raw sensor pre and post: Note that it does need a minor change to the filter review tool to take the new options into account when plotting raw sensor. |
I hope those plots also clearly show why raw sensor logging is better. The white bands in the sepctogram show where logging could not keep up. None in the batch logs, a couple in raw sensor logging, more in pre+post raw. Tested on CubeOrange with default logging settings. Maybe as future PR we could add a raw logging mask so you can raw log on just a single sensor, currently its all or nothing. Unfortunately we can't just reuse the batch logging mask as we would need to default to log all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe INS_LOG_OPTION bitmask, where INS_LOG_OPTIONS=1 means log primary gyro raw
…and pre+post on primary or all gyros
d5ddaba
to
1ea805d
Compare
This expands the capability of raw sensor logging to allow post filter and pre-post. If the board can keep up with it raw sensor is much nicer than batch logging.
This re-uses the batch sampler options, which means we loose this functionality if batch sampler is compiled out. This will be a change in behavior if users have left over options from filter setup but now have disabled the batch mask. We could also add a new param for just raw sensor logging, this would allow us to add a new bits "primary IMU only" and "gyro only" that would reduce the logging rate.