Peter Barker
e5c3dd871c
AP_InertialSensor: create explicit define for AP_INERTIALSENSOR_BATCHSAMPLER_ENABLED
...
this allows the batch sampler to be removed for size reasons, or because you don't have logging enabled
2023-01-11 19:08:41 +11:00
Andy Piper
90cdc1aa52
AP_InertialSensor: allow FFT window to be captured post-filter
...
selectively apply filters twice to make sure that FFT is not tracking itself
clean-up notch disablement for non-DSP builds
use filter gyro data for FFT when analysing post-filter
always apply LPF after all of the notches
move to a phased application of window information for FFT
tap FFT gyro window at the appropriate place for downsampled FFTs
add accessor for FFT notch
document notch uses cases and flow
2022-12-28 18:14:56 +11:00
Andy Piper
221ab9752e
AP_InertialSensor: synchronise fifo reads on the ICM42xxx
2022-08-12 20:53:36 +10:00
Peter Barker
e4ce4ebed3
AP_InertialSensor: remove un-needed methods
2022-07-19 10:30:36 +10:00
Andrew Tridgell
9ac3472b47
AP_InertialSensor: add set_inactive() on notch filters
2022-06-30 20:58:37 +10:00
Andrew Tridgell
a37f268dc6
Ap_Inertialsensor: by default only run harmonic notch on the active gyro
...
this should save quite a lot of CPU. Only the active gyro impacts
vehicle flight
2022-06-12 15:39:44 +10:00
Andrew Tridgell
19063a46a0
AP_InertialSensor: fixed build with logging disabled
...
fixes CubeOrange-periph build
2022-06-06 14:50:40 +10:00
Andrew Tridgell
db14ba46dc
AP_InertialSensor: call notch param update with semaphore held
2022-04-19 09:39:03 +10:00
Andrew Tridgell
e2e1e74da5
AP_InertialSensor: switch to HarmonicNotch class
...
this makes the logic much easier to follow, without indexes into
arrays
2022-04-19 09:39:03 +10:00
Andrew Tridgell
e67d9b4179
AP_InertialSensor: support two full harmonic notch filters
2022-04-19 09:39:03 +10:00
Iampete1
b77476caa1
AP_InertialSensor: remove custom orentations
2022-03-02 18:16:42 +11:00
Andy Piper
c7a43f2a90
AP_InertialSensor: put some functions in fast ram
...
precisely split backend/frontend on Invensense for RAMFUNC allocation
allow building with no IMUs
2022-02-09 12:47:55 +00:00
Andrew Tridgell
662327f2ea
AP_InertialSensor: added support for more ADIS IMUs
...
support 32 bit delta angles and velocities
2021-12-29 18:25:18 +11:00
Andy Piper
6e3b502110
AP_InertialSensor: inline vector ops for backends and temp cal
2021-12-22 18:23:33 +11:00
Peter Barker
c6734ad825
AP_InertialSensor: correct logging of inertial-sensor reg-change logging
2021-12-18 21:25:27 +11:00
Andrew Tridgell
4fdc1ebc30
AP_InertialSensor: fixed locking issue in delta accumulation
...
this fixes a bug in calculating delta velocity and delta acceleration
between threads.
2021-08-31 10:10:18 +10:00
Siddharth Purohit
447935bf4c
AP_InertialSensor: remove dependence on gcs for AP_Periph builds
2021-06-30 17:06:02 +10:00
Josh Henderson
2b20dcf128
AP_InertialSensor: move GYR & ACC logging functions to Logging.cpp
2021-05-01 14:15:58 +10:00
Andrew Tridgell
4cddf37984
AP_InertialSensor: log unexpected register changes
...
when the register checking code finds an error we will log what
register changed and to what value
2021-02-24 18:18:37 +11:00
Andrew Tridgell
3ff71c7814
AP_InertialSensor: changes from review feedback
2021-01-21 13:09:21 +11:00
Andrew Tridgell
8caea96ab1
AP_InertialSensor: start auto-learning at boot
...
This makes it easier to setup the params. The ENABLE=2 value only
takes effect at boot
2021-01-21 13:09:21 +11:00
Andrew Tridgell
fc0f8b990a
AP_InertialSensor: added online learning of temp cal
...
use INS_TCAL1_ENABLE=2 to start learning
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
Andrew Tridgell
b74e5c0e2f
AP_InertialSensor: added ExternalAHRS backend
2021-01-05 21:13:12 +11:00
Peter Barker
2437cf8a24
AP_Logger: use instance number for IMU logging
2020-11-11 19:31:53 +11: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
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
Andrew Tridgell
5c6749ee54
AP_InertialSensor: use wait_pin() to wait for DRDY pin if available
2020-04-23 07:28:13 +10: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
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
Andrew Tridgell
236ce28339
AP_InertialSensor: updated for heater changes
2019-11-02 16:31:04 +11: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
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
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
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
Peter Barker
ef860db558
AP_InertialSensor: add floating point constant designators
2019-04-05 23:04:17 -07:00
Tom Pittenger
3eeaa2c8df
AP_InertialSensor: rename dataflash to logger
2019-03-28 16:40:57 +11:00
Tom Pittenger
9347e6d36f
AP_InertialSensor: unify singleton naming to _singleton and get_singleton()
2019-02-10 19:09:58 -07:00
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
2019-01-18 18:08:20 +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
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
0e6497aa85
AP_InertialSensor: merged in Revo driver
2018-02-10 09:14:41 +11:00