Andrew Tridgell
0e4bab74ba
AP_InertialSensor: simplify sensor backends
...
use common code for filtering and update, allowing each sensor driver
to be simpler and more consistent
9 years ago
Gustavo Jose de Sousa
7789aec85b
AP_InertialSensor: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Andrew Tridgell
ad7c612334
AP_InertialSensor: fixed SITL with new HIL code
10 years ago
Andrew Tridgell
a047d1f569
AP_InertialSensor: moved default filter and sample_rate to frontend
...
this simplifies the backends and prevents code repitition
10 years ago
Andrew Tridgell
586fa9a816
AP_InertialSensor: added product_id support
...
fill in parameter from first backend
10 years ago
Andrew Tridgell
ff6d87f145
AP_InertialSensor: minor tidy up for HIL driver
10 years ago
Andrew Tridgell
d48beb0c0f
AP_InertialSensor: converted PX4 driver to new API
10 years ago
Andrew Tridgell
ec11417705
AP_InertialSensor: converted HIL backend, which gets SITL working
10 years ago
Andrew Tridgell
448efc70a3
AP_InertialSensor: first steps in frontend/backend split
...
This converts the MPU6000 driver to a frontend/backend structure, and
disables all other drivers. They will be progressively re-enabled as
each is converted
10 years ago
Andrew Tridgell
532e9aace4
AP_InertialSensor: fixed timer bug in HIL sensors
11 years ago
Randy Mackay
0e7cbd28c8
INS_HIL: init members to resolve compiler warnings
11 years ago
Andrew Tridgell
f8ceccce32
AP_InertialSensor: improved HIL timing consistancy
...
try to keep the average time for each sample right
11 years ago
Jonathan Challinger
e81d2e9584
AP_InertialSensor: Correct out-of-bounds array access that was causing SITL to crash
11 years ago
Andrew Tridgell
840f1b9a1e
AP_InertialSensor: make HIL timing more accurate
...
needed for 400Hz replay
11 years ago
Andrew Tridgell
6732d6c79b
AP_InertialSensor: enable get_accel_count() and get_gyro_count() APIs for HIL
11 years ago
Andrew Tridgell
0e18079c47
AP_InertialSensor: allow HIL sensors to support multiple instances
...
this allows log replay to test both sets of sensors on a Pixhawk log
11 years ago
Andrew Tridgell
fe0cb23733
AP_InertialSensor: fixed HIL for 400Hz INS
11 years ago
Andrew Tridgell
3617c65af7
AP_InertialSensor: make HIL treat time like PX4 does
11 years ago
Andrew Tridgell
b1c5f23bbd
AP_InertialSensor: make get_delta_time() const
...
allows use from AP_NavEKF
11 years ago
Andrew Tridgell
a0688a69d4
AP_InertialSensor: generalise the accel/gyro calibration for N sensors
11 years ago
Andrew Tridgell
2753449e75
AP_InertialSensor: added support for multiple accel/gyro devices
...
this makes it possible to ask for the gyro and accel vectors from
secondary INS devices.
11 years ago
Andrew Tridgell
f10a4b04ae
AP_InertialSensor: make PX4 healthy call _get_sample()
...
this prevents a false positive during times like arming where we are
not reading the sensors
11 years ago
Andrew Tridgell
f5299e2e11
AP_InertialSensor: added healthy check for PX4 and HIL
...
used to detect bad accels
11 years ago
Andrew Tridgell
a04c056598
AP_InertialSensor: remove unused get_last_sample_time_micros()
11 years ago
Andrew Tridgell
e5e4cdee18
AP_InertialSensor: added wait_for_sample() API call
...
this waits for a new INS sample to arrive, using whatever method is
most efficient on each INS type
11 years ago
Andrew Tridgell
cf726c6642
AP_InertialSensor: rename Stub to HIL
...
more consistent with other drivers
12 years ago
Andrew Tridgell
14636e1cdf
AP_InertialSensor: changed num_samples_available() to sample_available()
...
this makes the interface clearer. It also fixes a 3D accel cal bug.
12 years ago
Andrew Tridgell
99d21854f9
SITL: fixed drift rate limit in simulator
12 years ago
Andrew Tridgell
76e20150e9
AP_InertialSensor: ensure parent class is initialised in instance classes
12 years ago
Randy Mackay
777c6a308e
AP_InertialNav: use shared GRAVITY_MSS constant
12 years ago
Michael Oborne
87292e0a4a
Init hil accel with gravity
12 years ago
Andrew Tridgell
5643c371b9
AP_InertialSensor: removed unused new_data_available() and temperature() APIs
12 years ago
Andrew Tridgell
6142eac4b4
AP_InertialSensor: simplify get_delta_time() API
...
use a single float return rather than two APIs.
This also changes the MPU6k driver to match the new 2.9 behaviour of
using the MPU6k sample timing instead of micros()
12 years ago
Pat Hickey
4acf2c8591
AP_InertialSensor: ported to AP_HAL
12 years ago
Andrew Tridgell
3b18c57691
AP_InertialSensor: removed axis getters for accel/gyro
...
these were only being used in one place, and in that place were used
incorrectly!
12 years ago
Andrew Tridgell
5e77119377
AP_InertialSensor: fixed stub driver to work correctly with sensors HIL
12 years ago
Andrew Tridgell
089ae0f9f3
AP_InertialSensor: allow specification of sample rate in init() call
...
this lets the caller not need to know the underlying sample rate. They
just ask for what rate updates happen.
This also changes the MPU6k filtering to be less than half the sample
rate
12 years ago
rmackay9
d9b4407e64
AP_InertialSensor: changes after review with Tridge.
...
sanity checking added to accelerometer calibration routine.
user feedback is sent using gcs_send_text_fmt instead of Serial.printf.
moved ins parameters to new eeprom number to avoid conflicts with older parameters.
other small changes including renaming of functions and parameters.
12 years ago
rmackay9
49de46a548
AP_InertialSensor: merge in calibration features from IMU library
...
add gauss-newton method of accelerometer calibration
12 years ago
rmackay9
9f1033dc42
AP_InertialSensor_Stub: added num_samples_available method to fix HIL build
13 years ago
uncrustify
0c322fb18a
uncrustify libraries/AP_InertialSensor/AP_InertialSensor_Stub.cpp
13 years ago
Craig Elder
4a1d8b0875
AP_InertialSensor: Return product ID from sensor initialization
...
this exposes the product ID to the IMU Layer
13 years ago
Andrew Tridgell
b02ca58901
InertialSensor: fixed HIL build
13 years ago
Andrew Tridgell
a9dea35310
AP_InertialSensor: added new_data_available() interface
13 years ago
Andrew Tridgell
97f8d21c1b
added code format markers to AP_InertialSensor library
13 years ago
Andrew Tridgell
41caa949ca
fixed InertialSensor stub build
13 years ago
Pat Hickey
d2a0bd35f4
hil-sensors: added stub libraries for InertialSensor and PeriodicProcess
...
* Also added dummy ivar to APM_BMP085_hil
13 years ago