Commit Graph

548 Commits

Author SHA1 Message Date
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 bc655ff0cc AP_InertialSensor_PX4: add optional debug 2015-03-12 12:50:28 +11:00
Jonathan Challinger 074ee49cd0 AP_InertialSensor_PX4: interleave accel and gyro samples by time 2015-03-12 12:50:28 +11:00
Jonathan Challinger addf80b669 AP_InertialSensor_PX4: explicitly configure sensors, publish deltas 2015-03-12 12:50:27 +11:00
Jonathan Challinger b5131b7b64 AP_InertialSensor: add coning.py example 2015-03-12 12:50:27 +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
Jonathan Challinger 502446d821 AP_InertialSensor: use LowPassFilter2pVector3f 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 494e909703 AP_InertialSensor: ensure accel cal completion messages get through 2015-03-09 07:36:50 +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
Andrew Tridgell 434d094993 AP_InertialSensor: allow MAVLink packets to flow during accelcal
this uses the snoop functionality of GCS_MAVLink to allow the delay
callback to be used during accel calibration
2015-03-07 21:56:39 +11:00
Randy Mackay b650d39786 InertialSensor: remove product_id set to zero 2015-02-21 09:14:33 +09:00
Andrew Tridgell 9b2d44d6ed AP_InertialSensor: use delay_microseconds_boost()
this gives much more consistent timing for PX4
2015-02-16 12:19:13 +11:00
Andrew Tridgell f54d799bff AP_InertialSensor: added TIMING_DEBUG code for finding loop timing issues 2015-02-16 10:12:10 +11:00
Andrew Tridgell 04bef5ccf3 AP_InertialSensor: don't skip delay if we are a bit early
this produces a bit more even timing
2015-02-14 12:25:44 +11:00
Andrew Tridgell 4537acb898 AP_InertialSensor: change for new PX4 device paths 2015-02-14 12:25:43 +11:00
mirkix 460b434708 AP_InertialSensor: add apm1 oilpan support 2015-02-11 18:22:44 +11:00
Grant Morphett b511410b48 AP_InertialSensor: Changes to fix the warnings in rover sitl build.
We are starting the process of resolving all the warnings in the
ardupilot builds of all vehicles and platforms.
2015-02-11 18:16:45 +11:00
Emile Castelnuovo dae32984f1 AP_InertialSensor: use PX4 library for VRBRAIN boards. 2015-02-02 08:43:59 +11:00
Emile Castelnuovo 731329fc55 AP_InertialSensor: correction to AP_InertialSensor_VRBRAIN 2015-02-02 08:43:58 +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
Randy Mackay b43dc3bdfb INS: fix example sketch 2015-01-28 17:15:42 +09:00
Andrew Tridgell 8b59c72eb9 AP_InertialSensor: cope with 2 IMUs in SITL 2015-01-20 19:47:45 +11:00
Andrew Tridgell b3ce56d34d AP_InertialSensor: fixed 2nd IMU in Replay
this makes for much more accurate replay runs
2015-01-20 09:20:47 +11:00
mirkix fa950a735e AP_InertialSensor: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black 2015-01-12 21:36:40 +13:00
Andrew Tridgell 1b3c3c754d AP_InertialSensor: use correct ifdef for AK8963 2015-01-07 11:58:05 +11:00
Staroselskii Georgii f7f9cd2173 AP_InertialSensor: prevented MPU9250 from disabling I2C slaves 2015-01-07 08:41:13 +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 06a72839ed AP_InertialSensor: fixed error detection on secondary IMUs
the break; was preventing error detection on lsm303d/l3gd20
2015-01-01 08:55:57 +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 7bb56e50aa AP_InertialSensor: fixed example build 2014-11-28 10:40:19 +11:00
Andrew Tridgell f84f432ecf AP_InertialSensor: allow gyro calibration to take up to 30 seconds
this gives time for the user time to get their battery hatches on and
hold the model steady. 5 seconds was just far too short
2014-11-22 18:27:51 +11:00
Andrew Tridgell 7c288e020b AP_InertialSensor: fixed detection of dead IMU
if a PX4 sensor does not give new data we need to avoid calling
_rotate_and_offset_*() to avoid marking it as healthy. Otherwise if
the MPU6k dies we won't switch to the LSM303D automatically
2014-11-16 12:30:33 +11:00
Andrew Tridgell 986b7bf894 AP_InertialSensor: fixed frequency to 16 bit in LDM303D and L3GD20 drivers 2014-11-11 17:06:22 +11:00
Andrew Tridgell 3518cf5480 AP_InertialSensor: fixed default MPU9250 orientation for NavIO 2014-11-04 16:18:35 +11:00
Andrew Tridgell ad7c612334 AP_InertialSensor: fixed SITL with new HIL code 2014-10-24 15:05:44 +11:00
Andrew Tridgell aeaa3c1e04 AP_InertialSensor: fixed build for VRBrain 2014-10-24 12:10:41 +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 9dfbdb1e69 AP_InertialSensor: run the MPU6000 at 1kHz on fast CPUs
use a software filter and 1kHz sampling for better filtering if we
have a fast enough CPU to do it
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 bc5d79118d AP_InertialSensor: updated comments 2014-10-24 12:10:39 +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 586fa9a816 AP_InertialSensor: added product_id support
fill in parameter from first backend
2014-10-24 12:10:39 +11:00
Andrew Tridgell 520727e5bd AP_InertialSensor: fixed example build 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 a42af0f2f1 AP_InertialSensor: use common AP_InertialSensor driver for PX4 and VRBRAIN 2014-10-24 12:10:38 +11:00
Andrew Tridgell 3ce7667e5a AP_InertialSensor: tidy up MPU6000 driver 2014-10-24 12:10:37 +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 ff6d87f145 AP_InertialSensor: minor tidy up for HIL driver 2014-10-24 12:10:37 +11:00
Andrew Tridgell 85686c22ec AP_InertialSensor: converted the APM1/Oilpan driver to new API 2014-10-24 12:10:37 +11:00
Andrew Tridgell dcef9bb3b8 AP_InertialSensor: converted the MPU9250 driver to new API 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 0803d79701 INS: param descriptions for ACC2, GYR2 2014-09-27 21:05:33 +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
Randy Mackay 50ae5b2519 InertialSensor: reorder .cpp file to match .h
No functional changes
2014-09-03 11:19:36 +09:00
Andrew Tridgell dcdb53584b AP_InertialSensor: use lockless structures in MPU9250 driver
this avoids suspending timers when transferring data between main
thread and SPI read thread
2014-08-22 21:13:11 +10:00
Andrew Tridgell 5c9e5fbc11 AP_InertialSensor: removed use of hrt_absolute_time() 2014-08-20 09:10:24 +10:00
Andrew Tridgell a14f8dbd0a AP_InertialSensor_MPU9250: use micros64() and millis64() 2014-08-20 08:02:34 +10:00
Andrew Tridgell 3c2ab31415 AP_InertialSensor: get rid of data_ready for MPU9250
when running off a 1kHz timer and reading at 1kHz it is better to
double sample than it is to skip a sample, as skipping samples will
throw the filter off, whereas a double sample will have minimal effect
2014-08-19 20:03:33 +10:00
Andrew Tridgell 9e01c657e5 AP_InertialSensor: update MPU9250 driver for 1kHz operation
use a time base sample wait, with 1kHz sampling
2014-08-19 20:03:33 +10:00
Andrew Tridgell 532e9aace4 AP_InertialSensor: fixed timer bug in HIL sensors 2014-08-19 20:03:33 +10:00
Andrew Tridgell 12239de00d AP_InertialSensor: fix data_ready return for L3GD20 2014-08-19 10:14:20 +10:00
Andrew Tridgell 7286e7acd2 AP_InertialSensor: fixed build errors on APM2 2014-08-19 10:08:17 +10:00
Andrew Tridgell 50068a7c6a AP_InertialSensor: fixed default orientation for PXF board MPU9250 2014-08-19 10:08:16 +10:00
Víctor Mayoral Vilches 5e5319e23b AP_InertialSensor: MPU9250 cleaning 2014-08-19 10:08:16 +10:00
Víctor Mayoral Vilches df1de4efd6 AP_InertialSensor: Driver added for the LSM303D 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches 8968647873 AP_InertialSensor: INS_generic example, add support L3GD20 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches 0f908a8ccd HAL_Linux: Add L3GD20 to the AP_InertialSensor header 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches 556d46a4ef AP_InertialSensor: L3GD20 driver added
L3GD20 gyro userspace sensor added. The driver constructs
over the implementation of the PX4 Dev Team at
https://github.com/diydrones/PX4Firmware.
2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches bfacf08c30 HAL_Linux: LSM9DS0 legacy driver moved to AP_InertialSensor/LSM9DS0/
The new LSM9DS0 driver will consist of the AP_InertialSensor_L3GD20 and
the AP_InertialSensor_LSM303D. For that reason the old LSM9DS0
(consisting of gyro and accel+mag implemented on a single class) has
been moved to a folder.

Legacy LSM9DS0 didn't probe to receive "correct" data.
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 0e7cbd28c8 INS_HIL: init members to resolve compiler warnings 2014-08-14 11:27:32 +09:00
Andrew Tridgell 24251a7e12 AP_InertialSensor: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell 984064f3d3 AP_InertialSensor: fixed example build 2014-08-13 18:46:44 +10:00
Mikhail Avkhimenia 34da221c3d AP_InertialSensor: Use MPU9250 DRDY pin only on boards that support it 2014-08-12 22:13:00 +10:00
Andrew Tridgell f8ceccce32 AP_InertialSensor: improved HIL timing consistancy
try to keep the average time for each sample right
2014-08-09 22:50:15 +10:00
Andrew Tridgell 1d4d848300 AP_InertialSensor: fixed a build warning 2014-08-08 13:48:03 +10:00
Andrew Tridgell ed6ab5f1d3 AP_InertialSensor: use bool for blocking_read()
uint8_t return was confusing
2014-08-07 13:09:17 +10:00
Michael Carpenter b4c0e1215b AP_InertialSensor: Use return value of blocking_read to handle calibration timeouts 2014-08-07 13:04:18 +10:00
Andrew Tridgell cc735a4200 AP_InertialSensor: some more debug info for VibTest 2014-07-31 12:48:30 +10:00
Andrew Tridgell f7b01a6f3f AP_InertialSensor: avoid integer underflow in mavlink txspace check 2014-07-27 22:18:52 +10:00
Andrew Tridgell 662276597a AP_InertialSensor: fixed example build 2014-07-25 17:52:14 +10:00
Andrew Tridgell 79f453dfd3 AP_InertialSensor: use LSM9DSO_AM device 2014-07-19 13:23:54 +10:00
Randy Mackay 6baedbda1d AP_InertialSensor: add empty virtual destructor 2014-07-16 14:56:56 +09:00
Randy Mackay a09f7b9198 AP_InertialSensor_MPU6k: init members to reduce compiler warnings 2014-07-16 14:40:55 +09:00
Randy Mackay c5a03ea18e AP_InertialSensor: init members to reduce compiler warnings 2014-07-16 14:40:53 +09:00
LukeMike 85fc72c57c AP_InertialSensor: VRBRAIN added 3th inertial sensor 2014-07-15 20:42:15 +10:00
Andrew Tridgell 0f724c1d7a AP_InertialSensor: removed per-device example code
now can use a single generic test for all boards
2014-07-14 09:44:36 +10:00
Andrew Tridgell 5a170c6343 AP_InertialSensor: added INS_generic test 2014-07-14 09:44:36 +10:00
Andrew Tridgell d1ba78002d AP_InertialSensor: added paranoid check for DRDY pin 2014-07-14 09:44:36 +10:00
Andrew Tridgell 6f9965cc22 AP_InertialSensor: fixed setup of DRDY pin on MPU9250 2014-07-14 09:44:36 +10:00
Andrew Tridgell 6a6dbe5790 AP_InertialSensor: added check for WHOAMI on MPU9250 2014-07-14 09:44:35 +10:00
Andrew Tridgell abb53eb9a2 AP_InertialSensor: simplify using HAL board subtypes 2014-07-14 09:44:35 +10:00
Andrew Tridgell 848b563fc3 AP_InertialSensor: rotate acccel/gyro for PXF 2014-07-14 09:44:34 +10:00
Andrew Tridgell ea188528fc AP_InertialSensor: fixed build errors for LSM9DSO 2014-07-14 09:44:34 +10:00
Víctor Mayoral Vilches 2982fc029c AP_InertialSensor_LSM9DS0: Fix _dump_registers method 2014-07-14 09:44:34 +10:00
Víctor Mayoral Vilches feedc40f72 AP_InertialSensor_LSM9DS0: Move LSM9DS0_DEBUG flag to the header 2014-07-14 09:44:34 +10:00
Andrew Tridgell 297bb52ced AP_InertialSensor: added MPU9250 header 2014-07-14 09:44:34 +10:00
Víctor Mayoral Vilches f213f01983 AP_InertialSensor_LSM9DS0: Remove previous CS handling.
CS is now being automatically handled by the SPI Driver.
2014-07-14 09:44:33 +10:00
Andrew Tridgell 3ed4f82cb0 AP_InertialSensor: fixed DRDY include for Linux 2014-07-14 09:44:33 +10:00
Andrew Tridgell 06b6d7aaf0 AP_InertialSensor: fixeup DRDY pin for different boards 2014-07-14 09:44:33 +10:00
Víctor Mayoral Vilches 3379ddd51f AP_InertialSensor_MPU6000: Add _register_write_check method.
This private method allows to check whether the value written and
the posterior value readed are the same.
Should be used only for debuging purposes, for release versions use
_register_write instead.
2014-07-14 09:44:33 +10:00
Víctor Mayoral Vilches 0fff8df491 AP_InertialSensor: fix LSM9DS0 test code 2014-07-14 09:32:30 +10:00
Víctor Mayoral Vilches bb5de8a6a1 AP_InertialSensor_LSM9DS0: Fix the CS. 2014-07-14 09:29:45 +10:00
Víctor Mayoral Vilches ad3a3f9366 AP_InertialSensor_MPU6000: Fix the CS. 2014-07-14 09:29:45 +10:00
Víctor Mayoral Vilches aa60a89cda AP_InertialSensor_MPU9250: Fix SPI CS. 2014-07-14 09:29:45 +10:00
Víctor Mayoral Vilches bae84e2942 AP_InertialSensor: Add missing library to test example. 2014-07-14 09:29:36 +10:00
Víctor Mayoral Vilches 4df3b55ed4 AP_InertialSensor_MPU9250: Add missing library for example/
In order to compile the examples test a library needed to
added.
2014-07-14 09:29:36 +10:00
Víctor Mayoral Vilches eb95130441 AP_InertialSensor_MPU9250: remove legacy CS. 2014-07-14 09:29:18 +10:00
Víctor Mayoral Vilches 5e7e28a83e AP_InertialSensor_MPU9250.cpp: Update the DRDY pin. 2014-07-14 09:29:18 +10:00
Víctor Mayoral Vilches d053a91cd5 AP_InertialSensor_MPU6000: Remove MPU6000_CS_PIN
Remove MPU6000_CS_PIN, a legacy way of handling
Chip Select.
2014-07-14 09:29:18 +10:00
Víctor Mayoral Vilches d9cb29ea8b AP_InertialSensor_MPU6000: Correct DRDY pin. 2014-07-14 09:29:18 +10:00
Víctor Mayoral Vilches df14318bbd AP_InertialSensor_L3G4200D: Clock-based wait_for_sample() impl. 2014-07-14 09:29:08 +10:00
Víctor Mayoral Vilches 7cf1187473 AP_InertialSensor_MPU9150: Clock-based wait_for_sample() impl.
Adapt the I2C driver to a system clock based wait_for_sample()
implementation.

The sample rate of the sensor has been corrected to 800 Hz (could be
further pushed up to 1KHz).

Filters for the mag have also been created but remain commented until
the code for the mag is ready.
2014-07-14 09:10:23 +10:00
Víctor Mayoral Vilches c4babc543d AP_InertialSensor_LSM9DS0: SPI userspace sensor driver.
ST Microelectronics 9 DOF IMU userspace sensor driver. Some
work with the filters needs to be done.
2014-07-14 09:10:23 +10:00
Víctor Mayoral Vilches 1c07985518 AP_InertialSensor_MPU9150: Comment the suspend_timer_procs
It causes the driver to hang. This matter should be inspected.
2014-07-14 09:02:47 +10:00
Víctor Mayoral Vilches d65aefbef5 AP_InertialSensor_MPU6000: Fix the test code so that compiles. 2014-07-14 09:02:47 +10:00
Víctor Mayoral Vilches fac3d1c271 AP_InertialSensor_MPU9250: SPI userspace sensor driver.
InvenSense MPU9250 sensor driver and test code (available under
libraries/examples/).
2014-07-14 09:02:47 +10:00
Víctor Mayoral Vilches 4d79887cc5 L3G4200D: fix in the test example provided.
The test coded had a call to "wait_for_sample" that expected one
argument and 0 where provided.
2014-07-14 08:52:51 +10:00
Andrew Tridgell ab7e96b9de AP_InertialSensor: updates for ERLE board type 2014-07-14 08:51:44 +10:00
Victor Mayoral Vilches 44320708a7 AP_InertialSensor_MPU9150: I2C userspace driver sensor added.
The MPU9150 is a 9 axis sensor that includes 3 accelerometers,
3 gyroscopes and 3 magnetometers. All accessible through I2C.
The AP_InertialSensor_MPU9150 class allows APM to use this sensor.
2014-07-14 08:16:29 +10:00
Randy Mackay 7e04b5d1f1 INS: calibrated method checks all accelerometers 2014-07-13 22:05:21 +09:00
Andrew Tridgell d325f630e5 VibTest: added sample timing to console output 2014-07-09 12:12:23 +10:00
Andrew Tridgell 863e7a5f93 VibTest: fixed array bounds error 2014-07-09 08:11:52 +10:00
Andrew Tridgell 2c8240dbb4 VibTest: fixed gyro timestamps in logs
it was using the accel timestamps
2014-07-09 08:10:09 +10:00
Andrew Tridgell d50d5b8f24 VibTest: fixed sample count output on console 2014-07-08 10:59:30 +10:00
Andrew Tridgell 03770c4d34 VibTest: added gyro data and support 3 sensors
will be used for vibration testing on FMUv3
2014-07-08 10:07:58 +10:00
Andrew Tridgell ca12592448 AP_InertialSensor: allow for 3 accels and 3 gyros on Pixhawk
this supports FMUv3
2014-06-30 07:58:27 +10:00
Andrew Tridgell ece01da10e AP_InertialSensor: fixed _dump_registers() for MPU6000
need to take the semaphore to prevent bus errors
2014-06-29 12:11:21 +10:00
LukeMike 8f552d5758 VRBRAIN: Changed the management of VirtualRobotix's boards. 2014-06-19 11:27:38 +02:00
Andrew Tridgell 4c43cd9775 AP_InertialSensor: fixes for HAL_GPIO_* 2014-06-02 10:42:35 +10:00
Andrew Tridgell 65fd25fb5a AP_InertialSensor: fixed example build 2014-05-18 08:08:19 +10:00
Andrew Tridgell 8533aecf18 AP_InertialSensor: fixed example build 2014-05-16 21:24:25 +10:00
Andrew Tridgell 086142580a AP_InertialSensor: added VibTest sketch
logs all accel data at high rate to SD card
2014-05-15 21:14:21 +10:00
Emile Castelnuovo 06744ea7d2 AP_InertialSensor: new files and definitions for VRBRAIN board 2014-04-08 16:19:19 +10:00
Andrew Tridgell 2763393908 AP_InertialSensor: fixed some compiler warnings 2014-03-24 12:52:16 +11:00
Andrew Tridgell 731f980327 AP_InertialSensor: fixed example build 2014-03-19 12:13:47 +09:00
Jonathan Challinger e81d2e9584 AP_InertialSensor: Correct out-of-bounds array access that was causing SITL to crash 2014-02-28 17:25:54 +11:00
Andrew Tridgell 2c85a7ba56 AP_InertialSensor: expose get_primary_accel() for use in AHRS 2014-02-27 16:27:46 +11:00
Andrew Tridgell 840f1b9a1e AP_InertialSensor: make HIL timing more accurate
needed for 400Hz replay
2014-02-27 08:10:42 +11:00
Andrew Tridgell 6732d6c79b AP_InertialSensor: enable get_accel_count() and get_gyro_count() APIs for HIL 2014-02-23 19:10:07 +11:00
Andrew Tridgell 0e18079c47 AP_InertialSensor: allow HIL sensors to support multiple instances
this allows log replay to test both sets of sensors on a Pixhawk log
2014-02-23 08:16:33 +11:00
Randy Mackay 33fe778cdd InertialSensor_PX4: resolve compiler warning 2014-02-21 13:53:34 +09:00
Andrew Tridgell fe0cb23733 AP_InertialSensor: fixed HIL for 400Hz INS 2014-02-19 10:29:00 +11:00
Mike McCauley 2c94a40310 AP_InertialSensor: AP_InertialSensor_Flymaple Remove unnecessary
comment
2014-02-17 05:56:37 +11:00
Mike McCauley dd6abb49a9 AP_InertialSensor: AP_InertialSensor_Flymaple::healthy() was required after
all.
2014-02-17 05:56:37 +11:00
Mike McCauley 0a43cf8c5c AP_InertialSensor: AP_InertialSensor_Flymaple removed redundant definition of
healthy().
2014-02-17 05:56:37 +11:00
Mike McCauley f7279aa13f AP_InertialSensor: AP_InertialSensor_Flymaple implement get_gyro_health
and get_accel_health.
2014-02-17 05:56:37 +11:00
Andrew Tridgell f9d0747750 AP_InertialSensor: fixed example build 2014-02-15 06:39:35 +11:00
Andrew Tridgell 3617c65af7 AP_InertialSensor: make HIL treat time like PX4 does 2014-02-15 05:48:20 +11:00
Andrew Tridgell b1c5f23bbd AP_InertialSensor: make get_delta_time() const
allows use from AP_NavEKF
2014-02-15 05:29:47 +11:00
Randy Mackay b7565affcd INS: add support for 400hz for PX4 2014-02-15 05:27:33 +11:00
Andrew Tridgell a95a3142e0 AP_InertialSensor: use fixed size arrays
apparently helps SITL build on MacOS
2014-02-08 19:32:26 +11:00
Andrew Tridgell 045efdb084 AP_InertialSensor: fixed example builds 2014-01-30 13:33:38 +11:00
Andrew Tridgell 58d3729d16 AP_InertialSensor: fixed default health functions
this fixes INS on APM1. Thanks to Mike McCauley for noticing this!
2014-01-22 22:08:28 +11:00
Don Gagne 68b3b31499 Param doc typo 2014-01-18 10:18:58 +09:00
Randy Mackay 965e5b2dfd INS: check for good calibration for 10seconds
Shortened gyro calibration commit also halved the total time we would
look for a good gyro calibration.  This restores the total time to 10
seconds.
2014-01-17 12:48:11 +09:00
Randy Mackay 1f76ada9dd INS: shortened gyro calibration
Removed delays before calibration, reduced number of samples taken,
widened convergence criteria
2014-01-16 13:40:49 +09:00
Randy Mackay a400ddeb88 INS: replace APM with vehicle in accel calibrate 2013-12-28 10:41:49 +09:00
Andrew Tridgell 8dd34f8bc4 AP_InertialSensor: fixed example build 2013-12-17 11:51:37 +11:00
Andrew Tridgell 6d39cf5e49 AP_InertialSensor: another attempt at fixing the spurious bad gyro health warnings
cope with _get_sample() not being called for a while
2013-12-14 15:47:49 +11:00
Andrew Tridgell 99e2dc87c9 AP_InertialSensor: prevent INS healthy errors while initialising
during gyro cal we shouldn't mark the gyro unhealthy
2013-12-13 20:47:24 +11:00
Andrew Tridgell 23a112c5d5 AP_InertialSensor: reduce the number of format string warnings 2013-12-11 17:29:27 +11:00
Andrew Tridgell 433ad19335 AP_InertialSensor: fixed loop limits
stops pointless operations
2013-12-11 14:57:13 +11:00
Andrew Tridgell e54fc6b8e3 AP_InertialSensor: make sure we wait for a sample before update() 2013-12-11 13:50:50 +11:00
Andrew Tridgell cba0cb963a AP_InertialSensor: auto-failover to working gyro and accel 2013-12-09 20:02:04 +11:00
Andrew Tridgell a0688a69d4 AP_InertialSensor: generalise the accel/gyro calibration for N sensors 2013-12-09 17:34:06 +11:00
Andrew Tridgell d9b6f7f0f7 AP_InertialSensor: implement up to two sensors on PX4 2013-12-09 17:34:05 +11:00
Andrew Tridgell 2753449e75 AP_InertialSensor: added support for multiple accel/gyro devices
this makes it possible to ask for the gyro and accel vectors from
secondary INS devices.
2013-12-09 17:34:05 +11:00
Randy Mackay fd9b115d01 INS: move Product ID to @User Advanced 2013-11-26 22:18:28 +09:00
Andrew Tridgell 71bb462ad0 AP_InertialSensor: use fabsf() 2013-11-15 10:43:10 +11:00
Andrew Tridgell aef9289476 AP_InertialSensor: added INS_PRODUCT_ID values 2013-11-15 10:43:10 +11:00
Andrew Tridgell f10a4b04ae AP_InertialSensor: make PX4 healthy call _get_sample()
this prevents a false positive during times like arming where we are
not reading the sensors
2013-11-10 17:03:16 +11:00
Andrew Tridgell 80def01fbe AP_InertialSensor: fixed semaphore error on startup for MPU6000 2013-11-09 11:26:50 +11:00
Andrew Tridgell f5299e2e11 AP_InertialSensor: added healthy check for PX4 and HIL
used to detect bad accels
2013-11-07 13:53:59 +11:00
Andrew Tridgell 9ecd889e9d AP_InertialSensor: detect bad MPU6000 SPI transactions and lower bus speed
this uses bad data or bad INT_STATUS values from the MPU6000 to detect
the sensor running too fast and lower bus speed
2013-11-07 12:48:17 +11:00
Andrew Tridgell b98bcbf715 AP_InertialSensor: automatically lower bus speed on mpu6k bad reads 2013-11-07 12:48:16 +11:00
Andrew Tridgell bdc40cc7df AP_InertialSensor: try to lower SPI bus speed on errors 2013-11-07 12:48:16 +11:00
Andrew Tridgell 1cd070a2e7 AP_InertialSensor: use const reference returns
saves some vector copies
2013-11-04 21:21:42 +11:00
Andrew Tridgell f4dde44b8d AP_InertialSensor: SITL doesn't use Oilpan code any more 2013-11-02 21:41:11 +11:00
Mike McCauley fe6cacf081 AP_InertialSensor: Minor correction to comments in AP_InertialSensor_Flymaple.cpp 2013-10-14 11:34:47 +10:00
Andrew Tridgell 7831113f84 AP_InertialSensor: yield the CPU for the right time in wait_for_sample()
this improves timing performance
2013-10-14 08:45:58 +11:00
Andrew Tridgell 8532e2bff8 AP_InertialSensor: fixed timing of PX4 sensor samples 2013-10-13 22:15:50 +11:00
Andrew Tridgell 9833900f91 AP_InertialSensor: run MPU6000 sensor register reads at 8MHz
run other register IO at 500kHz
2013-10-13 11:03:08 +09:00
Andrew Tridgell b3af59cc0c AP_InertialSensor: don't build L3G4200D example 2013-10-10 09:54:20 +11:00