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