--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mlloyd’s solution is somewhat light weight and it would be used only in althold, autotune, drift, land, poshold and stabilize modes. Poshold is probably the heaviest of those in terms of CPU… it might be ok.
Jonathan, you happy with this solution?
-Randy
Sorry for my ignorance, but is it possible that using quaternions instead of Euler angles would solve this whole problem of 45° angle projections aka east-north-east?
Then add unit-circle limiting on top of that. I use a plastic mechanical limiter on my cyclic stick, but a software solution as well would be more elegant.
The limiting is done by replacing H_ROL_MAX and H_PIT_MAX with a different parameter, H_CYC_MAX. For each iteration, the pitch and roll are summed and then compared to H_CYC_MAX. The vector angle is also calculated. If the total pitch and roll exceed the limit, they are scaled down appropriately using the vector angle. This gives the swashplate a circular limit. It is calculated within AP_MotorsHeli.cpp
I highly recommend this patch because AFAIK there isn't a helicopter out there that requires different cyclic pitch limits for pitch and roll axes, plus this eliminates the issue of exceeding preset cyclic pitch limits everywhere that isn't dead on axis. Please take a look at the commit and you see what I mean :)
It can be done without all that trig in component form.
I don't follow, do you mean that you know of a way to convert from polar to cartesian without trig, or that I should be using vector2f to do the trig?
:O Wow OK yes nicely done. Much, much better than mine. Do you mind if I commit that?