Red Dog's corner

Cougar World

Red Dog's Corner

General

Sim specific tips
Programming the Cougar for FS2002

Flight Simulator is not the easiest sim to make a joystick file for. The number of available keyboard commands is rather few if we consider only the flight controls. On the other hand, managing the radios, ATC communications and autopilot commands leads to a very hard to master setup.
The file I made is optimized for small prop aircraft or even turboprop or floatplanes. Now, of course the heavies will work too but I cannot guarantee that all required functions are implemented, as I don't fly anything heavier than a Dassault Falcon 50.

I don't own peripheral devices for FS to manage the avionic stack, and I really enjoy FS when flying IFR. So I really wanted my Cougar to manage the radios, the ATC and the autopilot controls. The radio is managed by the Hat2, the AP controls by the Hat3 and the ATC by the radioswitch. The final file is not easy to use, but with a little experience; you'll be able to manage all the comms with the Cougar. The file can be downloaded here.

Here are the explained functions so far:

1. Setting up flight sim.
2. A hat with three layers.
3. Implementing reverse thrust beyond the first detent.
4. Differential braking.
5. Use a two speed microstick to change the radio frequencies.
6. Implementing the mixture and propeller controls on the RNG knob with minimum and maximum positions emulated.


Setting up MS Flight Simulator

Flight Simulator assigns buttons and axes of your controller by default. But as we completely reassign the joystick ourselves, we do need to make sure that the default button assignments are deleted.
This is done by opening the controls menu of FS2002 and going to the assignment tab. Then delete all button assignments one by one. If you don't do it, you may end up with the Hat1 emulating two functions at the same time. One from the Cougar, the other from the default assignment in FS2002.
Next is the axes setup. Check that all your Cougar axes are declared as you wish: X for ailerons, Y for pitch, throttle for all engines, rudder pedals (if you own them) for rudder and ANT as pitch trim. Make sure the RNG knob is not declared as we will program it digitally.

I used the default FS2002 key presses to program the Cougar. The only command I added was the switch between GPS and NAV declared as SHF o. Add that key press to the buttons assignments of FS2002.


A hat with three layers

I wanted to concentrate all the radio commands on one hat only and all the autopilot related functions on another hat. With the S3 button, I obviously have 8 positions on one hat but I realised I would need more and I did not want to use the corner positions as they are sometimes difficult to reach.
I decided to make my first steps in logic programming and create a third layer by using another button. Now this is a beginner's attempt that I share with other beginners, so there are certainly better ways to do it.
Here we go for the brainstorm (I like that word, can't resist picturing that storm)

The first two layers are of course the button only and the button + S3. The third layer will be created by a combination of the button and another declared shift button. I chose the button S1 to act as the second shift button. You may as well use S4 or any other button. I just didn't want to use a button on the throttle because the microstick will be used to change the frequencies and that will keep the left hand busy.
As S1 will act as a second shift button, it may not be programmed alone.
Now, there is something difficult to understand here for those setting foot for the first time on the logic path. At least I had a hard time figuring it out: The first layer is the button only but we cannot program it the usual way, we need to create a logical flag excluding the S1 button.
The second layer is simply the first flag with a /I modifier.
The third layer is also logically programmed, but this time with the button S1.
DEF X1 H2U AND NOT S1
DEF X2 H2U AND S1

As stated earlier, by using /I and /O in the X1 string, we will implement the first (button only) and second layer (button + S3) The X2 makes the third layer
rem H2U
BTN X1 /I Select_heading_bug
/O COM1_Select
rem H2U and S1
BTN X2 DME1_indent

Now you do the same for the 3 other positions and you'll have something like this:
DEF X1 H2U AND NOT S1
DEF X2 H2U AND S1
DEF X3 H2R AND NOT S1
DEF X4 H2R AND S1
DEF X5 H2D AND NOT S1
DEF X6 H2D AND S1
DEF X7 H2L AND NOT S1
DEF X8 H2L AND S1
rem H2U
BTN X1 /I Select_heading_bug
/O COM1_Select
rem H2R
BTN X3 /I Nav_GPS
/O Transponder_select
rem H2D
BTN X5 /I DME_Select
/O ADF_Select
rem H2L
BTN X7 /I OBS_Select
/O Nav1_Select
rem H2U and S1
BTN X2 DME1_indent
rem H2R and S1
BTN X4 VOR2_indent
rem H2D and S1
BTN X6 ADF_indent
rem H2L and S1
BTN X8 VOR1_indent

Now, I hear some screaming that we can do that with a least number of flags - I'm only asking to learn logic programming, so don't hesitate to tell me how.
Of course, the least used functions are programmed on the third layer. I don't use them often but it's good to know they are readily available. The good thing is to be able to concentrate all commands from the same kind or reporting to the same instrument (here the radio). The hat3 is programmed the same way to implement all autopilot commands.


Implementing reverse thrust beyond the first detent

This is very similar to the way we implemented WEP on the throttle for IL-2. This time, we concentrate on the first detent and we will use the same type 5 digital programming. But let's see first what we need:

  • The throttle works as a DX axis above the first detent.
  • Beyond the first detent, the throttle may not send analogue values and thus must be locked. We will need the LOCK, UNLOCK syntax.
  • At minimum throttle, I want to activate the reverse thrusters (key press F2 - held) They must be held as long as the throttle stays in that position. As soon as the throttle moves farther than the reverse zone, I want the macro F1 (idle) being sent so that the engines are placed back at idle power. To do that, we will use the /P and /R modifiers allowing us to emulate F2 in press mode and F1 at release. Note that a /H is inserted before the F2 so that the key press is held.
  • The two zones above will let us LOCK and UNLOCK the analogue values of the throttle. Notice that I used the value 0% to lock the throttle at minimum position since that has been corrected with newer versions of the compiler.

So we have three zones:
1. From 0 to 2%: As long as the throttle lies in that zone, the F2 macro is sent and held. When the throttle gets out of that zone, the macro F1 is sent once.
2. From 2 to 3%: The command LOCK is implemented.
3. From 3 to 5%: We UNLOCK the throttle so that above 5% real course, the throttle starts to emulate the analogue values of the Direct X third axis.

THR 5 3 (0 2 3 5) (/P /H F2 /R F1) LOCK (THR, 0%) UNLOCK (THR)

As usual, there are plenty of other ways to do just about the same thing. I even have some redundancies as the LOCK (THR,0%) is the same as emulating /R F1 at the release of the reverse zone. But that's done on purpose as two checks are better than one.


Implementing differential braking

This one has already been discussed here


Use a two speed microstick to change the radio frequencies

When I decided to place the radio selection on the Hat2 and the Autopilot controls on the Hat3, I knew I would need a decent tool to increase or decrease the selection. 
The microstick may not seem to be the best solution but it offers some great advantages, so I decided to give it a try and I finally adopted it. Only one axis out of the two is needed. You can pick the one you prefer. I elected to use the vertical axis easier to find in flight IMHO. As usual, the microstick also emulates the mouse when S3 is depressed.
While we are programming this rather simple function, why not make it complete and program a two speed selection according to the position of the vertical axis of the microstick.

  • The MIY axis must be divided in different areas. One rather large neutral region, an area where the selection increase slowly, and a short region near the end of the axis travel where the selection will increase quickly. The same two zones are needed in the lower part of the axis for the selection decrease. We would then end up with 5 zones. 
  • I elected to keep the neutral region rather large to avoid disrupting the T1 operation. Indeed, when the microstick send key presses too close to the centre of its axis, those same key presses are very often generated when the T1 is pressed. 
  • We already know that we will use a type 5 digital programming to make it happen. Lets consider the following example:
    MIY 5 5 (0 5 40 60 95 100) (Decrease _selection_fast) (Decrease _selection_slow) ^ (Increase _selection_slow) (Increase _selection_fast)
    The difference between the slow and fast selection change is the rate of the repeating macro. We directly realise that the fast change could be done with a /H modifier and the slower change with a /A and maybe a Delay value (DLY). If the /H is allowed in a digital statement, the /A is a problem. The only way to implement it is to switch to logical programming. Yeah, I know - again!   
  • So we will define two logical flags each allowing to increase or decrease the selection using a /A and a DLY value. So far, nothing difficult:  
    BTN X17 /A Selection_decrease DLY(200)
    BTN X18 /A Selection_increase DLY(200)
  • Now we just need to adjust the digital statement for the logical flags.

MIY 5 5 (0 5 40 60 95 100) (/H Selection_decrease) (/H X17) ^ (/H X18) (/H Selection_increase)
BTN X17 /A Selection_decrease DLY(200)
BTN X18 /A Selection_increase DLY(200)

Note the /H in front of each flag. That's to make sure that the flag stays ON as long as the microstick is in the defined area and the selection keeps changing. If the /H is omitted, the macro will be emulated once. Now, it's very easy to manage the speed of the selection by changing the DLY value.
This programming emulates the vertical axis of the microstick with the following areas:
- From 0 to 5% : Decrease the selection fast
- From 6 to 40%: Decrease the selection slower (one key press sent every 200 milliseconds)
- From 41 to 60%: Dead zone not programmed.
- From 61 to 95%: Increase the selection slowly.
- From 96 to 100%: Increase the selection faster.
The "fast" zones are voluntarily smaller as they are easily found on the end of the axis travel. 

There is an interesting side issue on this. You can increase or decrease the selection only if something is selected. This is done by selecting a radio (Com1, Nav1,...) or an instrument (OBS, Heading bug,...) or an autopilot setting (AP altitude set,...) with the Hat2 or the Hat3. If nothing is selected beforehand, the microstick vertical axis controls the zoom macros. It's really handy to change the field of view settings in the 3D cockpit. 


Implementing the mixture and propeller controls on the RNG knob

This looks quite similar to the previous example. this time though, we will program the RNG knob to control the mixture and propeller pitch lever of small prop planes. 

  • As we have two functions to program on the same knob, we will use the /I and /O modifiers so that the RNG alone controls the prop pitch and the RNG + S3 controls the mixture. 
  • To move one axis from minimum to maximum range, we need to press a huge number of macros. So huge we cannot use a type 1. So we'll go along the known route of the type 5.  
  • To ensure that the minimum and maximum region of the propeller and mixture axis are reached, we will define a short zone at the end of the RNG axis travel. That zone will send once the corresponding full or min position for the relevant command. 
  • The central position is not programmed. It's a short dead zone. 
  • It's the rotation direction which decides of the increase or decrease of the propeller or mixture axis. 
  • The rate to go from a low pitch to a high propeller pitch using a /H is too fast and we can't set the command precisely. So we will again use a /A modifier with the known fact that we cannot use them in a digital statement. We will again use logic programming as in the previous example. This will let us set the DLY value at wich we want the macro to be repeated.

Still with me? All right, let's see : 
RNG /I 5 5 (0 1 48 52 99 100) Mixture_Cutoff (/H X21) ^ (/H X22) Mixture_full_rich
/O 5 5 (0 1 48 52 99 100) Prop_low (/H X19) ^ (/H X20) Prop_hi
BTN X19 /A Prop_decrease DLY(60)
BTN X20 /A Prop_increase DLY(60)
BTN X21 /A Mixture_lean DLY(60)
BTN X22 /A Mixture_enrich DLY(60)

This programming allows reaching at all times the minimum and maximum travel of the two levers.
As normally the RNG knob is centred when you download a file and when you enter the sim, whatever is the lever position you can increase it or decrease it easily.

Olivier "Red Dog" Beaumont