Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Tridgell c8e6d03c67 DCM: added matrix recovery on reset
when we get a bad DCM error we can recover a matrix corresponding to
the current attitude, making it more likely that the aircraft will be
able to recover
2012-02-24 11:52:55 +11:00
Andrew Tridgell 57ffd00b69 DCM: range check the matrix before calculating pitch
The asin() in the pitch calculation can only take values between -1
and 1. This change ensures that the value is in range, and if it isn't
then we force a normalization. If that fails we reset the matrix
2012-02-23 08:16:08 +11:00
Andrew Tridgell 156d98cb9f DCM: remove the taylor expansion optimisation for renormalisation
The sqrt() costs about 44usec on a 2560, which is small enough for us
not to worry about the speed.

This also changes the range of values where we declare a blowup to
much less likely, which means we can cope with larger delta_t glitches
2012-02-23 08:16:08 +11:00
Randy Mackay ed19c25a97 Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Andrew Tridgell 0147c7b6c6 DCM: added matrix_reset() method 2011-12-13 21:32:50 +11:00
Jason Short fa7f39ba20 Access to _clamp val. May want to make a private member and write accessor. 2011-12-03 17:57:12 -08:00
Doug Weibel e3ab1b0353 Add an accessor for the DCM drift correction integrator to monitor performance
Also made the get_health accessor an inline function.
2011-11-05 09:02:23 -06:00
Andrew Tridgell 9314dcaa89 DCM: re-work the DCM to use the new IMU/ADC features
this gives us higher resolution DCM calculations, with much more
accurate timing of the update delta time.
2011-09-17 14:58:02 +10:00
Olivier ADLER 1ee65e3ef2 Merge branch 'APM_Camera' of https://code.google.com/p/ardupilot-mega/
Conflicts:
	ArduPlane/ArduPlane.pde
	libraries/AP_Camera/AP_Camera.h
	libraries/AP_Mount/AP_Mount.cpp
	libraries/AP_Mount/AP_Mount.h
2011-09-12 00:31:18 +02:00
Amilcar Lucas 77c798abd5 Use G_RC_AUX macro to simplify accessing the auxiliary servos 2011-09-12 00:02:47 +02:00
Jason Short d50ed35077 Added a state machine intended to run at 250hz to the DCM. Spread load of DCM out to lower CPU. 2011-09-11 11:03:55 -07:00
jasonshort 5e163c6052 added ki_Yaw private variable and accessors.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2778 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-08 03:57:12 +00:00
jasonshort 418a4b3903 removed redundant FP calcs for speed up.
added ability to alternate normalization and drift correction. Not fully implemented, needs further testing.


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2691 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-26 22:54:08 +00:00
jasonshort 595266152b Added dynamic setting of kp_rollpitch, ki_rollpitch, kp_yaw.
Added three constants for kp_rollpitch, (high, med -default, low)
Functionally equivalent to prior version.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2550 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-12 23:49:01 +00:00
DrZiplok 71604405f4 Re-order initialisers to suppress warnings
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2072 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-02 05:55:59 +00:00
james.goppert aa598b575a APO merge.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1935 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-01 02:05:17 +00:00
deweibel@gmail.com 92bf4c4e0a Add method definition for set_centripetal()
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1756 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-03-08 01:47:43 +00:00
deweibel@gmail.com 195b695011 Fix imu_health metric
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1728 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-25 20:09:00 +00:00
DrZiplok@gmail.com 7ca9081238 DCM needs a reference to a pointer so that we can change the GPS under it during init.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1662 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-16 07:54:48 +00:00
DrZiplok@gmail.com bf59d7abc7 Update for changes to AP_IMU
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1343 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-28 23:41:26 +00:00
deweibel 1da23bc3c0 Fix bug in transposed DCM matrix accessor
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1134 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-14 18:39:02 +00:00
jasonshort 7945937874 added ability to get the transpose of the DCM
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1116 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-13 04:01:26 +00:00
james.goppert 21634dad19 Added AP_DCM_HIL class.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1103 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-10 10:17:27 +00:00
jasonshort 2f2aaa88fd Added dynamic setting of compass
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1010 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-04 06:24:21 +00:00
james.goppert 110685f880 Updated DCM library.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@996 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-02 05:13:35 +00:00
jasonshort 93206020cb Moved Health to DCM, Centripetal correct
git-svn-id: https://arducopter.googlecode.com/svn/trunk@988 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-01 22:52:11 +00:00
jasonshort 275624358d boolean to disable centrifugal correction.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@987 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-01 19:53:40 +00:00
jasonshort d209f3d59e update - See ArducopterMega in Branch for implementation details
git-svn-id: https://arducopter.googlecode.com/svn/trunk@986 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-01 07:58:04 +00:00