-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
PX4Accelerometer/PX4Gyroscope: fix calibration offset for integrated FIFO case #14765
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dagar
force-pushed
the
pr-imu_fifo_cal_fix
branch
from
April 26, 2020 16:27
ddcf31b
to
120c5e7
Compare
mhkabir
approved these changes
Apr 26, 2020
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 good. Tested and works with real CAL
s.
nsh> param show CAL_ACC*
Symbols: x = used, + = saved, * = unsaved
x CAL_ACC0_EN [36,62] : 1
x + CAL_ACC0_ID [37,63] : 3670026
x + CAL_ACC0_XOFF [38,64] : -0.0008
x + CAL_ACC0_XSCALE [39,65] : 0.9909
x + CAL_ACC0_YOFF [40,66] : -0.0544
x + CAL_ACC0_YSCALE [41,67] : 1.0108
x + CAL_ACC0_ZOFF [42,68] : -0.0835
x + CAL_ACC0_ZSCALE [43,69] : 1.0101
x CAL_ACC1_EN [44,70] : 1
x + CAL_ACC1_ID [45,71] : 3932170
x + CAL_ACC1_XOFF [46,72] : 0.0770
x + CAL_ACC1_XSCALE [47,73] : 0.9886
x + CAL_ACC1_YOFF [48,74] : 0.1238
x + CAL_ACC1_YSCALE [49,75] : 1.0110
x + CAL_ACC1_ZOFF [50,76] : -0.3014
x + CAL_ACC1_ZSCALE [51,77] : 0.9991
x CAL_ACC2_EN [52,78] : 1
x + CAL_ACC2_ID [53,79] : 4259850
x + CAL_ACC2_XOFF [54,80] : 0.4906
x + CAL_ACC2_XSCALE [55,81] : 0.9741
x + CAL_ACC2_YOFF [56,82] : 0.0353
x + CAL_ACC2_YSCALE [57,83] : 1.0021
x + CAL_ACC2_ZOFF [58,84] : 0.0967
x + CAL_ACC2_ZSCALE [59,85] : 1.0004
x + CAL_ACC_PRIME [60,86] : 3670026
nsh> param show CAL_GYRO*
Symbols: x = used, + = saved, * = unsaved
x CAL_GYRO0_EN [64,90] : 1
x + CAL_GYRO0_ID [65,91] : 3670026
x + CAL_GYRO0_XOFF [66,92] : 0.0051
x + CAL_GYRO0_YOFF [67,93] : -0.0097
x + CAL_GYRO0_ZOFF [68,94] : 0.0045
x CAL_GYRO1_EN [69,95] : 1
x + CAL_GYRO1_ID [70,96] : 3932170
x + CAL_GYRO1_XOFF [71,97] : 0.0144
x + CAL_GYRO1_YOFF [72,98] : 0.0190
x + CAL_GYRO1_ZOFF [73,99] : 0.0018
x CAL_GYRO2_EN [74,100] : 1
x + CAL_GYRO2_ID [75,101] : 4325386
x + CAL_GYRO2_XOFF [76,102] : 0.0040
x + CAL_GYRO2_YOFF [77,103] : 0.0051
x + CAL_GYRO2_ZOFF [78,104] : 0.0016
x + CAL_GYRO_PRIME [79,105] : 3670026
nsh> sensors status
INFO [sensors] gyro status:
INFO [ecl/validation] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO [ecl/validation] sensor #0, prio: 100, state: OK
INFO [ecl/validation] val: 0.0046, lp: 0.0053 mean dev: 0.0000 RMS: 0.0010 conf: 1.0000
INFO [ecl/validation] val: -0.0042, lp: -0.0039 mean dev: -0.0000 RMS: 0.0011 conf: 1.0000
INFO [ecl/validation] val: -0.0001, lp: 0.0000 mean dev: 0.0000 RMS: 0.0012 conf: 1.0000
INFO [ecl/validation] sensor #1, prio: 99, state: OK
INFO [ecl/validation] val: -0.0012, lp: -0.0002 mean dev: -0.0000 RMS: 0.0039 conf: 1.0000
INFO [ecl/validation] val: -0.0025, lp: 0.0013 mean dev: 0.0000 RMS: 0.0047 conf: 1.0000
INFO [ecl/validation] val: 0.0025, lp: 0.0002 mean dev: 0.0000 RMS: 0.0029 conf: 1.0000
INFO [ecl/validation] sensor #2, prio: 100, state: OK
INFO [ecl/validation] val: -0.0016, lp: -0.0019 mean dev: 0.0000 RMS: 0.0012 conf: 1.0000
INFO [ecl/validation] val: 0.0067, lp: 0.0067 mean dev: 0.0000 RMS: 0.0013 conf: 1.0000
INFO [ecl/validation] val: -0.0015, lp: -0.0008 mean dev: 0.0000 RMS: 0.0011 conf: 1.0000
INFO [sensors] accel status:
INFO [ecl/validation] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO [ecl/validation] sensor #0, prio: 100, state: OK
INFO [ecl/validation] val: -0.0219, lp: -0.0279 mean dev: -0.0001 RMS: 0.0143 conf: 1.0000
INFO [ecl/validation] val: -0.0049, lp: 0.0206 mean dev: -0.0001 RMS: 0.0136 conf: 1.0000
INFO [ecl/validation] val: -9.8618, lp: -9.8686 mean dev: -0.0001 RMS: 0.0107 conf: 1.0000
INFO [ecl/validation] sensor #1, prio: 99, state: OK
INFO [ecl/validation] val: -0.0672, lp: -0.0529 mean dev: -0.0002 RMS: 0.0256 conf: 1.0000
INFO [ecl/validation] val: -0.1331, lp: -0.1213 mean dev: 0.0026 RMS: 0.0353 conf: 1.0000
INFO [ecl/validation] val: -9.8829, lp: -9.8698 mean dev: -0.0004 RMS: 0.0300 conf: 1.0000
INFO [ecl/validation] sensor #2, prio: 100, state: OK
INFO [ecl/validation] val: -0.1538, lp: -0.1463 mean dev: 0.0000 RMS: 0.0191 conf: 1.0000
INFO [ecl/validation] val: -0.1138, lp: -0.1257 mean dev: -0.0000 RMS: 0.0186 conf: 1.0000
INFO [ecl/validation] val: -9.7799, lp: -9.8087 mean dev: -0.0002 RMS: 0.0193 conf: 1.0000 |
LorenzMeier
approved these changes
Apr 26, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a quick follow up fix to #14752. In the case of FIFO data (new IMU drivers) the calibration offset wasn't being applied correctly to the result of integrating the FIFO samples.
This slipped through unnoticed with the offsets zeroed (simple bench testing, the test rack, and SITL CI).