Newcal / opentx

Automatically exported from code.google.com/p/opentx
0 stars 0 forks source link

Enhance usability of mixer line specification #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, linear responses in a mixer line are specified using Weight and 
Offset parameters. The response is defined by y = weight * x + offset. 

The drawback of this approach is that adjustments on the field can be awkward 
as it often requires calculation for example if it's required to produce an 
output of between say 40 and 65.

The proposal is to replace Weight and Offset with two end-point values EP1 and 
EP2. The values would be the required output values for inputs of -100 and +100 
respectively. 

The principle could be extended to permit 3- or more point ad-hoc curves. (The 
Multiplex 4000 uses this approach).

Original issue reported on code.google.com by m.shel...@gmail.com on 13 Jul 2013 at 11:35

GoogleCodeExporter commented 8 years ago
That's a double-edged sword...
With the Weight/Offset approach it's easy to just change the weight when offset 
is 0 (most common scenario), but a bit more complicated to calculate when you 
have offset. 
With the EP1/EP2 approach you'd have to figure out and adjust 2 parameters even 
to just change a ratio...
If I want to set an output between 40 and 65 I'll just use a 3-point curve. 
Having 2-point ones available too would be nice though. 

Original comment by bernet.a...@gmail.com on 14 Jul 2013 at 9:09

GoogleCodeExporter commented 8 years ago
> With the EP1/EP2 approach you'd have 
> to figure out and adjust 2 parameters even to just change a ratio...

Not sure I understand this. Since the end points would reference -100 and +100 
values, they are intuitively expressed as ratios (percentages). People used to 
other systems tend to think in terms of percentages, not gradients and offsets. 
Having now used both systems (OpenTx and others), I know why.

The suggestion for using curves to set up an asymmetric response would of 
course work, but it seems like using a sledgehammer to crack a nut. It means 
(a) using up a named curve (limited resource) and (b) a further calculation to 
determine the mid-point since 2-point curves are not available. All this makes 
complex glider setups difficult to set up on the field.

Original comment by m.shel...@gmail.com on 14 Jul 2013 at 10:39

GoogleCodeExporter commented 8 years ago
I mean now when you want to reduce the ratio of a mix that has no offset from 
100% to 80%, you just set the ratio to 80%.

With the EPs, you'd have to set EP1 to -80, then also EP2 to +80.

IMO the major manufacturers (maybe not MPX, but everyone else AFAIK) make it 
more complicated, they give you 2 percentages for left and right but center is 
always center. Some have an offset, but it then shifts everything up or down.

What may cause you trouble in calculations is that openTx applies the offset to 
the input. To apply it to the output a clearer approach is to add a 2nd mixer 
line with xx% MAX where xx is the offset you want to add to the output. 

Original comment by bernet.a...@gmail.com on 14 Jul 2013 at 10:51

GoogleCodeExporter commented 8 years ago
... But on reflection I see your point too. I think allowing named curves with 
2 points would be a good compromise and allow easy adjustment for the kind of 
example i gave. Thank  you for responding... and on a Sunday, appreciated!

Original comment by m.shel...@gmail.com on 14 Jul 2013 at 10:52

GoogleCodeExporter commented 8 years ago
Hy,

sorry, but calculation of Mixer is [(Source + Offset) * Weight] + Trimm
So for your example:

Range is from  -100% to +100%  = 200

you want a Range from -30% to +50%  = 80 absoult

the mid from -30% to +50%  is +10%

So calculate:

80/200=0,4 = 40% for Weight

+10/0.4=25  for Offset

so  set 
Weight =40 
offset =25  
and you got what you want
 a Range from -30 to +50

Helle

Original comment by hrenz62...@aol.com on 14 Jul 2013 at 5:36

GoogleCodeExporter commented 8 years ago
Yes, my brain fade. One consequence of the (correct) formula is of course that 
small ranges (low values for weights) require potentially very large offsets.

Original comment by m.shel...@gmail.com on 17 Jul 2013 at 9:58

GoogleCodeExporter commented 8 years ago
Nota: 2 points curves will also be part of the next MAJOR openTX release

Original comment by bson...@gmail.com on 31 Jul 2013 at 9:56

GoogleCodeExporter commented 8 years ago
2-point curves will help! Thanks for all the hard work :)

Original comment by m.shel...@gmail.com on 31 Jul 2013 at 10:49