I was so fed up with the current Baro implementation, that i rewrote the whole Baro controller stuff. I ended up with something like a P-whatever controller and a configurable ACC Z Part. Now i am quiet happy how the Baro works (tested on MS Baro, but other users report good working results on BMP as well) Here is the Link to the German site: http://fpv-community.de/showthread.php? ... post188839
. Please use google translate for now.
Here is a short description:
Alt P = Is what you expect, high values will give you a good swinging copter. Only the P "knows" wich height is the setpoint.
Alt I = Is the strength of a variometer, wich tries to fight fast movements up/dwn. It does NOT know the wanted hight but will slow down P jojo significantly.
Values normally between 0,010-0,050. A strong P can outperform the I. You can think of the "I" making the air thicker, like you would fly in oil.
Alt D = Is the Baro - Accelerometer term now. It is only active in level mode. The "D" also doesn't know the hight at all. But it can fight fast dropping. It is limited to ONLY upcorrection. Values depending of used ACC vary from very low like 2 or so up to 90!
Tuning: Set D and I to 0. Increase P till you get a solid jojo effect (Default Value 10,0!) do steps of 2 or 5 don't bother with 0,x values. Don't decrease P now - let it jojo. Now increase I (default 0.040) from 0.010 to 0.050 in 0.010 steps until you see a good dampening of the P -jojo. From my findings (ms Baro) 0.050 is already to high. Now you can try to increase the P and than the I again.
When this is done increase the "D" Term. Hold the copter in your hand with Baro&Levelmode activated (without levelmode: no effect). Try low values at first like 2 or 5 or so and pull the copter down by hand. You should feel the copter instantly fighting your movement. If you don't feel it fighting increase in steps of 20. I have the Freeimu 3.xx MS and i am happy with a D of 80.
If your copter always has the tendency to drop to much (despite your PID efforts) go to IMU line 272: #define Droppercent 20
and reduce it to lets say 5 or 10. That means only 5% of the calculated downmovement is given to the motors. It is dependent on the throttle when turning the Baroswitch. I kept this parameter out of the config.h to leave the config.h unchanged from the default state. So you can copy your existing 2.1 config.h into my mod and upload it right away.
EDIT: A dropping Lipo voltage can be compensated, if the "P" still gives enough power to the motors.
I hope it helps your Barofunction working as well!
EDIT: "Martinez" has done some stunning videos with the modified code on his Copter (WMP,BMA020,BMP085 Baro Alt: P=4.5 I=0.030 D=10)http://www.youtube.com/watch?v=kfN3nGYCetI&http://www.youtube.com/watch?v=sE2CEOab4SI&
EDIT: I summarized the changes from the original 2.1 here: http://fpv-community.de/showthread.php? ... post189820