1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

36 Commits

Author SHA1 Message Date
James Cotton
53cb5b67d1 Make the revo attitude now use the separate gyro object. CopterControl
attitude still needs an update.
2011-12-12 13:28:35 -06:00
James Cotton
07e3ad10af Force some floating point units to be safe 2011-11-26 15:52:25 -06:00
James Cotton
c36297227d Stabilization fix typo 2011-09-12 11:56:01 -05:00
James Cotton
b38081bb1b Stabilization: When in none mode zero the integral accumulators for rate and
attitude loops.  When not using outer loop zero that accumulator.
2011-09-11 16:33:38 -05:00
James Cotton
6945f17eba Make the StabilizationSettings.MaxRate field only apply to the stabilized
modes.  That way ManualRate can exceed MaxRate.
2011-09-11 12:27:17 -05:00
James Cotton
482bec497b Revert "Fixed modules that didn't initialize used UAVObjects correctly"
Modules should initialize their settings and the objects they source.  Not just
everything.

This reverts commit 9ad85e9b7b.
2011-08-19 09:44:38 -05:00
Corvus Corax
9ad85e9b7b Fixed modules that didn't initialize used UAVObjects correctly 2011-08-19 13:20:15 +02:00
James Cotton
bbe3c1533a Merge branch 'next' into camera_stabilization 2011-08-10 21:57:45 -05:00
James Cotton
ab288e95ab Stabilization: Small patch so that by default the integral is zeroed while
throttle is low (good for quads) but can be disabled (good for planes and also
testing helis).
2011-08-10 03:51:46 -05:00
James Cotton
96c2d24253 Merge branch 'next' into camera_stabilization
Conflicts:
	flight/CopterControl/Makefile
	flight/CopterControl/System/coptercontrol.c
	flight/Modules/Actuator/actuator.c
	flight/Modules/GPS/GPS.c
	flight/Modules/ManualControl/manualcontrol.c
	flight/Modules/Stabilization/stabilization.c
	flight/Modules/System/systemmod.c
	shared/uavobjectdefinition/manualcontrolsettings.xml
	shared/uavobjectdefinition/stabilizationdesired.xml
2011-07-30 10:06:10 +09:00
Mathieu Rondonneau
612a439199 OP-423: simplify the MODULE_INITCALL macro and remove the ordering loops 2011-07-12 20:44:32 -07:00
James Cotton
0aec3b592c Changing stabilization so that the PIDs are zeroed when not armed, but NOT when
the throttle is < 0.  This will make things like axis-lock work while armed
without throttle.  HOWEVER don't hold your stick in the arming position for a
long time or you can wind up the integrals now.
2011-07-12 14:35:32 -05:00
James Cotton
53ca934b2b Merge branch 'heli_stabilization'
Conflicts:
	flight/CopterControl/System/inc/pios_config.h
	flight/Modules/Attitude/attitude.c
	flight/Modules/ManualControl/manualcontrol.c
	flight/Modules/Stabilization/stabilization.c
2011-07-12 13:28:20 -05:00
Mathieu Rondonneau
9b9b5a1367 OP-423: remove ';' at the end of macro 2011-07-05 19:44:54 -07:00
James Cotton
ad8876c62a OP-193: Weak leveling variant on rate mode. Slowly will return to level. 2011-07-04 20:44:55 -05:00
James Cotton
a7206361d2 Slightly different way to respond to sticks in axis lock that is much more
responsive and avoids overshoot.
2011-06-26 21:59:54 -05:00
Mathieu Rondonneau
de55c56427 OP-423: Change capital on macro to be uppercase for consistency. 2011-06-24 22:03:03 -07:00
James Cotton
dedbcbfceb Correct nasty bug on range checking for max rate and use the axis lock rate
desired when in that mode.
2011-06-24 11:30:28 -05:00
James Cotton
038f955cb1 OP-410 OP-333: Axis lock (heading hold) implemented 2011-06-24 10:38:26 -05:00
James Cotton
28501842c3 Expose the rate D term which in simulations seems to help damp oscillations for
high RateKp terms.  However it might be sensitive to gyro noise (vibrations).
In addition it is mathematically similar to lead shapign so probably only use
one or the other.
2011-06-24 10:38:25 -05:00
James Cotton
a09642675c Tweak the integral calculation so it is scaled in ms internally. This avoids a
loss of precision on the accumulation.
2011-06-24 10:38:25 -05:00
James Cotton
373689207a Add a 1-tap IIR filter into the gyros in the feedback path. This will make the
stabilization output a bit more resilient to the high frequency noise from
gyros.  However this value shouldn't be too high as it will increase the phase
delay of the feedback loop and decrease stability.  Default is 5 ms.

Note: this resests the stabilizationsettings object.  Sorry guys.
2011-06-24 10:38:25 -05:00
Mathieu Rondonneau
fc1e3f574c OP-423: Split task create and module init in order to postpone task creation once the full heap is available.
Also implement some ordering (quite ugly still) in the module init and task creation order so we can decide which module to start/init first
and which module to start/init last.
This will be replaced/adapter with the uavobject list later (once it's implemented).
reserving some space for module init and task create parameters to customize module/task creation (this will be usefull once we get the list and customization from customer).

Changes have been made for OP and CC. Tested comped with CC,OP, sim_posix.
Only ran on bench with CC for couple of minutes (code increase expected but no dropping of stack which is good).

This gives task creation at the time wherethe all heap is available.
2011-06-19 22:35:40 -07:00
James Cotton
5044ea36de Start initializing objects in the modules that consume them. Shouldn't affect
OP yet but not tested.
2011-06-18 14:20:51 -05:00
James Cotton
9720a8444f Make a few things optional if they are mostly for diagnostics to keep memory
down
2011-06-17 21:00:21 -05:00
Mathieu Rondonneau
65cf467ca4 OP-423: move the module initialize funtion into a specific section for OP and CC.
- create linker section for those <module>Initialize()
- later this list will incorporate parameters as well. (this probably will be more a OP feature to swap/remove/delete module on the fly.
- this is not done at compile time anymore by Makefile.
- this will allow us to have control on the module start at run-time (not implemented but build the ground for it).
- this simplify the startup (Part of code re-org).
- this change does not affect sim_posix and win32 (since they don't need that)
- ensure it's compiling for PiOS.posix
- port to PiOS.win32 but not tested (not compiled)
- tested on CC
- compile on OP.
- this free ~200 bytes.
- current avalable bytes (is we keep the same remaining bytes on the stack than before) is easily passed the 1.2Ko mark on CC with new gcc (4.5.2)
- this does not include init-reorg for each module (I still think more can be freed)
2011-06-16 22:13:19 -07:00
James Cotton
10e55c25bc OP-475: More changes to get the FlightStatus object to work for Armed and
FlightMode
2011-05-07 15:06:04 -05:00
James Cotton
80c839d5bb OP-475: Starting to use the new FlightStatus object 2011-05-07 13:17:21 -05:00
peabody124
915ae1ae3c OP-313 Account for which axis are in rate and none to get the desired
quaternion

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2933 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-02 01:25:38 +00:00
peabody124
8930ec01de OP-313 Quaternion based stabilization, gets rid of lots of checking angle
signs, should be stable for all orientations

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2932 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-02 01:25:34 +00:00
peabody124
3488d28a5b Whitespace fixes
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2931 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-02 01:25:30 +00:00
peabody124
3e17c2ff55 OP-312: Create a StabilizationDesired object that is the generic input to
Stabilization, carries the desired rate or attitude as well as a flag on how to
intepret it.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2930 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-02 01:25:27 +00:00
corvus
435072cf4e Modules/Stabilization, Modules/ManualControl:
Move channel StabilizationSettings from ManualControlCommand to
AttitudeDesired, unify channel normalization and put them all into ManualControl

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2797 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-15 14:55:00 +00:00
peabody124
810fa70856 UAVObjects: Remove the raw versus filtered fields in the sensor data. Save
some memory.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2706 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-03 02:42:39 +00:00
peabody124
cf2e9fb349 Memory: Also allow overriding Stabilization stack size
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2690 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-02 08:57:34 +00:00
peabody124
fc54159369 OP-265 Flight reorganization of UAVObjects and Modules up a directory
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2415 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:19 +00:00