Andrew Tridgell
3a41ad8e7c
AHRS: normalize the ge vector in drift correction, and use barometer
...
The normalisation ensures the error term scales uniformly with
different accelerations.
The barometer is used for vertical acceleration estimation
13 years ago
Andrew Tridgell
4d08f75292
AHRS: update for new _fly_forward flag
13 years ago
Andrew Tridgell
b549b88e5e
AHRS: fixed error_yaw reporting with 2 MAVLink connections
...
when a user first connects with USB, and later switches to the
telemetry port without restarting we were getting zero for error_yaw
in the logs, as AHRS.get_error_yaw() was being called twice.
This ensures we give the last value after the counter is reset
13 years ago
Andrew Tridgell
c53b320e00
Quaternion: change signs in AP_AHRS_Quaternion
...
thanks to Justin for the suggestion
13 years ago
Andrew Tridgell
f8087d3c67
AHRS: adapt the quaternion library to AHRS
13 years ago
Andrew Tridgell
9d75ffeba1
AHRS: rename DCM and Quaternion implementions ready for AHRS class
...
this is the first step to creating a general AHRS class for ArduPilot
13 years ago
Andrew Tridgell
00c1c6f108
Quaternion: credit Justin with the initial idea of using Madgwick
...
thanks Justin!
13 years ago
Andrew Tridgell
16c95236c0
Quaternion: use the new quaternion API
13 years ago
Andrew Tridgell
3989fe2c2c
Quaternion: go back to the full update_MARG()
...
the separate drift controller is too erratic on yaw hold to be usable
at the moment
13 years ago
Andrew Tridgell
bf16b2926c
Quaternion: removed some unused variables
13 years ago
Andrew Tridgell
882fa1818b
DCM: removed the limit on linear acceleration
...
we get linear accelerations of more than 1g when turning corners
13 years ago
Andrew Tridgell
982712d58f
Quaternion: code cleanups and added comments
13 years ago
Andrew Tridgell
8b40c44522
Quaternion: separate out drift correction from main updates
13 years ago
Andrew Tridgell
3b7d78cf02
Quat: test patch for michael
13 years ago
Andrew Tridgell
f363f81869
Quaternion: added NaN paranoid checking
...
this is for Michael to run
13 years ago
Andrew Tridgell
066a513758
Quaternion: added more numerical safety in the quaternion code
...
prevent infinities from creeping in and prevent large drift changes
13 years ago
Andrew Tridgell
f70dfe440d
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
13 years ago
Andrew Tridgell
7256652de5
Quaternion: use GPS to correct for linear acceleration
...
this gives much better pitch estimates. We should do this with the
airspeed sensor if available.
13 years ago
Andrew Tridgell
c7ef72cf28
Quaternion: don't update if we have a very long deltat
...
this can be caused by stopping the system in a debugger
13 years ago
Andrew Tridgell
e699e9ace0
Quaternion: added in reporting of gyro drift and rp/yaw errors
13 years ago
Andrew Tridgell
25e5ddeaa4
AP_Quaternion: fixed build on Arduino 1.0
13 years ago
Andrew Tridgell
c369d9f60a
AP_Quaternion: added DCM compatibility interfaces
...
useful for getting the code going quickly
13 years ago
Andrew Tridgell
c8a459ab0d
fixed deltat in quaternion
13 years ago
Andrew Tridgell
74eef7018a
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
13 years ago