Commit Graph

3039 Commits

Author SHA1 Message Date
Jason Short a59c9ae22c added notes 2012-01-12 22:28:58 -08:00
Andrew Tridgell 15d446bde2 DCM: prevent a segmentation fault when compass is not enabled
when compass is disabled _compass is NULL
2012-01-13 15:48:07 +11:00
Doug Weibel 9846822748 Bug fix for compass.
This is a fix for an interesting bug when a DCM matrix reset was added to the ground start.  This bug only showed up if (A) a ground start were performed after an air start or due to use of the "Calibrate Gryo" action, (B) if the current orientation were sufficiently different from 0/0/0, and (C.) if the particular magnetometer had sufficiently large offsets.  Why did resetting the DCM matrix to 0/0/0 pitch/roll/yaw at ground start cause a bug?  The magnetometer offset nulling determines the proper offsets for the magnetometer by comparing the observed change in the magnetic field vector with the expected change due to rotation as calculated from the rotation in the DCM matrix.  This comparison is made at 10Hz, and then filtered with a weight based on the amount of rotation to estimate the offsets. Normally it would take considerable time at normal in-flight rotation rates for the offset estimate to converge. 

If a DCM matrix reset occurs when the offset nulling algorithm is up and running, the algorithm sees the DCM reset as a instantaneous rotation, however the magnetic field vector did not change at all.  Under certain conditions the algorithm would interpret this as indicating that the offset(s) should be very large.  Since the "rotation" could also have been large the filter weighting would be large and it was possible for a large erroneous estimate of the offset(s) to be made based on this single (bad) data point.

To fix this bug methods were added to the compass object to start and stop the offset nulling algorithm.  Further, when the algorithm is started, it is set up to get fresh samples.  The DCM matrix reset method now calls these new methods to stop the offset nulling before resetting the matrix, and resume after the matrix has been reset.
2012-01-12 14:44:24 -07:00
analoguedevices 70b7951366 Eliminated second instance of APM2 #defines 2012-01-12 20:38:41 +00:00
Jason Short a7bce15365 R10 2012-01-11 22:41:51 -08:00
Jason Short 99ea69ef7b New Loiter control 2012-01-11 22:41:51 -08:00
Jason Short 257890d5be New Loiter Gains for new Loiter methods 2012-01-11 22:41:51 -08:00
Jason Short 98f637282b moved to verify_land 2012-01-11 22:41:51 -08:00
Jason Short 5e9db462f5 attempting to force down without using Manual boost. 2012-01-11 22:41:51 -08:00
Doug Weibel 892f24ac5c Adding comments for global variables 2012-01-11 12:37:43 -07:00
Michael Oborne 28d0377a00 APM Planner 1.1.20
add ac2 land Mode
add xplane 10 support
add disconnect verify
2012-01-12 01:33:42 +08:00
Andrew Tridgell 49cf409c23 desktop: floating point precision changes from Justin Beech 2012-01-11 21:31:59 +11:00
Jason Short f35411ac45 R9 2012-01-10 23:46:08 -08:00
Jason Short 84e001594d comma 2012-01-10 23:45:33 -08:00
Jason Short d11eaa9265 Tweaks 2012-01-10 23:43:44 -08:00
Jason Short e2830ca147 fixed type error 2012-01-10 23:43:44 -08:00
Jason Short 354d9588bf sensorSign swicth 2012-01-10 23:43:44 -08:00
Jason Short 4b54887c6c Switched to set_next_WP for mode switches 2012-01-10 23:43:44 -08:00
Jason Short 6b836d1a09 Fixed Type Error 2012-01-10 23:43:44 -08:00
Jason Short c4476bdd80 Fixed type error 2012-01-10 23:43:44 -08:00
Jason Short 3e8ff39d4b Climb rate control 2012-01-10 23:43:44 -08:00
Jason Short a79d302b98 added set_new_altitude call() 2012-01-10 23:43:44 -08:00
Jason Short e102cb9e6a Added ending for auto landing 2012-01-10 23:42:27 -08:00
Jason Short 3a5ffc252d updated climb rate control
Land detector
2012-01-10 23:42:27 -08:00
Jason Short acd877abda added set_new_altitude call 2012-01-10 23:42:27 -08:00
Jason Short f36aba8af2 climb rate control 2012-01-10 23:42:26 -08:00
Jason Short 5a91396f63 Added climb rate control
removed unused vars
2012-01-10 23:42:26 -08:00
Jason Short 7890b784b2 Added altitude 2012-01-10 23:42:26 -08:00
Jason Short dab4fb43d4 Added altitude change flags 2012-01-10 23:42:26 -08:00
Jason Short b6fc8e519c AP Rangefinder had some bad characters in it. Converted and cleaned the text files. 2012-01-10 23:42:26 -08:00
Jason Short 351be7c305 Made timer unsigned 2012-01-10 23:42:26 -08:00
Jason Short 7b8767d846 Added comments 2012-01-10 23:42:26 -08:00
Jason Short b1e971ea18 added location error calc to get better data. Otherwise we'll be 1 GPS read off. 2012-01-10 23:42:26 -08:00
Jason Short 5f55780b5e Added comments
moved out failsafe check. otherwise the reporting was erroneous.
2012-01-10 23:42:26 -08:00
Jason Short 92f7b22722 Moved failsafe check to more logical place 2012-01-10 23:42:26 -08:00
Jason Short cf92631d33 added #if to wind compensation code 2012-01-10 23:42:26 -08:00
Pat Hickey fc6321b7ca ArduCopter motors_y6: rewrite CH_ macros with MOT_ macros 2012-01-09 22:06:49 -08:00
Pat Hickey 927e60d85b ArduCopter motors_y6: rewrite loop in terms of motors 2012-01-09 22:06:49 -08:00
Pat Hickey ac7f6a5602 ArduCopter motors_tri: rewrite CH_ macros with MOT_ macros
* Third Tricopter motor was on CH_4, so it is called MOT_4. This
  will be changed in a subsequent commit.
2012-01-09 22:06:49 -08:00
Pat Hickey 73610ddb6c ArduCopter motors_octa_quad: rewrite remainder from CH_ macros to MOT_ macros 2012-01-09 22:06:48 -08:00
Pat Hickey 7f4c994346 ArduCopter motors_octa_quad: rewrite loop in terms of motors 2012-01-09 22:05:01 -08:00
Pat Hickey e2be119433 ArduCopter motors_octa: rewrite remainder from CH_ macros to MOT_ macros 2012-01-09 21:57:02 -08:00
Pat Hickey 46b8037a73 ArduCopter motors_octa: rewrite janky loops to use ch_of_mot
* Previously the loop was written over channels, now it is over motors
* the correct channel for that motor is determined by ch_of_mot.
* ch_of_mot is defined correctly based on the config_channels macros.
2012-01-09 21:57:02 -08:00
Pat Hickey 79030a84b8 ArduCopter motors_hexa: rewrite remainder from CH_ macros to MOT_ macros. 2012-01-09 21:57:02 -08:00
Pat Hickey f7e14fff37 ArduCopter motors_hexa: rewrite janky loops to use ch_of_mot
* Previously the loop was written over channels, now it is over motors
* the correct channel for that motor is determined by ch_of_mot.
* ch_of_mot is defined correctly based on the config_channels macros.
2012-01-09 21:57:02 -08:00
Pat Hickey b907c1fd5c ArduCopter: add ch_of_mot lookup to motors.pde 2012-01-09 21:57:02 -08:00
Pat Hickey 7535c1c3fe ArduCopter test.pde: translate from CH_ to MOT_ notation 2012-01-09 21:57:02 -08:00
Pat Hickey 6a4442557c ArduCopter setup.pde: translate from CH_ to MOT_ notation 2012-01-09 21:57:02 -08:00
Pat Hickey 91bc2698a8 ArduCopter radio.pde: translate CH_ to MOT_ outputs 2012-01-09 21:57:02 -08:00
Pat Hickey 2f63c636ad Rename ArduCopter/config_motors.h to config_channels.h 2012-01-09 21:57:02 -08:00