Thread Tools
This thread is privately moderated by Fig Newton, who may elect to delete unwanted replies.
Oct 23, 2015, 04:14 PM
Registered User
Fig Newton's Avatar
Thread OP
Discussion

Updated Trainer Quick Takeback


Important Note from Wayne at Aloft Hobbies (See post 26. I will update as we hear more.):
"There is some sort of issue with the Linker and Sbus right now. We are working with the OpenTX team to attempt to resolve the issue ASAP. Our ground testing never showed any issues, but flight testing it giving different results. For now we suggest using the D4R-II with the Linker.
-Wayne "

I would like to point out that if you are using a trainer cable like I am there is no issue with trainer mode. - Fig Newton.


Here is my setup for the Trainer Quick Takeback mode(OpenTX 2.1.3 compatible):

Mixes
=====

CH15 (Optional)
TR1 Weight(+100%)

CH 16
Ele Weight(+100%) NoTrim
+= TR3 Weight(-100%) NoTrim
+= Ail Weight(+100%) NoTrim
+= TR2 Weight(-100%) NoTrim

Logical Switches
============

L1 Edge(SH↓, [0:0])
L2 |CH16| > 20
L3 ( GV1 ~ 20 ) AND !L4
L4 ( TR1 ~ 0 ) AND !L3

Special Functions
=============

SF1 L1 - Adjust GV1(Value 20)
SF2 L2 - Adjust GV1(Value 0)
SF3 L3 - Trainer(0)
SF4 L3 - Play Track(trainon)
SF5 !L3 - Play Track(trainoff )
SF6 L4 - Adjust GV1(Value 0)


GV1 is used to set Trainer mode. If it's set to 0, then trainer mode is off. If it's set to 20 then trainer mode is on.

L1 - SH↓l sets GV1 to 20 using SF1. This then triggers the logical switch L3 to true. That in turn triggers SF3 to turn on trainer mode, and SF4 to announce trainer mode is on. At that point any input from the student radio aileron or elevator input is mixed in to channel 16, and then subtracted back out using the -100% corresponding PPM value. This channel should stay at 0 until either the aileron or elevator are pushed on the Taranis. At that point (stick is moved on the trainer radio) the elevator and/or aileron value is added or subtracted from CH16, but since there will not be a corresponding Trainer value it will move CH16 up or down.

Logical switch L2 will then be triggered when the value goes over or below by 20. I used a value of 20 here because the lower the number the more sensitive the trigger is. I didn't want it too sensitive. At this point when L2 is triggered, it fires off SF2 which then sets GV1 back to 0. That in turn sets L3 to false and trainer mode goes off. SF5 announces it.

If you do not have a trainer radio attached and engage trainer mode, the throttle will go to value 0. Seems all of the inputs are zeroed including the throttle. So L4 does a check on the trainer throttle input and if it's 0, then it stops the arming of trainer mode in L3 using the "AND !L4". This check (L4) is not performed if trainer mode is already engaged using the "AND !L3". This keep trainer mode from being turned on and off as the trainer radio moves the throttle up or down through the 0 value (half throttle). Since we can only test trainer values, if the trainer radio has the throttle half way and you try and engage trainer mode, it won't arm. So for the trainer to take over the model they have to be off half throttle, probably best to have them at throttle off position depending on the model.

SF6 is there so that in the rare case that a trainer radio is plugged in and is at half throttle when trainer mode is attempted, it won't go to trainer mode as soon as they adjust the throttle. What was happening was everything was ready to arm trainer mode and the trainer throttle was at 0 (half throttle), but since L4 read it as 0, trainer mode was not engaged. But the second the trainer throttle was moved off half throttle, all conditions were met to engage trainer mode - 1) toggle was pulled and GV1 set to 20, but since L3 wasn't met, trainer mode wasn't set in SF3. This resulted in a situation where as soon as L4 was tripped (moving the trainer throttle off half if connected) then trainer mode armed, which could have been anytime after the SH↓ was pulled. Since it would be totally unexpected when it armed trainer mode, it is best to set GV1 back to 0 if L4 is true. This prevents any unexpected late trainer mode engagement. Another safe comment would be like mentioned above, make sure that the trainee throttle is down before handing over the reins.

If you want to see the TR1 input for testing, you can set up a mix on CH15 to TR1, but it isn't required for this to work. I used it strictly for testing purposes.

Here is an eepe file (zipped) with this setup tested and working.

Edit: adding in some info. After spending an hour with a student connected I found that if they start wildly moving the aileron and elevator, the CH16 value can sometimes wander causing trainer mode to be canceled. This is actually a good thing in my opinion, but also the reason I bumped up L2 to be a value of 20. I had it set to 10 initially and it seemed to trigger more, turning off trainer mode without me actually touching the sticks on the Taranis. Another interesting side effect of this setup is that to be able to re-arm trainer mode, the student needs to let his/her aileron/elevator stick go back to center. Which is also a good thing in my opinion. Gives them control of the plane where they aren't full throw with one of their sticks. Not only did this give me confidence that I could just take back over control, but it put my Dad at ease that all I had to do was just take over. It's the first time I have been able to get him to use trainer mode in years, and I think he's comfortable enough with it that he will give some other planes a try. Makes me happy!!

More Updates. I am including the new eepe file, and also a pdf of the settings printed from OpenTX.

*Note: For some variety see LapinFou's setup (post #9). It takes a completely different approach using fewer switches and functions. He uses the inputs and a logical switch to create a trainer mode without actually switching trainer mode on. See his post 11 for a more detailed explanation.
Last edited by Fig Newton; Nov 03, 2015 at 05:37 PM.
Sign up now
to remove ads between posts
Oct 23, 2015, 04:58 PM
Rotozuk's Avatar
Thanks Fig! That is doing even more than I would have thought, really cool. I'm for sure going to add this to my radio!

-Wayne
Oct 25, 2015, 08:37 AM
Registered User
Is this a wired set up only? My setup is close to yours . I get the wired issue too. I bought a Linker from Wayne and My setup works in CPPM mode, but in the sbus mode it works for 50 secs and drops the student. I am going to set up with your method and see if this fixes the Sbus issue. It is a spike in the ele and ail that causes the dropout. My method has fewer steps, but may not be adequate. This has been driving me crazy, and to see someone have a similar problem is exciting.
Edit: I set up a model using your method. It works except ele and ail movement from the student gets trnoff just like from the master. Moving thr or rud works as expected after control is given back to student. This is on a T plus with 2.1.3 and a T-model B as the slave using 2.0.17. I like the safety on thr on student plane. I am also using a Linker in CPPM mode in the module bay.
I appreciate your help, but will understand if your time is limited. I can use my method in the CPPM mode, but the SBUS method keeps dumping the student and I want to find out why. Certainly not an emergency. At times I think it is a bug in 2.1.3, but I usually find out it is me.
Last edited by oldpal44; Oct 25, 2015 at 10:42 AM.
Oct 25, 2015, 11:24 AM
Registered User
Fig Newton's Avatar
Thread OP
My setup is a Taranis as the master and the student is using a DX6i with a physical cable connecting the two. I went into the DX6i and set up a "trainer" model that I keep the radio in.

So you are getting spikes in the mix on CH16 if I am reading this correctly, and it's causing trainer mode to drop. First thing I would do is take a look at the Channels Monitor page for the model and start moving the sticks on the trainer radio and see if that's what could be causing it. The reason I mentioned the "trainer" model above is that I think having the trims set weird on the trainer radio was causing things to be off a little. So in the trainer model I have all trims set to 0. The things you can start tweaking are the weight's in the CH16 mix for the trainer and the master, and then the threshold that it takes for the Master to take back control (L2 |CH16| > 20). Try bumping that up to 30. It just means that you will have to move the Master sticks a little farther. It is cumulative so a move of 15 on the ele and 15 on the ail would be enough to kick it off.

With that being said, you might end up splitting up the ele and ail channels and use say CH15 for ele, and CH16 for ail, and give them both a threshold of 20 then they aren't cumulative and a move of 20 in either axis could turn off trainer mode. You would have to modify L2 for CH15 and add in another Logical switch for the other channel you use. Then do an "or" for a third Logical Switch to trigger when either one pass the threshold. If you need help setting that up, let me know I think I could plug all that in pretty quick. Keep me posted if any of this works.
Oct 25, 2015, 12:31 PM
Registered User
I am terrible at describing my problem. I keep adding stuff.... Oh well at 71 things go south..... I have your setup in a new model.What I need to use your method, is to fix the fact that the trainer movement of sticks thr and rud, shows movement in the master(student has it), however ail and ele movements simply return control to the master the same as you would expect with the same movements from the master. Student can't use ele or ail without going back to master.
Oct 25, 2015, 12:38 PM
Registered User
Fig Newton's Avatar
Thread OP
Did you just copy in the model in my eepe to your eepe file? And then can you post up your eepe file? I want to take a look at the trainer settings. If you click on "General Settings" at the top of your models you will get to a set of tabs. One is trainer settings. This is what mine looks like on my working eepe I use.

If you just loaded my eepe into your radio, then all of the settings will be blank as I used a completely new eepe file to upload. It has no calibration or trainer setup in it. All of the trainer inputs are off.
Oct 25, 2015, 12:54 PM
Registered User
I missed that. I will change them. They are all replace right now. Thanks.
I found the issue. In the mix on ch16 I had all as positive values rather than 2 at -100. Duh....... Sorry. Ok, it works, so I am going to remove the cppm dr4-II rx and put in the X4r sbus. That's the one that is giving me problems. I will report success or failure. Thanks for your patience so far.
Success !!!
I had to go up to 40 on the CH16 abs value, and that did it. At 20 and 30 it would drop the student. At 40, I did notice noise in the values. That has been the problem, but it is covered with the value at 40. Very nice! Thanks a lot. I learned a bunch doing this, but it was getting painful.
40 doesn't seem to be too much. Usually when I take it back, it is a panic situation, and I probably hammer the sticks a bit anyhow. Will try to fly this tomorrow. Again Thanks.........
Last edited by oldpal44; Oct 25, 2015 at 02:19 PM.
Oct 25, 2015, 02:31 PM
Registered User
Fig Newton's Avatar
Thread OP
Awesome! Glad it's working and was something simple like that. If we needed to, we could make a model with the elevator and aileron on separate channels like I mentions above.

Again, glad it's working out.
Oct 26, 2015, 08:50 AM
Froggy RC Pilot
LapinFou's Avatar
Well I checked my trainer setup. In fact the best way to multiplex the TRxx channels will be in the INPUTS. Thus, it is also possible to used the trim of the master radio.


Input01-... Those inputs must be multiplexed to be either controlled by the master or either by the student. Including the instructor trims.
Each controls will be replaced by the corresponding TRxx inputs when the trainer mode is ON (L2).


Inputs
=====
[I1] Rud

TR1 Weight (+100%) Switch (L2) TrmR [Student]
Rud Weight (+100%) [Master]

[I2] Ele
TR2 Weight (+100%) Switch (L2) TrmE [Student]
Ele Weight (+100%) [Master]

[I3] Thr
TR3 Weight (+100%) Switch (L2) TrmT [Student]
Thr Weight (+100%) [Master]

[I4] Ail
TR4 Weight (+100%) Switch (L2) TrmA [Student]
Ail Weight (+100%) [Master]

Mixes
=====

CH16 detects any stick movements on the master radio (raw data without trims). This channel will be used as an "end of training" signal. An "absolute value" function will be used to convert negative orders to positive ones.

CH 16
Ail Weight(+100%) NoTrim Function (|x|)
+= Ele Weight(+100%) NoTrim Function (|x|)
+= Rud Weight(+100%) NoTrim Function (|x|)

Having the trainer multiplexers in the INPUTS, makes your life much easier here for a complex model. You just need to use [Ixx] as usual

CH1 [I4] Ail Weight (+100%)
CH2 [I2] Ele Weight (+100%)
CH3 [I3] Thr Weight (+100%)
CH4 [I1] Rud Weight (+100%)
CH6 [I4] Ail Weight (-100%)
CHxx
etc..

Logical Switches
============

L1 CH16 > GV1
L2 Sticky(SH↓, L1)

Special Functions
=============

SF1 !L2 - Play Track(trainoff )
SF2 L2 - Play Track(trainon)

Global Variables
============

GVAR1 Traine 150

GV1 is the sensitivity (= instructor gimbals amplitudes) required to disengaged the "trainer" mode.
Smaller value = higher disengage sensitivity (tiny movements on instructors gimbals will disable the trainer mode)
Bigger value = smaller disengage sensitivity (large movements on instructors gimbals are required to disable the trainer mode)
Last edited by LapinFou; Oct 28, 2015 at 06:39 AM.
Oct 26, 2015, 08:51 AM
Registered User
Fig Newton's Avatar
Thread OP
LapinFou,
This is great. The reason is, back in the earlier versions of OpenTX, the trainer input was not being differentiated from the master stick input. That's why we had to subtract the trainer input from the master input on CH16, so that we could determine which set of sticks was being moved. It seems like now that the trainer input is set as TR1, etc and not the PPM inputs as they used to be, they solved this for us. Do you know if this will work with a radio running 2.0.x? Or is this a 2.1.x solution? I have 2.1.3 on my radio and tried it. It works and seems to save a few Logical Switches and Custom Functions. I will edit my top post to mention your setup as well.
Oct 26, 2015, 08:55 AM
Froggy RC Pilot
LapinFou's Avatar
It does work on OpenTX 2.0.x

When I wrote it, my X9D+ was running OpenTX 2.0.13. So, this setup is working since, at least, 2.0.13
However, please note that I'm not using the Special Function "Trainer". If you do it, then you will get the same trouble that you described.
The good point with the method I described, you don't need to transfer the instructor's trims in the student radio and you got a straightforward MIXERS programming. The backside is a more complex INPUTS programming (specially if you got some double/triple rates).
Last edited by LapinFou; Oct 26, 2015 at 09:52 AM.
Oct 26, 2015, 09:22 AM
Registered User
Fig Newton's Avatar
Thread OP
I was just noticing that you never actually set 'trainer' mode, just use L2 to control the inputs. Very clever. I removed your old post #9 as requested. I will go re-update the top post too. Thanks!
Oct 26, 2015, 09:42 AM
Froggy RC Pilot
LapinFou's Avatar
I discovered your message when reading the description of the Aloft Linker.
I thought it was the right place to share this kind of information.
Moreover, people using S.Bus as a wireless trainer, can easily understand how to multiplex 16 channels if necessary!

How could we live without OpenTX before...
Last edited by LapinFou; Oct 26, 2015 at 11:32 AM.
Oct 26, 2015, 03:26 PM
Registered User
Quote:
Originally Posted by Fig Newton
Awesome! Glad it's working and was something simple like that. If we needed to, we could make a model with the elevator and aileron on separate channels like I mentions above.

Again, glad it's working out.
I flew 3 different people on the buddy box today. I used a Linker with a x4rsbus rx . I used my setup, which is very close to your setup. No crashes everyone was very happy.... except me..... In each flight after about 50 secs of student flight. the plane did a snap roll. The 3rd time I predicted the occurrance within 5 secs. In each case, I took over and gave it back to the student and we continued flying. The spike that happened was the reason I had to go to 40 on L2.
I am going to put the CPPM rx in and run the same test. From what I have seen, I expect it to behave normally (my guess so far).
I later flew 4 or 5 batteries with no buddy box, but the linker still in the module bay with no issues.
This is just a fyi for you, in case you were considering wireless via a Linker. I think there is an issue . Will see after I try the CPPM (D4R-II) rx. Other than the spike, it was great.
Oct 26, 2015, 03:41 PM
Registered User
Fig Newton's Avatar
Thread OP
oldpal44, you should also take a look at LapinFou's setup. He is actually forgoing trainer mode altogether and switching the input from the master to the trainer based on a Gvar and a logical switch. I don't know if it will alleviate the glitching you are noticing, but it might be worth a try. It will require some reworking of your model, but that's the great part about the Taranis, you can just plop another copy right down next to the original and select either one out in the field. Make sure and give them all a good test before using.

I am curious, seems like this spike was predictable. Was it every 50 secs, or just a one time event. I take it you are using Taranis to Taranis since you mentioned the Linker. Wonder if you should turn on logging to see if there is a spike occurring on the trainee's radio. Are you using a 'trainee' model setup on the trainee radio? Like I mentioned earlier I am using a DX6i as the trainee with an audio cable, but I set up a 'Trainer' model on the DX6i so that there wouldn't be any weird goings on with mixes or such.


Quick Reply
Message:
Thread Tools