Andrew Tridgell
4cddf37984
AP_InertialSensor: log unexpected register changes
...
when the register checking code finds an error we will log what
register changed and to what value
2021-02-24 18:18:37 +11:00
Andrew Tridgell
85ef6b7ac6
AP_InertialSensor: added optional logging of register changes
2021-02-24 18:18:37 +11:00
Andrew Tridgell
25dd08a1fd
AP_InertialSensor: added force_save_calibration()
2021-02-15 07:24:40 +11:00
Peter Barker
3da156e358
AP_InertialSensor: prevent nullptr dereference in SITL
2021-02-05 15:02:12 +11:00
Andrew Tridgell
0535c4f592
AP_InertialSensor: default TMAX to 70
...
if user forgets to set this then better to just timeout rather than
calibrating over a small range
2021-01-27 09:49:35 +11:00
Andrew Tridgell
bdb364d461
AP_InertialSensor: save the accelerometer ID parameters
...
this is needed for factory accel cal
2021-01-27 09:49:35 +11:00
Andrew Tridgell
2843cfa42d
AP_InertialSensor: use mavlink statustext for cal info
2021-01-25 16:24:50 +11:00
Andrew Tridgell
b542f947f7
AP_InertialSensor: don't mark accels as calibrating during trim
...
we need the accels with offsets applied when doing accel trim
2021-01-25 16:24:50 +11:00
Andrew Tridgell
e908a996af
AP_InertialSensor: support SIM_ACC_TRIM
...
and cleanup vector maths
2021-01-25 16:24:50 +11:00
Andrew Tridgell
6c8a57c2d7
AP_InertialSensor: review fixes
2021-01-21 13:09:21 +11:00
Andrew Tridgell
3ff71c7814
AP_InertialSensor: changes from review feedback
2021-01-21 13:09:21 +11:00
Andrew Tridgell
b12a663f7a
AP_InertialSensor: apply accel scaling
2021-01-21 13:09:21 +11:00
Andrew Tridgell
73ddde3629
AP_InertialSensor: changes for new SITL IMU params
2021-01-21 13:09:21 +11:00
Andrew Tridgell
5e60fac37e
AP_InertialSensor: remove unused variable
2021-01-21 13:09:21 +11:00
Andrew Tridgell
285b53fe07
AP_InertialSensor: use vector polyfit
...
this reduces memory usage
2021-01-21 13:09:21 +11:00
Andrew Tridgell
ffe20f7958
AP_InertialSensor: use a fixed reference temperature of 35C
...
this allows us to timeout the calibration when the temperature stops
rising as the polynomial no longer depends on the maximum temperature
2021-01-21 13:09:21 +11:00
Andrew Tridgell
dc58b0b950
AP_InertialSensor: changes from review feedback
...
thanks Sid!
2021-01-21 13:09:21 +11:00
Andrew Tridgell
c9a83c8127
AP_InertialSensor: added INS_TCAL_OPTIONS
...
make persistent params optional, and allow save of accelcal
2021-01-21 13:09:21 +11:00
Andrew Tridgell
1ddc21c9bb
AP_InertialSensor: support saving tempcal params persistently
2021-01-21 13:09:21 +11:00
Andrew Tridgell
8caea96ab1
AP_InertialSensor: start auto-learning at boot
...
This makes it easier to setup the params. The ENABLE=2 value only
takes effect at boot
2021-01-21 13:09:21 +11:00
Andrew Tridgell
7cb7ad3636
AP_InertialSensor: fixed build error
2021-01-21 13:09:21 +11:00
Andrew Tridgell
2e9f61fe49
AP_InertialSensor: fixed IMU index display in msgs
...
start at 1 for users
2021-01-21 13:09:21 +11:00
Andrew Tridgell
d5b511f4a0
AP_InertialSensor: fixed start timer for temperature in SITL
...
when we are doing an autotest we want the temperature to start
climbing when we first set SIM_IMUT_FIXED=0
2021-01-21 13:09:21 +11:00
Andrew Tridgell
30e55d8dfc
AP_InertialSensor: cope with user changing TMAX while calibrating
2021-01-21 13:09:21 +11:00
Andrew Tridgell
e2e97c67ce
AP_InertialSensor: catch user attempt to change TMAX during cal
2021-01-21 13:09:21 +11:00
Andrew Tridgell
3fb720354d
AP_InertialSensor: added notify events for temperature calibration
2021-01-21 13:09:21 +11:00
Andrew Tridgell
cc3579ea5d
AP_InertialSensor: change TCAL sampling to be even in temperature
2021-01-21 13:09:21 +11:00
Andrew Tridgell
fc0f8b990a
AP_InertialSensor: added online learning of temp cal
...
use INS_TCAL1_ENABLE=2 to start learning
2021-01-21 13:09:21 +11:00
Andrew Tridgell
6f6f89e5aa
AP_InertialSensor: enable temperature sensor on LSM9DS0
...
this allows for temperature calibration of the LSM303D in CubeBlack
and Pixhawk1
2021-01-21 13:09:21 +11:00
Andrew Tridgell
4bdf506d10
AP_InertialSensor: apply 1e-5 scale factor
...
this keeps the params in a reasonable range for parameter editors
2021-01-21 13:09:21 +11:00
Andrew Tridgell
0f6f6bac6b
AP_InertialSensor: expose TCal class for use in SITL
2021-01-21 13:09:21 +11:00
Andrew Tridgell
7921e042f1
AP_InertialSensor: added IMU temperature calibration support
...
this adds parameters that can be setup by an external script for
compensating for temperature variation in gyros and accels using a 3rd
order polynomial
2021-01-21 13:09:21 +11:00
Peter Barker
239b09fb34
AP_InertialSensor: add simulator for ICM40609
2021-01-12 17:43:36 +11:00
Andrew Tridgell
957842f7eb
AP_InertialSensor: added support for v3 Invensense sensors
...
starting with ICM-40609, ICM-42688 and ICM-42605
2021-01-11 14:43:35 +11:00
Andrew Tridgell
b74e5c0e2f
AP_InertialSensor: added ExternalAHRS backend
2021-01-05 21:13:12 +11:00
Andrew Tridgell
4f176c25de
AP_InertialSensor: relax IMU wait time for low loop rates
...
allow for waiting for all IMUs for up to 1/3 of the loop time
2021-01-05 21:13:12 +11:00
murata
219dc2e7da
AP_InertialSensor: Set the gravitational acceleration value to the defined value
2021-01-05 09:11:14 +09:00
Andy Piper
3db6203fb6
AP_InertialSensor: reduce FIFO buffer size to avoid DMA contention
2020-12-23 18:03:12 +11:00
Peter Barker
72acc8bfc8
AP_InertialSensor: use primary gyro (not accel) for get_delta_angle_dt
2020-11-29 13:21:53 +11:00
Peter Barker
2437cf8a24
AP_Logger: use instance number for IMU logging
2020-11-11 19:31:53 +11:00
Andrew Tridgell
f6c45c3bcd
AP_InertialSensor: cope with INS_MAX_INSTANCES < 3
2020-11-10 16:15:45 +11:00
Andrew Tridgell
e8f21d3458
AP_InertialSensor: fixed rpm indexing for vtol motors
...
quadplane vtol motors start at 1
2020-10-28 14:20:44 +11:00
Michael du Breuil
c86dcf91d6
AP_InertialSensor: Run vibration monitoring on all instances
2020-10-24 09:54:04 +11:00
Peter Barker
02c9aa2ae2
AP_InertialSensor: remove unused define
2020-10-20 11:24:34 +11:00
mhefny
02daa4c3ec
AP_InertialSensor: update L3G4200D driver
2020-10-06 09:27:26 -07:00
Andrew Tridgell
cfc59497f6
AP_InertialSensor: trigger internal error on persistent IMU reset
...
this will give users a warning when they are getting the Invensense
IMU FIFO reset issue
2020-09-02 06:42:44 +10:00
Andrew Tridgell
d5c0522651
AP_InertialSensor: instantiate SIM_IMU_COUNT sensors in SITL
2020-08-28 10:17:00 +10:00
bugobliterator
4cdb4b74f3
AP_InertialSensor: add support for checked register in Invensensev2 Drvr
2020-08-06 12:41:35 +10:00
Andy Piper
e53a43461b
AP_InertialSensor: remove ICM gyro pre-filter
2020-08-04 09:24:16 +10:00
bugobliterator
43c16cd417
AP_InertialSensor: ensure that we use environment Python interpreter
2020-08-03 14:02:09 +10:00
Andy Piper
d4ba821297
AP_InertialSensor: make the backend fast gyro rate configurable and independent from the accel rate
...
allow fast sampling of gyros on MPU6000 and MPU6500
2020-07-28 20:47:16 +10:00
Andy Piper
05366e9aa9
AP_InertialSensor: delegate active harmonic calculation to the filter
2020-07-14 09:50:06 +10:00
Andy Piper
faf9bbbf3a
AP_InertialSensor: make the backend fast gyro rate configurable
...
raise gyro rate default on F7 and H7
clean up gyro rate docs and output startup banner
2020-07-10 16:45:29 +10:00
Andy Piper
61bb42cc0c
AP_InertialSensor: allow up to four distinct notch center frequencies to be updated
...
apply the LPF after the notch filters to reduced notch-induced noise
2020-06-21 19:09:35 +10:00
duccan
cdcdd5ce27
AP_HAL_ChibiOS: Added support for Bitcraze Crazyflie 2.1
...
Rework after review:
- Kept old IMU and barometer definition of crazyflie 2.0 in hwdef
- Added comment regarding soft-reset command
- Added defaults.parm for crazyflie
2020-06-07 07:49:37 +10:00
duccan
0d96c7f7a5
AP_HAL_ChibiOS: Added support for Bitcraze Crazyflie 2.1
2020-06-07 07:49:37 +10:00
Andrew Tridgell
cab3630009
AP_InertialSensor: switched to supplying timestamps for SITL
...
this allows the time step to change on each loop as we no longer use
the average sensor rate when calculating deltas
2020-06-03 18:11:06 +10:00
Andy Piper
8ac79da643
AP_InertialSensor: FFT gyro window would overflow on windows >= 256
...
convert FFT buffers to ObjectBuffer<float> for lock-free access
push gyro samples directly into the FFT ring buffer from the gyro thread
2020-05-24 07:43:34 +10:00
Andy Piper
d0a241597a
AP_InertialSensor: add support for double harmonic notches to more effectively target wider noise peaks
2020-04-28 09:32:02 +10:00
Andrew Tridgell
5c6749ee54
AP_InertialSensor: use wait_pin() to wait for DRDY pin if available
2020-04-23 07:28:13 +10:00
Peter Barker
efbf929bc0
AP_InertialSensor: rename APMrover2 to Rover
2020-04-14 09:50:34 +09:00
Andrew Tridgell
d772289b0d
AP_InertialSensor: added driver for ADIS16470
2020-04-13 11:57:04 +10:00
Andrew Tridgell
d8b33bcac9
AP_InertialSensor: suppress expected errors from invensense IMUs
2020-03-11 16:30:06 +11:00
Andy Piper
507bd9eea9
AP_InertialSensor: add in user-specified background noise when there is no rpm noise
2020-02-25 08:35:09 +11:00
Andy Piper
41b41c05f3
AP_InertialSensor: scale SITL motor noise by SIM_VIB_MOT_MULT
2020-02-22 11:15:37 +11:00
Andy Piper
0e9b2a26c5
AP_InertialSensor: SITL the raw sample rate is not the same as the sensor rate
...
use regulated time for frequency noise to avoid spurious harmonics
SITL sensors must be true separate instances
don't compile in FFT structures if DSP disabled
2020-02-22 11:15:37 +11:00
Andy Piper
3d9776dd6d
AP_InertialSensor: expose statically filtered gyro values for FFT analysis and allow sampling to gyro window for FFT analysis.
...
FFT windows can be dynamically allocated
add harmonic notch dynamic tracking mode
unwind gyro window allocation in the case of failure
allow access to harmonic notch harmonics
2020-02-22 11:15:37 +11:00
Peter Barker
ab7ee46423
AP_InertialSensor: mark some parameters as Calibration parameters
2020-02-04 20:29:09 +11:00
Randy Mackay
b7f6f4a05e
AP_InertialSensor: reduce POS param range to 5m and add increment
2020-02-01 08:46:03 +09:00
Andrew Tridgell
58708c483f
AP_InertialSensor: make all semaphores recursive
...
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell
b89c241329
AP_InertialSensor: use take_blocking instead of HAL_SEMAPHORE_BLOCK_FOREVER
...
this makes for cleaner and smaller code as the failure case is not
needed
2020-01-19 20:19:30 +11:00
Andy Piper
52f59fb573
AP_InertialSensor: more accurately compute INS noise taking throttle into account and adding frequency noise noisily
...
make SITL fast-sampling correct
2019-12-31 10:34:02 +11:00
Andrew Tridgell
e52a3b9978
AP_InertialSensor: default fast sampling on
...
if we have a first IMU capable of fast sampling then we want it
enabled by default
2019-12-23 09:55:07 +11:00
Andy Piper
143a071788
AP_InertialSensor: add rpm-based motor noise to gyros and accels
...
Remove sample time error in backend.
2019-12-17 10:07:06 +11:00
Andy Piper
7e35622015
AP_InertialSensor: correct loop rate on BMI055, clean up setting of loop rate on BMI055 and BMI088
2019-12-09 13:29:34 +11:00
Andy Piper
763089addb
AP_InertialSensor: slight improvement to LOG_BAT_OPT docs.
2019-12-01 12:19:46 +11:00
Andrew Tridgell
9dc618ddd4
AP_InertialSensor: added gyro_harmonic_notch_enabled()
2019-11-19 07:08:01 +08:00
Andrew Tridgell
77d21f9f5d
AP_InertialSensor: return HarmonicNotchDynamicMode
2019-11-19 07:08:01 +08:00
Andrew Tridgell
eb582ac0cc
AP_InertialSensor: avoid SITL build on non-SITL
2019-11-17 20:10:54 +11:00
Mark Whitehorn
00948c33d5
AP_InertialSensor: rename sensor_config_error to config_error
2019-11-08 10:14:34 +11:00
Andrew Tridgell
236ce28339
AP_InertialSensor: updated for heater changes
2019-11-02 16:31:04 +11:00
Andy Piper
6381183aa3
AP_InertialSensor: expose harmonic notch tracking mode
2019-10-31 11:18:40 +08:00
Andrew Tridgell
d6e17b0c2b
AP_InertialSensor: publish an IMU temperature
...
makes testing of mavlink extension easier
2019-10-10 13:23:03 +11:00
Andrew Tridgell
850892c3d9
HAL_ChibiOS: fixes from LGTM errors
2019-09-22 18:35:15 +10:00
Andy Piper
8e385d7453
AP_InertialSensor: correct formatting
2019-09-11 18:41:05 +10:00
Andy Piper
5b7f9f6bea
AP_InertialSensor: while sensors are converging update the filters sample rates. if gyro filtering produces invalid output, keep the previous value
2019-09-11 18:41:05 +10:00
Andy Piper
a9a7fe3ea5
AP_InertialSensor: ensure harmonic notch gets appropriate defaults
2019-09-11 18:41:05 +10:00
Andy Piper
3261677e01
AP_InertialSensor: remove _ prefix from methods. use changed filter methods.
2019-09-11 18:41:05 +10:00
Andy Piper
50f7e50634
AP_InertialSensor: add harmonic notch filter to gyro filter chain
...
Allow dynamic updates to the calculated frequency. Convert bandwidth and frequency to floats.
backend variables do not need to be indexed per-backed
2019-09-11 18:41:05 +10:00
Andy Piper
dde6dec145
AP_InertialSensor: correct reboot documentation for batch logger and filters
2019-09-10 20:29:56 +10:00
Andrew Tridgell
15e15e0b9d
AP_InertialSensor: define GET_I2C_DEVICE()
2019-09-04 16:27:47 +10:00
Andrew Tridgell
1c92ecc89f
AP_InertialSensor: removed old method of specifying most IMUs
...
and removed dangerous default values for rotations
2019-08-28 06:54:11 +10:00
Andrew Tridgell
c99923d500
AP_InertialSensor: require gyro orientations in LSM9DS probe
...
this prevents a bug where they are missing in hwdef.dat
2019-08-27 19:29:37 +10:00
Andrew Tridgell
992016069a
AP_InertialSensor: fixed watchdog on AHRS trim gyro wait
2019-08-19 14:37:46 +10:00
Andrew Tridgell
e1ce735886
AP_InertialSensor: special check for CubeBlack to force INS_USE3=1
...
this will cope with users loading old parameter files
2019-07-31 12:53:57 +10:00
Andrew Tridgell
123800ccd2
AP_InertialSensor: default INS_USE3 to 1
2019-07-31 12:53:57 +10:00
Randy Mackay
6a154c4e4c
AP_InertialSensor: resolve gcs::send_text compiler warning
2019-07-30 09:02:39 +09:00
Andrew Tridgell
8e5c0fa32b
AP_InertialSensor: disable kill IMUs with HAL_MINIMIZE_FEATURES
2019-07-07 19:03:01 +10:00
Andrew Tridgell
09d3392aee
AP_InertialSensor: zero accumulators on time step
...
this zeros the delta angle and delta velocity accumulators when a
sensor is unavailable for a period of 0.1s. This prevents garbage
values being passed into the EKF when a sensor dies and then becomes
available again some time later
2019-07-07 19:03:01 +10:00
Andrew Tridgell
3444e82ef9
AP_InertialSensor: added RC switch for killing IMUs
2019-07-07 19:03:01 +10:00