Hi,
I would like to make a little contribution. We found out during flying that the current algorithm of Flaperons have an impact on flight characteristics, making the plane spongy with full flaps so decreasing effectiveness of the ailerons.
Currently the flaperons are added additive to ailerons which has 2 problems.
1. Given that flaps are on 400, when you add more than 100 scale for Roll, you hit the limit it gets constrained, the left 400 on Roll is ignored!
2. The other wing, where you should now have 400 + -500 = 900 path the servo will take only 500 ==> -100, so not using the remaining path.
Practically in flying we noticed that the last 50% of servo scale have much less reaction than the first.
What would be the goal?
The idea is to
always propotional use the remaining servo path that is still available (which was not consumed by flaps).
For instance, on flap 400, the roll of 250 (50%) would be (full scale 500 - flaps 400) = left 100 * propotional Roll 50% == add 50 to 400.
In that example Wing 1 ==450 and Wing 2 (50% of 900 (400 + -500) == -450 ) == -50.
That means, you will
always have full Aileron Roll reaction, regardless if you have full flaps or not!

Honestly, on full Roll you basically dont have flaps function - but that situation is an emergency situation where you desparetely need roll and forget about flap.
To better understand the difference here is a comparison attached.
This is the current implementation:
Code: Select all
if(f.PASSTHRU_MODE){ // Direct passthru from RX
servo[3] = rcCommand[ROLL] + flapperons[0]; // Wing 1
servo[4] = rcCommand[ROLL] + flapperons[1]; // Wing 2
This is my proposed algorithm:
Code: Select all
if(f.PASSTHRU_MODE){ // Direct passthru from RX
servo[3] = (rcCommand[ROLL]*(500.0-(rcCommand[ROLL]<0 ? -flapperons[0]: flapperons[0])))/500.0 + flapperons[0]; // Wing 1
servo[4] = (rcCommand[ROLL]*(500.0-(rcCommand[ROLL]<0 ? -flapperons[1]: flapperons[1])))/500.0 + flapperons[1]; // Wing 2
I've tested it and it works nicely. The same applies of course for gyro mode. I'm currently thinking about making it faster with integer calculation.
I hope that of some use and would appreciate any comment.
Sam
EDIT:Here is the integer version, it gives the same results but I think it should be faster:Code: Select all
if(f.PASSTHRU_MODE){ // Direct passthru from RX
servo[3] = (int32_t) rcCommand[ROLL] * (500 - (rcCommand[ROLL]<0 ? -flapperons[0]: flapperons[0])) / 500 + flapperons[0]; // Wing 1
servo[4] = (int32_t) rcCommand[ROLL] * (500 - (rcCommand[ROLL]<0 ? -flapperons[1]: flapperons[1])) / 500 + flapperons[1]; // Wing 2