GoalThere are actually two different ways to configure an rc aircraft controller for use with a simulator. If you're fine-tuning maneuvers, or learning the advanced maneuvers, then you want the simulation to be as close to the craft you fly as possible. To get there, you tweak the sim to make the model act more like yours. You also use your controller configured the way you normally configure it to fly the aircraft. This is great for advanced flyers, and most - if not all - of the guides on the net have you do things this way.
However, if you're practicing basic skills - flying in different orientations, for instance - and want to experiment with different kinds of aircraft, there is an alternative approach. Since the simulator isn't an aircraft, but a computer, it can do a lot more for you than just pretend to be an aircraft - it can take over some of the functionality of the controller. For instance, it can provide helicopter pitch curves for inverted flight, which most helicopters can't do. They won't be exact, but they'll be good enough for practicing flying inverted while you learn the orientation. And it frees up a channel between the sim and the controller for other things. This is the way the manuals I've seen have you do things. Which may well explain why there is so much confusion about such things.
This isn't so much a guide on setting up a controller for use with a sim, but a demonstration of the capabilities of open source controller software. It takes the latter approach because that lets you get more functionality out of the sim/controller system. If you're looking for instructions on making your sim/controller combination as much like your aircraft as possible - this isn't for you. You're probably well beyond this in any case, so thank you for taking the time to read my blog.
If, on the other hand, you're still working on those basic skills, and interested in trying out various different aircraft without having to re-arrange your controller every time - this is for you. I'll show you how to set up deviationTx on the Devo 10 so you can fly a heli inverted with the same configuration you use for fine control of flaps on an aircraft, while still having the ability to raise the gear and control the engine angle on tilt-rotor craft.
What you're going to find hereThe deviationTx software makes the models available as a USB file system, each model being in a file formatted like a DOS
.inifile. That means it has sections that each line takes the form
variable=value, with sections for different things marked by lines with the section name enclosed in square brackets. I'm going to show you the relevant sections, then describe what they mean. The section names will be in blue, and the subsections - if any - in green.
Finally, I'll tell you where you can download a copy of my model file, so you can just use it directly if you're using deviationTx software.
Getting started - radio and simple channels
Radio configFor completeness sake - as in you'll need this if you're trying to copy the config without using my
.inifile - the radio setup looks like this:
That is, the name for this model is
name=Phoenix mixermode=Advanced [radio] protocol=PPM num_channels=8
Phoenix(yes, I'm using the Phoenix flight sim), I'm using the
Advancedmixer mode, with the
PPMprotocol with eight channels. If you haven't aren't familiar with open source controller software, the existence of a protocol setting might surprise you. The software implements multiple protocols in the same controller, sometimes with the same transmitter.
The Simple channelsThere are three simple channels - literally. They use the simple mixer type in deviationTx. The first is for
AUX4, one of the extra input knobs. You won't find a simpler mixer in a deviationTx config:
This doesn't specify a curve type, so it's 1-1. No scaling, no offset, so those default to 100 and 0. I.e. - it copies the input
[channel7] template=simple [mixer] src=AUX4 dest=Ch7
AUX4direct to the output
It does have one twist. In the trims section, I've set up the trim switches in the upper left - near that knob - to tweak it's output:
Two of the switches near that knob are nearly as simple:
[trim5] src=AUX4 pos=TRIM_L- neg=TRIM_L+
These add the
[channel5] template=simple [mixer] src=GEAR1 dest=Ch5 curvetype=min/max [channel6] template=simple [mixer] src=ELE DR1 dest=Ch6 curvetype=min/max
min/max, meaning they go from -100 to 100 as they turn on, giving a good sharp edge should you have an edge-triggered control. The two are identical except for the channel number,
Elevator, Aileron and RudderThese are all set the same, and are the a bit more complicated. The model file entry for them looks like this:
The bits in italic are what vary between the three channels - the channel number, source and output channel.
[channel1] template=expo_dr [mixer] src=ELE dest=Ch1 curvetype=expo points=35,35 [mixer] src=ELE dest=Ch1 switch=FMODE0 scalar=70
To translate, this is the settings for
channel1. I'm going to use an
expo_drtemplate - meaning three mixers, the last two controlled by switches. I only use two mixes, the reason to be revealed later. The first mixer uses a curve from the
Ch1with an expo of 35 on both sides of 0. The second mixer just copies the
ELEstick setting to
Ch1with a 70% rate (the
scalarvalue). Obviously, these should be adjusted to taste, I use them on my real helis because they give the same feel near center, but the low rate mode keeps me from getting into trouble with a new craft. The
switchsetting in the second mixer (aka low rate) controls when it is used. If the
FMODEswitch is in position 0 this mixer is used, otherwise the first one is.
Pitch (or is it flaps?)Now we're going to see the first bit of the magic this software can do. Channel 8 has a
complextemplate, meaning an arbitrary number of mixers, each which has the full mixer facilities available:
These all have a
[channel8] template=complex [mixer] src=AUX5 dest=Ch8 switch=MIX0 scalar=-100 curvetype=fixed [mixer] src=AUX5 dest=Ch8 switch=MIX1 [mixer] src=AUX5 dest=Ch8 switch=MIX2 curvetype=fixed [mixer] src=Virt3 dest=Ch8 switch=AIL DR0 usetrim=0
switchsetting which controls how each mixer is used. The last one whose switch is on will be the mixer that actually gets used. The first three:
are selected by the
[mixer] src=AUX5 dest=Ch8 switch=MIX0 scalar=-100 curvetype=fixed [mixer] src=AUX5 dest=Ch8 switch=MIX1 [mixer] src=AUX5 dest=Ch8 switch=MIX2 curvetype=fixed
MIXswitch as it moves through it's three positions. The middle one is a straight copy of the other knob -
Ch8. The ones above and below this one have a
curvetype, meaning they always output their values when selected. The first one has a
scalerof -100, so that's the value it outputs. The last one doesn't have a
scaler, so it outputs the default of 100.
This one mixer also has a trim set up in the trim config:
These three mixers let you toggle the output to
[trim6] src=AUX5 pos=TRIM_R- neg=TRIM_R+
Ch8from -100, through the knob setting, to 100. I use it for flaps when flying airplanes.
Finally, the last mixer in that template is:
This is a straight copy of
[mixer] src=Virt3 dest=Ch8 switch=AIL DR0 usetrim=0
AIL DR0switch is on. Since this is the last mixer, it will always have priority if enabled, meaning that the
AIL DRswitch switches between the previous behavior (when down) and
Virt3- whatever that is - when up.
So what is
Virt3? A virtual channel. It's not output to anything by itself, but can be used in other mixers, as it is here. It looks like:
A channel whose
[virtchan3] template=complex [mixer] src=THR dest=Virt3 scalar=55 offset=45 usetrim=0 [mixer] src=THR dest=Virt3 switch=FMODE2 usetrim=0
complex, but with only two mixes. The second one is a straight copy of the
Virt3when FMODE2 is on. The first one is a tweaked copy, scaled back to a factor of 55 and having 45 added to it, meaning it runs from -10 to 100. This could be pair of collective pitch curves, one for idle-up mode, and one for inverted flight. Given that the latter is on
FMODE2, and I use
FMODE0for a low rate mode, that would be logical.
I could have used two virtual channels here, one for the
virtchan3, and switched between them in the
channel8template. That would have been a bit cleaner, but this model - putting one virtual channel in the real channel, then a switch to turn the other one on - works equally well with one less virtual channel.
ThrottleAt this point, I've only got one channel left - the throttle. We are about to go through the looking glass.
[channel3] safetysw=Virt2 safetyval=-100 template=expo_dr [mixer] src=THR dest=Ch3 [mixer] src=THR dest=Ch3 switch=FMODE2 curvetype=fixed [mixer] src=THR dest=Ch3 switch=AIL DR1
expo_drtemplate, though it doesn't actually use an expo. Or dual rates, for that matter, though it has DR switch. The first and third mixers are direct copies from
Ch3, with the last one being enabled by
AIL DR1. The middle one is enabled by
FMODE2, and sets the throttle output to the default value of 100, or full on.
FMODE2is on, giving us the full range pitch curve on channel 8, I get a throttle fixed at full on, which is what I want (well, close to it) for 3d flight. If you prefer a V-curve here, you can either use a 3 point curve, or a scaled and offset absolute value curve to get it.
AIL DR1is on, you don't get the fixed throttle - you get normal behavior. If you recall,
Channel 8is set up to only use the pitch curve virtual channel if
AIL DR0is on. So
AIL DRwill switch between CP heli mode (up) and airplane or 4 channel 'copter mode (down).
The real magic is in the setup for
channel3, though. It has a
Virt2, using a virtual channel as a switch. When that switch is on, the value output to
channel3will be -100, creating a throttle hold.
So lets look at that virtual channel. Well, channels:
I start with
[virtchan1] template=complex [mixer] src=THR dest=Virt1 scalar=-50 offset=-49 usetrim=0 [mixer] src=!FMODE2 dest=Virt1 switch=AIL DR0 usetrim=0 muxtype=min curvetype=min/max
virtchan1. This translates the combination of
AIL DR0into an on/off value. It uses a
The first mixer uses the throttle stick - still
THR- as input. It maps the value directly to the output, with a
scalerof -50 - meaning it will slope down from left to right. Further, we subtract 49 from it before outputting it, so the value goes from 1 (when the throttle is at the bottom of it's travel) to -49. This will cause the
Virt1switch to be on when the throttle is all the way down, and off otherwise.
But we're not done yet! The second mixer is controlled by the
AIL DRswitch, being used if it is up. The input is
!FMODE2, so it will be -100 if the
FMODEswitch is in position 2, and 100 otherwise. The
min/max, because I like those for switches. The result of all this is that this mixer is only on if the controller is either in airplane mode (
AIL_DR0is off) or in heli mode and
FMODEis not inverted (2).
This mixer also has the first (and only) appearance of the
muxtypevalue. It is
min, meaning that the value from this mixer - if it is enabled - will be the minimum of the value from the last enabled mixer and it's value. All the other mixers use the default
replace, meaning their value is used if they are enabled, replacing the previous value.
Because of this,
virtchan2will be on if both the first mixer is on - meaning the throttle stick is full off - and the second one is on. In other words,
virtchan2is on if and only if the controller is set so that the propellers aren't getting power.
The second virtual channel is even more complex:
[virtchan2] template=complex [mixer] src=Virt2 dest=Virt2 usetrim=0 curvetype=min/max [mixer] src=AIL dest=Virt2 switch=Virt1 scalar=-100 usetrim=0 curvetype=fixed [mixer] src=AIL dest=Virt2 switch=RUD DR1 usetrim=0 curvetype=fixed
complextemplate. The first mixer copies
Virt2to itself. The curve is
min/max, meaning we force the channel to 100% or -100%. That's not really necessary, but we want this channel to be clearly on or off. The source is also
Virt2, meaning the default behavior is to continue outputting the old value.
The second mixer is another
fixedcurve, with a value of -100. It is controlled by the
Virt1switch - which means that it's going to be on only if we're not going to spin the props. If it goes on,
Virt2will go off.
The third and final mixer is controlled by the
RUD DR1switch, or rudder dual rate when it's spelled out. If that switch is on, we get
fixedoutput default value of 100. So when we switch the rudder dual rate switch down,
Virt2will go on.
Ok, let's put this all together to see it in action. During normal flying, rudder dual rate is off, flight mode is either 0 or 1, and the throttle output tracks the stick.
Virt2is also off. I throw the rudder dual rate switch, the third mixer for
Virt2goes on, so the
safetyswentry for the throttle sets the output to -100. If I turn off the rudder dual rate, the first mixer will keep
Virt2off! I.e. - the throttle output will stay at -100. It will stay that way until
Virt1goes on - meaning things are set so the props won't spin.
I was introduced to this for just the throttle stick as a sticky throttle hold. The first time I tried it with a CP heli, I managed to turn throttle hold off in an inverted flight mode. Fortunately, I was using a sim, so no damage was done, but I quickly fixed it. I call this a safe throttle hold. When using it, your good habits of making sure the throttle is down and you're not in an inverted flight mode will still work - but should you accidental skip a step, it will help you avoid a nasty accident.
A little lagniapeYou can also control the display with this software. I have it set this way:
This displays the values of all 6 trims as bars, and provides the value of all 8 output channels as numeric output. It provides four toggles, from left to right underneath the model name.
[gui-qvga] trim=6 barsize=half box1=Ch1 box2=Ch2 box3=Ch3 box4=Ch4 box5=Ch5 box6=Ch6 box7=Ch7 box8=Ch8 bar1=Ch1 bar2=Ch2 bar3=Ch3 bar4=Ch4 toggle1=FMODE tglico1=5,6,19 toggle2=Virt2 tglico2=0,13,19 toggle3=AIL DR tglico3=0,3,0 toggle4=GEAR tglico4=0,23,0
toggle1shows the flight mode, switching to white-on-black when in
toggle2turns on a throttle hold icon when
toggle3turns on an
A-downicon when in airplane mode.
toggle4turns on a
G-downicon when you put the gear down.
SummaryThis setup allows me to use one model on my Devo 10 to fly both CP helicopters and everything else. With 30 models, I could certainly spare more than one, but that could be problematical as Phoenix doesn't deal well with multiple transmitters.
ReviewLet's go over the controls we have.
The elevator, aileron and rudder sticks are sent to channels 1, 2 and 4 respectively. They all have a low rate mode enabled by
ELE DRswitches are sent to channels 5 and 6, respectively.
GEARbeing on brings up a
G-downicon on the display. The
AUX4knob goes to channel 7, with trim adjustment.
AIL DRswitch switches between CP heli and other modes. When it's on, channel 8 is a mix of the
AUX5and trims, the throttle stick goes to channel 4, and an
A-downicon shows on the display. When
AIL DRis off you are in CP mode, and channel 8 is pitch, controlled by the throttle. In CP mode, when
FMODEis 2 the throttle is full on and you have the full range of pitch available, so you can fly inverted. Otherwise CP mode has the throttle stick with full range and pitch limited to the top 60% of the range.
FMODEalso has an icon on the display.
RUD DRfunctions a safe throttle hold, that re-enables the throttle only when it shouldn't spin the props, adjusted depending on the setting of
AIL DR. Whenever the throttle is held, there's a
THicon on the display.
DownloadYou can download this
model.inifile from the deviationTx forums.