Jump to content

Dynamic Trim Update with GlovePIE & PPJoy - See Link


Reticuli

Recommended Posts

Newest:

 

-------------------------------------------

INTRODUCTION:

 

v.12 package - Slightly more trim authority added.

v.13 package - corrected instructions.

v.14 package - more tweaks. Smoothing and padlocking on BS.

Latest and greatest update for adding dynamic trim update to DCS:Blackshark to give a more natural experience when using a recentering, non-forcefeedback joystick like the Saitek X52. This crudely mimics fly-by-wire AFCS & side-stick controllers as used in ADOCS, HACT, Comanche, Dauphine Experimental, and the Block III Enhanced Apache. There are now three modes, identified by your computer voice as you cycle through them: Manual Trim, Standard Dynamic Trim, and Flight Director Dynamic Trim. A calibration profile is also included, along with more detailed instructions.

-------------------------------------------

MODDING FOR NON-X52 STICKS:

 

Go for it. The X52 Pro should work fine with it as-is and you don't really need the dat. GlovePIE and PPJoy don't care which stick you use, but I can't guarantee the LUA files will show the correct key assignments in Blackshark. They might need some slight changing, but keep it minimal.

Anyone without an X52, make sure your x, y, and zrotation (yaw) PPJoy axis assignments are correct and put their curves at 15. I'm using a rotary on my throttle to suppliment yaw trim, so if you want that you need to match up either the script to yours, or your PPJoy settings to the script to give you this.

You also may need to go through and change which button the trim/mode switching is on inside the GlovePIE script, which is Joystick1.Button6 (the pinkie) on my non-pro X52.

-------------------------------------------

WHAT YOU NEED TO INSTALL:

 

-DCS: Blackshark

-PPJoy

-Carl Kenner's GlovePIE

For PPJoy and GlovePIE, you can either download my larger AVsim uploads that already include them, or go to their respective sites.

-------------------------------------------

FILE PLACEMENT:

 

Put the Blackshark 1 dat in your saitek software folder. Not necessary, but I included it.

You can leave the PIE scripts where they're at and open them from GlovePIE manually, as it's only a directory away.

Both LUA files go in your internal DCS profiles directory, which is somewhere inside of C:\Program Files\Eagle Dynamics\Ka-50\BlackShark. At the very least, you need the PPJoy one loaded up to get the axis curves of 15 for the proper trim capture rates and response. If you want the button assignments within Blackshark for the X52, use the other one, as well. For anyone with an X52, I recommend you at least try both just to see what it's intended to be like and to make sure you don't miss any steps.

-------------------------------------------

PPJoy:

 

After you have installed it, open Configure Joysticks and ADD a new Virtual Analog Joystick with 7 axis. See the next section for matching to mine.

From time to time you may need to go back in there after booting up your computer to reinitialize it by selecting this virtual joystick, clicking on Mapping, and going through the modifying wizard. Don't actually change anything, just hit next repeatedly, and then finish for Windows to recognize it again if it's not.

-------------------------------------------

CALIBRATION REQUIRED:

 

There is a custom GlovePIE script for the Windows calibration process required. Open it in GlovePIE and hit "Run". Go calibrate your PPJoy virtual joystick in the Windows Control Panel - Game Controllers. Select it and then Properties. The script must be running first.

PPJoy1.Analog0 = Joystick1.x

PPJoy1.Analog1 = Joystick1.y

PPJoy1.Analog2 = Joystick1.z

PPJoy1.Analog3 = Joystick1.xrot //side

PPJoy1.Analog4 = Joystick1.yrot //top

PPJoy1.Analog5 = Joystick1.zrot //twist

PPJoy1.Analog6 = Joystick1.slider

Double check all the red bars afterwards that are onscreen.

-------------------------------------------

BLACKSHARK DTU MULTI:

 

Once you have everything up and ready, "Run" this in GlovePie. There are three control modes cycled through by doubleclicking joystick1.button6 (pinkie on X52):

-Manual Trim

-Standard Dynamic Trim

-Flight Director Dynamic Trim

You will hear GlovePIE saying in your computer's voice which one you've switched to.

-------------------------------------------

OTHER ASSIGNMENTS:

I currently have the y.rot (top of throttle) on the x52 as a 50% authority trim range, which is nice to supplement the twist axis or pedals (if you have them).

In Blackshark's options, the three keys under the x52 MFD are the channel hold buttons. Reset is the all important Heading Hold. The middle is pitch. The left most is bank (wrong in the other readme).

Switch the Desired Heading/Desired Track switch to the middle when Route Flying, Flight Director, and Weapons are ALL NOT selected to see where the FCS is trying to realign you slowly to (limited to 20% authority) when the Head Hold channel is on. In Flight Director, you get yaw dampening only. Yeah!

Be aware that in Manual Trim mode when the GlovePIE script is running, you are trimming yaw along with the other two channels. So either don't apply any when trimming, or correct this after you've trimmed yaw accidentally by counter-yawing and trimming again.

Yes the X52/DCS profiles are simple, but I've been mostly just using the keyboard and cockpit clicking for other commands. Not sure how much I want to program. You're not dreaming, I only have one key in the x52 dat profile...for the unseen rotary button.

-------------------------------------------

IMPORTANT NOTE:

 

GO INTO BLACKSHARK'S OPTIONS TO SEE THE BUTTON ASSIGNMENTS (CLICK ON EACH X52 BUTTON OR HAT) BUT DON'T CHANGE THEM IF YOU CAN HELP IT.

ESPECIALLY DO NOT CHANGE THE AXIS CURVES. THE RESPONSE OF THE DYNAMIC TRIM UPDATE CAPTURE RATE, TRIM RANGE, AND THESE CURVES HAVE BEEN TAILORED TO WORK IN A SPECIFIC WAY TOGETHER.

Trim is already on Joystick1.Button6 within GlovePIE, so if you use this without modding, do not apply the trim function to the stick or change this keyboard setting within Blackshark's options.

AGAIN...

TRIM IS ALREADY ON JOYSTICK1.BUTTON6 WITHIN GLOVEPIE, SO IF YOU USE THIS WITHOUT MODDING, DO NOT APPLY TRIM FUNCTION TO THE STICK OR CHANGE ITS KEYBOARD SETTING WITHIN BLACKSHARK'S OPTIONS!

-------------------------------------------

SHAMELESS PLUG ON STEREOSCOPICS:

 

I'd also like to plug, for a moment, the first commercially available stereoscopic driver set which actually works.

Go to www.iz3d.com to download it. Yes, it works with Blackshark, and several of the modes are free. Please support this company if you have an interest in true 3D...especially if you have an ATI card.

-------------------------------------------

 

(IMPORTANT!!!! copied here for posterity. download the package to use it. don't just copy this into glovepie and expect it to work)

 

PRIMARY SCRIPT:

 

 

if pressed(joystick1.button31) then {

press(numpaddel)

press(o)

}end

if released(joystick1.button31) then {

release (numpaddel)

release(o)

press(enter)

release(enter)

press(numlock)

release(numlock)

}end

var.0 = PPJoy1.Analog0

var.1 = PPJoy1.Analog1

var.2 = PPJoy1.Analog2

var.3 = PPJoy1.Analog3

var.4 = PPJoy1.Analog4

var.5 = PPJoy1.Analog5

var.6 = PPJoy1.Analog6

PPJoy1.Analog2 = Joystick1.z

PPJoy1.Analog3 = Smooth(Joystick1.xrot, 2, .03)

PPJoy1.Analog4 = Joystick1.yrot

PPJoy1.Analog5 = Joystick1.zrot + (Joystick1.yrot * .5)

PPJoy1.Analog6 = Smooth(Joystick1.slider, 2, .03)

if doubleclicked(joystick1.button6) then begin {

var.m = var.m + 1

if var.m = 1 then begin {

say("Standard Dynamic Trim")

press(leftctrl)

press(t)

release(t)

release(leftctrl)

} end

if var.m = 2 then begin {

say("Flight Director Dynamic Trim")

press(leftctrl)

press(t)

release(t)

release(leftctrl)

} end

if var.m > 2 then var.m = 0

if var.m = 0 then begin {

say("Manual Trim")

} end

} end

if var.m = 0 then begin {

t = joystick1.button6

PPJoy1.Analog0 = Joystick1.x

PPJoy1.Analog1 = Joystick1.y

var.y = 0

var.x = 0

var.c = 0

var.l = 0

var.r = 0

var.p = 0

var.s = 0

} end

if var.m = 1 then begin {

var.c = 45

var.l = -0.575

var.r = 0.275

var.p = -0.900

var.s = 0.0

var.y = EnsureRange(Joystick1.y / var.c + var.y, var.p, var.s)

PPJoy1.Analog1 = var.y + Joystick1.y

var.x = EnsureRange(Joystick1.x / var.c + var.x, var.l, var.r)

PPJoy1.Analog0 = var.x + Joystick1.x

} end

if var.m = 2 then begin {

var.c = 70

var.l = -0.50

var.r = 0.0020

var.p = -0.775

var.s = 0.0

var.y = EnsureRange(Joystick1.y / var.c + var.y, var.p, var.s)

PPJoy1.Analog1 = var.y + Joystick1.y

var.x = EnsureRange(Joystick1.x / var.c + var.x, var.l, var.r)

PPJoy1.Analog0 = var.x + Joystick1.x

} end


Edited by Reticuli
  • Like 1

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

This sounds like something interesting that i might want to try...

 

If you've got time Reticuli, I've got two questions:

 

1. I run the newer .pr0 software with my vanilla x52; will that work or do i need to use the older .dat software from saitek?

 

2. Assuming I cannot run my .pr0 profile with this and I switch to .dat.... Can i still use the Saitek software to program my stick, and if not, what do i use to program the stick? (I only ask this because you say you only have the y. rot progged.)

Link to comment
Share on other sites

As I said in the second paragraph, this script does not care which stick you use. I included the X52 dat only to be complete about the whole thing...there is only one key on it: the rotary button which is not recognized by programs. All the rest of the key assignments are done inside Blackshark. Make an X52 pro profile, or assign them within the sim. Doesn't matter.

 

I'm not sure if the LUA's will work from the X52, but you can try them. Again, not critical, except that the axis curves for pitch, roll, and yaw need to all be put at 15 to match with what I intended. Just know that the pinkie is currently assigned as the trim and script trim mode changer (doubleclick it) within the GlovePIE script. You can change that, as well, to whatever you want. Just change the Joystick1.button6 instances in the script to whatever button you want it to be.

 

Download the package below and follow the instructions. I just flew a mission, navigated, completed, navigated back, and landed without a single hitch. And I'm barely getting 20fps most of the time! Seriously, this is the way to fly Blackshark if you have a recentering non-forcefeedback stick. The above stuff looks a lot more complicated at first than it is. I even included a calibration script, pictures for matching up PPJoy...everything you need. To quote Arnold, "Do it, do it now!"


Edited by Reticuli

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

While it's not needed or necessarily wise to be trimming in speeds over 250, for my own purposes I have today upped the negative pitch ranges to -0.900 for mode1 and -0.775 for mode2, the var.p values in each section within the script. They are currently at -0.850 and -0.7, respectively. I find this more convenient when cruising, though overspeed and rotor bumping is far more likely. Simply changing modes and clearing trim from -.900 to zero in a turn could be catastrophic. Do this at your own risk or adjust them to whatever you want in between ;-)


Edited by Reticuli

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

I also last night found some interesting ways of tweaking the EECH scripts that actually works very nicely with Arneh's Hind flight model (lovely cockpit, by the way). They never really worked well before now. The other choppers need a slight varient of the limits and still don't quite work as well as the Hind, but pretty nice. Comanche flies like a dream, now...very little bobbing or wobble as with the trim bands on the old X52 profiles I made. True honest to goodness attitude command-attitude hold by stick. EECH is very unstable on my system though. Never was like that before. Probably just so many mods coexisting. Had to take the ATI 3850 out and put in an old 9250 just to play it for a few minutes at a time. Still runs faster than Blackshark with the faster card, though. Heh heh. You really feel like you're playing an arcade game at times with Longbow 2 and EECH, in comparison to Blackshark's flight model. Goodness, we were sooo spoiled with forgiving performance. I keep expecting the blades to rip off at any moment...missing it, in fact. Maybe there's some way Arneh can work something in like you deflect more than 1.5 (out of 2 from -1 to +1) in under 2 seconds and your helo rips apart in EECH, with maybe buffeting at a sudden deflection of 1. Helo sims will never be the same after DCS.


Edited by Reticuli

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

Oh, forgot to mention...The LUAs do indeed work. At the very least you should use the PPJoy one, but you also need to load the X52 one if you aren't using your own outside profile. Wasn't sure exactly how that worked, but I'm glad I made both. Otherwise, you need to manually set your x, y, and twist axis to the PPJoy and put their curves at 15 to get the capture to work out correctly.

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

I got confused what does this do.

Dell XPS 630i w/ Dell nForce 650i Sli ,Intel Q9650 @3.0 ,6.0 GB Ram @800Mhz, 2xGeforce 9800 GT 512 MB ,Saitek X52, Saitek Pro Rudder Pedals ,Dell 24" 1080P HD monitor, Klipsch THX Pro Media 2.1 ,TrackIR 4, Logitech MX518

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

It seems to automatically set the trim after you hold the stick in place for a few milliseconds. Not sure on the raw mechanics of it, but that's the general jist of it. Personally, I don't really care for it. It's a handy tool I suppose, but I've gotten pretty proficient at trimming the Shark even without FFB and I guess opening and running yet ANOTHER app before I play just doesn't seem worth the trouble to me; nor do I like the idea of using a system that the heli doesn't actually have in reality. However, I love to see these kinds of user made solutions/tweaks being done within the community. I'm sure this will be invaluable to alot of people, and I applaud your efforts.

Link to comment
Share on other sites

It does all sorts of things, but it's primarily used as an input emulator: it allows you to trick your computer into thinking whatever device you're using is a joystick so you can use almost anything to control your game. However, I think he's using it here to run an advanced input script to automate the trimming system. It's a pretty clever workaround, really.

Link to comment
Share on other sites

The real helo doesn't use delays or a recentering stick, though. All fly-by-wire helos that have recentering joysticks use an auto-trimming system like this as their primary flight mode, though obviously not as crude. If you don't have an FF stick, that is similar to you at home. So in my view, it's more realistic this way. Also known as attitude command-attitude hold, trim management, trim update, or dynamic trim...depending on the AFCS and helo. I hate the manual trim/delay system. I fly much more naturally like this and it performs more like X-Plane with more heft. Everything is just much easier for me this way. Landing. Strafing. Taking off. Aerobatics. Very natural.

 

Oh, and I've been successful with getting the EECH idea implimented. No need for Arneh to do it. Overcontrol and you get warning sounds. Go too far beyond that, and the engines shut down with a voice warning you about exceeding the control tolerances. Very cool. Forces you to be gentle and Blacksharky. Unfortunately Enemy Engaged seems practically too glitchy to play anymore. Maybe it's just me? Oh well. I'll probably upload them and the slightly revised Blackshark GlovePIE with v12 of the pack.


Edited by Reticuli

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

How this "new" trim works?

 

I use to activate Flight Director to change altitud/direction avoiding FCS to be disabled, then, with a stabilized course, I press trim button, disable flight director, release trim button et voilà... in course and stabilized.

Link to comment
Share on other sites

This "new trim" is an automatic dynamic trim management or trim update system with the GlovePIE script. It trims itself based on what you're doing with your non-forcefeedback stick. The script will hold at least part of your bank or pitch when you let go, depending on your stick motions, the amount of time deflected, and the finesse you use. It is also known as attitude command/attitude hold (ACAH). Any modern helo that uses a recentering joystick (usually a sidestick) has this as its primary AFCS fly-by-wire mode. So I came up with this method for using conventional joysticks in helo flight sims that have either wings leveling or manual trim, or both in the case of Blackshark. Originally I did this in EECH using bands in an X52 profile. GlovePIE, however, allows you to do a lot more and allows the script to be used with any joystick.

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

This is in response to Zika's pm, but I think it might be useful here, too:

 

Manual trim is the same as Blackshark usually has. You tap trim once to trim and (when not in flight director) reset the autopilot attitude hold.

 

Standard Dynamic Trim is for getting autotrimming attitude command/attitude hold in normal flight, and allows hovering and other functions. If you're not in flight director mode and you want automatic trimming, this is the mode to use. Note, you'll still be wanting to reset the heading bug manually or putting the auto-turn to target on when hovering and killing tanks. There is a separate yaw trim available on the rotary dial of the X52 in this script that is very nice for tweaking your alignment for the launch, or for when heading hold is off.

 

The Flight Director one is ACAH trim updating but tailored to that Kamov mode's lack of wings-leveling autopilot. When you're not in flight director, the shark holds your orientation based on where the aircraft was when you tapped the trim key. So normally, dynamic auto-trimming requires more authority to work in order to hold pitch/banks properly. Since flight director mode in the shark turns the hold channels to just rate dampening (to reduce drift), less authority and deflection of the trim management system is required to hold, say, a left bank or a full pitch down. If I don't need the autopilot to hover for me, this is the mode I usually use. You have to turn FD on yourself, by the way.

 

With dynamic trim, you should be able to fly in a natural, but gentle way, without having to worry about the helo trimming in a continuous loop or roll. This is standard fly-by-wire "flight law" design theory at work for modern helos that use conventional sidestick joysticks. A crude implimentation, but effective.


Edited by Reticuli

X65 and X52, Glide, Winx3D, and GlovePIE Profiles http://library.avsim.net/search.php?SearchTerm=reticuli&CatID=miscmisc

 

http://library.avsim.net/register.php

 

X52 + Silicone Grease = JOY stick

Link to comment
Share on other sites

  • 3 weeks later...
INTRODUCTION:

 

Latest and greatest update for adding dynamic trim update to DCS:Blackshark to give a more natural experience when using a recentering, non-forcefeedback joystick like the Saitek X52.

.........

 

I installed PPJoy and Glovepie, the latest version V13. It is a bit confusing, and am still trying to figure some of it out. I enable it in my taskbar.. but could not tell if it was doing anything when I adjusted my Trim in Black Shark. Anyone else trying it? maybe we can compare notes?

 

Thanx..

:joystick:


Edited by Ramstein

ASUS Strix Z790-H, i9-13900, WartHog HOTAS and MFG Crosswind

G.Skill 64 GB Ram, 2TB SSD

EVGA Nvidia RTX 2080-TI

55" Sony OLED TV, Oculus VR

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...