Peter Barker
5becd59265
AP_InertialSensor: remove superfluous linefeed from panic strings
...
panic adds this within the HAL layer.
2024-12-14 10:06:13 +11:00
Andrew Tridgell
4d31a7320a
AP_InertialSensor: stop sensors converging if motors arm
...
if the user arms within 30s of startup then stop the re-init of the
sensors. This can give less accurate frequency as the sample rate may
not have settled yet, but it is better than doing init of the filters
while the vehicle may be flying
also fix a 32 bit millis wrap
2024-12-09 07:40:48 +11:00
Andy Piper
88f6125a94
AP_InertialSensor: belt and braces checks
2024-12-04 07:45:05 +11:00
Andy Piper
4b0fa15278
AP_InertialSensor: address review comments
2024-12-04 07:45:05 +11:00
Andy Piper
398a70ec4b
AP_InertialSensor: avoid multiple allocations of rate loop buffer
...
add nullptr checks and comments to FastRateBuffer
2024-12-04 07:45:05 +11:00
Andy Piper
6db09c9fdd
AP_InertialSensor: keep a queue of gyro samples for use by the rate thread
...
decimate the gyro window locally
configure rate loop buffer based on AP_INERTIALSENSOR_FAST_SAMPLE_WINDOW_ENABLED
allow backends to be updated from rate thread
output debug error if rate loop buffer overruns
add support for updating filter parameters independently of propagating samples
add rate loop config abstraction that allows code to be elided on non-copter builds
must be using harmonic notch to use rate thread
mediate fast rate loop buffer using mutex and binary semaphore
ensure gyro samples are used when the rate loop buffer isn't
Co-Authored-By: Andrew Tridgell <andrew@tridgell.net>
2024-12-04 07:45:05 +11:00
Andrew Tridgell
53ee7d6e75
AP_InertialSensor: fixed check for changes to notch filters
...
if the configured freq changes on any type of notch then A and Q
change, so init must be called. This does not affect only Fixed
notches
2024-11-30 17:59:47 +11:00
Eric Katzfey
115e5254d9
AP_InertialSensor: Added explicit casts to get rid of Qurt compiler warning about implicit casts
2024-11-20 15:06:37 +11:00
Jacob Dahl
8413ab2bf2
AP_InertialSensor: added IIM42653 support
2024-11-13 06:39:29 +11:00
Andy Piper
c0ce5e5ed0
AP_InertialSensor: optimize Invensense v3 FIF read
2024-11-12 11:36:59 +11:00
Andy Piper
d76132ec63
AP_InertialSensor: ensure fifo reads use transfer() to optimize buffer allocation and copying
2024-11-12 11:36:59 +11:00
bugobliterator
9381404a9f
AP_InertialSensor: fix continuing after ins init fail in AP_Periph
2024-10-23 06:46:22 +09:00
Andy Piper
cb111504e2
AP_InertialSensor: cope with negative ESC frequencies in notch updates
2024-10-09 18:31:57 +11:00
Peter Barker
7147a2deeb
AP_InertialSensor: re-order initialiser lines so -Werror=reorder will work
2024-09-24 22:50:28 +10:00
Peter Barker
b5cd3370eb
AP_InertialSensor: add missing include for AHRS
...
we use a method from this library
2024-09-06 08:52:01 +10:00
Peter Barker
a0c57291d7
AP_InertialSensor: correct compilation when logging disabled
2024-09-02 11:53:12 +10:00
Andy Piper
98f3a4b7d5
AP_InertialSensor: allow backend filters to be updated independently from a separate thread
2024-08-23 18:34:28 +10:00
Iampete1
89297737ea
AP_InertialSensor: move to new constant dt low pass filter class
2024-08-20 09:09:41 +10:00
Peter Barker
f389549d5d
AP_InertialSensor: correct warnings on static_assert requiring a message
2024-08-13 08:38:00 +10:00
James O'Shannessy
66817e207f
AP_InertialSensor: Check the gyro/accel id has not been previously registered
...
If the Gyro/Accel ID is already in the registered list, do not try to add it again.
This stops an issue seen on a CubeOrangePlus BG3 where, during the very first boot after a parameter wipe, software incorrectly registers a fourth IMU.
The Fourth IMU is registered because the AUX IMU is the same DevID as the third ICM45686.
2024-07-25 09:49:35 +10:00
James O'Shannessy
c771440ea4
AP_InertialSensor: Fix persistent storing of IMU Z Scale
...
Fixes INSn_ACCSCAL_Z not being stored in persistent storage when bootloader is flashed.
2024-07-23 11:59:49 +10:00
Peter Barker
ef0de65347
AP_InertialSensor: tidy IMU killing
2024-07-10 18:17:00 +10:00
muramura
e48044dc45
AP_InertialSensor: Clearly state the maximum G-force
2024-07-10 10:07:16 +10:00
Andy Piper
a86f4fdc8f
AP_InertialSensor: move gyro and accel instance ids into AP_InertialSensor_Backend
2024-06-26 17:14:56 +10:00
Peter Barker
8ddac54b17
AP_InertialSensor: rename ins get_primary_accel to get_first_usable_accel
2024-06-26 17:12:12 +10:00
Andrew Tridgell
e9d39d80f4
AP_InertialSensor: fixed ICM42670
...
highres sampling is not working on the ICM42670 on some versions of
the Pixhawk6X. Disable for now.
2024-06-07 19:44:48 +10:00
Andrew Tridgell
e97a6c7089
AP_InertialSensor: use NEW_NOTHROW for new(std::nothrow)
2024-06-04 09:20:21 +10:00
Andrew Tridgell
a0acccb1f9
AP_InertialSensor: use NEW_NOTHROW for new(std::nothrow)
2024-06-04 09:20:21 +10:00
Andy Piper
f78eb58fb4
AP_InertialSensor: ensure that notches get updated while converging
2024-05-03 07:34:21 +10:00
Andy Piper
30877cf11f
AP_InertialSensor: allow FIFO rate logging for hires sampling
2024-05-02 11:01:20 +10:00
James O'Shannessy
9dbc61f85b
AP_InertialSensor: Fix parameter name when saving persistent accel cals for Aux IMUs
...
Without this change, you get:
* IMU_ACCOFFS_*
* IMU_ACC2OFFS_*
* IMU_ACC3OFFS_*
* IMU3_ACCOFFS_*
After this change, you get:
* IMU_ACCOFFS_*
* IMU_ACC2OFFS_*
* IMU_ACC3OFFS_*
* IMU4_ACCOFFS_*
2024-04-05 11:02:04 +11:00
James O'Shannessy
ac271cf4e0
AP_InertialSensor: Improve bitmask indicating persistent parameters on bootloader flash
...
INS_TCAL_OPTIONS parameter description indicates a singular bit in a bitmask to persist Accels/TCAL parameters, however there are two separate bits for persistence.
2024-03-26 11:39:11 +11:00
Peter Barker
6de3cce480
AP_InertialSensor: allow HarmonicNotches to be compiled out of the code
2024-03-19 07:04:13 +11:00
Andrew Tridgell
7353001646
AP_InertialSensor: adjust logging descriptions
2024-03-16 06:54:27 +11:00
Andrew Tridgell
d7d854a60f
AP_InertialSensor: call logging function for notch centers and harmonics
2024-03-16 06:54:27 +11:00
Andrew Tridgell
88fb38b524
AP_InertialSensor: added comments
2024-03-16 06:54:27 +11:00
Andrew Tridgell
25ffcc1580
AP_InertialSensor: use num_composite_notches()
...
this prevents duplication of the logic for the priority of the double
notch vs the triple notch option
2024-03-16 06:54:27 +11:00
Andrew Tridgell
08ccead215
AP_InertialSensor: fixed num_filters to be uint16_t
...
max is more than 256
2024-03-16 06:54:27 +11:00
Andrew Tridgell
de8bec596e
AP_InertialSensor: removed zero checks and clamping on notch filters
...
and pass params object down into HarmonicNotchFilter
2024-03-16 06:54:27 +11:00
Patrick José Pereira
5b1cac268b
INS_generic: Use new default for reboot
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2024-03-12 21:13:41 +11:00
Andrew Tridgell
66ff84e6fb
AP_InertialSensor: fixed wait_for_sample() in examples
2024-02-28 19:22:14 +11:00
Andrew Tridgell
280bc3a285
AP_InertialSensor: fixed accel cal simple to remove unused IMUs
...
when we change EAHRS_SENSORS to remove use of IMU from an external
AHRS we need to be able to zero the accel and gyro offsets to get
prearms to pass
2024-02-27 21:10:20 +11:00
Peter Barker
477fa3e161
AP_InertialSensor: move logger object up to AP_Vehicle
2024-02-13 10:54:29 +11:00
Hayden Donald
fdf56c2ec4
AP_InertialSensor: Move accel/gyro_consistent to AP_IntertialSensor
...
Move the accel_consistent and gyro_consistent methods from AP_Arming to AP_IntertialSensor
2024-02-09 18:54:43 +11:00
Peter Barker
6a897f01d8
AP_InertialSensor: allow compilation with HAL_LOGGING_ENABLED false
2024-01-17 18:25:55 +11:00
Peter Barker
1051da5cb4
AP_InertialSensor: correct compilation when AP_AHRS_ENABLED is off
...
e.g. CubeOrange-periph-heavy
2024-01-16 16:14:04 +11:00
Peter Barker
a81b229997
AP_InertialSensor: make AHRS attitude member variables private
2024-01-14 12:47:47 +11:00
Andrew Tridgell
9c8fa7f58c
AP_InertialSensor: fixed build of NONE backend
...
conflict with rand_float()
2024-01-07 20:51:55 +11:00
muramura
4765ba8218
AP_InertialSensor: Specify the number of arrays by sizeof
2024-01-04 10:24:44 +11:00
Peter Barker
68d8a2606d
AP_InertialSensor: SITL: call logging singleton methods only if available
2024-01-03 18:33:41 +11:00