Today i tried to create new roll-pitch-mode for my copter after reading this tutorial.
First I wanted to mention that there is an error at the end of the page.
[quote] Overriding the roll-pitch mode for ALTHOLD can be done by simply adding this line to APM_Config.pde:
#define ALT_HOLD_RP ROLL_PITCH_MYNEWRP[/quote]
But I am pretty sure that it is the APM_Config.h
Then I wanted to ask which values for the angle are sensefull for this function
Is it a value in radian or degree or is it the pwm-value for the pitch output?
I don’t want to overwrite a totally wrong angle
thanks for pointing out that typo. fixed now.
the angle should be in centi-degrees. so degrees * 100. 4500 = 45 degrees.
By the way, we're working on "[url=https://github.com/rmackay9/rmackay9-ardupilot/tree/onion3/libraries/AC_AttitudeControl]the onion[/url]" at the moment. This is going to change quite a bit how you create new roll-pitch modes. In fact, you won't be able to create only a new roll-pitch mode but instead you'll have to make an entire new flight mode (or modify an existing flight mode). You can see the beginnings of how it will work if you look in the [url=https://github.com/rmackay9/rmackay9-ardupilot/blob/onion3/ArduCopter/control_stabilize.pde]control_stabilize.pde[/url].
I don't think that means you need to stop what you're doing though, I'm converting all the existing modes to the new structure so you should be able to retro fit what you've done in a similar way.