Commit Graph

1382 Commits

Author SHA1 Message Date
Andrew Tridgell
cc1961b1e8 Math: any euler angle with pitch > 90 is invalid
both DCM and quaternion always return pitch in the range -90 to 90
2012-03-11 15:37:07 +11:00
Andrew Tridgell
36e92bf4ba Quaternion: update for new Quaternion interface 2012-03-11 15:37:07 +11:00
Andrew Tridgell
eea63ecd6e DCM: update for new Matrix3f interface 2012-03-11 15:37:07 +11:00
Andrew Tridgell
01535a7a21 AP_Math: update the test suite 2012-03-11 15:37:07 +11:00
Andrew Tridgell
6d08e38d5d AP_Math: made rotation matrices more C++
thanks to Adam for the suggestion
2012-03-11 15:37:07 +11:00
Andrew Tridgell
92ada85f49 AP_Math: allow null pointers in Quaternion::to_euler()
this matches the Matrix3f method
2012-03-11 15:37:07 +11:00
Andrew Tridgell
18fcb14335 Quaternion: use the new quaternion API 2012-03-11 15:37:07 +11:00
Andrew Tridgell
a9b8c4dd82 AP_Math: re-work quaternion functions to be more C++ like
thanks to Adam for the suggestion!
2012-03-11 15:37:07 +11:00
Andrew Tridgell
ea0fb311af I2C: fixed cr/lf mess 2012-03-11 15:37:07 +11:00
Andrew Tridgell
5203df2cf8 OpticalFlow: adapt optical flow library to new rotation system 2012-03-11 15:37:07 +11:00
Andrew Tridgell
7aa6ba2c86 OpticalFlow: fixed line endings
this library was a mixture of dos and unix line endings, which makes
for very messy editing
2012-03-11 15:37:07 +11:00
Andrew Tridgell
3c145ab61c Compass: update the compass driver to use the new vector.rotate() method 2012-03-11 15:37:07 +11:00
Andrew Tridgell
24a9fe8827 Math: added a test suite for the new rotation methods 2012-03-11 15:37:07 +11:00
Andrew Tridgell
85c3c1d2ea Math: added vector3.rotate() and matrix3.rotation() methods
these operate on a "enum Rotation" which defines a set of standard
rotations. These are much faster than our previous method, plus use
less memory
2012-03-11 15:37:07 +11:00
Andrew Tridgell
a30b03cd0a SITL: lower the noise and drift levels for general autotest usage 2012-03-10 10:34:34 +11:00
Andrew Tridgell
07e8360970 InertialSensor: fixed HIL build 2012-03-10 10:34:34 +11:00
Andrew Tridgell
6d06d9d070 MAVLink: bring the v1.0 MAVLink in sync with 0.9 2012-03-10 10:34:34 +11:00
Andrew Tridgell
fed5426274 DCM: after some experimentation, raise the ki values a bit
this tracks the max gyro drift more accurately
2012-03-10 10:34:34 +11:00
Andrew Tridgell
89b4a9f4ed Quaternion: use gyro drift value from sensor driver 2012-03-10 10:34:34 +11:00
Andrew Tridgell
fd74414884 Quaternion: go back to the full update_MARG()
the separate drift controller is too erratic on yaw hold to be usable
at the moment
2012-03-10 10:34:34 +11:00
Andrew Tridgell
1002bbcbfe SITL: cleanup the gyro drift calculations
use units that are more easily understood
2012-03-10 10:34:34 +11:00
Andrew Tridgell
ad21913605 Quaternion: make the quaternion test more generic
works with DCM too
2012-03-10 10:34:33 +11:00
Andrew Tridgell
a889135e78 Quaternion: update to get_gyro_drift() interface 2012-03-10 10:34:33 +11:00
Andrew Tridgell
e0cc9c93a1 Quaternion: removed some unused variables 2012-03-10 10:34:33 +11:00
Andrew Tridgell
b67b0afd10 DCM: separate out the omega_yaw_P from omega_P
this cleans up the separation of drift rates and proportional
correction from yaw source and accelerometers, allow the yaw
to run at a different rate to the accel correction
2012-03-10 10:34:33 +11:00
Andrew Tridgell
f4b1dae7cf IMU: added get_gyro_drift_rate() interface
this just calls down to the InertialSensor layer
2012-03-10 10:34:33 +11:00
Andrew Tridgell
f46fba54dc AP_InertialSensor: added a get_gyro_drift_rate() interface
this returns the expected max drift rate for the particular type of
gyro being used
2012-03-10 10:34:33 +11:00
Andrew Tridgell
9e07fa3af6 DCM: removed the limit on linear acceleration
we get linear accelerations of more than 1g when turning corners
2012-03-10 10:34:33 +11:00
Andrew Tridgell
ab1aec0f77 Quaternion: minor tuning 2012-03-10 10:34:33 +11:00
Andrew Tridgell
e470bf2354 DCM: minor tuning based on testing my quad 2012-03-10 10:34:33 +11:00
Andrew Tridgell
97faa47ba6 SITL: make the yaw match the APM conventions 2012-03-10 10:34:33 +11:00
Andrew Tridgell
d1713bd2fb SITL: fixed the pwm output on startup 2012-03-10 10:34:33 +11:00
Andrew Tridgell
8b37790bd1 Quaternion: code cleanups and added comments 2012-03-10 10:34:32 +11:00
Andrew Tridgell
f5e5ccff6a DCM: code cleanup and added more comments 2012-03-10 10:34:32 +11:00
Andrew Tridgell
e2b2c9181e Quaternion: bumb up gyro drift limit to match DCM 2012-03-10 10:34:32 +11:00
Andrew Tridgell
2b6fae6e16 ADC: removed the ADC level accel smoothing
the quaternion code does a better job of handling this noise than this
filter does
2012-03-10 10:34:32 +11:00
Andrew Tridgell
8ad6b5f4d1 Quaternion: separate out drift correction from main updates 2012-03-10 10:34:32 +11:00
Andrew Tridgell
ff4f7ccc65 InertionSensor: update for new Ch6() interface 2012-03-10 10:34:32 +11:00
Andrew Tridgell
d1976449fd IMU: fixed a warning 2012-03-10 10:34:32 +11:00
Andrew Tridgell
e9f35bfa7f GPS: expose last_fix_time 2012-03-10 10:34:32 +11:00
Andrew Tridgell
17daa2f31c Compass: change last_update to be in microseconds 2012-03-10 10:34:32 +11:00
Andrew Tridgell
404a4e4896 ADC: use floats for ADC averaging
this costs almost nothing and improved accel/gyro calibration
2012-03-10 10:34:32 +11:00
Andrew Tridgell
4c6afa36cb DCM: removed update_DCM_fast
this combines the functionality of the 'fast' DCM with the normal one,
and also speeds up both the yaw drift correction and the matrix update
code
2012-03-10 10:34:31 +11:00
Andrew Tridgell
2c279639a3 AP_IMU: fixed led flashing in gyro cal
thanks Pat!
2012-03-10 10:34:31 +11:00
Andrew Tridgell
b39323bf1b AP_Math: expanded the math test suite 2012-03-10 10:34:31 +11:00
Andrew Tridgell
a8fd31a5e1 AP_Math: added quaternion->matrix and earth frame routines
this will be used for 3d acceleration
2012-03-10 10:34:31 +11:00
Andrew Tridgell
d3dc5bd751 AP_Math: better way of handling safe_sqrt()
better to test the result, than predict it
2012-03-10 10:34:31 +11:00
Andrew Tridgell
b273df0725 SITL: avoid parent pid code on cygwin
this causes problems on windows
2012-03-10 10:34:31 +11:00
Andrew Tridgell
e1ff9a641b SITL: prevent nested timer interrupts 2012-03-10 10:34:31 +11:00
Andrew Tridgell
d11aab610d Quat: test patch for michael 2012-03-10 10:34:31 +11:00