Commit Graph

40 Commits

Author SHA1 Message Date
Peter Barker 558f6babc4 AP_InertialSensor: correct compilation if INS_TEMPERATURE_CAL_ENABLE is off 2022-02-08 10:44:01 +11:00
Peter Barker c1c329e2b4 AP_InertialSensor: add and use AP_SIM_INS_ENABLED 2022-01-17 19:14:39 +11:00
Andrew Tridgell b3ed4f4b12 AP_InertialSensor: fixed handling of more than 3 accel/gyro instances
allows for first 3 to work without a panic
2021-04-13 09:36:52 +10:00
Peter Barker 3da156e358 AP_InertialSensor: prevent nullptr dereference in SITL 2021-02-05 15:02:12 +11:00
Andrew Tridgell 2843cfa42d AP_InertialSensor: use mavlink statustext for cal info 2021-01-25 16:24:50 +11:00
Andrew Tridgell e908a996af AP_InertialSensor: support SIM_ACC_TRIM
and cleanup vector maths
2021-01-25 16:24:50 +11:00
Andrew Tridgell b12a663f7a AP_InertialSensor: apply accel scaling 2021-01-21 13:09:21 +11:00
Andrew Tridgell 73ddde3629 AP_InertialSensor: changes for new SITL IMU params 2021-01-21 13:09:21 +11:00
Andrew Tridgell d5b511f4a0 AP_InertialSensor: fixed start timer for temperature in SITL
when we are doing an autotest we want the temperature to start
climbing when we first set SIM_IMUT_FIXED=0
2021-01-21 13:09:21 +11:00
Andrew Tridgell 0f6f6bac6b AP_InertialSensor: expose TCal class for use in SITL 2021-01-21 13:09:21 +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
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 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 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
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 d6e17b0c2b AP_InertialSensor: publish an IMU temperature
makes testing of mavlink extension easier
2019-10-10 13:23:03 +11:00
Andrew Tridgell c7ed4bfbcc AP_InertialSensor: allow testing of IMU failure 2019-04-22 14:56:42 +10:00
Peter Barker ef860db558 AP_InertialSensor: add floating point constant designators 2019-04-05 23:04:17 -07: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
Peter Barker 04c36efdbf AP_InertialSensor: eliminate SITL float-equals issues 2018-08-28 09:54:47 +10:00
Andrew Tridgell 5f8b57ba19 AP_InertialSensor: added SITL device IDs 2018-07-13 10:19:01 +10: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 a0af4af5b5 AP_InertialSensor: debugging code for EK2 bug 2017-12-12 11:39:38 +11: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
Andrew Tridgell f513c1c8dd AP_InertialSensor: support rotated IMUs in SITL 2017-10-10 10:57:38 +11:00
Andrew Tridgell 62b826953d AP_InertialSensor: use AP_Math rand_float() 2017-05-03 20:12:04 +10:00
Andrew Tridgell 112b22516a AP_InertialSensor: fixed use of accel2_noise
thanks Francisco!
2017-05-02 08:24:50 +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 a30745903a AP_InertialSensor: use ACC2_BIAS 2016-12-19 08:07:15 +11:00
Lucas De Marchi 469efb00f6 AP_InertialSensor: save id for gyro and accel instances
This allows each sensor to be uniquely identified in the system by using
either the index inside the backend or for those that use the Device
interface, to use the bus type, location, and device id.

We leave 16-bit for each sensor to be able to change its own
identification in future, which allows them to be changed in an
incompatible manner forcing a re-calibration.
2016-11-09 17:08:05 +11:00
Lucas De Marchi ace61087a1 AP_InertialSensor: remove product_id
We only leave the parameter there for backward-compatibility. However
product id on the inertial sensor is not much useful since it's only
kept for the first instance.

A better implementation per-gyro and per-accel is needed in order to
avoid problems with sensors taking the offsets configured for another
sensor.
2016-11-09 17:08:05 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
priseborough 470f5c4562 AP_InertialSensor: Correct SITL IMU1 accel for position in body frame 2016-10-27 14:54:45 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 24d8610013 AP_InertialSensor: use SIM_GYR_SCALE in SITL 2016-01-19 15:29:08 +11:00
Caio Marcelo de Oliveira Filho d7601095fa AP_InertialSensor: use millis/micros/panic functions 2015-11-20 12:31:41 +09:00
Andrew Tridgell 4a768d47f3 AP_InertialSensor: created a SITL specific backend 2015-11-16 17:57:35 +11:00