Lucas De Marchi
3aa46e3213
AP_InertialSensor: use functor macros
...
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:53 +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
3f8b832075
InertialSensor: fix example sketch
2015-05-13 10:13:51 +09: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
afc9812d0b
AP_InertialSensor: update VibTest after moving messages info DataFlash
2015-05-07 13:25:37 +10:00
Andrew Tridgell
7d90033a36
AP_InertialSensor: support raw accel and gyro dataflash logging
2015-05-07 12:08:30 +10:00
Andrew Tridgell
f5140e25b0
AP_InertialSensor: updated VibTest for latest PX4 interfaces
2015-05-07 10:51:52 +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
31693e332e
AP_InertialSensor: use non-PSTR printf
...
this is not built on AVR
2015-05-05 13:48:34 +10:00
Andrew Tridgell
e6a8a6da07
AP_InertialSensor: revert AP_Math class change
2015-05-05 13:27:06 +10:00
Tom Pittenger
0e076d6dc8
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:02 +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
Andrew Tridgell
ef527d9daa
AP_InertialSensor: fix for HAL_SITL rename
2015-05-05 09:45:55 +10:00
Randy Mackay
6773c0b232
AP_InertialSensor: default primary accel and gyro
2015-05-01 16:37:33 +09:00
Jonathan Challinger
bb88a4f8fe
AP_InertialSensor: healthy() checks bounds
2015-05-01 16:37:15 +09:00
Jonathan Challinger
af80f20a51
AP_InertialSensor: add get_primary_gyro, fix get_primary_accel
2015-05-01 16:37:14 +09:00
Andrew Tridgell
007b01533d
AP_InertialSensor: switched to 16g accel range for MPU9250
...
this matches the Pixhawk, and makes us less prone to vibration. We
have seen clipping at 8g
2015-04-28 15:30:29 +10:00
Tom Pittenger
a4b8575432
InertialSensor: fix compile warnings re float constants
2015-04-24 14:03:49 +09:00
mirkix
13ee34c58a
AP_InertialSensor: MPU9150 fix compiler warnings
2015-04-14 11:14:48 +10:00
Lucas De Marchi
b292873304
AP_InertialSensor: fix starvation in L3G4200D
...
The main thread would always be blocked on the semaphore to read the
data from accelerometer and gyroscope. Especially if we have a slow
update of these values in _accumulate() due to the I2C transfer function
taking too much time: the timer thread would never give up the CPU,
causing starvation on the main thread.
This fixes the issue by reducing the critical region using a flip-buffer
so _accumulate() can work on its own copy of the data. Now that the
critical region is smaller, also avoid the semaphore and use a spinlock
instead.
2015-04-14 10:01:47 +10: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
Jonathan Challinger
423160eaf8
AP_InertialSensor: publish delta_velocity_dt
2015-04-03 14:54:06 -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
23272e4013
AP_InertialSensor: added get_temperature() interface
...
this will allow logging of individual temperature sensors
2015-03-17 13:32:54 +11:00
ahcorde
103bb2a08d
AP_InertialSensor: Fix orientation MPU6000 PXF
2015-03-16 09:50:51 +11: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
520c7c1306
AP_InertialSensor: always allow for AK8963 on MPU9250
2015-03-13 18:46:17 +11:00
Andrew Tridgell
60b8736cf1
AP_InertialSensor: use right AK8963 compass defines
2015-03-13 18:46:15 +11:00
Andrew Tridgell
808c33d0a7
AP_InertialSensor: support both MPU9250 and MPU9255
...
seems to be just different WHOAMI register
2015-03-13 13:26:49 +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
a1d43e39e0
AP_InertialSensor: added get_gyro_filter_hz() and get_accel_filter_hz()
2015-03-12 12:50:31 +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
5d0eb49114
AP_InertialSensor: calculate queue depth based on requested sample rate
...
this auto-scales the queue depth for plane, rover and copter
2015-03-12 12:50:30 +11:00
Andrew Tridgell
ea49d1cd39
AP_InertialSensor: removed unused variable
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