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
Andrew Tridgell
a954f68f27
Quaternion: added NaN paranoid checking
...
this is for Michael to run
2012-03-10 10:34:30 +11:00
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
Jason Short
59e1d43f60
Updated fastPWM to 490Hz
2012-02-29 22:17:38 -08:00
Pat Hickey
8fa559930f
AP_Param: nested group recursion into next_group disableable by macro
...
* c.f. 0251932c81fe7eb, e5515bb6ef82
2012-02-29 19:48:43 -08:00
Pat Hickey
8b3d013294
AP_Param: One more nexted group recursion disableable by macro
...
* c.f. e5515bb6ef82
2012-02-29 18:48:54 -08:00
rmackay9
9832ac879e
AP_Compass - fixed compile warning
2012-02-29 22:57:35 +09:00
rmackay9
0311b70004
AP_Baro - fixed small compiler warning to do with order of parameters in constructor
2012-02-29 22:46:29 +09:00
rmackay9
64f9f1d92e
AP_Compass - fixed small compiler warning to do with order of parameters in constructor
2012-02-29 22:45:49 +09:00
rmackay9
7c1d1b45a7
AP_DCM - fixed small compiler warning to do with order of parameters in constructor
2012-02-29 22:45:26 +09:00
rmackay9
3cbd172ea9
RC_Channel - fixed small compiler warning
2012-02-29 22:44:29 +09:00
rmackay9
ced49f7d01
AP_ADC - removed small compiler warning
2012-02-29 22:43:46 +09:00