Commit Graph

3791 Commits

Author SHA1 Message Date
Andrew Tridgell
eff6778515 Quaternion: use gyro drift value from sensor driver 2012-03-10 10:34:34 +11:00
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
2012-03-10 10:34:34 +11:00
Andrew Tridgell
c8189c80d4 SITL: cleanup the gyro drift calculations
use units that are more easily understood
2012-03-10 10:34:34 +11:00
Andrew Tridgell
b833190abb Quaternion: make the quaternion test more generic
works with DCM too
2012-03-10 10:34:33 +11:00
Andrew Tridgell
2f9af05cfa Quaternion: update to get_gyro_drift() interface 2012-03-10 10:34:33 +11:00
Andrew Tridgell
bf16b2926c Quaternion: removed some unused variables 2012-03-10 10:34:33 +11:00
Andrew Tridgell
d75e883fe8 GCS: get_integrator() is now get_gyro_drift() in DCM 2012-03-10 10:34:33 +11:00
Andrew Tridgell
3b2609c441 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
bcb7196680 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
9296ac494d 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
882fa1818b 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
9a06d35772 make 'ENABLE' and 'ENABLED' mean the same things
users get this wrong far too often!
2012-03-10 10:34:33 +11:00
Andrew Tridgell
801a442ffb Quaternion: minor tuning 2012-03-10 10:34:33 +11:00
Andrew Tridgell
3344869285 DCM: minor tuning based on testing my quad 2012-03-10 10:34:33 +11:00
Andrew Tridgell
dffb435aac SITL: make the yaw match the APM conventions 2012-03-10 10:34:33 +11:00
Andrew Tridgell
2673614f6d SITL: fixed the pwm output on startup 2012-03-10 10:34:33 +11:00
Andrew Tridgell
982712d58f Quaternion: code cleanups and added comments 2012-03-10 10:34:32 +11:00
Andrew Tridgell
f405477875 DCM: code cleanup and added more comments 2012-03-10 10:34:32 +11:00
Andrew Tridgell
9dc08b30cd Quaternion: bumb up gyro drift limit to match DCM 2012-03-10 10:34:32 +11:00
Andrew Tridgell
828ad7625b ACM: removed the ADC filtering code 2012-03-10 10:34:32 +11:00
Andrew Tridgell
f9394f8068 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
8b40c44522 Quaternion: separate out drift correction from main updates 2012-03-10 10:34:32 +11:00
Andrew Tridgell
3e960f8ef9 InertionSensor: update for new Ch6() interface 2012-03-10 10:34:32 +11:00
Andrew Tridgell
919874f2a0 IMU: fixed a warning 2012-03-10 10:34:32 +11:00
Andrew Tridgell
4dff78b9c0 GPS: expose last_fix_time 2012-03-10 10:34:32 +11:00
Andrew Tridgell
6eff9107ea Compass: change last_update to be in microseconds 2012-03-10 10:34:32 +11:00
Andrew Tridgell
a0a360f955 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
13d5839778 APM: removed quaternion special cases 2012-03-10 10:34:32 +11:00
Andrew Tridgell
371677610d APM: avoid fetching the DCM matrix twice
also no special case for quaternions
2012-03-10 10:34:32 +11:00
Andrew Tridgell
1016d3c95d ACM: removed quaternion special cases in CLI code 2012-03-10 10:34:31 +11:00
Andrew Tridgell
8393c0299b ACM: removed the DCM tuning overrides
not needed now that DCM scales with deltat
2012-03-10 10:34:31 +11:00
Andrew Tridgell
7291dfc25a ACM: removed the special case for quaternions in GCS code 2012-03-10 10:34:31 +11:00
Andrew Tridgell
d6cfc51ae4 ACM: no need to fetch offsets at startup
AP_Param handles this
2012-03-10 10:34:31 +11:00
Andrew Tridgell
ef771fecdc ACM: removed a lot of the special case code for quaternions 2012-03-10 10:34:31 +11:00
Andrew Tridgell
69c29d35ce ACM: change DCM loop to 100Hz
On my APM2 quad this seems to give better results
2012-03-10 10:34:31 +11:00
Andrew Tridgell
045b49c4c4 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
321200ebbc AP_IMU: fixed led flashing in gyro cal
thanks Pat!
2012-03-10 10:34:31 +11:00
Andrew Tridgell
a92fb67b70 AP_Math: expanded the math test suite 2012-03-10 10:34:31 +11:00
Andrew Tridgell
4d65cda0ea 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
8abbbe5713 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
ccada2e9c2 SITL: avoid parent pid code on cygwin
this causes problems on windows
2012-03-10 10:34:31 +11:00
Andrew Tridgell
3666476bcb SITL: prevent nested timer interrupts 2012-03-10 10:34:31 +11:00
Andrew Tridgell
3b7d78cf02 Quat: test patch for michael 2012-03-10 10:34:31 +11:00
Andrew Tridgell
f363f81869 Quaternion: added NaN paranoid checking
this is for Michael to run
2012-03-10 10:34:30 +11:00
Andrew Tridgell
2596acc8eb ACM: removed incorrect mode definition 2012-03-10 10:34:30 +11:00
Andrew Tridgell
1ec4c0777c Math: added comment on quaternion constructor 2012-03-10 10:34:30 +11:00
Andrew Tridgell
f5e6dc0757 Math: added is_inf() on vector3f 2012-03-10 10:34:30 +11:00
Andrew Tridgell
066a513758 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
c7d5f06b21 AP_Math: added quaternion helper functions and a test suite 2012-03-10 10:34:30 +11:00
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
2012-03-10 10:34:30 +11:00