Fun, Learning, Friendship and Mutual Respect START  HERE


Unregistered
Go Back   HeliFreak > R/C Simulators Support > RealFlight Flight Sim


RealFlight Flight Sim All versions of RealFlight Sim


Reply
 
LinkBack Thread Tools Display Modes
Old 04-03-2014, 01:09 AM   #1 (permalink)
HF Support
 
Posts: 6,850
 
My HF Map location
Join Date: Jan 2013
Default Emulating switch activated Self Level (and rescue) in Realflight

Emulating switch activated Self Level (and Rescue) in Realflight

This is how to program BD3SX self level and rescue for RealFlight.

(I posted this originally in the bavarianDEMON/HeliCommand forum (Emulating the BD3SX in Realflight), but it is probably most relevant here. As BD3SX is not the only self level FBL unit on the market ).

There is also a follow up thread to this: Spektrum DX8 with RF Helicopters. This details how to use your own TX with RealFlight (6.5 or 7) and how to enable the self level and rescue facility through your own TX.

(The Goblin 700 variant from this guide is at: http://www.knifeedge.com/forums/down...=file&id=19562)

Rescue will be activated with a channel you specify (I use the ch5 / dual rates switch). The amount of collective rescue is determined by another channel (I use ch6 / flaps/gain knob).

Thanks to Johnny31297 for making the Logo 700 variant with the initial self leveling and posting it on the Knife Edge Swap pages. By dissecting this model I worked out how he had done the self leveling. The rest of the rescue pieces are my own work.

The rescue is amazing. The BD3SX unit really does work like this IRL. At any time you are lost in orientation, or have one of those "OH **!@#$** !!" moments, flick the magic switch and you escape to the sky.

Enough teasing, on with the guide.

During this guide:
Nick = Elevator operation (nose up/down)
Roll = Aileron operation (left/right)

Software radio channels are assumed to be:
1 - Aileron
2 - Elevator
3 - Throttle
4 - Rudder
5 - Gyro
6 - Pitch
7 - Governor


Configuring the Software Radio

You will lose low rates in the software radio if using this setup. In this guide, I configure up as rescue and down as normal. Therefore, I configure the low rates setting in the software radio in reverse for Channel 1 and Channel 2 (ie. Conditional Channel ABOVE #1). If you want rescue down, then leave the dual rate settings for Channel 1 and Channel 2 as they are.


As this is emulating 3SX rescue, We need to add a channel for the head gain. For a 3SX, the head gain works as follows; -100 rescue, 0 off, +x Self level. The reason for setting up this channel is so that if you add a real TX, you can use the 3SX rescue facilities.

Create an Output Channel 8. (this will be for head gain)

Create a complex input for channel 8 and rename it to "RescueOff" (renaming can be done by clicking on the name when it is already selected). Change the input to "Input Channel 5 (Channel 5 - Dual Rates)" and set the graph to all points = 0. For "Input Feed When", set Condition below value #1 and channel to "Input Channel 5 (Channel 5 - Dual Rates)". If rescue is switch down, then set condition as "above value #1".

Create another complex input for channel 8 and rename it to "RescueOn". Change the input to "Input Channel 5 (Channel 5 - Dual Rates)" and set the graph to all points = -100. For "Input Feed When", set Condition above value #1 and channel to "Input Channel 5 (Channel 5 - Dual Rates)". If rescue is switch down, then set condition as "below value #1".


Note: I now change the input channel to "Input Channel 6 (Channel 6 - Knob)". This way if I just want graded self level (instead of rescue), I can program a linear graph from (-100,0 to 100,100). This way the knob determines self level aggressiveness.

Create an Output Channel 9. (this will be for rescue aggressiveness).


Create a simple input for channel 9. Change the input to "Input Channel 6 (Channel 6 - Knob)".

You must have the rescue and rescue aggressiveness channels set before continuing so that you can test mid setup.

The AFS gyro's you will be using may induce some insensitivity during self level. This does not occur at self level 0 as this guide mixes them back to the original values when level is off. For testing (and the level mode), if you need to increase sensitivity on Aileron and Elevator (Output Channel 1 and Output Channel 2), reduce expo (even into the negative values). This may be useful when testing.


Self Leveling

First set up the SL Gains. This is based on Channel 8.

Create a Servo Modifier and rename it to "LevelHeadGainMix".
- LevelHeadGainMix (Input: Channel 8 / Curve is (0,100 / 45.9999,100 / 46,-100 / 50,-100 / 55,-31 / 60,17 / 65,52 / 70,74 / 75,87 / 80,95 / 85,98 / 90,99 / 95,100 / 100,100))



Note: 50 to 100 is a -100% expo curve (x2). This offsets the AFS effect at low SL values on Channel 8.

[Edit: Note about decmial values in curves and gains. In curves, RF will show the rounded value (the picture above was taken mid-edit). In gains it will sometime take it and sometimes will not. In all cases, if the value is accepted, the rounded value will show.]

To add a point to a curve Ctrl - right click on the curve.

Now set up the Upright and inverted AFS gyros.

- LevelRollUp (Roll - Sensor pointed up / Gain 100 / Input:Reciver Ch1 / Gain:LevelHeadGainMix)
- LevelNickUp (Pitch - Sensor pointed up / Gain 100 / Input:Reciver Ch2 / Gain:LevelHeadGainMix)
- LevelRollInv (Roll - Sensor pointed up / Gain 100 / Gyro Reverse / Input:Reciver Ch1 / Gain:LevelHeadGainMix)
- LevelNickInv (Pitch - Sensor pointed up / Gain 100 / Gyro Reverse / Input:Reciver Ch2 / Gain:LevelHeadGainMix)




[Edit: I now usually use Gain 200 instead of Gain 100 to level faster during rescue]

4 gyro's are needed instead of inverting the output as the gyro will settle to it's intended orientation. If the output is reversed, then the heli will just spin uncontrollably in a violent positive feedback loop.

If you wanted to have a "goes to pos" type rescue, simply reverse the gain on LevelRollInv and LevelNickInv. The heli will then upright itself, but initial rescue collective when inverted will still be away from the ground.

At this point you may want to test the FBL unit with self level. Connect the LevelRollUp to the FBL Aileron and LevelNickUp to FBL elevator and have a fly. This is where you can tune the Dual rates and expo for both normal and leveled flight (this will be de-tuned later it's only for testing). To tune, reduce expo on the Aileron and Elevator (even into negative).


Now set up a way to tell upright from inverted. This is done with another AFS gyro.

- LevelSenseUp (Pitch - Sensor pointed forward / Gain 100 / Gyro Reverse / Input:<no servo> / Gain:<no servo> )


This works because of the way leveling works. On a horizontal axis, the feedback signal tries to level the heli (too much left, signal to go right). On the vertical axis the forward sensor, it only middles when the heli is vertical (too much upright, pull up / too much inverted, push down). The reason the inverted gyro is that normally to pull up the elevator signal goes negative. I wanted the signal poitive for up and negative for down.

Next we need to make sure this signal changes on a knife edge (everything below -100, everything above +100). This is done with another modifier.

- LevelSenseUpAbs (Input:LevelSenseUp, Curve (0,-100 / 49.9999,-100 / 50,100 / 100,100)


Now the AFS gain signals need to be modified so that only the appropriate gyro levels based on orientation. This will take two new servo mixes.

- LevelGainUp (Input 1:LevelHeadGainMix / Input 2:LevelSenseUpAbs / Logic: Minimum)
- LevelGainInv (Input 1:LevelHeadGainMix / Input 2:LevelSenseUpAbs / Reverse 2: yes / Logic: Minimum)



The use of minimum is so that if upright, inverted gain is -100 ALWAYS, if Inverted upright gain is -100 ALWAYS.

Now we alter the gain channels for LevelRollUp and LevelNickUp to LevelGainUp. Also alter the gain channel for LevelRollInv and LevelNickInv to LevelGainInv.

Next the average the signal from the upright and inverted AFS gyros must be found. Create two servo mixes:
- LevelRoll (Input 1:LevelRollUp / Input 2:LevelRollInv / Logic: Add)
- LevelNick (Input 1:LevelNickUp / Input 2:LevelNickInv / Logic: Add)


[Note: The roll image says average, but it works better with add]

(The two signals can be added together since add looks at the signals difference from 0. Averaging the signals effectively halves the output and the expo effect of the AFS gyro is magnified. Remember, these will only be seen when SL is engaged, we discard this input later if SL is off).

At this point you may want to test the FBL unit with self level. Connect the LevelRoll to the FBL Aileron and LevelNick to FBL elevator and have a fly. This is where you can tune the Dual rates and expo for both normal and leveled flight again.
The next are the instructions to add mixes to correct the cyclics to normal feel when SL is disabled, so if you don't like altered expo, don't panic.

If you test flew once upright and inverted SL is programmed, you may see that the heli drifts in SL mode. This is because the level is perfectly level. I find this drift annoying so I will show how to mix it out too.

Ready for round 2


Cyclic adjustments.

I don't like having heavily expo'd normal controls. They never feel right. So these mixes are to ensure that the normal input are used when not in a SL mode.

So, first create mixed cyclic values for SL and not SL mode.

- CyclicRollSL (Input 1:LevelHeadGainMix / Input 2:LevelRoll / Logic:Multiply)
- CyclicNickSL (Input 1:LevelHeadGainMix / Input 2:LevelNick / Logic:Multiply)
- CyclicRollNoSL (Input 1:LevelHeadGainMix (reverse) / Input 2:Reciever Channel 1 / Logic:Multiply)
- CyclicNickNoSL (Input 1:LevelHeadGainMix (reverse) / Input 2:Reciever Channel 2 / Logic:Multiply)





Interesting thing about Multiply mix for RF. The first value is the gain, the second is the control channel. Gain goes from 0 to 100, Channels go from -100 to +100. If you feed -100 into gain you get 0. In short, these parameters cannot be reversed.

By using the reverse of the LevelHeadGainMix for the gain for the normal channels, when SL is 0, the input channels are 100%. When SL is 100%, input channels are from the AFS gyro.

Then create mixes to add the values together.

- CyclicRoll (Input 1:CyclicRollSL / Input 2:CyclicRollNoSL / Logic:Add)
- CyclicNick (Input 1:CyclicNickSL / Input 2:CyclicNickNoSL / Logic:Add)



Finally adjust the FBL controller to take the inputs of CyclicRoll and CyclicNick for Aileron and Elevator respectively.

Now our non-leveled cyclic should now behave as normal. If you tuned them for earlier testing, now is a good time to restore to original values and re-test.


Cancelling drift in SL.

One annoying thing is that heli's lean when hovering (artifact of translating tendency). So in SL our heli will drift sideways (unless you steer). What is the use of SL if you cannot get a near stationary hands off hover

In order to allow SL to adjust, we need to adjust the input into the AFS SL gyros. The adjustment will be one way for upright and the exact opposite for inverted.

Create a mixer to make a mod stream proportional to the amount of self level.

- LevelMod (Input 1:LevelHeadGainMix / Input 2:LevelSenseupAbs / Logic:Multiply)


This way we get a value of self level positive for upright, negative for inverted.

Next add a % based on this value to the roll and the nick.

- LevelRollIn (Input 1:Receiver Channel 1 / Input 2:LevelMod (17%) / Logic:Add)
- LevelNickIn (Input 1:Receiver Channel 2 / Input 2:LevelMod (0%) / Logic:Add)


[Edit: The image for LevelNickIn is in error, the setting is actually 0% - I tried to set 0.2, but RF would not hold it and reverted to 100%].
[Edit: You may also notice if you look carefully at cyclic programming images that I originally had a LevelRollMod and a LevelNickMod. I simplified it to 3 instead of 4 mixes ].

Next replace the input value for the LevelRollUp and LevelRollInv with LevelRollIn, also LevelNickUp and LevelNickInv with LevelNickIn.

The value of 17% and 0% came from tuning. To do this, I replaced the Input 2 on the mixes with the knob channel (channel 9). I reduced the sensitivity of channel 9 to +/- 40 and got into a stable SL hover and tweaked the knob, till drift was constant and not accelerating. Then landed and read the value from the config screens.


Adding rescue collective.

We have a fun SL heli at this point. Time to add the rescue part 3SX is famous for.

Rescue is only enabled if Head gain channel is -100. (+100 is locked self level).

First add a signal modifier that goes full positive if Head gain is < -95.

- RescueEnabledSignal (Input:Receiver Channel 8 / Curve (0,100 / 4.9999,100 / 5,-100 / 100,-100))



Next The collective override signal will be a mix of the Upright/inverted sensor multiplied (gained) by the knob input channel (this is optional, you could use the Upright/inverted sensor in the next mix and hard set your own percentage).

- RescueColleciveSignal (Input 1:Receiver Channel 9 / Input 2:LevelSenseUpAbs / Logic:Multiply)


Next create a mixes rescue collective overrides.

- RescueNormalSource (Input 1:RescueEnabledSignal (reverse) / Input 2:Receiver Channel 6 / Logic:Multiply)
- RescueRescueSource (Input 1:RescueEnabledSignal / Input 2:RescueColleciveSignal / Logic:Multiply)



Next mix together these collective signals.

- RescueOutputSignal (Input 1:RescueNormalSource / Input 2:RescueRescueSource / Logic:Add)


Finally replace the collective servo signal with the rescue output signal.

- Pitch Servo (Input: RescueOutputSignal)




  • If you do not want inverted self level (or rescue), change "LevelRollInv", "LevelNickInv" gyro reverse to "No". This way the heli will always flip to upright.
  • If you want variable self level (without rescue), change the RescueOn amount in "Receiver Channel 6" to vary between 0 and 100 based on "Input Channel 6" This way you can alter self level aggressiveness without invoking rescue pitch.


All done.

Save your model and post the variant on the Knife Edge forum for others to enjoy.


Happy SL and rescuing.


The Goblin 700 variant from this guide is at: http://www.knifeedge.com/forums/down...=file&id=19562

Models done since this guide:

Boof69 RF 6.5 models:
Johnny31297 RF 6.5 models:
Heli Mega Pack FBL models:
Heli Mega Pack FBL models - TX variant:
02DropTopM3 did a Rescue variant for RF 7 on the Boof69 Compass Warp360:
I also did RF 6.5 variants for:
  • Gronimod - SAB GOBLIN 500
  • Gronimod - SAB GOBLIN 630 R2
  • Gronimod - SAB GOBLIN 700 R2
These cannot be posted as the EA's are only on the Gronimod site (http://www.gronimod.com/index.html).
__________________
TRex 700E Pro DFC HV (BD3SX) - Gaui X5 (6S/BD3SX), Blade 130X, RealFlight, Heli-X, Taranis+DSMX
ArchmageAU is offline        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 10-11-2015, 01:23 AM   #2 (permalink)
HF Support
 
Posts: 6,850
Thread Starter Thread Starter
 
My HF Map location
Join Date: Jan 2013
Default

Made this sticky (HF Support privilege ).

I get asked about this about four times a year and having to re-find the information get tiresome.

Most of the discussion and detail for this is in the Emulating the BD3SX in Realflight thread. However with Spirit and others FBL systems getting into the rescue game, this is relevant to more than just BD3SX.

I hope to update this soon for RF 7 (as the instructions are RF6 at the moment).

Will un-sticky if requested.
__________________
TRex 700E Pro DFC HV (BD3SX) - Gaui X5 (6S/BD3SX), Blade 130X, RealFlight, Heli-X, Taranis+DSMX
ArchmageAU is offline        Reply With Quote Quick reply to this message
Old 10-11-2015, 02:01 AM   #3 (permalink)
CHC Benefactor
 
Posts: 6,748
 

Join Date: Feb 2006
Location: Singapore
Default

Thanks for that! I was going to go an a hunt for it myself after I saw the latest enquiry. I seem to need to practice rescue, that or move the switch
__________________
Playing with gravity one heli at a time
Dancing with gravity one flight at a time
Raptorapture is offline        Reply With Quote Quick reply to this message
Reply




Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the HeliFreak forums, you must first register.
Please enter your desired user name, your REAL and WORKING email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself. Use a real email address or you will not be granted access to the site. Thank you.
Email Address:
Location
Where do you live? ie: Country, State, City or General Geographic Location please.
Name and Lastname
Enter name and last name here. (This information is not shown to the general public. Optional)
Helicopter #1
Enter Helicopter #1 type and equipment.
Helicopter #2
Enter Helicopter #2 type and equipment.
Helicopter #3
Enter Helicopter #3 type and equipment.
Helicopter #4
Enter Helicopter #4 type and equipment.

Log-in


Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Copyright © Website Acquisitions Inc. All rights reserved.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.

SEO by vBSEO 3.6.1