Andrew Tridgell
d24b055b66
Math: added comment on quaternion constructor
2012-03-10 10:34:30 +11:00
Andrew Tridgell
1f5095e722
Math: added is_inf() on vector3f
2012-03-10 10:34:30 +11:00
Andrew Tridgell
89a10c584d
Quaternion: added more numerical safety in the quaternion code
...
prevent infinities from creeping in and prevent large drift changes
2012-03-10 10:34:30 +11:00
Andrew Tridgell
f2e6714598
AP_Math: added quaternion helper functions and a test suite
2012-03-10 10:34:30 +11:00
Andrew Tridgell
f71311fdc0
Quaternion: fix the gyro bias in centripetal and remove smoothing
...
the centripetal code needs to take account of the current gyro
bias.
It turned out that the accel and gyro smoothing was causing
significant control lag, and we're better off just letting the
quaternion code handle it via its own smoothing parameters
2012-03-10 10:34:30 +11:00
Andrew Tridgell
76736792f8
SITL: disable interrupts during register updates
...
this may prevent bogus mode channel reads
2012-03-10 10:34:30 +11:00
Andrew Tridgell
e445a455d0
Quaternion: use GPS to correct for linear acceleration
...
this gives much better pitch estimates. We should do this with the
airspeed sensor if available.
2012-03-10 10:34:30 +11:00
Andrew Tridgell
1ea1b500a6
Quaternion: don't update if we have a very long deltat
...
this can be caused by stopping the system in a debugger
2012-03-10 10:34:30 +11:00
Andrew Tridgell
8b73166605
Compass: fixed last_update time for HIL compass
2012-03-10 10:34:30 +11:00
Andrew Tridgell
2969e16f7d
RC: disable interrupts when reading the RC registers
...
this prevents getting bogus values which could cause a flight mode
change
2012-03-10 10:34:30 +11:00
Andrew Tridgell
efe2686b33
GPS: added an acceleration estimate to the GPS driver
...
This uses the GPS ground speed to estimate acceleration
2012-03-10 10:34:30 +11:00
Andrew Tridgell
02ae5358d5
GPS: fixed some stdint types
2012-03-10 10:34:29 +11:00
Andrew Tridgell
2f5a4cdc4a
Quaternion: added in reporting of gyro drift and rp/yaw errors
2012-03-10 10:34:29 +11:00
Andrew Tridgell
934a05bbc6
fixed comment
2012-03-10 10:34:29 +11:00
Andrew Tridgell
a60cf111c5
DCM: fixed an uninitialised variable warning
2012-03-10 10:34:29 +11:00
Andrew Tridgell
7d9c4094a2
Quaternion: tweak the quaternion gains a bit
2012-03-10 10:34:29 +11:00
Andrew Tridgell
e33bb217bc
AP_IMU: improved the gyro calibration code
...
this should give a much more accurate result
2012-03-10 10:34:29 +11:00
Andrew Tridgell
de1cfc8e34
Quaternion: drop the gyro drift rates down
...
this should allow us to cope with noise more readily
2012-03-10 10:34:29 +11:00
Andrew Tridgell
2d6680f144
DCM: fixed bug in accel averaging
...
sorry Randy!
2012-03-10 10:34:29 +11:00
Andrew Tridgell
73594199c8
AP_Quaternion: fixed build on Arduino 1.0
2012-03-10 10:34:29 +11:00
Andrew Tridgell
a85ba80246
AP_Quaternion: added DCM compatibility interfaces
...
useful for getting the code going quickly
2012-03-10 10:34:29 +11:00
Andrew Tridgell
626f8598ed
AP_IMU: added new_data_available() interface
2012-03-10 10:34:29 +11:00
Andrew Tridgell
a052aa8435
AP_InertialSensor: added new_data_available() interface
2012-03-10 10:34:28 +11:00
Andrew Tridgell
61d649e7ac
AP_ADC: added new_data_available() interface
...
returns true if more samples are available
2012-03-10 10:34:28 +11:00
Andrew Tridgell
4a277f9871
fixed deltat in quaternion
2012-03-10 10:34:28 +11:00
Andrew Tridgell
353f9e613f
SITL: make SITL not depend on DCM
2012-03-10 10:34:28 +11:00
Andrew Tridgell
fb23c617fa
Quaternion: added an AP_Quaternion library
...
this is for experimenting with the Madgwick quaternion system, to see
if it is more or less noise sensitive than DCM
2012-03-10 10:34:28 +11:00
Andrew Tridgell
a05eeab55e
SITL: reduce the simulated compass offsets
...
this was causing us problems in getting DCM right
2012-03-10 10:34:28 +11:00
Andrew Tridgell
d03b11092b
SITL: separate out drift speed and drift level
2012-03-10 10:34:28 +11:00
Andrew Tridgell
71d3847bfc
SITL: added a drift_level multiplier
...
this makes it easier to experiment with different gyro drift levels
2012-03-10 10:34:28 +11:00
Andrew Tridgell
61ebcfe9fe
DCM: fixed the averaging of accel values for update_DCM_fast()
...
this should improve drift correction for ArduCopter
2012-03-10 10:34:28 +11:00
Andrew Tridgell
de32c3bc31
AP_Math: added a .zero() method to Vector3f
2012-03-10 10:34:28 +11:00
Andrew Tridgell
a0e2e69431
SITL: fixed delay() to account for signal interrupions
...
when a timer went off we stopped the delay() code
2012-03-10 10:34:28 +11:00
Andrew Tridgell
37ab76c9e6
DCM_Test: fixed example code to work with SITL
...
this also fixes the compass setup
2012-03-10 10:34:27 +11:00
Andrew Tridgell
d2a969ee95
SITL: push noise level to 2.0 for DCM testing
2012-03-10 10:34:27 +11:00
Andrew Tridgell
79b8ddc236
DCM: added a small amount of accel smoothing to update_DCM_fast()
2012-03-10 10:34:27 +11:00
Andrew Tridgell
55413bfcc1
DCM: don't use the z accel sensor for drift correction
...
the z accel is the noisest, and seems to do more harm than good. Using
just x and y is sufficient for drift correction by assuming the vector
length
2012-03-10 10:34:27 +11:00
Andrew Tridgell
a78b00513b
DCM: added a small amount of gyro and accel smoothing
...
possibly not needed, but convenient to be able to test with different
values
2012-03-10 10:34:27 +11:00
Andrew Tridgell
82032b17a9
DCM: added reporting interfaces for DCM state
2012-03-10 10:34:27 +11:00
Andrew Tridgell
ae6a94a933
SITL: added sitl_simstate_send()
...
used to report simulator state in logs
2012-03-10 10:34:27 +11:00
Andrew Tridgell
d106e3a970
MAVLink: import new message types DCM, HWSTATUS and SIMSTATE
2012-03-10 10:34:27 +11:00
Andrew Tridgell
4e354a9731
DCM: got rid of _error_roll_pitch from object state
...
this can be a local error variable in common with the yaw code. This
saves 12 bytes in the object.
2012-03-10 10:34:27 +11:00
Jason Short
13e9608fb8
Consolidated Barometer pressure sensing to a single filter based on Randy's new filter class.
2012-03-08 23:13:04 -08:00
Jason Short
34cf1e8fb3
Updated on Barometer - increased the Temp filtering and decreased the pressure filtering to and get less temp noise, faster response from pressure. I'm filtering the Climb rate differently now, so this higher pressure noise should not hurt the derivative calcs at all now.
2012-03-06 20:55:35 -08:00
rmackay9
6c1299fe7e
AP_RC - removed unused library
2012-03-04 18:21:52 +09:00
Andrew Tridgell
dd9065123c
SITL: use the new noise model
...
use the new noise model at a low level for master until we sort out
DCM noise handling
2012-03-02 18:31:07 +11:00
Andrew Tridgell
63ea5dfb49
APM_RC: allow the fast RC speed to be passed as a parameter
...
this will allow users to test different speeds
2012-03-02 17:57:08 +11:00
Andrew Tridgell
f1a389fe19
AP_Param: ensure we can't have duplicate keys in Parameters.h
...
this is O(n^2), but only at startup, and takes less than 1ms to run.
It catches a very nasty coding error
2012-03-02 15:48:28 +11:00
Andrew Tridgell
1476f044e6
I2C: added lockup_count() interface
...
used for reporting I2C problems
2012-03-02 15:48:27 +11:00
Andrew Tridgell
c9031f1d36
SITL: implement cli()/sei() properly for desktop build
...
this disables simulated hardware interrupts during critical sections
2012-03-02 15:48:27 +11:00