is this virtually possible?

More
07 May 2017 02:41 #62081 by crash7X
is this virtually possible? was created by crash7X
I've been clicking away at some examples and doing some experiments with the virtual channel / trim switches stuff and I will cheerfully admit that it just won't sink in.

So I ask if what I am aiming to eventually accomplish is even possible - so far I've tried things that made no sense and didn't expect to work, naturally they did not:

I would like to set it up so that the aileron stick operates normally, say even with rates selected by FMODE 0, 1 2 as many of the models I have come across do, and add to the AIL channel the idea that a trim switch would override any stick input and provide max aileron when pressed up and min aileron when pressed down.

I would do the same for elevator and rudder.

I don't need a fish, just describe it so I can find my way. Or tell me it isn't possible.

As for whether it is such a good idea as I think, I am willing to hear your opinion(s), but I'd like to try this out. Also it seemed like a good exercise.

crash7X

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

More
07 May 2017 03:52 #62082 by magic_marty
Replied by magic_marty on topic is this virtually possible?
I think it is possible i set up my jjrc1000a to do flips and rolls with the trim buttons..If i remember correctly i used virtual channels then mixed them to the Aileron and Elevator so when pressing the trim it applied full Aileron/Elevator as well as activated the flip channel..

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

More
07 May 2017 13:33 #62098 by crash7X
Replied by crash7X on topic is this virtually possible?
I awoke in the middle of the night with an idea. Went back to sleep.

Now after much button pressing I have something that works. I think if I continue experimenting I can improve my solution - right now I am needing two virtual channels to accomplish my min/max idea on just the elevator.

Old fashioned: it will be easier to do the rudder and aileron using the text file I can examine and edit. Many of the elements and syntax don't quite seem to make sense, but it is what it is and I expect slavish copying and competent modification will allow progress, as it has with simpler things I have managed.

I am sure when I am all done it will be intuitively obvious and simple. ;)

crash7X

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

More
07 May 2017 18:06 #62108 by magic_marty
Replied by magic_marty on topic is this virtually possible?
Here's my model file you can look it over it might help you figure out what you need..
name=JJRC 1000A
mixermode=Advanced
icon=QC2.BMP
type=plane
[radio]
protocol=V202
num_channels=9
tx_power=150mW

[protocol_opts]
Format=V202
Re-bind=No
250kbps=No

[channel1]
reverse=1
scalar-=100
template=complex
[mixer]
src=AIL
dest=Ch1
switch=ELE DR2
scalar=40
curvetype=expo
points=25,25
[mixer]
src=AIL
dest=Ch1
switch=ELE DR1
scalar=80
curvetype=expo
points=25,25
[mixer]
src=AIL
dest=Ch1
switch=ELE DR0
scalar=125
curvetype=expo
points=25,25
[mixer]
src=AIL
dest=Ch1
switch=Virt1
scalar=-125
curvetype=fixed
[mixer]
src=AIL
dest=Ch1
switch=Virt2
scalar=125
curvetype=fixed
[mixer]
src=RUD
dest=Ch1
switch=MIX1
scalar=30
usetrim=0
muxtype=add
curvetype=expo
points=0,0
[mixer]
src=RUD
dest=Ch1
switch=MIX2
scalar=40
usetrim=0
muxtype=add
curvetype=expo
points=0,0

[channel2]
template=complex
[mixer]
src=ELE
dest=Ch2
switch=ELE DR2
scalar=40
curvetype=expo
points=25,25
[mixer]
src=ELE
dest=Ch2
switch=ELE DR1
scalar=80
curvetype=expo
points=25,25
[mixer]
src=ELE
dest=Ch2
switch=ELE DR0
scalar=125
curvetype=expo
points=25,25
[mixer]
src=ELE
dest=Ch2
switch=Virt3
scalar=125
curvetype=fixed
[mixer]
src=ELE
dest=Ch2
switch=Virt4
scalar=-125
usetrim=0
curvetype=fixed

[channel3]
template=simple
[mixer]
src=THR
dest=Ch3
scalar=125
curvetype=expo
points=25,25

[channel4]
reverse=1
template=expo_dr
[mixer]
src=RUD
dest=Ch4
scalar=125
[mixer]
src=RUD
dest=Ch4
switch=RUD DR1
[mixer]
src=RUD
dest=Ch4
switch=RUD DR2
scalar=80

[channel5]
template=simple
[mixer]
src=GEAR0
dest=Ch5
scalar=125
curvetype=expo
points=0,0

[channel6]
template=complex
[mixer]
src=TRN1
dest=Ch6
curvetype=expo
points=0,0
[mixer]
src=Ch6
dest=Ch6
switch=AIL DR0
muxtype=multiply
curvetype=expo
points=0,0

[channel9]
template=simple
[mixer]
src=FMODE1
dest=Ch9
curvetype=expo
points=0,0

[virtchan1]
name=Virt1
template=simple
[mixer]
src=Virt1
dest=Virt1

[virtchan2]
name=Virt2
template=simple
[mixer]
src=Virt2
dest=Virt2

[virtchan3]
template=simple
[mixer]
src=Virt3
dest=Virt3

[virtchan4]
template=simple
[mixer]
src=Virt4
dest=Virt4

[virtchan5]
name=Virt5
[trim1]
src=LEFT_V
pos=TRIMLV+
neg=TRIMLV-
value=4,0,0
[trim2]
src=RIGHT_V
pos=TRIMRV+
neg=TRIMRV-
[trim3]
src=LEFT_H
pos=TRIMLH+
neg=TRIMLH-
value=23,0,0
[trim4]
src=RIGHT_H
pos=TRIMRH+
neg=TRIMRH-
[trim5]
src=Virt1
pos=TRIM_R-
neg=TRIM_R-
step=193
value=-100,0,0
[trim6]
src=Virt2
pos=TRIM_R+
step=193
value=-100,0,0
[trim7]
src=Virt3
pos=TRIM_L+
step=193
value=-100,0,0
[trim8]
src=Virt4
pos=TRIM_L-
step=193
value=-100,0,0
[timer1]
type=countdown
src=Ch3
time=240
[timer2]
src=Ch3
[timer3]
src=THR
[datalog]
switch=None
rate=1 sec
[safety]
Auto=min
[gui-480x272]
V-trim=6,109,1
H-trim=16,254,3
V-trim=464,109,2
H-trim=339,254,4
Big-box=26,40,Timer1
Big-box=26,88,Timer2
Big-box=26,136,Timer3
Big-box=183,136,None
Small-box=341,146,Ch3
Bargraph=340,184,Ch1
Bargraph=361,184,Ch2
Bargraph=382,184,Ch3
Bargraph=403,184,Ch4
Bargraph=424,184,Ch5
Bargraph=445,184,Ch6
Bargraph=25,184,Ch7
Bargraph=46,184,Ch8
Bargraph=67,184,Ch9
Bargraph=88,184,Ch10
Bargraph=109,184,Ch11
Bargraph=130,184,Ch12
Toggle=155,188,3,130,66,RUD DR
Toggle=201,188,5,132,68,ELE DR
Toggle=247,188,4,131,67,AIL DR
Toggle=293,188,1,64,128,FMODE
Toggle=155,230,9,72,0,HOLD
Toggle=201,230,8,71,0,GEAR
Toggle=247,230,2,65,129,MIX
Toggle=293,230,10,73,0,TRN
Toggle=145,44,0,0,0,None
Toggle=302,44,0,0,0,None
Toggle=145,92,0,0,0,None
Toggle=302,92,0,0,0,None
Toggle=145,140,0,0,0,None
Toggle=302,140,0,0,0,None
Model=350,40
quickpage1=Telemetry monitor
[voice]
RUD DR0=202
RUD DR1=201
RUD DR2=200
ELE DR0=202
ELE DR1=201
ELE DR2=200
AIL DR0=202
AIL DR1=201
AIL DR2=200
GEAR0=205
GEAR1=206

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

More
08 May 2017 02:09 #62129 by crash7X
Replied by crash7X on topic is this virtually possible?
Thank you! This is a help indeed.

At a glance, it appears you also needed two (or at least implemented your functions with two) virtual channels for each of aileron and elevator.

But the text of your use of the virtual mechanism is simpler, meaning I went around a few corners butt0n-pressing my way to a solution that I mightn't have needed to.

Slowly the light dawns…

crash7X

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

More
08 May 2017 02:41 #62130 by mwm
Replied by mwm on topic is this virtually possible?
Not only is this possible, but it's easy.

If you're not sure something can be done, it's probably easier to try it with a normal switch first. After all, one of the beauties of deviation is that any switch can be used for any function, including replacing any real switch with a virtual switch. Or a channel output being a logical switch.

So, first question - can we have a switch that forces a channel to a specific value? Answer: yes. There's even a feature for that - channel safety. In the channel editor on the list of mixers, you can select the channel name to get to minimum, maximum, scale, reverse, etc. In particular, you can set a "Safety switch" and "Safety value". Whenever the Safety switch is on, the channel output will be the Safety value. This is normally used for throttle hold, but since it's available for any channel, it works for your use case as well. I use this to emulate the Blade "Panic switch" on models that don't have one: it sets the flight mode channel to the most stable mode with auto-leveling and the cyclic sticks to zero so it auto-levels.

Now all you need is a virtual switch, and instructions for that are in the manual.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
08 May 2017 12:10 #62139 by crash7X
Replied by crash7X on topic is this virtually possible?
Thank you for your informative and encouraging remarks. In addition to experimenting and perusing tutorials I have read the manual! I think it just does not match my, er, learning style. Or I am not bringing to it sufficient number of coordinated brain cells. I've thrown myself at this with renewed determination and vigor every so often ever since I deviated. I think I get a bit further each time…

Some searching now with what I have managed to understand leads me to conclude that the functionality I have accomplished, albeit it a more roundabout fashion than magic_marty's example, will need two virtual channels no matter.

I'm not in danger of running out of virtual channels (yet, haha) but my conservative nature seeks a way to do it using minimal resources.

I have my min/max aileron and elevator idea working, I should give up and go fly it. But I think taking this thing as far as it can will be useful for cementing what I have managed to learn.

Again, thank you for your patient help.

crash7X

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

Time to create page: 0.045 seconds
Powered by Kunena Forum