Heli Swash Ring

Help with any software/desktop related issues. e.g. companion9x, eePe, etc
Post Reply
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Heli Swash Ring

Post by MikeB »

I've been looking at er9x specifically, seeing if there is any code that may be simplified to save space (as usual!).
I noticed that there seems to be TWO sets of code applying swash ring calculations to the Aileron (roll) and elevator (pitch) controls. Checking in openTx, this appears to do the same.
After some experiments, I think only one set of code should be present. In addition, I believe the current implementation, in both er9x and openTx, is flawed.

My understanding is the swash ring would simulate having a ring around the aileron/elevator stick to prevent full movement to the corners, so an attempt to move the stick towards the corner would limit both directions to 71% of maximum (swash ring of 100%).
Setting up a simple swash ring at 100% and testing this in eepe and openTx companion produces this result.
However, applying some expo to the sticks results in a different operation. Using different values of expo in the two directions (70% and 50%) only 46% and 53% of maximum travel, not 71%.
Using negative expo on one (-70% and 50%) gives worse results of 86% and 51%.

The cause of this is the first application of the swash ring is applied to the stick inputs BEFORE expo is applied, and the second swash ring code is applied after.

I think we only need the second application. With no expo present, the first application does all that is needed and the second application actually does nothing extra. With expo present, the expo, particularly if negative, actually voids the first swash application and the second swash application is needed. However, the first application has already distorted the stick inputs causing the second application to carry out an "incorrect" calculation.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: Heli Swash Ring

Post by pmackenzie »

HI Mike,
just heading out to work, so not a lot of time to think about this.
I can't comment on the twice applied part, but I think the way you describe expo affecting the result is as it "should" be.
If the goal is to simply simulate a ring on the gimbals then expo applied after the limit is done would be "correct" and result in some changes to the result.

If the goal is moved to limit actual swash motion then everything will quickly get quite complicated due to the many different ways swash servos are connected.

FWIW, I have never used the swash ring function, simply because no other radio I used had the feature.
And the way I fly ( not 3D) the stick is never going into the corner hard anyway :)

Pat MacKenzie
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Heli Swash Ring

Post by MikeB »

I've tried to see what is happening in openTx, complicated by the fact that on the Taranis, heli processing is separated from 'normal' processing part way through.

This seems to be what is happening:
1. Obtain stick inputs.
2. If swash ring enabled, apply swash ring to stick inputs.
3. Copy results to heli processing.
4. Apply expo (etc.) to both normal and heli values.
5. If swash ring enabled, apply swash ring to heli values only.

I believe the swash ring should only be applied to the stick inputs AFTER expo (etc.) has been applied, otherwise if expo is present at different amounts on the sticks you end with a very confusing result.
There is a question whether the swash ring should apply to the normal processing. I think it should. It could be useful if you have, for example, elevon mixing. Often with elevons you set 50% of elevator and 50% of aileron to get 100% altogether. If you set 100% elevator and 100% aileron, with a swash ring of 71% you get 71% of elevator and 71% of aileron, but the swash ring adjusts both values when you try for extreme values so you never go over 100% deflection.

er9x was simpler:
1. Obtain stick inputs.
2. If swash ring enabled, apply swash ring to stick inputs.
3. Apply expo (etc.) to values.
4. If swash ring enabled, apply swash ring to values.

I've simply removed item 2 and all seems to work correctly.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Heli Swash Ring

Post by jhsa »

errrrr, you mean item number 3?? ;) :)

I agree with allowing Swash ring to be used with mixes like elevon or V-Tail if it really helps..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Heli Swash Ring

Post by MikeB »

No, I did mean item 2.
Get stick inputs, apply expo, then apply swash ring.
If you apply the swash ring first, then expo messes up the swash ring result.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Heli Swash Ring

Post by jhsa »

Ahh, ok, I understand now, sorry

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “Software”