Commit Graph

837 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
Andrew Tridgell a0af4af5b5 AP_InertialSensor: debugging code for EK2 bug 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 c056076e85 AP_InertialSensor: fix code style problem, delete useless codes 2017-11-22 10:20:00 -08:00
HeBin efbb030494 AP_InertialSensor: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Andrew Tridgell eab1d3af4f AP_InertialSensor: don't apply offsets in SITL backend
the offsets are applied in the rotate and correct methods
2017-11-01 17:09:21 +11:00
Peter Barker b997f445ff AP_InertialSensor: include sample count in ISBH 2017-10-27 16:33:45 +11: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 ac6f7511bd AP_InertialSensor: examples: print temperature 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 f513c1c8dd AP_InertialSensor: support rotated IMUs in SITL 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 b05610870c global: use static method to construct AP_Rally 2017-09-26 03:01:21 +01:00
Lucas De Marchi 69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Lucas De Marchi 87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi d566567d87 AP_InertialSensor: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi caa4e3ee89 AP_InertialSensor: remove raspilot 2017-09-12 15:06:19 -07:00
Lucas De Marchi 06fe5ce8ba AP_InertialSensor: implement periodic thread for AuxiliaryBus 2017-09-11 09:52:41 -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 62b826953d AP_InertialSensor: use AP_Math rand_float() 2017-05-03 20:12:04 +10:00
Andrew Tridgell bfd8d151c8 AP_InertialSensor: lower slave rate with fast sampling
On an invensense IMU with fast sampling we need to lower the slave
sample rate for slave sensors such as the built-in AK8963 compass on a
MPU9250.

The slave rate is set as a multiple of the main rate, so it needs to be
much lower for fast sampling. If we leave it high then it greatly
impacts on IMU sample rate.

Without this change a MPU9250 with fast sampling and a compass enabled
will give a gyro rate of around 7200Hz. With this change it gets 7760Hz
2017-05-02 12:11:08 +10:00
Andrew Tridgell 519a293af9 AP_InertialSensor: fixed instance usage in set_gyro_oversampling()
thanks Francisco!
2017-05-02 08:27:11 +10:00
Andrew Tridgell 112b22516a AP_InertialSensor: fixed use of accel2_noise
thanks Francisco!
2017-05-02 08:24:50 +10:00
Andrew Tridgell 2876f1467c AP_InertialSensor: converge sensor rate quickly, then slowly
converge fast for the first 60 seconds, then more slowly to reduce
noise
2017-05-01 15:13:56 +10: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 49cc0965c0 AP_InertialSensor: separate handling of FIFO and non-FIFO sensors
FIFO sensors produce data at a well known rate, but samples come in
bunches, so we can't use the system clock to calculate deltaT.

non-FIFO sensors produce data when we sample them, but that rate is
less regular due to timing jitter.

For FIFO sensors this changes makes us use a learned sample rate,
which allows for different clock speeds on sensor and system board.

For non-FIFO sensors we use the system clock to measure deltaT

the overall effect is a fix for sensors that produce samples at other
than the claimed datasheet rate.
2017-05-01 15:06:46 +10:00
Andrew Tridgell 74eb7a7243 AP_InertialSensor: make SITL sensor rate match a Pixhawk1
use 760Hz 2nd gyro and 800 Hz 2nd accel
2017-05-01 15:06:46 +10:00
Andrew Tridgell 25cd16a275 AP_InertialSensor: fixed LSM303D registered sample rate
we are running the LSM303D at 1600Hz, and are sampling it at 1kHz. We
need to tell the AP_InertialSensor layer that samples will arrive at 1kHz
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
Andrew Tridgell c952e58edb AP_InertialSensor: fixed invensense driver temp reading
different parts have quite different zero offsets in temperature
2017-04-03 10:06:27 +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 875274e761 AP_InertialSensor: added support for ICM-20602
treat the same as a 20608
2017-03-02 14:21:36 +11:00
Andrew Tridgell b86513f503 AP_InertialSensor: support AUAV21 board 2017-03-01 17:24:10 +11:00
Lucas De Marchi 2d50eb312c AP_InertialSensor: add support to MPU6500
Just like and MPU9250 without mag and with different WHOAMI register.
2017-02-26 13:37:13 +11:00
murata a3f5b4f319 AP_InertialSensor: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
Lucas De Marchi 9535b45cc9 AP_InertialSensor: examples: fix double to float warnings
While at it add function prototype.
2017-02-12 01:22:35 +00: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 0733d760f6 AP_HAL_VRBRAIN: Unify from print or println to printf.
AP_InertialSensor: Unify from print or printin to printf.
2017-01-27 18:20:22 +11:00
murata 2643e7e906 AP_InertialSensor: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Julien Beraud 3d9dacb227 AP_InertialSensor: push gyro data for opticalflow
Do it only if there is an optical flow in the current HAL
2017-01-23 21:23:16 +11:00