Commit Graph

274 Commits

Author SHA1 Message Date
Andrew Tridgell 39c206ca03 AP_InertialSensor: limit delta-time from INS
limit delta-time to 2x average time

DEBUG CODE - DO NOT MERGE
2017-12-12 11:39:38 +11:00
Randy Mackay 38145f9541 AP_InertialSensor: fix param docs for notch and log settings 2017-12-12 07:59:41 +09:00
Peter Barker 161e2145cb AP_InertialSensor: tighten type of simple_accel_cal result 2017-12-01 17:01:10 +00:00
HeBin efbb030494 AP_InertialSensor: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Peter Barker 9566abb3a8 AP_InertialSensor: add IMU batch sampling 2017-10-27 16:33:45 +11:00
Peter Barker 5096e2fca9 AP_InertialSensor: use df singleton, factor out log_{gyro,accel}_raw 2017-10-27 16:33:45 +11:00
Alexey Bulatov 069c98b8a9 AP_InertialSensor: Edge: add sensor's rotation YAW_90 2017-10-20 13:03:08 -07:00
Georgii Staroselskii 4f2d8f8df4 AP_InertialSensor: use ICM backend for Edge 2017-10-20 13:03:08 -07:00
Andrew Tridgell 6a6f9681ab AP_InertialSensor: allow for 1,1,1 accel scaling
this supports simple accel calibration
2017-10-10 10:57:38 +11:00
Andrew Tridgell d5cab1140a AP_InertialSensor: added simple_accel_cal()
this is useful for mass market vehicles where a full 3D accel cal is
too complex.
2017-10-10 10:57:38 +11:00
Lucas De Marchi caa4e3ee89 AP_InertialSensor: remove raspilot 2017-09-12 15:06:19 -07:00
Andrew Tridgell 7e1368f7a5 AP_InertialSensor: implement notch filter on gyro 2017-08-29 13:52:29 +10:00
Kevin Lopez Alvarez ca3627c140 AP_InertialSensor: add ppro support 2017-07-24 13:47:06 +10:00
Randy Mackay 51fa8fb0bd AP_InertialSensor: resolve member init order compiler warning 2017-07-07 17:27:23 +09:00
Randy Mackay edc9d4db5b AP_InertialSensor: increase accel filter to 20hz 2017-07-03 09:38:15 +09:00
Peter Barker 6ae86a0b8c AP_InertialSensor: use DataFlash should_log to determine raw logging 2017-06-29 15:26:27 +01:00
Leonard Hall 447b20efa5 AP_InertialSensor: reduce accel filter to 10hz 2017-06-01 14:53:48 +09:00
Andrew Tridgell db25b6e966 AP_InertialSensor: estimate and log sensor rates for all IMUs
this adds IMU.GHz and IMU.AHz log fields so we can see the actual
observed sensor rates of each IMU
2017-05-01 15:06:46 +10:00
Andrew Tridgell e62fdad12c AP_InertialSensor: added get_last_update_usec()
this will be used by the inter-EKF scheduling changes
2017-05-01 14:24:55 +10:00
Lucas De Marchi 2e4e4365d0 AP_InertialSensor: enable fast sampling for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 87846fe049 AP_InertialSensor: use MPU6500 on aerofc 2017-03-24 12:06:19 +11:00
Andrew Tridgell b86513f503 AP_InertialSensor: support AUAV21 board 2017-03-01 17:24:10 +11:00
Andrew Tridgell 01da36295d AP_InertialSensor: support the L3GD20H gyro
this is used by the MRo Pixhawk1
2017-01-31 07:39:36 +11:00
murata 2643e7e906 AP_InertialSensor: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
murata d56bad781f AP_InertialSensor: change if statements to switch statement
No functional change
2016-12-24 12:23:59 +09:00
murata 398b7b83dd AP_InertialSensor: minor formatting fixes
No functional change
2016-12-24 12:23:58 +09:00
Andrew Tridgell 65b9b86099 AP_InertialSensor: unify MPU6000 and MPU9250 drivers
make a single AP_InertialSensor_Invensense driver. This avoids a lot
of duplication and will save time as new varients are added
2016-12-16 12:31:34 +11:00
Andrew Tridgell 0f984290c3 AP_InertialSensor: enable fast sampling by default on some boards 2016-11-25 17:59:54 +11:00
Andrew Tridgell 18d4286166 AP_InertialSensor: fixed pixfalcon 9250 detection 2016-11-18 14:24:39 +11:00
Andrew Tridgell f3f1f6b0b6 AP_InertialSensor: fixed gyro orientation on l3gd20H on pixhawk 2016-11-16 20:33:56 +11:00
Francisco Ferreira bfbb275577 AP_InertialSensor: on accel cal failure don't save values to zero
When the accel calibration fails leave the previous values saved but set them to defaults (scale default is ones, not zeros) and notify the GCS
This fixes an arithmetic exception when doing a second accel cal after the first one failed
2016-11-15 11:42:54 -08:00
Andrew Tridgell 624178f3be AP_InertialSensor: added INS_FAST_SAMPLE parameter
this allows enable/disable of fast sampling per IMU, making
experimentation easier.

It also fixes the fast sampling to always average over 8 samples, and
fixes the 9250 to use the correct accumulator when not doing fast
sampling
2016-11-15 21:16:40 +11:00
Andrew Tridgell 4ebf3309f7 AP_InertialSensor: auto-handle invensense sensor changes
some boards swap out MPU6000 for MPU9250 or ICM20608
2016-11-11 08:08:55 +11:00
Andrew Tridgell 70c27a85de AP_InertialSensor: on PH2 run the first MPU9250 at 8kHz 2016-11-10 13:04:15 +11:00
Andrew Tridgell cb70bae167 AP_InertialSensor: use in-tree drivers for PH2SLIM 2016-11-10 11:44:52 +11:00
Andrew Tridgell 8a3f6a8902 AP_InertialSensor: use FIFO and implement fast sampling for MPU9250 2016-11-10 11:44:51 +11:00
Andrew Tridgell e25a391a8f AP_InertialSensor: fixed typo 2016-11-09 17:08:15 +11:00
Andrew Tridgell 7137d5c6f2 AP_InertialSensor: switch pixracer to always use in-tree drivers 2016-11-09 17:08:14 +11:00
Andrew Tridgell 84c3e29891 AP_InertialSensor: use AP_HAL rotations for MPU6000 2016-11-09 17:08:14 +11:00
Andrew Tridgell 03b7bc9e65 AP_InertialSensor: use internal drivers for PHMINI
this gets us fast sampling
2016-11-09 17:08:12 +11:00
Andrew Tridgell 3d7d773883 AP_InertialSensor: added support for ICM20608 on Pixracer 2016-11-09 17:08:08 +11:00
Andrew Tridgell 2c1e9024f1 AP_InertialSensor: detect missing accels or gyros 2016-11-09 17:08:07 +11:00
Andrew Tridgell 106a91c64c AP_InertialSensor: use init_gyro() on startup
this saves the calibration parameters which should be done on
calibration
2016-11-09 17:08:07 +11:00
Andrew Tridgell 408593465f AP_InertialSensor: fixed rotation for mpu9250 on pixracer 2016-11-09 17:08:07 +11:00
Andrew Tridgell 790dd4769b AP_InertialSensor: simplify rotations for MPU9250 2016-11-09 17:08:07 +11:00
Lucas De Marchi 469efb00f6 AP_InertialSensor: save id for gyro and accel instances
This allows each sensor to be uniquely identified in the system by using
either the index inside the backend or for those that use the Device
interface, to use the bus type, location, and device id.

We leave 16-bit for each sensor to be able to change its own
identification in future, which allows them to be changed in an
incompatible manner forcing a re-calibration.
2016-11-09 17:08:05 +11:00
Lucas De Marchi bbb9bfa95e AP_InertialSensor: save only gyro calibration
When we are initializing the gyro and then saving the calibration we are
also saving the calibration values for the accelerometers. Right now
this is non-problematic, but we want to check that the ID of the
accelerometer corresponds to the ID of the sensor detected. If we also
save accel calibrations we would actually override the ID of the
accelerometer.

Rename the method to _save_gyro_calibration() and save only on gyro
values.
2016-11-09 17:08:05 +11:00
Lucas De Marchi ace61087a1 AP_InertialSensor: remove product_id
We only leave the parameter there for backward-compatibility. However
product id on the inertial sensor is not much useful since it's only
kept for the first instance.

A better implementation per-gyro and per-accel is needed in order to
avoid problems with sensors taking the offsets configured for another
sensor.
2016-11-09 17:08:05 +11:00
Andrew Tridgell 4ef92b5e39 AP_InertialSensor: enable all 3 IMUs on PH2 2016-11-09 17:08:04 +11:00
Andrew Tridgell a5c5e033d2 AP_InertialSensor: fixed threading and locking in remaining backends
use a backend semaphore for shared data and use thread per bus where
available
2016-11-09 17:08:01 +11:00