Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
12 years ago
Andrew Tridgell
0d36832b82
AP_AHRS: use const reference not pointers for locations
...
this makes life easier for the new AP_Mission library
Pair-Programmed-With: Brandon Jones <brnjones@gmail.com>
12 years ago
tobias
1bf135b36f
AP_AHRS: make some more functions const
12 years ago
Andrew Tridgell
7d42a0562d
AP_AHRS: cope better with large GPS yaw changes
...
this should cope better with bungee launches when using only GPS for
yaw.
12 years ago
Andrew Tridgell
38fc0e61c6
AP_AHRS: optimise yaw drift correction
...
use new vector2 cross product, and factor out the z component of a dcm
mul_transpose() to reduce the number of floating point operations for
a yaw drift correction cycle
12 years ago
Randy Mackay
ee2daf25b6
AHRS: perf improvement by caching declination vector
12 years ago
Andrew Tridgell
014c9376e7
AP_AHRS: use const references where possible
12 years ago
Andrew Tridgell
7ad293e270
AP_AHRS: made a few methods const
12 years ago
Andrew Tridgell
8459da202c
AP_AHRS: prevents compass flyaways for plane and rover
...
this switches to the GPS for yaw if the compass has dragged us off by
more than 45 degrees from the GPS heading, and the wind speed is less
than 80% of the ground speed.
12 years ago
Pat Hickey
9bf69d4e0d
AP_AHRS: port to AP_HAL
12 years ago
rmackay9
83ae8e47be
AP_AHRS: replace IMU with INS and add roll and pitch trim
12 years ago
Andrew Tridgell
2be785899b
AHRS: added airspeed_estimate() function
...
this allows the APM code to use an airspeed estimate for navigation
13 years ago
uncrustify
bc80148c75
uncrustify libraries/AP_AHRS/AP_AHRS_DCM.h
13 years ago
Andrew Tridgell
2985de279f
AHRS: fixed duplicate gps_use variable in DCM
13 years ago
Andrew Tridgell
134cd51d17
AHRS: moved var_info[] into top level AP_AHRS class
13 years ago
Andrew Tridgell
9b4b7997b6
AHRS: added ahrs.yaw_initialised()
...
this allows the high level code to know if the AHRS driver has a
reliable yaw estimate
13 years ago
Andrew Tridgell
48e275e22d
AHRS: avoid a compiler bug in quaternion code
...
Having _wind in the AP_AHRS class causes a register allocation error
when building the Quaternion code with some versions of avr-gcc. Quite
bizarre.
13 years ago
Andrew Tridgell
f5b7ae213c
AHRS: added AHRS_GPS_USE parameter
...
this allows for the GPS to be disables for position updates, which
allows for testing dead-reckoning
13 years ago
Andrew Tridgell
779dacfd24
AHRS: added wind estimation code
...
this allows us to estimate the wind while we have GPS lock, then use
that estimate in the long term dead reckoning
13 years ago
Andrew Tridgell
af4071894e
AHRS: added long-term dead-reckoning
...
this uses airspeed (if available) or last GPS ground speed to update
our position estimate in AHRS
13 years ago
Jason Short
52b2aacf28
AHRS DCM: FOrmatting
13 years ago
Andrew Tridgell
898a5af692
AP_Param: update AHRS for new constructor syntax
13 years ago
rmackay9
468170b589
AP_AHRS_DCM: moved var_info to belong to AP_AHRS_DCM instead of AP_AHRS
13 years ago
Andrew Tridgell
0f9fb2c64b
AHRS: added AHRS_GPS_GAIN parameter
...
this allows control of how much GPS velocity information is used in
doing centripetal correction in DCM
13 years ago
Andrew Tridgell
3849ca8b5c
AHRS: make DCM drift correction not rely on accurate yaw
...
this uses a new formulation of the GPS based drift correction from
Bill Premerlani that rotates the error vector to avoid relying on
accurate yaw. This means we should get accurate roll/pitch correction
even with lots of magnetometer interference
It also makes it possible to fly a multicopter with no compass. It can
even navigate and correct yaw (slowly!)
13 years ago
Andrew Tridgell
1314e4f872
AHRS: make P gain on PI roll/pitch controller tunable
...
this is to make it easier for Craig and Alan to tune
13 years ago
Andrew Tridgell
136c03c3c0
AHRS: include the P terms in get_gyro()
...
this makes it more useful for navigation controllers
13 years ago
Andrew Tridgell
58c4d458dc
AHRS: re-instate new DCM drift correction code
...
This reverts commit 078489638d47fbaffde7c51249e36b5a8fc4ef9d.
13 years ago
Andrew Tridgell
fd241692d0
AHRS: revert to the old drift correction algorithm
...
we need to work out why Craigs quad flipped today before we enable
this new drift correction
13 years ago
Andrew Tridgell
8e044a560b
AHRS: include P term in omega
...
thanks to Jon for suggesting this
13 years ago
Andrew Tridgell
37e2f2ee2c
AHRS: implement spin rate limits
...
this follows the method that Bill developed in his fastRotations
paper. We've demonstrated that this is indeed needed in APM, as we
were able to produce the 'dizzy' effects in both the ArduPlane and
ArduCopter simulator
13 years ago
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
Jonathan Challinger
d230690b7b
AHRS: brought DCM more inline with Bill's implementation
...
omega_I applied continuously. _ki larger. Stop integrating when _omega.length()>20
The key change was the scaling of ge to ensure the error is not
quadratic
13 years ago
Andrew Tridgell
d4c8041c51
AHRS: first successful version of Bills new drift correction system
...
This makes 3 major changes:
1) fixes the scaling of the yaw drift correction term to fix the time
constant
2) don't integrate the mag vector over multiple readings
3) accumulate omega_I changes over 15 seconds before applying, to try
to prevent omega_I picking up short term responses
13 years ago
Andrew Tridgell
0f5c22bd8e
AHRS: implement Bills new drift correction algorithm
...
this is an initial implementation of this paper:
http://gentlenav.googlecode.com/files/RollPitchDriftCompensation.pdf
13 years ago
rmackay9
6e1798b104
AP_AHRS: updated default AHRS_YAW_P to 0.2 (was 0.4)
...
This reduces the compass's default authority over the yaw direction by half
13 years ago
Andrew Tridgell
2a3af369b6
DCM: buffer omega_I changes over 10 seconds
...
this buffers up _omega_I changes in _omega_I_sum over a period of 10
seconds, applying the slope limit only when _omega_I_sum is
transferred to _omega_I.
The result is a huge improvement in the ability of _omega_I to track
gyro drift over the long term.
13 years ago
Andrew Tridgell
8e90aeea4e
AHRS: added AHRS_YAW_P parameter
...
this allows users to change the yaw gain in DCM
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
d4bb068d5b
AHRS: adapt the DCM library to the AHRS framework
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
13dac4a93a
DCM: adjust yaw kp constant down to 0.4
...
this makes the time constant for compass errors closely match the
timing of the older releases - about 10 seconds for a 1 radian change
in heading
13 years ago
Andrew Tridgell
87c463bcc7
DCM: after some experimentation, raise the ki values a bit
...
this tracks the max gyro drift more accurately
13 years ago
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
13 years ago
Andrew Tridgell
3344869285
DCM: minor tuning based on testing my quad
13 years ago
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
13 years ago
Andrew Tridgell
b11b571778
DCM: fixed the averaging of accel values for update_DCM_fast()
...
this should improve drift correction for ArduCopter
13 years ago
Andrew Tridgell
4031320f7c
DCM: added a small amount of gyro and accel smoothing
...
possibly not needed, but convenient to be able to test with different
values
13 years ago
Andrew Tridgell
94d0236b97
DCM: added reporting interfaces for DCM state
13 years ago
Andrew Tridgell
cc8278c1ac
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.
13 years ago