I want to preface this by saying I am new here, and I hope I don't break any rules - I have an APM but have not yet had a play with it, just read a bit.
But there was something I wanted APM for, I mistakenly thought it was what stabilize mode did, but it turns out I misunderstood.
So I want to see if I can cobble it together somehow =D I'm hoping for guidance, even if it's "You can't do this with APM because X"
Basically I want my APM to damp out the effects of turbulence, gusts of wind, hitting a thermal with a wingtip, etc, without auto leveling the plane. The intent is that the plane would fly like it normally does without APM (i.e. it wouldn't artificially auto level), but it would make flying in adverse conditions a bit easier and less stressful.
There are two issues here:
1) Stabilize mode, unfortunately, does auto level - which means it will make the plane behave a bit unnaturally.
2) If I did manage to make this work, I'm not sure, but will it mess around with the more advanced modes (fly by wire B, loiter, RTL) which are said to be based on stabilise?
For the first issue, my initial thought was that if I turn the proportional and integral gains to zero and only use differential gains, it would mean that the plane would damp out any movement away from level without auto leveling. This was quickly replaced by the realisation that (and I'm not sure about this) it would probably see the plane at say, 30 degree bank, notice it NOT moving towards level, and the differential gains would seek to correct that. Therefore, it would still autolevel.
The solution to that then would be a differential only mode, as above, but one which always considered the planes current orientation to be precisely what it wants it to be. It would, at any given point in time, look at its current orientation in the air and go "Yep that's cool", and then look at the rate of change of that orientation, and then, if non-zero, resist it.
Assuming this would work (would it?), how could I implement it? I assume it would necessitate scripting, rather than being accessible in the mission planner? What about if I scale the inertia and mangetometer readings to zero at all times while in stabilise mode? I imagine doing so would break other functions, so perhaps a better approach would be to find the lines of code that give current orientation to whatever chooses servo deflections, and make it show level orientation at all times?
For the second issue, I really don't know if this is an issue. If it is, how hard is it to make a new custom flight mode (probably would start as a copy paste of the stabilize mode) and modify that so that I wouldn't need to ruin the stabilise mode?
I would be happy to hear any feedback, ideas, or "We have already done this" comments. Even ones saying it is impossible, but please tell me why it is impossible if you want to say that, I'm a very curious person by nature ;)
This is fairly easy, but you will have to do some modifications to software to accomplish what you want. The standard controller doesn't actually use the rate process variable but uses a standard PID. The guys can correct me if I'm wrong here. However, the Jon Challinger controllers do use rate feedback directly. My opinion is that this method of control works much better than what most are flying. The start of that thread can be found here: Arduplane 2.60 Released.
Next you should read and understand what's happening in his code. This can be found in the library APM_control. It's not as big a deal as you think to turn off the attitude feedback and feed forward by making a simple code mod. What you're left with will be the rate feedback. That should be the rate damping autopilot that you're looking for.
Or, you could use an off-the-shelf airplane or heli solution. But that wouldn't be as much fun.
Larry D. Grater
put away APM , and exchange your plane for a bigger one! the more bigger the better!
maybe big plane can Meet your requirements