Commit Graph

691 Commits

Author SHA1 Message Date
Doug Weibel
ed9f7cb1b6 Update battery monitoring code for ArduCopter
Fixes compatibility for APM2.  Also a significant update to the battery monitoring code:  We previously had monitoring modes for individual cell voltages for 3 and 4 cell lipos.  These have been removed as they were never really supported (the cell voltages were computed but were not reported or recorded anywhere).  Also, some clean-up/prep work was done for supporting monitoring 2 separate battery packs.  The CLI battery and current monitoring tests were consolidated into 1 test.
changed
2012-01-15 17:10:02 -07:00
Doug Weibel
0306bf97a0 Just a little more commenting work on global variables 2012-01-15 16:11:02 -07:00
Jason Short
e2c2a453a8 APM2 Channel assignments 2012-01-15 10:24:16 -08:00
Jason Short
3ebed0b278 This allows users to test the Auto_throttle hold or cruise value 2012-01-14 11:43:52 -08:00
Jason Short
46ef246e67 b2 2012-01-14 11:37:00 -08:00
Jason Short
0ae82da0fd Fix for SIMPLE mode 2012-01-14 11:32:48 -08:00
Jason Short
72faa6525e Tweak to make circle mode scripting more accurate 2012-01-14 11:21:50 -08:00
Jason Short
89343ae306 adjusted GPS watch dog not to be so aggressive,
removed unneeded flag clearing
2012-01-14 11:20:40 -08:00
Jason Short
95ac9d163e lowered Loiter I, commented out unused var 2012-01-14 11:20:40 -08:00
Jason Short
c02b403a06 temp removed alt D term until more testing 2012-01-14 11:20:40 -08:00
Jason Short
1843798697 Clarified the Increment for WP total 2012-01-14 11:20:40 -08:00
Jason Short
f97d58c753 added notes, removed redundant save wp_total 2012-01-14 11:20:40 -08:00
Jason Short
7877a872d3 added update throttle cruise function 2012-01-13 16:48:05 -08:00
Jason Short
1269b07d9a Made RTL always the current Altitude 2012-01-13 16:47:38 -08:00
Jason Short
ec9880f725 made resetting throttle cruise a function 2012-01-13 16:47:08 -08:00
Jason Short
6591089110 Disabled Ryans filter until we get real-world testing in. 2012-01-13 12:48:02 -08:00
Jason Short
8d909f6eed fixed GPS bug - moved to fast loop location 2012-01-13 12:47:22 -08:00
Jason Short
c327a9f000 made landing shoot for below home by 2 meters to avoid bounce up. 2012-01-13 12:46:40 -08:00
Jason Short
7c475f178c tuned down Alt hold D gain 2012-01-13 09:36:51 -08:00
Jason Short
4eacc6f3eb re-enabled relay test 2012-01-13 08:55:02 -08:00
Jason Short
ee7c948781 Added simple constrain for Alt d term 2012-01-13 08:49:55 -08:00
Jason Short
b0810e054e moved GPS routines to 50hz loop to avoid delay. 2012-01-12 22:59:47 -08:00
Jason Short
648a404ee1 Version 2.2 2012-01-12 22:37:33 -08:00
Jason Short
91e05834c8 removed wind comp code,
Added Landing boost code
2012-01-12 22:28:58 -08:00
Jason Short
4459fc4e34 Added a small D term on alt hold 2012-01-12 22:28:58 -08:00
Jason Short
6b85adb460 Added Landing throttle control to force down the copter 2012-01-12 22:28:58 -08:00
Jason Short
154411c96c removed unused defines
lowered default Loiter gain
2012-01-12 22:28:58 -08:00
Jason Short
569ff5046f Added Ryan's GPS lag filter
Removed unused code
refined alt change
2012-01-12 22:28:58 -08:00
Jason Short
a59c9ae22c added notes 2012-01-12 22:28:58 -08: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
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
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
dab4fb43d4 Added altitude change flags 2012-01-10 23:42:26 -08:00
Jason Short
351be7c305 Made timer unsigned 2012-01-10 23:42:26 -08:00