Confused by the mapping logic

More
04 Apr 2013 05:58 - 04 Apr 2013 06:00 #8484 by cmpang
Confused by the mapping logic was created by cmpang
Other than the TRIM functions I have referred many many times in the forum, another very confused item is the channels mapping..

with the mixing page on the photo, can someone please help to point out what is wrong with my expection below:





I want to create a Virtual 1 channel that:

1, when my Tx outputs a -100% on Channel 3 to my receiver, Virtual 1 should give a value of +100%

2. when my Tx outputs a 0% on Channel 3 to my receiver, Virtual 1 should give a value of -100%

3. when my Tx outputs a +100% on Channel 3 to my receiver, Virtual 1 should give a value of +100%

It is no doubt that my expection is wrong cause it doesn't beheave that way.
Attachments:
Last edit: 04 Apr 2013 06:00 by cmpang.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 06:14 - 04 Apr 2013 06:16 #8485 by vlad_vy
Replied by vlad_vy on topic Confused by the mapping logic
What is wrong? All looks fine. If you want to use Virt1 channel for output, you need use it as a source for real channel. For example: Ch3 - Src:Virt1, Curve:1-to-1.
Last edit: 04 Apr 2013 06:16 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 06:23 - 04 Apr 2013 06:40 #8486 by cmpang
Replied by cmpang on topic Confused by the mapping logic

vlad_vy wrote: What is wrong? All looks fine. If you want to use Virt1 channel for output, you need use it as a source for real channel. For example: Ch3 - Src:Virt1, Curve:1-to-1.


Actallly I used CH3 for thottle control.
I works when I move the thottle stick, but as you are aware, I also use a switch as "Thottle hold" to held up the thottle to 0%. So under Thottle Hold condition, shall I expect Virtual 1 to give a fixed value of -100%?
The fact is Virtual 1 still follows the stick movement disregard the hold switch.
Last edit: 04 Apr 2013 06:40 by cmpang.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
04 Apr 2013 08:01 #8493 by rbe2012
Replied by rbe2012 on topic Confused by the mapping logic
I believe for ch3 you use the throttle stick as input and the throttle hold switch. So the output ch3 is dependent of the throttle stick (-100 to 100) and the th switch (assume -100).
This is used as input for virt1. So if you have an input of -100 you will get +100 as output regardless if the input is created by the switch or because the throttle stick is down.

This works for me. Perhaps ypu will post your relevant part of the model config? Mine (simple test) looks like this:
[channel3]
template=complex
[mixer]
src=THR
dest=Ch3
[mixer]
src=!AIL
dest=Ch3
switch=GEAR1
scalar=-100
usetrim=0
curvetype=fixed

[channel5]
template=simple
[mixer]
src=Virt1
dest=Ch5
curvetype=expo
points=0,0

[virtchan1]
template=simple
[mixer]
src=Ch3
dest=Virt1
offset=-50
curvetype=deadband
points=70,70
You can watch the behavior with the channel monitor.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 08:11 #8496 by FDR
Replied by FDR on topic Confused by the mapping logic
I assume this is because you use the safety feature for the throttle hold, which is applied after the Ch3 value is calculated, just before the tx sends it out (just like the reversing and the subtrims for example).

If you used a complex mixer page for the throttle hold, it would work...
Other option would be to use a complex mixer on the Virt1, and implement the throttle hold switch there on a new page...

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 08:37 - 04 Apr 2013 08:39 #8497 by cmpang
Replied by cmpang on topic Confused by the mapping logic

FDR wrote: I assume this is because you use the safety feature for the throttle hold, which is applied after the Ch3 value is calculated, just before the tx sends it out (just like the reversing and the subtrims for example).

If you used a complex mixer page for the throttle hold, it would work...
Other option would be to use a complex mixer on the Virt1, and implement the throttle hold switch there on a new page...


Simple logic is for the mixer to get value from the SRC, in this case is CH3, and outputs a value in accordance to the mixing function no matter is it a simple, complex or whatever the user puts in..

CH3 is CH3, what is transmitting out from the TX and receiving from the planes recever, no matter how many functions that has been applied along the mixing chain..








Attachments:
Last edit: 04 Apr 2013 08:39 by cmpang.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 09:46 #8500 by FDR
Replied by FDR on topic Confused by the mapping logic
Not that simple.
As I've already told, the safety value is not reflected in the ChX values, because it is applied after that calculation, and effect only that channel, which it belongs to...

Don't let the box and bar values fool you, because they also apply some of those values, like the safety for example, while they don't apply others, like for example the reverse is shown on the channel monitor, but not on the main page bars and boxes...

So please try to implement the throttle hold with a complex mixer, and see if it solves the problem.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
04 Apr 2013 09:48 - 04 Apr 2013 09:49 #8501 by rbe2012
Replied by rbe2012 on topic Confused by the mapping logic
As FDR mentioned ch3 is a virtual value which is not send out to the rx. There are some operations applied to it before the tx will send the value out like the safety switch/value.
You will see the difference when you compare the channel monitor with the real heli / plane.
Suddenly I am not sure about this.
I tested it again and the emulator shows that the ch3-value shown in the channel monitor (or as a bar) IS dependent of the safety switch. It shows a constant value if the switch is applied.
Nevertheless the virtual channel is fully reacting on the throttle input. So obviously it makes a difference if you show a channel value on the display (regardless if as bar, in a box or in the channel monitor) and if you use it as input for another channel (esp. safety is not applied).
So you can't use safety in this case. As I have done above and FDR supposed using a complex mixer and an additional page with the th switch works.

EDIT: FDR was faster, but seems to tell quite the same...
Last edit: 04 Apr 2013 09:49 by rbe2012.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 10:17 #8503 by cmpang
Replied by cmpang on topic Confused by the mapping logic
ask any rc pilot and tell him what ch3 doesnot mean something that comes out from his trusty receiver and see how surprise he may be.
sure there are lots of ways to get around this. But I can't think of a simpler and more logical way to do it.
I use virtual 1 ss a switch to enable a timer. Simple switch won't do as my boat runs in both directions.
no big deals here. just my two cents

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 11:05 #8505 by FDR
Replied by FDR on topic Confused by the mapping logic
Sorry, I just tried to help with the facts...
Please don't blame me.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 11:42 #8507 by cmpang
Replied by cmpang on topic Confused by the mapping logic

FDR wrote: Sorry, I just tried to help with the facts...
Please don't blame me.


no one is to be blamed here in this friendly forum. Sorry if I sound rough. Don't get me wrong, I love deviation and as such I like to point out what can mske such a great project even better.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
04 Apr 2013 11:46 #8508 by rbe2012
Replied by rbe2012 on topic Confused by the mapping logic
Reducing it to the facts I can understand cmpang's point of view. It is not easy to understand why a value which is labeled in a way you could think as if it were directly transferred to the rx will still have some calculations applied before it is sent out.
This is one of the points what made deviation's mixer concept hard to understand for me at the beginning. There were names used in different contexts for different things, but it is sometime quite hard to recognize that the context has changed (I had my problems with the throttle stick and the throttle channel - I always had to think about if it is used as input or output). I have forsaken at the point where I have understood enough for my needs.
Things could be easier if the nomenclature would be unambiguous but I see that this is hardly to achieve because in the "daily spoken language" the terms were also mixed up again and again...

I can't remember to have ever seen a description how the values of the output are generated / calculated from the inputs and which intermediate results were used for which intention. The documentation is a little bit short in that point. Does anyone have one?

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 12:01 - 04 Apr 2013 12:02 #8511 by RandMental
Replied by RandMental on topic Confused by the mapping logic

rbe2012 wrote: I can't remember to have ever seen a description how the values of the output are generated / calculated from the inputs and which intermediate results were used for which intention. The documentation is a little bit short in that point. Does anyone have one?


I noticed the latest V3 manuals has a section on the Mixer on Page 18, would that help:

A given mixer can be considered to have the general form:
M(x) = if(Switch) { Src * Curve * Scale + Offset} else {0} + Trim
etc......
Last edit: 04 Apr 2013 12:02 by RandMental.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 15:30 #8521 by cmpang
Replied by cmpang on topic Confused by the mapping logic
lets put nomenclature aside for the moment...

is it logical that an intermediate data that needs further processing even more important or useful than a final data as the valve being send out to the receiver?

It is no problem to have CH3 as a source, but then we should also include sometime like TX3 (transmitted channel 3) as a choice in the mixing page.

Please Log in or Create an account to join the conversation.

More
04 Apr 2013 20:26 #8534 by domcars0
Replied by domcars0 on topic Confused by the mapping logic

cmpang wrote: It is no problem to have CH3 as a source, but then we should also include sometime like TX3 (transmitted channel 3) as a choice in the mixing page.

But this is the same ... CH3 is the transmitted channel 3 which can be used as an INPUT for another TX channel which can be used as an INPUT for another ..... Yes we can ;-)

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
05 Apr 2013 05:59 #8548 by rbe2012
Replied by rbe2012 on topic Confused by the mapping logic
Sorry domcars0,
it is not the same when some parameters are applied after the value is used as mixer input and before it its sent out.

Please Log in or Create an account to join the conversation.

More
05 Apr 2013 07:18 #8550 by sbstnp
Replied by sbstnp on topic Confused by the mapping logic
I'm with domcars0 on this one, can't see anything confusing regarding channels. Channel 3 is channel 3.

In the UI on the other hand, yes, there are things which require attention. It's not that they wrong as they are now, but they can certainly be presented better and/or unambiguous.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

Time to create page: 0.126 seconds
Powered by Kunena Forum