Jump to content

Damper and friction effects in force feedback for Black Shark


average_pilot

Recommended Posts

I've been working on a little program that replicates the behaviour of the FFB in Black Shark, but I added a damping effect and also some friction. I launch it when the simulation is running so it takes over the control of force feedback.

 

Well, the question is that, it feels soooo good compared with that lonely spring effect that is implemented in Black Shark, that I'm going to use my application from now on. The joystick really feels like you are moving a stick connected to something heavy and complex instead of a silly regular spring joystick.

 

And there are two added benefits.

First, for those using the press and hold trimming technique, while the trim button is down the damping and the friction makes the helicopter a lot easier to control. Often people says that that's how it feels in the real one, but, despite it is possible to emulate to some extend with FFB the joystick is left without any resistance to movement at all.

Second, as I use the position of the joystick to update the spring centre instead of the position of the virtual stick like it seems it's done in Black Shark, I can use any curve or saturation in the joystick axes without problems.

 

Summarizing, I'd like to see some damper added to FFB in Black Shark, and maybe some friction, too.

And, a change in the trim system so that the centre is updated with the current position of the real joystick instead of the virtual stick in order to be able to use saturation or curves as mechanical joystick users are able to do.

 

EDIT: Posts with links to the application

http://forums.eagle.ru/showpost.php?p=1394206&postcount=18

http://forums.eagle.ru/showpost.php?p=1628706&postcount=43

Note that there is no longer a specific version for the G940. The only difference is the default value for Swap axes

 

And finally, the source code. It's pretty much C style as that's how it is the original sample in which it is based. I wanted to turn it into C++ style before release it, but I can't find the time for it.

simFFB_source.zip


Edited by average_pilot
Link to comment
Share on other sites

  • Replies 150
  • Created
  • Last Reply

Top Posters In This Topic

If you mean to ask how the FFB feels in DCS Black Shark, it just feels like a normal spring centred joystick.

That's why I've been trying to substitute it with one with damper and friction. And it has been a big success :)

 

And if you ask about the real, it doesn't have any fly-by-wire, so it may feel like any other helicopter with hydraulic-assisted controls.

Link to comment
Share on other sites

If you mean to ask how the FFB feels in DCS Black Shark, it just feels like a normal spring centred joystick.

That's why I've been trying to substitute it with one with damper and friction. And it has been a big success

 

(?)But with FFB on the joystick doesn't center - it sits where it's trimmed to... (/?)

Cheers.

Link to comment
Share on other sites

The Apache is not fly-by-wire.

 

Fly-by-wire is such a generic term it's nearly meaningless to use... technically any aircraft that uses flight control computers to calculate and move the surfaces for you without your express intent to move them based on maneuvers is fly-by-wire (ie: aileron/rudder interconnects that move the rudders to aid in turns), which would mean just about every aircraft made during and ever since the Cold War.

 

You don't have to have a force-sensing stick, which from what I understand is extremely rare to the extent that I can't even think of an aircraft besides the F-16 that has one.

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

The Ka-50 uses a force-trim system that is spring-loaded and really gets loose while you press trim down.

 

There is no direct force-feedback linked back from the rotor-disc to the cyclic.

Similar to this schematic:

amtc-autopilots1-300x207.jpg

 

@average_pilot - I can't say that I'm unhappy with the current

FFB simulation at the MSFFB2 >>Two MS FFB2 with Cougar Grip

 

-But can you let me have a look at your program?

I'm very curious how this works!


Edited by PeterP

Link to comment
Share on other sites

Fly-by-wire is such a generic term it's nearly meaningless to use... technically any aircraft that uses flight control computers to calculate and move the surfaces for you without your express intent to move them based on maneuvers is fly-by-wire.

 

Okay, then that's easy, so that makes the Apache AND the Ka-50 fly by wire by your definition. I'm fine with that.

 

Many people, however, still think of fly-by-wire as the replacement of the physical, moving connection between a pilot's flight controls and an aircraft's control surfaces with an electronic connection. And by that definition, neither the Ka-50 nor the Apache are fly-by-wire.

Link to comment
Share on other sites

The Ka-50 uses a force-trim system that is spring-loaded and really gets loose while you press trim down.

 

There is no direct force-feedback linked back from the rotor-disc to the cyclic.

Similar to this schematic:

The truth is that I can't emulate what I don't know. My main motivation was to change trim behaviour to re-centre to the position of the real joystick, rather than the position of the virtual ka-50 stick, in order to be able to use some saturation (and/or curves) on the pitch and roll axis for a less sensitive control. Current sensitivity makes me to keep my right arm all tight.

 

But once I had the spring effect working, I added the damping effect and loved it. Then I added the friction. All three working together feels like you are moving some complex machinery with the joystick. Absolutely different to the spring effect playing alone. I got so excited that I felt the urge to announce my findings to the world and beg at the 'wish list' section for this to be implemented in Black Shark. It only needs the two effects added to the FFB module and two more entries at the 'FF Tune' window.

@average_pilot - I can't say that I'm unhappy with the current

FFB simulation at the MSFFB2 >>Two MS FFB2 with Cougar Grip

(!!!!!!)I wanted to do that some time ago when I found that the motors were not strong enough after modding my msffb2. I decided it was too complex and required a time I just don't have and put the original grip back.

Now I understand why you think that the sensitivity is fine in Black Shark. What a difference of range of movement. :)

-But can you let me have a look at your program?

I'm very curious how this works!

It's OK. I'll PM the source if you want it. But is rather simple. It's based on the FFB code sample from microsoft.

And there is no dll injection at all. The key is that only one program can have control of the FFB at a time. You can stole the control simply initializing the device when the other program have the control.


Edited by average_pilot
Link to comment
Share on other sites

OMG this is amazing! could you put your software up for download please! im very anxious to "test it" would it work for my logitech G940? being able to put curves on and still have accurate FB is a dream, would could ED implement this?

I may have to keep PMing you till you let me have a go!

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

Link to comment
Share on other sites

The problem is that it doesn't have any GUI and everything is hard coded: forces, axis swapping for msffb2 and the trimmer button. Also, 3 effects at the same time can be too much depending on the ffb joystick.

Tell me the centering force percentage you use and the trimmer button number and I'll compile a version for you.

Link to comment
Share on other sites

The problem isn't the joystick id, but that the program, in its current state, just search for the ffb one. But it's a question of a bit of research on my part, and time. I'm learning as I code this.

 

I'm not sure if I could use the keyboard instead. Black Shark blocks hotkeys. I had to use a system-wide keyboard hook to overpass it and enable ffb without having to alt-tab. But the hook seems to interfere somehow with Black Shark and I disable it right after receiving the the key press.

 

Let's see what I can do before my family comes back. Yesterday my kid was ill and I couldn't work on this.

Link to comment
Share on other sites

No problem!:)

There is absolute no hurry - I'm very happy with the FFB as it is.

I was just curious what you "feel".

Words are sometimes not enough to describe things...;)

 

BTW: - I use autohotkey for setting hotkeys in DCS.

Maybe you can use AHK as "man in the middle" for this?!

Link to comment
Share on other sites

At last, I finished the GUI... more or less.

I don't know if the Axis swapping works as it should because MSFFB2 is my only FFB joystick.

 

Today is my turn to be ill.... aaaargh. Fever feels so bad. But as I can't sleep I decided to finish it.

 

I haven't been able to make the hotkeys to go through BS2, even with that keyboard hook. That means that to make it work one have to alt-tab from BS2 mission, and select "Init direct input" from the Options menu of my program.

 

As BS1 resets the FFB every time it regains focus, this trick doesn't work with it.

simFFB_32.zip

simFFB_64.zip


Edited by average_pilot
  • Like 2
Link to comment
Share on other sites

Thanks average_pilot for making and posting this force feedback program!

I can't test it on my Logitech G940 this week because my girlfriend is also ill and we have had to go stay at her parents. I look forward to testing it when I get home!

I have also noticed that BS2 handles input differently than BS1 because my Logitech profiler works very inconstantly with BS2 :mad:(used to work great with BS1). I can’t have any modifier key combinations in the profiler only single key entry’s work consistently well.

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

Link to comment
Share on other sites

I managed to test it quickly tonight.

It doesn't really work that well with G940 mainly because there is a bug with the G940 and blackshark that when you press and hold the trim button it doesn't release any of the pressure (so you don't get the sloppy joystick feeling anyway) I was hoping this program would release the pressure but also apply a bit of dampening.

 

It sometimes makes the stick go crazy and move to a different coner every time you press the trim button.:joystick:

 

It is not your fault the trim dampening doesnt work as it is a bug between ED and the Logitech G940.

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

Link to comment
Share on other sites

I managed to test it quickly tonight.

It doesn't really work that well with G940 mainly because there is a bug with the G940 and blackshark that when you press and hold the trim button it doesn't release any of the pressure (so you don't get the sloppy joystick feeling anyway) I was hoping this program would release the pressure but also apply a bit of dampening.

It sounds like the G940's ffb driver ignores the Stop command. The program sends that when the button is pressed. The G940 may need a different approach then.

 

It sometimes makes the stick go crazy and move to a different coner every time you press the trim button.:joystick:
I wasn't sure if the axes swapping also needs the inversion of the axes. I do things mostly by trial and error, so I will do some modifications for you to try, if it's ok for you.

 

I've been seeing that the joystick is very prone to rattle without control when the damper and the friction are playing together. That may not happend because of the very nature of damping, but it seems it's just a limitation of ffb.

So I recommend to set friction to zero for testing, to be sure about what it's happening.

Link to comment
Share on other sites

I had a go with this - and I have to say that I don't really feel a difference with my set-up (what is not really surprising. :P) - but I can understand that this can be a great enchantment at a stock MSFFB2!

 

But it is far more interesting to use this brilliant piece of code in MS-FX or "Take on Helicopters" - or simply any simulation/game that uses a helicopter.

Because the FFB effects are not really well done when it comes done to a Forec-trim system.

 

You should really considering to polish it a little - like a timed automatic initiation so you don't have to alt tab .

And post it over at Hovercontrol.com - I'm very sure that many will be really thankful.

My second Idea is to add the possibility to assign four trim dynamic bank/pitch trim - so it can be used for fixed wing aircraft also.

I'm thinking especially about to use this in CoD - since the developers don't support FFB for the MSFFB2 any more... (say say the controller is too old...)

 

-when this is done you could sure make it a donation-ware.

 

Thank you !:thumbup:

I will sure use it always when piloting in MSFX!


Edited by PeterP

Link to comment
Share on other sites

I added a "progressive trimmer" option for me, to use it with helicopters in FSX. But it is hard coded to be controlled with the POV hat of the FFB device.

As it's generic it can be used with any simulation, of course. IL-2 is a good example of where I would like to use it. It's a pity they coded all that FFB stuff but forgot about proper trimming.

 

About the hotkey, I plan to use glovepie. You can exchange data with a glovepie script via UDP. It will catch key strokes for me and will send them to my program so I can use it with BS2 while it is not added in future updates.

Link to comment
Share on other sites

jib, I did another version to see if the axes swapping is now correct and the spring stops while holding down the trim button.

If any of the axes is still inverted try to see which one, X or Y.

 

Remember that you have to use an actual joystick button. I mean, if you are using logitech's programming tool to send a 'T' with the trim button, my program won't catch any button press.

That same joystick button must be configured inside black shark as trim button.

 

Also, remember that you have to launch the program AFTER the mission is completely loaded. Or, if the program is already running, you have to select "Init DirectInput" in the Options menu to steal control of force feedback from black shark 2. But only after the mission is loaded.


Edited by average_pilot
removing outdated files
Link to comment
Share on other sites

  • Recently Browsing   0 members

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