Julien BERAUD
3cf952d1f8
AP_InertialSensor: add fifo support for MPU6000
...
And remove the use of data rdy in this case
2015-07-10 14:24:09 +10:00
Julien BERAUD
8a76ff53bd
AP_InertialSensor: add i2c bus driver for MPU6050
2015-07-10 14:24:09 +10:00
Andrew Tridgell
ac3200fd32
AP_InertialSensor: make max_abs_offsets a single float, not a vector
2015-06-30 10:51:43 +10:00
Gustavo Jose de Sousa
42eb73a1d1
AP_InertialSensor: add LSM9DS0 backend
...
This adds the backend driver for LSM9DS0. This implementation is based on the
legacy driver coded by Víctor Mayoral Vilches (under folder LSM9DS0) and makes
some necessary adaptations and fixes in order to work properly. The legacy
driver folder was removed.
2015-06-30 10:27:46 +10:00
Gustavo Jose de Sousa
c340e072f2
AP_InertialSensor: use accel instance max abs offset instead of a constant value
...
The calibration on LSM9DS0 was giving offsets between 4.0 and 4.2 on x-axis and
around 3.6 on y-axis. It turned out that those offsets were actually right.
The maximum absolute values of calibration offset should be a sensor
characteristic rather than a constant value for all sensors.
The constant value previously used (3.5 m/s/s for all axes) is set here as a
default maximum absolute calibration offset for every instance to keep it
working.
2015-06-30 10:27:44 +10:00
Andrew Tridgell
bc0ae630a1
AP_InertialSensor: always provide delta_velocity and delta_angles
...
this makes the NavEKF code simpler
2015-06-17 13:10:26 +10:00
Andrew Tridgell
727be87d84
AP_InertialSensor: support HIL functions for delta_velocity and delta_angles
2015-06-16 09:53:55 +10:00
Randy Mackay
8ceccd778d
InertialSensor: disable vibration checks on APM2
...
Also bug fix get_accel_clip_count's instance check
2015-06-12 21:36:56 +09:00
Randy Mackay
0db7acc628
InertialSensor: calc vibration and accel clipping
2015-06-12 21:36:22 +09:00
Andrew Tridgell
6a2c585632
AP_InertialSensor: fixed build warnings
2015-05-30 22:51:19 +10:00
Andrew Tridgell
aaa35bd1ec
AP_InertialSensor: using atan2f() gives more accurate euler corrections
...
thanks to Jon and Paul!
2015-05-16 08:19:18 +10:00
Andrew Tridgell
9e723ef907
AP_InertialSensor: added calibrate_trim() function
...
used for redoing trim calculation
2015-05-16 07:56:34 +10:00
Andrew Tridgell
b564ba0868
AP_InertialSensor: fixed AHRS_TRIM calculation again
2015-05-16 07:56:33 +10:00
Jonathan Challinger
159599879f
AP_InertialSensor: simplify and correct AHRS_TRIM computation
2015-05-15 21:03:03 +10:00
Randy Mackay
1f14eec4ea
InertialSensor: accel_calibrated_all_ok replaces calibrated
...
This checks that the current number of accelerometers matches the number
of calibrated accels in order to catch accel failures at boot
2015-05-12 16:32:16 +09:00
Andrew Tridgell
8bf2baef70
AP_InertialSensor: fixed primary accel/gyro in replay
2015-05-11 11:19:11 +10:00
Andrew Tridgell
7d90033a36
AP_InertialSensor: support raw accel and gyro dataflash logging
2015-05-07 12:08:30 +10:00
Andrew Tridgell
089e63f987
AP_InertialSensor: fixed PSTR handling
...
must use PSTR on code compiled for AVR
2015-05-05 13:54:00 +10:00
Andrew Tridgell
e6a8a6da07
AP_InertialSensor: revert AP_Math class change
2015-05-05 13:27:06 +10:00
Tom Pittenger
9e98c68099
AP_InertialSensor: compile warnings: format not a string literal, argument types not checked
...
PSTR() goofs things up when using hal.console->printf_P()
2015-05-05 13:27:01 +10:00
Tom Pittenger
820199635b
AP_InertialSensors: compiler warnings: apply is_zero(float) or is_equal(float)
2015-05-05 13:26:51 +10:00
Tom Pittenger
3cb2221315
AP_IntertialSensor: double to float warning
2015-05-05 13:26:50 +10:00
Randy Mackay
6773c0b232
AP_InertialSensor: default primary accel and gyro
2015-05-01 16:37:33 +09:00
Tom Pittenger
a4b8575432
InertialSensor: fix compile warnings re float constants
2015-04-24 14:03:49 +09:00
Andrew Tridgell
45e016ea5b
AP_InertialSensor: check for zero delta_velocity dt
2015-04-03 15:10:47 -07:00
Jonathan Challinger
b306d7a356
AP_InertialSensor: accel cal sample for 400ms instead of 1s
2015-04-03 14:54:19 -07:00
Jonathan Challinger
1e1d8efa22
AP_InertialSensor: use expected update rate for accel cal sampling
2015-04-03 14:54:17 -07:00
Jonathan Challinger
bd84328440
AP_InertialSensor: hack to "reset" the accel filter before taking a cal sample
2015-04-03 14:54:15 -07:00
Jonathan Challinger
b2b42e081a
AP_InertialSensor: use delta_velocity/dt for calibration if available
2015-04-03 14:54:10 -07:00
Andrew Tridgell
4147825b87
AP_InertialSensor: fixed gyro calibration bug
...
we must not update _gyro_offset[] until we have completed calibration
of that gyro, or we will end up using the new offsets when asking for
the raw gyro vector
2015-04-03 06:57:30 -07:00
Andrew Tridgell
cf2445dc97
AP_InertialSensor: prevent nested accelerometer calibration
2015-03-15 15:22:59 +11:00
Andrew Tridgell
8a99cab535
AP_InertialSensor: load only HIL backend for hil_mode
2015-03-13 22:52:55 +11:00
Andrew Tridgell
07fd31c724
AP_InertialSensor: change copter filters to 20Hz
...
with the backend filters disabled 20Hz is closer to the old default of
30Hz
2015-03-12 13:11:17 +11:00
Andrew Tridgell
3d7d46b9b0
AP_InertialSensor: replaced INS_MPU6K_FILTER with INS_ACCEL_FILTER and INS_GYRO_FILTER
...
this allows filtering to be set separately on accels and gyros where possible
2015-03-12 12:50:31 +11:00
Andrew Tridgell
f3314791f2
AP_InertialSensor: removed INS_CALSENSFRAME
...
it is no longer needed as we have shifted the accel cal indexes
2015-03-12 12:50:31 +11:00
Andrew Tridgell
4bc6c8e655
AP_InertialSensor: shift to new parameter indexes for accel calibration
...
this allows for users to switch between development trees and previous
stable versions while retaining their accel calibration values.
2015-03-12 12:50:30 +11:00
Andrew Tridgell
e6a4b9f68c
AP_InertialSensor: check accel health during accel cal
2015-03-12 12:50:29 +11:00
Andrew Tridgell
875339f12a
AP_InertialSensor: try to avoid a compiler fault in travis
2015-03-12 12:50:29 +11:00
Andrew Tridgell
786172aa4e
AP_InertialSensor: removed 1D accel calibration
...
it is finally time to move on from this. We want to push people
towards better calibration and removing the 1D accel cal is the first
step
2015-03-12 12:50:28 +11:00
Andrew Tridgell
a975520033
AP_InertialSensor: check range of accels in 3D calibration
...
during 3D accel cal it is possible to get data which passes the sphere
fit but which has very poor coverage and does not provide sufficient
data for a good result. This checks that each axis covers a range of
at least 12 m/s/s in body frame
2015-03-12 12:50:28 +11:00
Andrew Tridgell
a8a8628515
AP_InertialSensor: added INS_CALSENSFRAME parameter
...
this allows us to detect if accel calibration was done in sensor frame
or not. If it was done in sensor frame then the accel calibration is
independent of AHRS_ORIENTATION, which makes it easier to move a board
to a new airframe without having to recalibrate.
2015-03-12 12:50:28 +11:00
Jonathan Challinger
2a547f329b
AP_InertialSensor: allow backends to publish delta velocities and angles
2015-03-12 12:50:27 +11:00
Jonathan Challinger
155c173ed1
AP_InertialSensor: rename _rotate_and_offset to _publish
2015-03-12 12:50:27 +11:00
Randy Mackay
5f26a36060
INS: protect against two calibrations running at the same time
2015-03-09 17:58:38 +11:00
Randy Mackay
f9c6e35d19
INS: add calibrating method
2015-03-09 17:58:38 +11:00
Randy Mackay
b0e7990c90
INS: set gyro_cal_ok only after completing calibration
2015-03-09 17:58:37 +11:00
Andrew Tridgell
aec7907571
AP_InertialSensor: updated comment on accel check in gyro cal
2015-03-09 17:58:36 +11:00
Andrew Tridgell
38bde56523
AP_InertialSensor: continue finding best gyro after convergence
...
with multiple gyros if we are still calibrating one of the gyros then
keep looking for better values for the already converged gyros.
2015-03-08 07:49:38 +11:00
Andrew Tridgell
20a4c98bac
AP_InertialSensor: use accelerometers to prevent bad gyro cal
...
if the board is rotating at a steady rate we can end up with a bad
gyro calibration. This can happen on a steadily moving platform such
as a ship.
This uses the accelerometers to detect the steady movement and not
accept the gyro calibration
2015-03-08 07:48:16 +11:00
Randy Mackay
b650d39786
InertialSensor: remove product_id set to zero
2015-02-21 09:14:33 +09:00