PDA

View Full Version : Throttle AB deadzone?


RogueSqdn
12-02-2005, 03:53 PM
When flying Falcon4 it tends to get hard to find my AB engagement point with the Pro Throttle. I end up having to watch the RPM gauge and Fuel Flow very carefully when trying to find MIL power.

What I'd like to do is set a deadzone of sorts right around the point where it engages, to make it easier to find. Similar to the LOCK statements on the Cougar (where I had set the axis to lock at 80% when between the AB detents).

The axis value in F4 that my AB engages at is 37. The Pro Throttle is JS2 in my map.

:wacko:

Bob Church
13-02-2005, 03:29 AM
Hi Jared,

So you just want sort of a "step" around 37, above and below the step it would run from 37 to 0 and 255 respectively. If that's what you're looking for it would need to look something like this:

script
if( [ js2.a3 >= 27 ] AND [ js2.a3 <= 47 ] ) then
cms.a1 = 37;
else
if( [ js2.a3 > 47 ] ) then
cms.a1 = ((( js2.a3 - 47 ) * 218 ) / 208 ) + 37;
else
cms.a1 = ( js2.a3 * 37 ) / 27;
endIf
endIf
endScript

I'm setting the step width to 20 (10 counts either side of 37), which gives rise to the various values:

47 = 37 + 10 // High deadzone limit
27 = 37 - 10 // Low deadzone limit
218 = 255 - 37 // Max - AB point
208 = 255 - 47 // Max - AB point - deadzone

Then it's just a matter of scaling the remnant on either side of 27 and 47. The width of 20 felt about right here, but you can change it if it's not what you want. You just have to change the other values to match what you decide to use. You'll also need to unassign the Z axis on the Pro Throttle, and then assign CMS.A1 to that axis so that the throttle output comes from the script and not from the throttle itself.

One other thing to note. The script sees the value after linear scaling has been applied. The Pro Throttles seem to put out 0 to about 220 Raw, the script will see whatever the range is as 0 to 255. I'm not sure how you got the 37 value, but if you were looking at the Raw throttle value in Direct Mode, then it's probably not really 37 in the script because of that prescaling. It will show the script value in Mapped Mode, though. If you got the Pro Throttle value from the Raw Data display in Direct Mode, you'll need to go back and see what the Raw Data display is showing you in mapped mode at the AB point and use that instead of 37.

Have a look at the Raw Data display with the above running in Mapped Mode. As you push the throttle forward from 255, it should run smooothly down to 37 and then "stick" there. Once you get it past that zone, it will run from 37 down to 0. I think that's what you're looking for.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

RogueSqdn
13-02-2005, 04:04 AM
Thanks alot for the help, Bob. I knew you could count on you ever since getting your help way back in 99 with the SWF22. ;)

That's pretty much exactly what I was looking for, except that 20 is a bit too small of a deadzone for me... I changed it to 40.

script
if( [ js2.a3 >= 17 ] AND [ js2.a3 <= 57 ] ) then
cms.a1 = 37;
else
if( [ js2.a3 > 57 ] ) then
cms.a1 = ((( js2.a3 - 57 ) * 218 ) / 198 ) + 37;
else
cms.a1 = ( js2.a3 * 37 ) / 17;
endIf
endIf
endScript

The value of 37 was chosen because in flight, I backed off throttle until I was at 99% (to be safe and insure I didn't accidentally go into burner), exited F4 without moving throttle, and then read the value in Control Manager. It said 37, so that's what I chose. ;)

I spent the entire day trying to wrap my head around this... :huh: Didn't stop looking at it until the Bud Shootout started. I was looking at JNOV's file for clues, and managed to figure up something that would work if I held in a button to engage AB, but I didn't want to have to hold down a button for AB while in a knifefight.

%define Throttle cms.a1

// AB_mode logic
Throttle = js2.a3; // Set cms.a1 to throttle axis
if ( not JS2.B4 and [js2.a3 < 37]) then
Throttle = 37;
endif

Not very efficient, seems to me, but it worked. Add in the fact that due to carpal tunnel I have to wear a wrist immobilizer on my left wrist, and it's hard to keep a button pressed in constantly with my pinky. :censored:

Again, thanks for the tips! :salute:

Revvin
13-02-2005, 12:36 PM
Sorry I was'nt much used to you yesterday RogueSqdn I was at a LAN meet without my CH gear.

RogueSqdn
13-02-2005, 01:40 PM
No prob, it's ok. I've got it working now, though.

I'm tweaking a lot of stuff right now trying to get something perfect for release. Of course, the second I post something up I'll find something else that needs to be changed. :blink:

JNOV
15-02-2005, 12:24 AM
Hi, RogueSqdn:

I replied to your e-mail with the following explanation of how I've handled the problem in my F4 profile. I repeat it here in the off chance that someone else is interested. I personally like my solution better than a "soft" deadzone, because it is more definite (I tend to be hamfisted :)).

Best regards,

JNOV

================================================

Hi Rogue,

All I did in my profile was to set up two throttle states, one with AB enabled and one with it disabled. When AB is enabled, the throttle input passes unmodified from the main throttle axis to the game. When AB is disabled, my profile clips the throttle input at some minimum value, which I believe is 60. (Note: the way that the physical Pro Throttle axis is set up, it sends 255 when the throttle is all the way back and 0 when the throttle is fully forward.) What you need to do to get it to work right is to run F4 and, with AB disengaged, firewall the throttle and go into F4's setup and set the afterburn level at that point. When you do that, "full throttle" with AB disabled will just nudge up against F4's AB range, and "full throttle" with AB enabled will give full AB.

Here is the simple AB mode logic in my cms file:

// AB_mode logic
Throttle = js2.a3; // Set cms.a1 to throttle axis
if ( not AB_mode and [js2.a3 < 60]) then
Throttle = 60;
endif

Thus, when AB_mode is TRUE, Throttle = js2.j3 ("Throttle" is defined to be CM Device 1, Z axis, which is the throttle input that F4 sees; js2.j3 is the physical Pro Throttle axis). When AB_mode is FALSE, however, Throttle will never drop below 60, so the AB will not engage if you've set it up right in F4. Also, note that AB mode is disabled by default; perhaps that was a poor choice on my part.

If what you're wondering about is the logic than toggles the state of AB_mode from TRUE to FALSE, that logic is here:

////////////////////////////////////////////////////////////////////
// Middle
// No Shift
timer(period, d10, 4) = js2.b3 and not d10;
sequence
wait(d10 and not js2.b3 and not (ls1 or rs1 or rs2) );
cms.b96 = TRUE; // Cancel Override Mode
delay(3);
cms.b96 = FALSE;
endsequence
// Shift 1
timer(period, d11, 4) = js2.b3 and not d11;
sequence
wait(d11 and not js2.b3 and (rs1 or ls1) and not rs2);
AB_mode = not AB_mode
endsequence
////////////////////////////////////////////////////////////////////

That's a bit more complicated to explain, but, essentially, the toggle function is activated when you "quick-click" (i.e., click and release sufficiently quickly--before period timer d11 expires) the middle Pro Throttle button while holding in the pinkie key on either the Fighterstick or the Pro Throttle (these are the "Group 2" keys in my graphical map). Note that a different command (i.e., override dogfight/MRM mode) is activated if you quick-click the middle Pro Throttle button without holding in a shift key (i.e., you've activated a "Group 1" function, in the parlance of my graphical map) key. If you want to trace through the logic, rs1, rs2, ls1, and ls2 are defined earlier in the cms file.

I hope that's clear :) If not, just respond and I'll try to clarify.

Best regards,

Kevin (JNOV)

RogueSqdn
15-02-2005, 12:34 AM
That explains it rather well. If you look at my CMS file, you'll see I adapted your logic to work with JS2.B4 held in... it's the only thing I could figure out how to do. Now that I seem to have a grip on your method, I might experiment with it.

As for the soft deadzone... I stick a little plastic clip used for routing cable (with a sticky back) onto the base of my throttle, where my thumb will bump it when I get into the deadzone, letting me know when to stop.

Michael, bring us an arching F-15, 16, or 18 throttle with detents! Please! :whip:

JNOV
15-02-2005, 12:39 AM
Rogue:

Great -- I'm glad that made some sense! Also, you did really nice work on the profile. I'm sure lots of folks will use and appreciate it!

Best regards,

JNOV

RogueSqdn
15-02-2005, 12:44 AM
Originally posted by JNOV@Feb 14 2005, 06:39 PM
Rogue:

Great -- I'm glad that made some sense!Â* Also, you did really nice work on the profile.Â* I'm sure lots of folks will use and appreciate it!

Best regards,

JNOV
<div align="right">10665
[/quote]


Thanks for the compliment.. the readme was the biggest pain to do, other than this deadzone stuff. ;)

I've thought some folks may enjoy it, but I get the feeling in my gut that the one thing that'll keep people from using it is having to use my F4 keymap.

JNOV
15-02-2005, 12:46 AM
Originally posted by RogueSqdn+Feb 14 2005, 11:44 PM--><!--QuoteBegin-JNOV@Feb 14 2005, 06:39 PM
Rogue:

Great -- I'm glad that made some sense!ÂÂ* Also, you did really nice work on the profile.ÂÂ* I'm sure lots of folks will use and appreciate it!

Best regards,

JNOV
<div align="right">10665



Thanks for the compliment.. the readme was the biggest pain to do, other than this deadzone stuff. ;)

I've thought some folks may enjoy it, but I get the feeling in my gut that the one thing that'll keep people from using it is having to use my F4 keymap.
<div align="right">10666</div>
[/b][/quote]

My F4 profile suffers from the same shortcoming. I tried to avoid a custom key file, but, at the end of the day, I couldn't. :shrug:

RogueSqdn
15-02-2005, 12:49 AM
Well I kinda went backwards from you on that. The keymap was built when I was using the Cougar. At the time, I had the MFDs/ICP and the X-Keys 20. The goal was to map as many cockpit switches as possible to single key presses, to allow a full ramp start without memorizing CTL SHF ALT modifiers and such.

Now that I have an X-Keys 58 as well, that makes the single keypress thing much less important, but as I had built new Cougar and X-keys 20 files around the custom keymap, I didn't want to start over again.

RogueSqdn
15-02-2005, 01:35 AM
Well, with those tips, JNOV, here's another alternative afterburner logic. You can insert this into the CMS file and comment out the existing AB logic.

////////////////////////////////////////////////////////////////////
// Â*Alternative AB Logic - Tap JS2.B4 to activate AB
////////////////////////////////////////////////////////////////////
%define Throttle cms.a1
%define AB_mode b5

timer(period, d11, 4) = js2.b4 and not d11;
sequence
Â*Â*Â*Â*wait(d11 and not js2.b4 and not js1.b4);
Â*Â*Â*Â*AB_mode = not AB_mode;
endsequence

Â*Â*Â*Â*// AB_mode logic
Â*Â*Â*Â*Throttle = js2.a3; Â*Â*Â*Â*Â*// Set cms.a1 to throttle axis
Â*Â*Â*Â*if ( not AB_mode and [js2.a3 < 37]) then
Â*Throttle = 37;
Â*Â*Â*Â*endif
////////////////////////////////////////////////////////////////////


This is taken from JNOV's methods with some modification on my part. When you advance the throttle full forward, it will only get to a value of 37, meaning it won't go past MIL power. Tapping JS2.B4 will allow you to go into AB, tapping it again will drop you back down to MIL power. If you have the shift button held in, it won't work (which allows the FOV Default function on that button to work without punching you into afterburner).

Thanks, JNOV! :salute:

MichaelCHProd
15-02-2005, 04:30 AM
Daaaammmmmnnnn.... now thats some scripting :salute:

RogueSqdn
15-02-2005, 04:45 AM
Originally posted by MichaelCHProd@Feb 14 2005, 10:30 PM
Daaaammmmmnnnn.... now thats some scripting :salute:
<div align="right">10676
[/quote]


Thank you... guess I'm starting to get the hang of this... it'll take a LONG time before I'm good enough to write this on my own. :)

I'm not sure what I'll tackle next... might be a while, I'm busy with KOTOR II on the PC. :cheers:

But, I know what you should tackle next, Mike... that throttle request I posted! :evil: The F-15 throttle is the same as the A-10's also... which means that with a Fighterstick and an F-15 style throttle, you'd have an A-10C HOTAS. ;) I still have my old Suncom Talcon stick lying around (unused), and always loved the grip design, just hated that stick's limitations.

MichaelCHProd
15-02-2005, 05:59 AM
You are preaching to the choir brother :)

Bob Church
15-02-2005, 06:39 AM
Hi Jared,

>> Thanks alot for the help, Bob. I knew you could count on you ever since getting your help way back in 99 with the SWF22. <<

I thought we might have talked before. Good to see you over here!

>> The value of 37 was chosen because in flight, I backed off throttle until I was at 99% (to be safe and insure I didn't accidentally go into burner), exited F4 without moving throttle, and then read the value in Control Manager. It said 37, so that's what I chose. <<

That was exactly the right thing to do. It was just that it had to be done with the map active or the value would have been off a bit.

>> I spent the entire day trying to wrap my head around this... Didn't stop looking at it until the Bud Shootout started. I was looking at JNOV's file for clues, and managed to figure up something that would work if I held in a button to engage AB, but I didn't want to have to hold down a button for AB while in a knifefight. <<

Nope. The calculation is little more troublesome than you'd think at first, but doing it that way keeps the endpoints of the three zones matched up so there's no "jump" when you make the transition. Anyway, it looks like you've gone on to other methods since.

Have fun with it!

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

RogueSqdn
15-02-2005, 01:16 PM
Well, Bob, not sure waht I'm going to settle on, I'll have to get some flight time in with both methods. Nevertheless, I thank you for the help.

And Mike.. glad to know that you and I think alike on the issue... let's hope something happens with it!

paddyman
23-03-2005, 12:24 AM
Originally posted by RogueSqdn@Feb 15 2005, 12:16 PM

Well, with those tips, JNOV, here's another alternative afterburner logic. You can insert this into the CMS file and comment out the existing AB logic.

CODE////////////////////////////////////////////////////////////////////
//Â* Alternative AB Logic - Tap JS2.B4 to activate AB
////////////////////////////////////////////////////////////////////
%define Throttle cms.a1
%define AB_mode b5

timer(period, d11, 4) = js2.b4 and not d11;
sequence
wait(d11 and not js2.b4 and not js1.b4);
AB_mode = not AB_mode;
endsequence

// AB_mode logic
Throttle = js2.a3;Â* // Set cms.a1 to throttle axis
if ( not AB_mode and [js2.a3 < 37]) then
Throttle = 37;
endif
////////////////////////////////////////////////////////////////////


This is taken from JNOV's methods with some modification on my part. When you advance the throttle full forward, it will only get to a value of 37, meaning it won't go past MIL power. Tapping JS2.B4 will allow you to go into AB, tapping it again will drop you back down to MIL power. If you have the shift button held in, it won't work (which allows the FOV Default function on that button to work without punching you into afterburner).

Thanks, JNOV!





Lads is this script just for F4 or can it be made to work in lomac aswell?

RogueSqdn
23-03-2005, 12:31 AM
Well, you can make it work in any sim. The thing about LOMAC, however, is that it does not have a function where you can tell it when to slip the throttle into afterburner. I THINK it happens at 80% of your throttle's travel. You'd just need to adjust that "37" value until you find the right spot.

Ziggy
18-01-2006, 07:35 PM
I've been working on an alternative to the dead zone step around both dry thrust and afterburner. What I've done is to have the dead zone begin at 100% and continue into the AB stage. This way there is no change at all to the throttle response when not using AB. I've created a dead zone with a value of 25, finding this useful after flying around and trying different values. The AB response range is compressed of course but there are effectively only a few stages anyway and it will sit easily at 101, 102 and 103% (max thrust). I've used a value of 52 for military power since this was the default in Falcon but this is easy to tweak.

script
//ab detent//
if([js2.a3 >= 27] and [js2.a3 <= 52]) then
cms.a1 = 52; //dead zone
else
if([js2.a3 > 52]) then
cms.a1 = js2.a3; //dry thrust
else
cms.a1 = (js2.a3 * 52) / 27; //afterburner
endif
endif
endscript

snomhf
10-04-2006, 08:07 PM
Ziggy,
I like for the AB portion of my stick to use as little space as possible. A boundary of 52 just feels too wide for me but a DZ width of 25 really can't be reduced either IMO. That means a boundary of 30 for example only gives 5 points for AB. Not a heck of a lot. Do you know the granularity of the AB range in F4? How many points of AB do I need to get full functionality? I'd like to set it to minimum as much as possible.

BTW, (js2.a3 * DZLO) / DZHI is perfect. Thanks for that. Much better than the scaling I was using before.

Thanks for advice

-mark

Ziggy
11-04-2006, 05:19 PM
I've changed the dead zone slightly in the latest version of my profile. Falcon has three AB stages so it should be possible to make the dead zone and/or the AB zone pretty small, as required. If you make the dead zone too small it kind of defeats the purpose of simulating a physical detent. Of course everyone will have a different preference here so it is worth tweaking it to your own needs. Let me know what settings work for you and I might even give them atry myself and incorporate them is a future version of the profile.

RogueSqdn
11-04-2006, 06:33 PM
For a bit of a different solution that simulates a physical detent, check out this thread from a ways back... the pictures I posted aren't up anymore, but I'll fix that when I get home from work today.

http://www.ch-hangar.com/forum/index.php?showtopic=2455

snomhf
11-04-2006, 06:50 PM
I've changed the dead zone slightly in the latest version of my profile. Falcon has three AB stages so it should be possible to make the dead zone and/or the AB zone pretty small, as required. If you make the dead zone too small it kind of defeats the purpose of simulating a physical detent. Of course everyone will have a different preference here so it is worth tweaking it to your own needs. Let me know what settings work for you and I might even give them atry myself and incorporate them is a future version of the profile.
[/b]

Zig,
I spent a good bit of time last night playing around with your latest config. I shortened, lengthend it, etc, etc. I ended up pretty much with the 52-27 that you suggested. I had the DZ at 64 before yesterday and that is just to wide. 52 is considerably better. I'm going to stick with that. I agree (after playing with it) that making to too short defeats the purpose of the detent.

BTW, I really love your profile. I'm sure you've seen my post about the "four commands, one button." I love the concept. Being an ole Unix guy, it's identical to the old EMAC vrs vi wars that used to almost bring people to blows. The EMACS guys hated vi because of it "input mode." You forget you're in input mode and try to delete something and insert your delete command into your text. That same experience happens here. Funny how there is nothing really new in this world.

Regards
-mark

RogueSqdn
15-04-2006, 03:49 AM
I've now put a picture of the velcro mod I did back up on my webspace, though I could no longer find my original photo. But this should give you an idea. When moving the throttle forward, you can feel when the velro hits the edge of the slide and know you're about to hit AB, without looking down at it.


http://home.triad.rr.com/rogueviper/images/stiffie/sf_throttle.jpg