Smart Trainer switch

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
ImRich
Posts: 55
Joined: Sat Apr 05, 2014 9:25 pm
Country: -

Smart Trainer switch

Post by ImRich »

Hi team(s), first thanks for such a flexible radio! 8-) This is my first post here so I wanted to start by providing some thanks and appreciation.

Over the years, I've done a lot of training of students that want to learn how to fly RC. Often as a student progresses in their flight training, the instructor spends a lot of time just holding the Trainer switch while talking to the student. This often causes your finger to cramp while holding the switch for such a long period of time. Using only a toggle type of mode had it's own dangers as sometimes you can't grab the joysticks fast enough to recover a student's aircraft.

So I have a suggestion that could implement a 'Smart Trainer' (master / slave) switch mode to solve these issues.
This would work as follows:
  1. If the instructor holds the spring loaded trainer (master/slave) switch for more than a second, the trainer function works as normal in that the student has control of the aircraft (or assigned student channels) until the instructor lets go of the spring loaded trainer (master/slave) switch.
  2. If the instructor does a 'short press' (less than a second) of the spring loaded trainer switch, control passes on to the student as expected, but the current master stick positions (as well as the throttle) is remembered. Control passes back to the instructor (master) when:
    • the instructor does a 'short press' on the trainer switch OR
    • The instructor moves any of his joysticks from the remembered positions, then control will pass back to the instructor's (master) transmitter.
There needs to be a small amount of 'slack' in the definition of the remembered master joystick positions so that small vibrations on the transmitter does not cause it to unexpectantly switch from the slave transmitter to the master transmitter.

An option could be to ignore changes in the throttle stick, so only changes in the AER channels would cause it to switch control back to the master transmitter. Some instructors like to preset a particular throttle position (such as low throttle, or high throttle, depending on what the student is practicing).

I know there is the 'mix' mode, but mix mode doesn't stop errant students from continuing to control the aircraft. Yes, there are some students that don't listen and continue to try to fly when told not to touch the sticks. :shock:

I know that I could program the trainer switch to be a simple toggle, or instead use of the on/off toggle switches to control the trainer function, but as mentioned sometimes you can't grab the sticks fast enough to save a student's aircraft. :oops:

Of course, the trainer (master/slave) switch can be assigned to any button/switch (as always).

If you think this is a crazy idea, feel free to file it in the bit bucket! :)

Thanks again for all of your time providing a very powerful transmitter system.

Rich

User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Smart Trainer switch

Post by Kilrah »

I think someone has already set up some kind of similar thing. Can be done with the current firmware.
ImRich
Posts: 55
Joined: Sat Apr 05, 2014 9:25 pm
Country: -

Re: Smart Trainer switch

Post by ImRich »

This would be great! If someone can point me at it, that would be great (I did try to search). Or if more people like it perhaps have it as a preconfigured option.

Thanks! :)
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

I played with the idea just for practice/giggles...

in logic switches...

L1 .. Edge ... SH↓ ... [5.0:--]
L2 .. Stcky ... L1 .... SH↓
L3 .. OR ..... SH↓ ... L2


...the Sticky switch (L2) does most of what you want, but it doesn't have the "long hold" on the start of it to activate. L1 does the long press part, L2 does the sticky part, and L3 glues them together and makes sure the student has it while ever the switch is being held (doesn't wait for the initial timeout to give it to the student). Set the "5.0" to whatever timeout you want for the initial long press.

Set your trainer function to be whenever L3 is active.
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

...and you could also add the "bump the sticks" in logic switches also (one line per stick axis that you want to monitor). I gotta say, that is a rather good idea, rather than switch actions, just set about recovering the darn airplane :)


edit... ok, here's the whole tamale (I wanted to see it all working)...

L1 .. OR ..... SH↓ ... L3
L2 .. Edge .. SH↓ ... [5.0:--]
L3 .. Stcky .. L2 ..... L4
L4 .. OR .... SH↓ .... !L5
L5 .. a~x .... IAil .... 0


...changed them around slightly so that whenever L1 is active, your student has the plane.

the logic:
- L2 becomes active when held for two or more seconds
- L3 is the sticky switch in that it has an event to start (the 5 second press of L2), and another switch to stop (L4)
- L4 is active whenever SH is pulled (like a normal trainer switch), or if L5 is NOT active
- L5 is active whenever ailerons are around center... so the "!L4" triggers whenever this is not the case, which is whenever you bump ailerons.

...all comes together at L1.

It takes a few lines, but I quite like this idea of yours :)
Last edited by AcBates on Wed Apr 09, 2014 3:25 am, edited 2 times in total.

AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

reckon that with setup, just starting to fly the plane again is a solid way to get control back, may as well simplify a little and clear one of the OR lines (no need for press of switch to get it back, just fly the plane)...

L1 .. OR ..... SH↓ ... L3
L2 .. Edge .. SH↓ ... [5.0:--]
L3 .. Stcky .. L2 ..... !L4
L4 .. a~x .... IAil .... 0
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Smart Trainer switch

Post by jhsa »

I requested this feature sometime ago, but if I remember well it was declined for some reason. Or maybe just forgotten :)

Sent from my GT-I9195 using Tapatalk
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
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Smart Trainer switch

Post by ReSt »

I had a similar idea regarding the Trainer switch and it works like this:

You have a toggle switch to enable the student (e.g. AIL).
With switch off, only the teacher has control, with switch on, the student has control as long as the teacher leaves his sticks in his default position (e.g A,E,R in neutral, Thr low)
As soon as the teacher moves any stick out of the given defaults, he has control over this axis.

For every stick axis you need a custom switch and a custom function (AIL switch used as trainer switch).
One set for every axis.

CS1 |a|<x Rud 5 AIL
CS1 TrainerRud x

Reinhard

I implemented these modificationa as a loadable template that also fills up the TRAINER screen and it works on my radio setup. But I'm not sure if it correctly works under different setups of mode and channel order
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Smart Trainer switch

Post by jhsa »

I wouldn't use the throttle stick though as most of the time I need instant power to recover the aircraft.
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
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Smart Trainer switch

Post by ReSt »

don't see the problem :?: :?:
As the trainer, at any time give any throttle position and have it at the same moment
(ok, I'm only flying planes :) )

Reinhard
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Smart Trainer switch

Post by Kilrah »

For me it doesn't work, as when I train someone while he has control I still move the sticks as if I was flying, and kind of always have them where I would want them if I was taking control at that moment.
ImRich
Posts: 55
Joined: Sat Apr 05, 2014 9:25 pm
Country: -

Re: Smart Trainer switch

Post by ImRich »

Thanks for the idea(s) and the setup to try.

I will try it when I get a moment.

Different instructors use different methods when teaching and of course, it will vary greatly as the student progresses. As you know, at some point the student is doing almost all of the flying (including take offs and landings) and all you are doing is providing verbal guidance and you are there if they get themselves in trouble fast (i.e.: during approach to land they mess up their left/right and start heading for a tree!).

Some may not like this 'smart trainer switch' mode, and they can use the normal trainer switch mode.

What I'd like to see is to have this implemented with a simple one (or two) option check box on the trainer setup screen.
One option check box would enable/disable 'smart trainer mode'
The second option check box would only enable/disable using the throttle channel as a release action (from slave to master).

Acbates, you are right! As soon as the instructor pulls on the switch, transfer of control should switch to the student, but if the instructor held the switch for longer than a second (or few) then when he releases the switch control will revert back to the master. But if he releases it before the timeout (1 second or 5? perhaps have the time tunable and settable on the trainer page also?), then control will revert back to the master when he moves a stick (or toggles the instructor switch again).
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Smart Trainer switch

Post by ReSt »

Kilrah wrote:For me it doesn't work, as when I train someone while he has control I still move the sticks as if I was flying, and kind of always have them where I would want them if I was taking control at that moment.
That's an argument :)

Reinhard
ImRich
Posts: 55
Joined: Sat Apr 05, 2014 9:25 pm
Country: -

Re: Smart Trainer switch

Post by ImRich »

Kilrah wrote:For me it doesn't work, as when I train someone while he has control I still move the sticks as if I was flying, and kind of always have them where I would want them if I was taking control at that moment.
Yes, so for you, use the 'default' training switch method (momentary spring loaded switch, student has control while you hold the switch, you regain control as soon as you release the switch). There is nothing wrong with this method, it works and it's simple.

But I think we can offer the 'smart training switch' actions as an optional improvement! :)

It would be nice to have this as options on the 'training setup' page, to keep an instructor from having to spend a lot of time setting up a student's transmitter (when flying with a student's aircraft vs a club supplied aircraft system).
ImRich
Posts: 55
Joined: Sat Apr 05, 2014 9:25 pm
Country: -

Re: Smart Trainer switch

Post by ImRich »

Just to link this with another thread which I now found (Sorry that I didn't find it previously):
viewtopic.php?f=96&t=4256

It does seem like something similar to my idea has been previously suggested (great minds think alike)!

I hope we can gain some more support for a built in function like this!
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

ImRich wrote:Thanks for the idea(s) and the setup to try.

I will try it when I get a moment.

Different instructors use different methods when teaching and of course, it will vary greatly as the student progresses. As you know, at some point the student is doing almost all of the flying (including take offs and landings) and all you are doing is providing verbal guidance and you are there if they get themselves in trouble fast (i.e.: during approach to land they mess up their left/right and start heading for a tree!).

Some may not like this 'smart trainer switch' mode, and they can use the normal trainer switch mode.

What I'd like to see is to have this implemented with a simple one (or two) option check box on the trainer setup screen.
One option check box would enable/disable 'smart trainer mode'
The second option check box would only enable/disable using the throttle channel as a release action (from slave to master).

Acbates, you are right! As soon as the instructor pulls on the switch, transfer of control should switch to the student, but if the instructor held the switch for longer than a second (or few) then when he releases the switch control will revert back to the master. But if he releases it before the timeout (1 second or 5? perhaps have the time tunable and settable on the trainer page also?), then control will revert back to the master when he moves a stick (or toggles the instructor switch again).
The logic switch setup that I posted works exactly as you describe. The "5.0" on the L2 switch is the time in seconds that the instruct holds the switch... after which the control remains to the student. After that is triggered, wiggle the stick or hit the switch again and the instructor has control back. Just assign L1 as the switch in the trainer setup and you're good to go.

...the issue with making it a checkbox on the trainer screen is that the exact functionality you want takes only four lines on the logic switch screen with no changes needed, including optionally watching the throttle :)


the way I programmed it above, the slightest nudge of ailerons will turn it back to the instructor. You can change the stick monitoring line to:

L4 .. |a|<x .... IAil .... 10

...and change the "10" to be how serious a nudge you want on the stick before it triggers back to the instructor.
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Smart Trainer switch

Post by ShowMaster »

Kilrah wrote:For me it doesn't work, as when I train someone while he has control I still move the sticks as if I was flying, and kind of always have them where I would want them if I was taking control at that moment.
As with any idea, it can't hurt to try it. I teach RC flying for a large club that furnishes everything for a new member. All Spektrum equipment so this feature is as discussed, just for Taranis teaching and may distract from the established spring loaded trainer toggle sw or button? Something we've all become accustomed to? I, like Kilrah, track the students stick positions with my master.
There is one feature already in the Taranis called trainer add, not replace.
I'm thinking of trying that feature out.
If I understand it,
Instead of seizing the trainer control functions I can make realtime corrections to the students stick positions.
Maybe assign a toggle to select the two different modes?

Has anyone tried the add instead of replace feature for training?


Sent from my iPod touch using Tapatalk, small keys and a big finger.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Smart Trainer switch

Post by Kilrah »

The Add I don't like, because it's not clearly defined who controls when. If you give the student control and then add your correction, he might not notice or understand that a reaction is not due to his actions but you giving some input.
But again each to his own, it's a common feature on several radios and some like it.
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Smart Trainer switch

Post by gohsthb »

The add feature is great when my club does air shows. We take people up on buddy boxes to let them try flying. They think they fly the whole time, but especially for the younger ones I do a lot of the flying.
-Gohst

Sent from my LG-D801 using Tapatalk
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: Smart Trainer switch

Post by Daedalus66 »

Kilrah wrote:For me it doesn't work, as when I train someone while he has control I still move the sticks as if I was flying, and kind of always have them where I would want them if I was taking control at that moment.
Me too. I "fly" the model constantly, it's just that most of the time I have the trainer switch pressed!
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

I think there's a transition of needs... "Add" is great for the totally uninitiated... regular trainer switch for the "starting to get a feel for it".... but like ImRich mentions, there's "getting well along" student where it's just a pain to hold the switch as for 99% of the flight you don't need control, you're only there to avert crash when they get disoriented or to land the plane. Happily the firmware can do it all...
User avatar
ShowMaster
Posts: 4327
Joined: Thu Dec 29, 2011 3:44 am
Country: -
Location: Los Angeles, CA USA

Re: Smart Trainer switch

Post by ShowMaster »

For those that just need the instructor there in case of a dead stick or sudden wind issues, how about using the standard non spring loaded toggle of choice? If you're teaching it should mean you're a seasoned flyer way ahead of the trainee. Perhaps a switch to arm the spring loaded toggle, or a standard toggle? I could see successful flying and arming the add or replace option for takeoffs and landings. Later for loops, rolls, and inverted flight instruction. I still track their stick movements out of habit.

As for the add function. I find the younger flyers have been raised on video game controllers from birth. They all are thumb bangers because that's how you jump, run, and kill your opponent. Stops to stops right at the start, no smooth transitions in between. It takes a while to reprogram them to understand we're not going to kill anything, just do smooth movements. This is where for the first few flights, or demo flying, the add feature looks good to me. I've talked myself into trying it now. A big open fun fly is coming soon to our field. Open to the public. We've had upwards of 50 persons try flying Rc for the first time at these events. We have 3 training pads setup with spotters.
The big thrill, heart starter, is handing the box back and forth! Many simple systems don't have a trainer port. If they do they haven't been compatible with other brand name hard coded systems we fly.
Open tx and er9x has solved that and our open source TXs usually work with any system with a trainer port. At last some computability if we carry a trainer cable we reconfigure. Taranis mono on one end, everything adapters for the other.
I've soloed maybe 100 flyers over the years and many have gone on to be champs. Other just enjoy flying. Worth my time!
SM


Sent from my iPod touch using Tapatalk, small keys and a big finger.
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

I think the essence of this thread is "everything is already possible, operate the way you feel is best for your situation"... momentary switch as usual, non-momentary, the fancy "just fly the plane and you get control back" via the logic switches, the "Add" mode... all doable, we can do whatever rolls our socks up and down :)
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

so the above spiel with the logic switches was fun, the only issue was that it didn't actually work :) ...I made the switch logic (which works fine), but OpenTx bakes the control from the student so deep that you can't differentiate the instructor moving the stick from the student moving the stick. Bummer. But, poked it again, have a work around that does indeed work perfect (albeit one more thing to set up)...

...the fix is to use a mixer to separate what the instructor is doing from what the student is doing.

first thing is to make sure that trainer mode is set to add ("+=") instead of replace (":=")... this change doesn't matter because we're talking about the instructor having total control if he touches the stick.


Using mixer to figure the difference ---

- on an unused channel (CH6 for this example), set it up with weight 100, and the source set the raw channel input of "Ail"
- then add a mix to this channel, that has the trainer port relative to this channel (using a spectrum DX6 as student Tx, CH2 is ailerons), and set the weight to be -100


...then back to the logic switches, there is a change on L4 only...

L1 .. OR ....... SH↓ ... L3
L2 .. Edge .... SH↓ ... [5.0:--]
L3 .. Stcky .. L2 ......... !L4
L4 .. |a|<x ... CH6 .... 10

...which is just checking to see if there's any movement on CH6.


Test it out!... (Note, you will need a connected student system to see this work)

Open the servo monitor and wiggle the sticks, everything should be normal for the instructor. Then hold down SH, and give control to the student. wiggle the student's sticks (especially ailerons as this is the one we care about) and you'll notice that they will have info being output to all channels except CH6... this is because we negated the Ail stick input from the trainer port input... it will stay at 0 while ever the student is in control.

...while wiggling the student stick, nudge the instructor's aileron stick, and you'll see all the student wiggling stop as the instructor now has control! woot!



the flow is... the mixer keeps CH6 at zero while Ail and trainer port 2 are equal (instructor not touching anything). Because the trainer mode is set to "+=", this actually adds the instructor's input to the student's input into the value of "Ail"... but because the mixer is comparing this against the trainer port (which naturally doesn't have the instructor's input added), the result is the difference between the two... and it's this which the logic switch L4 is detecting movement against, which equates to "the instructor did something, so give control back to the instructor".



END RESULT: it's doing exactly what we wanted to start with (yeh, bonus), we just needed the help of the mixer! continued kudos to OpenTx for being this absurdly flexible/powerful.


( and this time I even connected a student transmitter and tested it all as working ;) )
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Smart Trainer switch

Post by jhsa »

need to fly it now ;)
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
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

I simplified the setup for my own general use...

- for the trainer setup, make all stick axis which bumping will return the control to the instructor ADD mode (showing "+=" on the trainer screen).
- add some mixers on an unused channel, adding (100 weight) all these root input axis (Ail, Ele, Rud), and subtract the input from the trainer port (-100 weight, with "TR2" etc as the source). this creates a channel that is just what the instructor is doing.
- then it's simple two logic switches, a sticky switch, and a "|a|<x" switch on this mixed channel.


I dropped the need for the long press to initiate, as even if the student gets in trouble immediately, you still just fly the plane and control is yours. I quite like the setup. Have now flown it and it works really well. Can post more specifics/config if anyone wants it.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Smart Trainer switch

Post by jhsa »

Of course ;) :D

Thank you..

Joao

Sent from my GT-I9195 using Tapatalk
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
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: Smart Trainer switch

Post by Daedalus66 »

Please do.
AcBates
Posts: 40
Joined: Fri Jan 24, 2014 5:43 pm
Country: -

Re: Smart Trainer switch

Post by AcBates »

a graphic explanation and the eeprom (zipped bin). the bin contains a model with just aileron movement triggering the return of control, and another model that has "bump either Ail, Rud or Ele and instructor gets it back".
Attachments
X9d_trainer_infographic.jpg
TrainerEeprom_20140411.zip
(1.71 KiB) Downloaded 218 times
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Smart Trainer switch

Post by MikeB »

Are sticky switches implemented in companion (V1.52)?
Which version of openTx are you using?

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

Post Reply

Return to “openTx”