Andrew Tridgell
0f6f6bac6b
AP_InertialSensor: expose TCal class for use in SITL
2021-01-21 13:09:21 +11:00
Andrew Tridgell
7921e042f1
AP_InertialSensor: added IMU temperature calibration support
...
this adds parameters that can be setup by an external script for
compensating for temperature variation in gyros and accels using a 3rd
order polynomial
2021-01-21 13:09:21 +11:00
Peter Barker
239b09fb34
AP_InertialSensor: add simulator for ICM40609
2021-01-12 17:43:36 +11:00
Andrew Tridgell
957842f7eb
AP_InertialSensor: added support for v3 Invensense sensors
...
starting with ICM-40609, ICM-42688 and ICM-42605
2021-01-11 14:43:35 +11:00
Andrew Tridgell
b74e5c0e2f
AP_InertialSensor: added ExternalAHRS backend
2021-01-05 21:13:12 +11:00
Andrew Tridgell
4f176c25de
AP_InertialSensor: relax IMU wait time for low loop rates
...
allow for waiting for all IMUs for up to 1/3 of the loop time
2021-01-05 21:13:12 +11:00
murata
219dc2e7da
AP_InertialSensor: Set the gravitational acceleration value to the defined value
2021-01-05 09:11:14 +09:00
Andy Piper
3db6203fb6
AP_InertialSensor: reduce FIFO buffer size to avoid DMA contention
2020-12-23 18:03:12 +11:00
Peter Barker
72acc8bfc8
AP_InertialSensor: use primary gyro (not accel) for get_delta_angle_dt
2020-11-29 13:21:53 +11:00
Peter Barker
2437cf8a24
AP_Logger: use instance number for IMU logging
2020-11-11 19:31:53 +11:00
Andrew Tridgell
f6c45c3bcd
AP_InertialSensor: cope with INS_MAX_INSTANCES < 3
2020-11-10 16:15:45 +11:00
Andrew Tridgell
e8f21d3458
AP_InertialSensor: fixed rpm indexing for vtol motors
...
quadplane vtol motors start at 1
2020-10-28 14:20:44 +11:00
Michael du Breuil
c86dcf91d6
AP_InertialSensor: Run vibration monitoring on all instances
2020-10-24 09:54:04 +11:00
Peter Barker
02c9aa2ae2
AP_InertialSensor: remove unused define
2020-10-20 11:24:34 +11:00
mhefny
02daa4c3ec
AP_InertialSensor: update L3G4200D driver
2020-10-06 09:27:26 -07:00
Andrew Tridgell
cfc59497f6
AP_InertialSensor: trigger internal error on persistent IMU reset
...
this will give users a warning when they are getting the Invensense
IMU FIFO reset issue
2020-09-02 06:42:44 +10:00
Andrew Tridgell
d5c0522651
AP_InertialSensor: instantiate SIM_IMU_COUNT sensors in SITL
2020-08-28 10:17:00 +10:00
bugobliterator
4cdb4b74f3
AP_InertialSensor: add support for checked register in Invensensev2 Drvr
2020-08-06 12:41:35 +10:00
Andy Piper
e53a43461b
AP_InertialSensor: remove ICM gyro pre-filter
2020-08-04 09:24:16 +10:00
bugobliterator
43c16cd417
AP_InertialSensor: ensure that we use environment Python interpreter
2020-08-03 14:02:09 +10:00
Andy Piper
d4ba821297
AP_InertialSensor: make the backend fast gyro rate configurable and independent from the accel rate
...
allow fast sampling of gyros on MPU6000 and MPU6500
2020-07-28 20:47:16 +10:00
Andy Piper
05366e9aa9
AP_InertialSensor: delegate active harmonic calculation to the filter
2020-07-14 09:50:06 +10:00
Andy Piper
faf9bbbf3a
AP_InertialSensor: make the backend fast gyro rate configurable
...
raise gyro rate default on F7 and H7
clean up gyro rate docs and output startup banner
2020-07-10 16:45:29 +10:00
Andy Piper
61bb42cc0c
AP_InertialSensor: allow up to four distinct notch center frequencies to be updated
...
apply the LPF after the notch filters to reduced notch-induced noise
2020-06-21 19:09:35 +10:00
duccan
cdcdd5ce27
AP_HAL_ChibiOS: Added support for Bitcraze Crazyflie 2.1
...
Rework after review:
- Kept old IMU and barometer definition of crazyflie 2.0 in hwdef
- Added comment regarding soft-reset command
- Added defaults.parm for crazyflie
2020-06-07 07:49:37 +10:00
duccan
0d96c7f7a5
AP_HAL_ChibiOS: Added support for Bitcraze Crazyflie 2.1
2020-06-07 07:49:37 +10:00
Andrew Tridgell
cab3630009
AP_InertialSensor: switched to supplying timestamps for SITL
...
this allows the time step to change on each loop as we no longer use
the average sensor rate when calculating deltas
2020-06-03 18:11:06 +10:00
Andy Piper
8ac79da643
AP_InertialSensor: FFT gyro window would overflow on windows >= 256
...
convert FFT buffers to ObjectBuffer<float> for lock-free access
push gyro samples directly into the FFT ring buffer from the gyro thread
2020-05-24 07:43:34 +10:00
Andy Piper
d0a241597a
AP_InertialSensor: add support for double harmonic notches to more effectively target wider noise peaks
2020-04-28 09:32:02 +10:00
Andrew Tridgell
5c6749ee54
AP_InertialSensor: use wait_pin() to wait for DRDY pin if available
2020-04-23 07:28:13 +10:00
Peter Barker
efbf929bc0
AP_InertialSensor: rename APMrover2 to Rover
2020-04-14 09:50:34 +09:00
Andrew Tridgell
d772289b0d
AP_InertialSensor: added driver for ADIS16470
2020-04-13 11:57:04 +10:00
Andrew Tridgell
d8b33bcac9
AP_InertialSensor: suppress expected errors from invensense IMUs
2020-03-11 16:30:06 +11:00
Andy Piper
507bd9eea9
AP_InertialSensor: add in user-specified background noise when there is no rpm noise
2020-02-25 08:35:09 +11:00
Andy Piper
41b41c05f3
AP_InertialSensor: scale SITL motor noise by SIM_VIB_MOT_MULT
2020-02-22 11:15:37 +11:00
Andy Piper
0e9b2a26c5
AP_InertialSensor: SITL the raw sample rate is not the same as the sensor rate
...
use regulated time for frequency noise to avoid spurious harmonics
SITL sensors must be true separate instances
don't compile in FFT structures if DSP disabled
2020-02-22 11:15:37 +11:00
Andy Piper
3d9776dd6d
AP_InertialSensor: expose statically filtered gyro values for FFT analysis and allow sampling to gyro window for FFT analysis.
...
FFT windows can be dynamically allocated
add harmonic notch dynamic tracking mode
unwind gyro window allocation in the case of failure
allow access to harmonic notch harmonics
2020-02-22 11:15:37 +11:00
Peter Barker
ab7ee46423
AP_InertialSensor: mark some parameters as Calibration parameters
2020-02-04 20:29:09 +11:00
Randy Mackay
b7f6f4a05e
AP_InertialSensor: reduce POS param range to 5m and add increment
2020-02-01 08:46:03 +09:00
Andrew Tridgell
58708c483f
AP_InertialSensor: make all semaphores recursive
...
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell
b89c241329
AP_InertialSensor: use take_blocking instead of HAL_SEMAPHORE_BLOCK_FOREVER
...
this makes for cleaner and smaller code as the failure case is not
needed
2020-01-19 20:19:30 +11:00
Andy Piper
52f59fb573
AP_InertialSensor: more accurately compute INS noise taking throttle into account and adding frequency noise noisily
...
make SITL fast-sampling correct
2019-12-31 10:34:02 +11:00
Andrew Tridgell
e52a3b9978
AP_InertialSensor: default fast sampling on
...
if we have a first IMU capable of fast sampling then we want it
enabled by default
2019-12-23 09:55:07 +11:00
Andy Piper
143a071788
AP_InertialSensor: add rpm-based motor noise to gyros and accels
...
Remove sample time error in backend.
2019-12-17 10:07:06 +11:00
Andy Piper
7e35622015
AP_InertialSensor: correct loop rate on BMI055, clean up setting of loop rate on BMI055 and BMI088
2019-12-09 13:29:34 +11:00
Andy Piper
763089addb
AP_InertialSensor: slight improvement to LOG_BAT_OPT docs.
2019-12-01 12:19:46 +11:00
Andrew Tridgell
9dc618ddd4
AP_InertialSensor: added gyro_harmonic_notch_enabled()
2019-11-19 07:08:01 +08:00
Andrew Tridgell
77d21f9f5d
AP_InertialSensor: return HarmonicNotchDynamicMode
2019-11-19 07:08:01 +08:00
Andrew Tridgell
eb582ac0cc
AP_InertialSensor: avoid SITL build on non-SITL
2019-11-17 20:10:54 +11:00
Mark Whitehorn
00948c33d5
AP_InertialSensor: rename sensor_config_error to config_error
2019-11-08 10:14:34 +11:00
Andrew Tridgell
236ce28339
AP_InertialSensor: updated for heater changes
2019-11-02 16:31:04 +11:00
Andy Piper
6381183aa3
AP_InertialSensor: expose harmonic notch tracking mode
2019-10-31 11:18:40 +08:00
Andrew Tridgell
d6e17b0c2b
AP_InertialSensor: publish an IMU temperature
...
makes testing of mavlink extension easier
2019-10-10 13:23:03 +11:00
Andrew Tridgell
850892c3d9
HAL_ChibiOS: fixes from LGTM errors
2019-09-22 18:35:15 +10:00
Andy Piper
8e385d7453
AP_InertialSensor: correct formatting
2019-09-11 18:41:05 +10:00
Andy Piper
5b7f9f6bea
AP_InertialSensor: while sensors are converging update the filters sample rates. if gyro filtering produces invalid output, keep the previous value
2019-09-11 18:41:05 +10:00
Andy Piper
a9a7fe3ea5
AP_InertialSensor: ensure harmonic notch gets appropriate defaults
2019-09-11 18:41:05 +10:00
Andy Piper
3261677e01
AP_InertialSensor: remove _ prefix from methods. use changed filter methods.
2019-09-11 18:41:05 +10:00
Andy Piper
50f7e50634
AP_InertialSensor: add harmonic notch filter to gyro filter chain
...
Allow dynamic updates to the calculated frequency. Convert bandwidth and frequency to floats.
backend variables do not need to be indexed per-backed
2019-09-11 18:41:05 +10:00
Andy Piper
dde6dec145
AP_InertialSensor: correct reboot documentation for batch logger and filters
2019-09-10 20:29:56 +10:00
Andrew Tridgell
15e15e0b9d
AP_InertialSensor: define GET_I2C_DEVICE()
2019-09-04 16:27:47 +10:00
Andrew Tridgell
1c92ecc89f
AP_InertialSensor: removed old method of specifying most IMUs
...
and removed dangerous default values for rotations
2019-08-28 06:54:11 +10:00
Andrew Tridgell
c99923d500
AP_InertialSensor: require gyro orientations in LSM9DS probe
...
this prevents a bug where they are missing in hwdef.dat
2019-08-27 19:29:37 +10:00
Andrew Tridgell
992016069a
AP_InertialSensor: fixed watchdog on AHRS trim gyro wait
2019-08-19 14:37:46 +10:00
Andrew Tridgell
e1ce735886
AP_InertialSensor: special check for CubeBlack to force INS_USE3=1
...
this will cope with users loading old parameter files
2019-07-31 12:53:57 +10:00
Andrew Tridgell
123800ccd2
AP_InertialSensor: default INS_USE3 to 1
2019-07-31 12:53:57 +10:00
Randy Mackay
6a154c4e4c
AP_InertialSensor: resolve gcs::send_text compiler warning
2019-07-30 09:02:39 +09:00
Andrew Tridgell
8e5c0fa32b
AP_InertialSensor: disable kill IMUs with HAL_MINIMIZE_FEATURES
2019-07-07 19:03:01 +10:00
Andrew Tridgell
09d3392aee
AP_InertialSensor: zero accumulators on time step
...
this zeros the delta angle and delta velocity accumulators when a
sensor is unavailable for a period of 0.1s. This prevents garbage
values being passed into the EKF when a sensor dies and then becomes
available again some time later
2019-07-07 19:03:01 +10:00
Andrew Tridgell
3444e82ef9
AP_InertialSensor: added RC switch for killing IMUs
2019-07-07 19:03:01 +10:00
Andrew Tridgell
053f0cb689
AP_InertialSensor: try much harder to get all IMU samples
...
this we ensures we get new data for all active IMUs on each loop,
rather than sometimes returning with some IMUs not having data.
This matters as not having a sample on an IMU for a single loop can
cause an EKF IMU failover, which will degrade the learned bias
variances
The issue is usually only seen under high load, such as requesting a
loop rate beyond what the hardware is capable of
2019-07-07 19:03:01 +10:00
Andy Piper
31ea3466af
AP_InertialSensor: Post-filter logging takes precedence over sensor-rate logging.
2019-06-06 17:09:17 +10:00
Andy Piper
36878e9b3c
AP_InertialSensor: Allow all filter frequencies to be 16bit.
2019-06-06 17:09:17 +10:00
Andy Piper
fff81a2163
AP_InertialSensor: Make sure the LPF output is used by the notch input.
2019-06-06 17:09:17 +10:00
Andy Piper
18d403c3ac
AP_InertialSensor: Rework notch filter allocation and sampling
...
https://github.com/ArduPilot/ardupilot/issues/11346
Allocate a notch filter per-IMU.
Update the notch filters in the backend at the sensor sample rate.
Allow raw logging of post-filtered gyro and accel values.
2019-06-06 17:09:17 +10:00
Andrew Tridgell
aef343bfd0
AP_InertialSensor: removed old mRoControlZeroF7 config
2019-05-30 15:39:57 +10:00
Andrew Tridgell
039e7366b0
AP_InertialSensor: support new sensor config setup
2019-05-30 15:39:57 +10:00
Andrew Tridgell
3823ba539c
AP_InertialSensor: rename to EXPECT_DELAY_MS()
2019-05-15 15:33:48 +10:00
Andrew Tridgell
02326ac52c
AP_InertialSensor: use EXPECT_DELAY() macro
2019-05-15 15:33:48 +10:00
Andrew Tridgell
4e769730c9
AP_InertialSensor: removed unusued AP_Common/Semaphore.h
2019-05-15 15:33:48 +10:00
Phillip Kocmoud
6665e4c0a7
AP_InertialSensor: probe IMUs for mRoControlZeroF7
2019-05-10 15:05:42 +10:00
Andrew Tridgell
893b49d145
AP_InertialSensor: disable register checking in invensensev2 driver
...
register checking doesn't work for the banked registers used in the
invensensev2 register layout. It ends up setting the wrong register
value in some cases, which can either cause the sensor to stop working
or in the worst case give bad data
2019-05-10 14:55:39 +10:00
Jaaaky
47c65314fb
AP_InertialSensor: fix accelcalsimple watchdog
2019-05-01 14:23:20 +10:00
Andrew Tridgell
034d476fa5
AP_InertialSensor: prevent watchdog in accelcal
2019-04-22 16:53:35 +10:00
Andrew Tridgell
9c48d001ac
AP_InertialSensor: skip gyro cal on watchdog reset
2019-04-22 16:53:35 +10:00
Andrew Tridgell
c988eb2fd9
AP_InertialSensor: don't set INS_ENABLE_MASK to found IMU mask
2019-04-22 14:56:59 +10:00
Andrew Tridgell
c7ed4bfbcc
AP_InertialSensor: allow testing of IMU failure
2019-04-22 14:56:42 +10:00
Randy Mackay
9fa742e1be
AP_InertialSensor: fix compiler warning in BMI088 driver
2019-04-11 10:32:51 +09:00
Peter Barker
e0fc73776c
AP_InertialSensor: return floats from raw-sample-rate getters
...
The underlying type changed at some stage but the getters did not
2019-04-09 10:02:16 +10:00
Andrew Tridgell
fa63243eb0
AP_InertialSensor: added BMI088 accel config retry
2019-04-08 19:58:12 +10:00
Peter Barker
ef860db558
AP_InertialSensor: add floating point constant designators
2019-04-05 23:04:17 -07:00
Michael du Breuil
c7a9e8bf93
AP_InertialSensor: Fix implicit include of AP_Logger
2019-04-05 20:12:53 +11:00
L Kurt Shaw
d08ab88dea
INS: AP_InertialSensor comments for new cubes
...
Correct comments ICM20648 should have been ICM20948
2019-04-02 10:52:43 +11:00
Tom Pittenger
3eeaa2c8df
AP_InertialSensor: rename dataflash to logger
2019-03-28 16:40:57 +11:00
na
494a3f86ad
AP_IntertialSensor: support ICM20601 IMU
2019-03-28 09:15:27 +11:00
Randy Mackay
5d8747c81d
AP_InetialSensor: fixup ENABLE_MASK parameter desc
2019-03-27 13:14:48 +09:00
Andrew Tridgell
4a334d0ed7
AP_IneertialSensor: fixed startup race in SITL
2019-03-21 18:54:32 +11:00
Andrew Tridgell
0a718ba330
AP_IneertialSensor: fixed orientations and gyro scale factors for new Invensense IMUs
2019-03-21 18:54:32 +11:00
Siddharth Purohit
8c2d3945de
AP_IneertialSensor: add support for custom accel scale
...
adds support for 30g measurement on ICM20649
2019-03-21 18:54:32 +11:00
Siddharth Purohit
3a833d9a90
AP_InertialSensor: fix rotation for ICM20649
2019-03-21 18:54:32 +11:00
Andrew Tridgell
880a55c6a2
AP_InertialSensor: fixes for BMI088 on SPI
...
The sensor has an unusual SPI interface, with a pad byte on read, and
retries needed on write
2019-03-14 16:10:40 +11:00
L Kurt Shaw
8d75e8c5bb
INS: AP_InertialSensor.cpp
...
Fix typo in comments should be NFC
2019-03-12 15:56:55 +09:00
Andrew Tridgell
81cd103073
AP_InertialSensor: probe for new v2 invensense IMUs
...
also suppress LSM9DS0 whoami warnings, as these will now be common
with new IMUs
and make 20602 show up as a new devtype so we can distinguish it
2019-03-11 12:40:21 +11:00
Andrew Tridgell
dff3ea416c
AP_InertialSensor: allow for LSM9DS0 to be used on I2C
2019-03-10 09:03:06 +11:00
Siddharth Purohit
086b4c1cfd
AP_InertialSensor: use default value for temperature scale and offset
2019-03-06 20:47:10 +11:00
Siddharth Purohit
b76ec8cc11
AP_InertialSensor: fix slave register structure for Invensensev2
2019-03-06 20:47:10 +11:00
Siddharth Purohit
528c0b4d7c
AP_InertialSensor: add drivers for register bank based Invensense Sensors
2019-03-06 20:47:10 +11:00
Siddharth Purohit
0cfcd0986e
AP_InertialSensor: look for icm20602 for Pixhawk 2 series flight boards
2019-03-06 20:47:10 +11:00
Andrew Tridgell
103af72859
AP_InertialSensor: remove more px4 remnants
2019-02-27 20:32:37 +11:00
Andrew Tridgell
2b285089e9
AP_InertialSensor: widen allowable temp gap on invensense IMUs
...
some sensors have more temperature noise
2019-02-26 16:18:26 +11:00
Andrew Tridgell
07e2167996
AP_InertialSensor: setup for fmuv6
2019-02-26 16:18:26 +11:00
Tom Pittenger
9347e6d36f
AP_InertialSensor: unify singleton naming to _singleton and get_singleton()
2019-02-10 19:09:58 -07:00
Andrew Tridgell
6048c10a7c
AP_InertialSensor: added driver for BMI088
...
setup for 1600 Hz accel sample, 2kHz gyro sample, 24g accel range
2019-01-31 12:05:57 -08:00
Andrew Tridgell
9520f5f768
AP_InertialSensor: removed F4Light
2019-01-21 21:57:21 +11:00
Peter Barker
6fc76a32af
GLOBAL: use AP::logger() and strip redundant Log_ from methods
2019-01-18 18:08:20 +11:00
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
2019-01-18 18:08:20 +11:00
Peter Barker
43e3acc954
AP_InertialSensor: remove use of never-set AP_HAL_PX4 and AP_HAL_VRBRAIN
2019-01-18 09:53:44 +11:00
Peter Barker
43e47f33e4
AP_InertialSensor: remove PX4 backend
2019-01-17 06:41:33 +11:00
Andrew Tridgell
a84af85689
AP_InertialSensor: support fast sampling in SITL
...
this allows testing of fast sample logs for FFT
2019-01-08 21:04:05 +11:00
Andrew Tridgell
512c50a6c4
AP_InertialSensor: use SIM_VIB_FREQ for SITL vibrations
...
this allows for testing of FFT on logs
2019-01-08 06:49:02 +11:00
Michael du Breuil
983356213a
AP_InertialSensor: Remove unused parameter
2018-12-23 12:46:37 -08:00
Randy Mackay
6b3fa520b5
AP_InertialSensor: add range to POS param description
2018-12-13 20:14:01 +09:00
Andrew Tridgell
3de860f73b
AP_InertialSensor: fixed orientation of 2nd OmnibusF7V2 IMU
2018-12-12 16:27:34 +11:00
Peter Barker
011c93f38e
AP_InertialSensor: add override keyword
2018-11-08 11:30:12 +11:00
Andrew Tridgell
755dc8dc5d
AP_InertialSensor: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Michael du Breuil
f51d757844
AP_InertialSensor: Remove unused (and conflicting in some builds) include
2018-10-02 07:09:41 +10:00
Peter Barker
04c36efdbf
AP_InertialSensor: eliminate SITL float-equals issues
2018-08-28 09:54:47 +10:00
Michael du Breuil
1efad07a84
AP_InertialSensor: Remove unused ADC include
2018-07-17 09:29:50 +10:00
Andrew Tridgell
5f8b57ba19
AP_InertialSensor: added SITL device IDs
2018-07-13 10:19:01 +10:00
Lucas De Marchi
49d08ba72a
Global: remove minlure
...
Minlure is a port of ArduPilot to Minnow Board connected to daughter
board. Very few of those were produced and nobody is flying with it.
It served its purpose and all the the improvements to ArduPilot remain
regardless of it not being supported anymore. Now it's just adding
maintenance work with no clear benefit, so pull the plug.
2018-06-26 07:32:08 -07:00
Patrick José Pereira
0c06bf89e5
AP_InertialSensor: Use SITL singleton
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Andrew Tridgell
89b8124560
AP_InertialSensor: added BMI055 IMU driver
2018-06-08 09:56:41 +10:00
Andrew Tridgell
bfa66c9397
AP_InertialSensor: detect two IMUs on FMUv5
2018-06-06 07:15:41 +10:00
Francisco Ferreira
8b32960d3e
AP_InertialSensor: remove Qualcomm board support
2018-05-17 09:57:20 +10:00
Peter Barker
1a640e3405
AP_InertialSensor: parameterise sensor-rate logging, generalise it
...
AP_InertialSensor: add parameters for push-to-log interval and count
AP_InertialSensor: rename BAT_RAW to BAT_OPT
This becomes a bitmask of options for the BatchSampler
AP_InertialSensor: rename 'fast sample' to 'sensorrate sample'
AP_InertialSensor: const sensor-rate filter method
AP_InertialSampler: remove hard-coding of sample rate multiplier
AP_InertialSensor: use parameter to enable/disable sensor-rate logging
AP_InertialSensor: use a parameter to control sensor-rate logging
AP_InertialSensor: allow backends to override sensor data multiplier
e.g. some accelerometers are sensitive over wider ranges than the default 16G
AP_Inertialsensor: correct sample rate multiplier
2018-05-01 09:35:29 +10:00
Andrew Tridgell
44131202cd
AP_InertialSensor: 4kHz batch sampling
2018-05-01 09:35:29 +10:00
Jacob Walser
ad4e928e7d
AP_InertialSensor: add support for custom board orientations
2018-04-24 13:04:37 +01:00
Andrew Tridgell
ca9d1a55fe
AP_InertialSensor: support ICM-20689 IMU
...
like the 20789, but without the baro
2018-04-24 08:03:46 +10:00
Andrew Tridgell
ea2dc9b831
AP_InertialSensor: added OMNIBUSF7V2 INS sensors
...
a dual-IMU board
2018-04-12 11:50:44 +10:00
Andrew Tridgell
f788cde5c7
AP_InertialSensor: use multiply for fifo scale factors
...
this fixes issue from #8118 too
2018-04-10 14:17:16 +10:00
Peter Barker
be634a893f
AP_InertialSensor: remove unused ins error count logging
2018-04-04 14:21:20 +01:00
Peter Barker
aca87ab638
AP_InertialSensor: remove pointless initialisations
...
AP_InertialSensor: avoid pointless zeroing in constructor
AP_InertialSensor is either in bss or is created via new (which zeroes
memory)
2018-04-04 12:14:02 +01:00
Peter Barker
2396a248ed
AP_InertialSensor: use ahrs singleton for simple accelcal
2018-04-02 23:25:05 +01:00
Lucas De Marchi
c4e8aeb105
AP_InertialSensor: remove linux-only include
...
We already include AP_HAL.h that includes the platform-agnostic gpio
header, which is all that this driver needs. This is an alternative
fix to #7794 .
2018-03-09 11:12:31 -08:00
Andrew Tridgell
53b76efbd2
AP_InerialSensor: setup INT_PIN_CFG correctly
...
this restores the behavior lost with the 20789 driver change
2018-03-08 21:25:14 -08:00
Andrew Tridgell
e8726865ab
AP_InertialSensor: Correct scaling of batch data
2018-03-08 18:00:16 -08:00
Andrew Tridgell
455c0e25e1
AP_InertialSensor: allow for HAL_INS_NONE
2018-03-02 12:52:50 +11:00
Peter Barker
4288133ce0
AP_InertialSensor: correct compiler warning
...
../../libraries/AP_InertialSensor/AP_InertialSensor_Invensense.h:108:14:
warning: private field '_error_count' is not used
[-Wunused-private-field]
uint16_t _error_count;
2018-03-02 09:26:37 +09:00
Andrew Tridgell
b61caa9c57
AP_InertialSensor: added SP01 board type
2018-02-14 18:27:00 +11:00
Peter Barker
096f7367bf
AP_InertialSensor: add ins() to AP:: namespace
2018-02-13 17:15:05 +11:00
Andrew Tridgell
b5e5b622c7
AP_InertialSensor: use register header for Revo driver
2018-02-10 09:14:41 +11:00
Andrew Tridgell
0e6497aa85
AP_InertialSensor: merged in Revo driver
2018-02-10 09:14:41 +11:00
Andrew Tridgell
b380143349
AP_InertialSensor: improved handling of I2C invensense sensor
...
on I2C the lower bus bandwidth changes the tradeoffs
2018-02-08 17:36:33 +11:00
Andrew Tridgell
b33c815e96
AP_InertialSensor: added whoami for prototype 20789
2018-02-08 17:36:33 +11:00
Andrew Tridgell
ad8db6cda3
AP_InertialSensor: added sensor type ICM20789_SPI
2018-02-08 17:36:33 +11:00
Andrew Tridgell
b9e5649888
AP_InertialSensor: support PCNC1
2018-02-08 17:36:33 +11:00
Peter Barker
71cf3941a7
AP_InertialSensor: move Invensense register defines into separate file
2018-02-08 17:36:33 +11:00
Peter Barker
3ee112843c
AP_InertialSensor: configure bypass for 20789 like we do for AK8963
2018-02-08 17:36:33 +11:00
Peter Barker
5d94172ada
AP_InertialSensor: remove clearing of BIT_USER_CTRL_I2C_MST_EN bit in user_ctrl
...
This bit should never be set on 20789
2018-02-08 17:36:33 +11:00
Andrew Tridgell
5a4f0fed2d
AP_InertialSensor: added ICM-20789 support
2018-02-08 17:36:33 +11:00
Andrew Tridgell
f4521772c1
AP_InertialSensor: don't try fast sampling on a MPU6500
...
it can't do it
2018-02-07 20:33:45 +11:00
Andrew Tridgell
d575d676b6
AP_InertialSensor: fixed another transfer without bus semaphore
2018-02-07 20:33:45 +11:00
Andrew Tridgell
2ffb8d1583
AP_InertialSensor: fixed a bug where bus semaphore not held
...
during init of the invensense driver we could do a transfer without
the bus semaphore held. That violates the locking rules for the bus
2018-02-07 20:33:45 +11:00
Igor Anokhin
e6d4b2a087
AP_InertialSensor: add LSM9DS1 entry
...
Enable LSM9DS1 in case it is selected
2018-02-06 09:31:26 -08:00
Igor Anokhin
be386b2b73
AP_InertialSensor: LSM9DS1 add FIFO support
...
Make reading data with FIFO
2018-02-06 09:31:26 -08:00
Igor Anokhin
44d5112488
AP_InertialSensor: add LSM9DS1 support
...
Make LSM9DS1 driver
2018-02-06 09:31:26 -08:00
LukeMike
502f19cbae
VRBRAIN / AP_InertialSensor: added inertial sensors init for VR Brain boards
2018-02-05 08:26:49 +11:00
Randy Mackay
9ea16bec15
AP_InertialSensor: resolve compiler warning in example
2018-01-23 08:32:48 +09:00
Andrew Tridgell
100363ba03
AP_InertialSensor: if no sensors found allow parameter change
2018-01-20 10:36:22 +11:00
Andrew Tridgell
24c424ae5d
AP_InertialSensor: support over 1kHz IMUs
...
this allows for invensense IMUs to run above 1kHz by adjusting the
downsampling rate
2018-01-20 10:36:22 +11:00
Andrew Tridgell
c0c5f23aa5
AP_InertialSensor: added INS_ENABLE_MASK
...
this allows for only a specified subset of IMUs to be probed, so you
can disable IMUs that aren't needed.
The back corresponds to bits in the order the IMUs are normally probed
on the board
2018-01-20 10:36:22 +11:00
Andrew Tridgell
9416165fe3
AP_InertialSensor: improved invensense debugging on ChibiOS
2018-01-20 10:36:22 +11:00
Andrew Tridgell
8ab35e8aca
AP_InertialSensor: fixed MindPX-v2 orientation of IMU2
2018-01-15 11:46:02 +11:00
Andrew Tridgell
dcab40459d
AP_InertialSensor: support MindPX-v2
2018-01-15 11:46:02 +11:00
Andrew Tridgell
febe414766
AP_InertialSensor: disable fast sampling on 2nd IMU on Pixracer
...
it also hosts a mag, and gets lots of FIFO resets if we try to run it
at 8kHz
2018-01-15 11:46:02 +11:00
Andrew Tridgell
3fc095589c
AP_InertialSensor: support ChibiOS FMUv4
2018-01-15 11:46:02 +11:00
bugobliterator
1c6beaa7c4
AP_InertialSensor: use new API for DMA safe allocation
2018-01-15 11:46:02 +11:00
Andrew Tridgell
39362a81ae
AP_InertialSensor: support ChibiOS
2018-01-15 11:46:02 +11:00
Tom Pittenger
36f06d3576
AP_InertialSensor: remove AP_InertialSensor_UserInteract
...
leftover dead code from when CLI was removed
2018-01-11 08:11:07 +11:00
Pierre Kancir
8c8767e964
AP_InertialSensor: reduce QURT include scope
2017-12-27 15:13:30 +00:00
Andrew Tridgell
99499dece2
AP_InertialSensor: removed create() method for objects
...
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
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
Lucas De Marchi
5472bc4de1
Global: change Device::PeriodicCb signature
...
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
mirkix
62fabca19d
AP_InertialSensor: Enable I2C bypass for MPU9250 conntected via I2C to access internal AK8963
2017-01-11 21:44:24 -08:00
Randy Mackay
946d30476a
AP_InertialSensor: fix whoami for MPU6k
2017-01-05 10:29:51 +09:00
murata
d56bad781f
AP_InertialSensor: change if statements to switch statement
...
No functional change
2016-12-24 12:23:59 +09:00
murata
398b7b83dd
AP_InertialSensor: minor formatting fixes
...
No functional change
2016-12-24 12:23:58 +09:00
Lucas De Marchi
9569ed94a9
AP_InertialSensor: Invensense: use capital letters for define
2016-12-20 09:23:30 +09:00
Andrew Tridgell
a30745903a
AP_InertialSensor: use ACC2_BIAS
2016-12-19 08:07:15 +11:00
priseborough
60ebe97e10
AP_InertialSensor: remove unused EKF1 include
2016-12-19 08:07:11 +11:00
Andrew Tridgell
65b9b86099
AP_InertialSensor: unify MPU6000 and MPU9250 drivers
...
make a single AP_InertialSensor_Invensense driver. This avoids a lot
of duplication and will save time as new varients are added
2016-12-16 12:31:34 +11:00
Pierre Kancir
de05e6ba29
InertialSensor : MPU9250 utilize an explicit type cast to avoid the loss of a fractional part
2016-12-05 12:39:30 -08:00
Pierre Kancir
13c16e187f
InertialSensor: MPU6000 utilize an explicit type cast to avoid the loss of a fractional part
2016-12-05 10:59:45 -08:00
Randy Mackay
dfd58cc57b
AP_InertialSensor: fix build warning for MPU9250
2016-11-30 18:00:14 +09:00
Randy Mackay
699279ed1f
AP_InertialSensor: fix build warning for MPU6000
2016-11-30 18:00:13 +09:00
Andrew Tridgell
f9845c93b1
AP_InertialSensor: keep transfers nicely setup for DMA on stm32
...
this avoids using stack based bounce buffers which may not support DMA
on stm32
2016-11-27 11:26:10 +11:00
Andrew Tridgell
771cedca3d
AP_InertialSensor: reduced number of SPI transfers
...
use cached copy of temperature in MPU6000 and MPU9250 to detect FIFO
error when possible
2016-11-26 19:02:22 +11:00
Andrew Tridgell
27605b0258
AP_InertialSensor: run invensese reg checking at low speed
...
config register read/write should be at low bus speed.
also change to check every 20 calls to reduce checking cost
2016-11-25 20:31:40 +11:00
Andrew Tridgell
0f984290c3
AP_InertialSensor: enable fast sampling by default on some boards
2016-11-25 17:59:54 +11:00
Andrew Tridgell
f3a778f980
AP_InertialSensor: fixed freeing of fifo buffer
2016-11-25 17:50:19 +11:00
Andrew Tridgell
6f28c61c8d
AP_InertialSensor: changed SIZE to LEN
...
thanks to Lucas for suggestion
2016-11-25 17:50:19 +11:00