Lucas De Marchi
4d4dac867e
AP_InertialSensor: pass backend instead of pointer to function
...
Different detect() function might need different arguments and passing a
pointer to function here is cumbersome. For example, it forces to have a
method like "detect_i2c2" rather than allowing hal.i2c2 to be passed as
parameter.
2015-08-08 14:12:22 +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
Randy Mackay
9d81856580
InertialSensor: fix name of get_delta_velocity method
2015-06-17 12:46:54 +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
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
7d90033a36
AP_InertialSensor: support raw accel and gyro dataflash logging
2015-05-07 12:08:30 +10: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
Jonathan Challinger
423160eaf8
AP_InertialSensor: publish delta_velocity_dt
2015-04-03 14:54:06 -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
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
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
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
Randy Mackay
f9c6e35d19
INS: add calibrating method
2015-03-09 17:58:38 +11:00
Emile Castelnuovo
dae32984f1
AP_InertialSensor: use PX4 library for VRBRAIN boards.
2015-02-02 08:43:59 +11:00
LukeMike
6a93148b92
AP_InertialSensor: added library for VRBRAIN Inertial Sensor
2015-02-02 08:43:58 +11:00
Andrew Tridgell
6e62e1ca7b
AP_InertialSensor: make calibrated() const
2015-02-01 14:13:54 +11:00
Andrew Tridgell
745b739ab7
AP_InertialSensor: make calibrated() function fast enough to call in flight
...
this will be used in plane to make AHRS SYS_STATUS unhealthy if a user
tries to fly with EKF enabled without a full 3D accel cal.
Note that it doesn't rely on using AP_Param load() to detect that a
value has been set, as some users are first doing a 3D cal then later
doing a 1D cal. In that case load() was returning true and would give
a false positive
2015-01-03 14:06:42 +11:00
Andrew Tridgell
b9adc6e466
AP_InertialSensor: prefer sensors that have zero error counts
...
if a sensor has failed in flight then try not to use it if another
error-free sensor is available
2014-12-29 21:19:35 +11:00
Andrew Tridgell
40e83ceb1f
AP_InertialSensor: simplify next sample time calculations
...
this makes the calculation much clearer
2014-10-24 12:10:40 +11:00
Andrew Tridgell
a047d1f569
AP_InertialSensor: moved default filter and sample_rate to frontend
...
this simplifies the backends and prevents code repitition
2014-10-24 12:10:40 +11:00
Andrew Tridgell
17b2214798
AP_InertialSensor: make it easier to add multiple backends
...
use _add_backend() to add new backends on startup
2014-10-24 12:10:40 +11:00
Andrew Tridgell
3a9a5a9c18
AP_InertialSensor: implement gyro and accel health monitoring
...
sensor is healthy if it gave a sample on the last update()
2014-10-24 12:10:39 +11:00
Andrew Tridgell
dbcd02f2be
AP_InertialSensor: converted MPU9150 driver
...
untested conversion
2014-10-24 12:10:38 +11:00
Andrew Tridgell
ff5f791343
AP_InertialSensor: converted flymaple driver to new API
2014-10-24 12:10:38 +11:00
Andrew Tridgell
2d47a07480
AP_InertialSensor: ported L3G4200D driver to new API
2014-10-24 12:10:37 +11:00
Andrew Tridgell
deafcd6ddc
AP_InertialSensor: improved timing in all drivers
2014-10-24 12:10:37 +11:00
Andrew Tridgell
d48beb0c0f
AP_InertialSensor: converted PX4 driver to new API
2014-10-24 12:10:37 +11:00
Andrew Tridgell
ec11417705
AP_InertialSensor: converted HIL backend, which gets SITL working
2014-10-24 12:10:36 +11:00
Andrew Tridgell
448efc70a3
AP_InertialSensor: first steps in frontend/backend split
...
This converts the MPU6000 driver to a frontend/backend structure, and
disables all other drivers. They will be progressively re-enabled as
each is converted
2014-10-24 12:10:36 +11:00
Randy Mackay
834f2bea07
INS: add gyro_calibrated_ok_all method
...
This returns true if the gyros have been calibrated successfully
2014-10-09 10:00:07 +09:00
Randy Mackay
74553e523d
INS: add get_accel_health_all and get_gyro_health_all
...
Returns true only if all available accels or gyros are healthy
2014-09-03 11:22:46 +09:00
Víctor Mayoral Vilches
0f908a8ccd
HAL_Linux: Add L3GD20 to the AP_InertialSensor header
2014-08-19 10:08:15 +10:00
Randy Mackay
51f40fe3d6
INS: add accessor for mpu6k filter
2014-08-14 11:47:23 +09:00
Randy Mackay
6baedbda1d
AP_InertialSensor: add empty virtual destructor
2014-07-16 14:56:56 +09:00
LukeMike
85fc72c57c
AP_InertialSensor: VRBRAIN added 3th inertial sensor
2014-07-15 20:42:15 +10:00
Andrew Tridgell
abb53eb9a2
AP_InertialSensor: simplify using HAL board subtypes
2014-07-14 09:44:35 +10:00