HarvesteR
Member
- Joined
- Apr 22, 2008
- Messages
- 384
- Reaction score
- 6
- Points
- 18
Hello,
I have no idea if this is the proper forum for this... but then again, it IS related to both hardware and software
(If I'm wrong, do move, please)
Seeing that quite a number of people here have X52 sticks, I thought it'd be useful for some to share my control scheme for Orbiter.
Orbiter by default is pretty limited with input handling, so I decided some time ago to take my time to cook up a scheme for some more advanced input mappings... something that could handle my X52, the pedals, and my SpaceNavigator 3D mouse.
This scheme works like this:
There are 3 main control modes:
Flight mode is used when flying under an atmosphere, or reentering a planet with an atmosphere (Mars is a little ambiguous on this respect...), Here you control your ship as an airplane (shuttle or DG style).
Orbital Mode is used for orbiting and docking
Maneuver mode is used for flying in a planet or moon with no atmosphere (or Mars, which is thin enough). This mode changes control so a ship with hover engines will handle like a helicopter.
There's still much to be done with the setup, but it's pretty playable as it is right now... So here's how it's done:
GlovePIE reads the axes from the X52, the rudder pedals and the SpaceNavigator, and runs a script that maps them, depending on which of the 3 modes it's set to, onto PPjoy.
PPjoy is a virtual joystick driver, that creates, well, virtual joysticks. GlovePIE can write to them, and the Fly-by-Wire module in Orbiter reads them.
There are 3 virtual joysticks setup, each with a specific function in Orbiter. What the GlovePIE script does is, depending on mode, assign different axes from the X52 and friends to these virtual joystick axes, which are in turn, received by Fly-by-Wire.
Fly-by-Wire then, passes the mapped input axes onto Orbiter. :thumbup:
Ok, so, here's how to set it up... Attached are 2 GlovePIE scripts (one that uses the SpaceNavigator for RCS, and on that uses only joystick buttons and axes for that), a profile configuration for Fly-By-Wire, and a profile for the X52.
You will need to install PPJoy and set up the virtual devices on your own though (more on that later... keep reading)
What you will need:
GlovePIE (Programmable Input Emulator) 0.43
http://glovepie.org/GlovePIEWithoutEmotiv043.zip
PPjoy 0.8.4.6
http://drop.io/ppjoy0846testrelease
http://www.megaupload.com/?d=US4CQ0TS (alt. link to PPjoy, in case the one above doesn't work)
Fly-By-Wire 0.9.1 beta
[ame="http://www.orbithangar.com/searchid.php?ID=3223"]Fly-By-Wire 0.9.1 beta[/ame]
Saitek SST programming software
(if you got an X52, you probably have it installed. If not, you can grab them from the Saitek site here: http://www.saitek.com/uk/down/drivers.php)
How to set it up:
First of all, install PPJoy. that is possibly the most complicated part of the whole process, since it's not always so easy to install it... on WinXP it should work alright, but on Vista and 7 you might need to enable test mode for the drivers before installing. here's how:
- Open up the command prompt (Start->Run->type cmd), and in there, type: BCDEDIT -SET TESTSIGNING ON
- restart your computer... next time you boot you should see a 'test mode' message near the clock on your desktop.
- now install PPJoy (it shouldn't complain now)
Once PPjoy is installed, you need to set up your virtual joysticks (it enables none by default)... that's pretty straightforward. Just open the 'configure virtual joysticks' app on your start menu, under Parallel Port Joystick, and create 3 new devices. When creating a device, it will ask you for a device number. Give it the next available number, based on how many joysticks you already have installed. (if you got the X52 and pedals, the first virtual device you create should be number 3)
You can verify that you have 3 shiny new virtual joysticks by going into Game Controllers on the control panel (for windows 7, Start->Run->Type joy.cpl), and making sure there are new devices there.
Ok, so now we have the virtual joysticks in place, let's go ahead and install GlovePIE. This awesome program can do pretty much anything when it comes to hacking input devices. The core of the setup is done here. Once installed, you can open the attached .PIE files with it, and have a look at them.
GlovePIE has it's own scripting language, and that enables us to do whatever we want. in this instance, it's reading the input from the physical joysticks, and mapping them, depending on mode, onto virtual devices that will be mapped into Orbiter through FBW.
Now, open up one of the included scripts with GlovePIE (if you haven't a SpaceNavigator, it should probably be the one that doesn't say SpaceNavigator
)
The first section of the attached scripts are comments that explain in a little more depth what is going on here... Also here I wrote down the virtual axis mapping into Fly-By-Wire, just in case the profile configuration I'm including doesn't work.
Run the script in GlovePIE now... you should hear Microsoft Anna saying "flight controls started". (yes, the control scheme talks to you :thumbup: )
Ok, now... we got PPjoy and GlovePIE up and running (here's hoping everything went ok up until now)
By now you should probably be installing Fly-By-Wire, if you haven't already, and replacing it's profile in the '<OrbiterDir>/FlyByWire/Current' folder by the one here.
Now we're just missing one little but critically important part of the process... We need to set up a profile for Orbiter in the Saitek SST... included is a my profile for it, which is simply a profile that's been stripped of ALL modes (except mode 1, which is mandatory), and has absolutely no mappings.
This is necessary, since without it, you can't read the state of the mode switch... which renders this whole thing pointless... by disabling all modes, GlovePIE can read the mode switch as buttons.
So, either load up the included profile, or create one and wipe it clean of all modes and apply it.
Now, when you run the glovePIE script, you will hear MS Anna again... and nothing new will have happened... now, assuming everything went right, if you hit the A button (the upper one right of the safe button), MS Anna should say "atmospheric flight controls engaged".
Now, you can go into Launchpad, open up FBW's config dialog, and see if the axes move when you move your stick (and rudder (and SpaceNavigator if you have one)). If that works, you're pretty much done!! Congratulations!!
This is the abbridged control mapping for my scheme... I hope you like it (changing it will require some tweaking of the GlovePIE script). you will find the full mapping commented throughout the GlovePIE script (it's quite large... I'm sure I'll forget a few)
Mode 1 :: Atmospheric Flight Control
X52:
X - Roll
y - Pitch
Throttle - well, throttle
Left toggle (T1) - Gears up/down
Small Rotary - Elevator Trim
Right toggle (T3) - Flight RCS assist on/off (voice cue will let you know)
Rudder Pedals:
Left/Right - Yaw
(still missing are mappings for the toebrakes... I still have to get around to doing it... should take 5 minutes though...)
Mode 2 :: Orbital Controls
X52:
Safe Button - Undock from station
Hat 2 - attitude autipilot (clockwise: prograde, normal, retro, antinormal)
Throttle - Main Engines
Slider - Retro
RCS: (non-spaceNavigator version)
Roll, pitch and yaw - X52 stick and rudder pedals
LIN X - rudder toebrakes
LIN Y - throttle hat up and down
LIN Z - x52 trigger and pinkie switch
Mode 3 :: Maneuver (non-atmospheric flight) (handles like a helicopter)
Roll, pitch and yaw - X52 stick and rudder pedals
Hover - X52 throttle
Main Engines - X52 throttle slider
RCS: Same as above.
Common controls for all modes:
C button: Kill Rot.
A Button: Engage Mode
Mode switch : switch modes
One thing worthy of note: when you switch from one mode to another, you will hear MS Anna say "controls disengaged". This is so you can have time to replace your axes (mainly throttle and slider) back to zero before engaging the next mode, since they will change functions on some modes.
To engage the new mode, press the A button again. MS Anna will call it out.
Another thing: The SpaceNavigator version overrides the RCS control only when in Orbital mode (which is the mode used for docking). When in flight or maneuver, RCS is still controlled by the stick. (linear RCS is available for Maneuver and Orbital modes only)
One last thing: This setup will completely override Orbiter's RCS mode switch... be it on ROT, LIN or OFF, it doesn't matter anymore... this is more Fly-By-Wire's doing than mine, really... but it shouldn't matter since if you want if off, you can just flip the mode switch and disengage all controls, or just put it in flight mode and leave RCS assist off. Also, the AF controls switch is also overriden... these shouldn't be a big deal really...
Well, this was a VERY long post... if you read this far, congratulations, and thanks for putting up with my ramblings
I hope this helps out others. BTW, you have full permission to modify the supplied scripts... whatever works for you :thumbup:
You may not, ever ever, sell these or make money from these in any way.
And please, remember to give credit if redistributing to a (freeware) source.
Best of luck.
Cheers
View attachment control scheme.zip
I have no idea if this is the proper forum for this... but then again, it IS related to both hardware and software
Seeing that quite a number of people here have X52 sticks, I thought it'd be useful for some to share my control scheme for Orbiter.
Orbiter by default is pretty limited with input handling, so I decided some time ago to take my time to cook up a scheme for some more advanced input mappings... something that could handle my X52, the pedals, and my SpaceNavigator 3D mouse.
This scheme works like this:
There are 3 main control modes:
Flight mode is used when flying under an atmosphere, or reentering a planet with an atmosphere (Mars is a little ambiguous on this respect...), Here you control your ship as an airplane (shuttle or DG style).
Orbital Mode is used for orbiting and docking
Maneuver mode is used for flying in a planet or moon with no atmosphere (or Mars, which is thin enough). This mode changes control so a ship with hover engines will handle like a helicopter.
There's still much to be done with the setup, but it's pretty playable as it is right now... So here's how it's done:
GlovePIE reads the axes from the X52, the rudder pedals and the SpaceNavigator, and runs a script that maps them, depending on which of the 3 modes it's set to, onto PPjoy.
PPjoy is a virtual joystick driver, that creates, well, virtual joysticks. GlovePIE can write to them, and the Fly-by-Wire module in Orbiter reads them.
There are 3 virtual joysticks setup, each with a specific function in Orbiter. What the GlovePIE script does is, depending on mode, assign different axes from the X52 and friends to these virtual joystick axes, which are in turn, received by Fly-by-Wire.
Fly-by-Wire then, passes the mapped input axes onto Orbiter. :thumbup:
Ok, so, here's how to set it up... Attached are 2 GlovePIE scripts (one that uses the SpaceNavigator for RCS, and on that uses only joystick buttons and axes for that), a profile configuration for Fly-By-Wire, and a profile for the X52.
You will need to install PPJoy and set up the virtual devices on your own though (more on that later... keep reading)
What you will need:
GlovePIE (Programmable Input Emulator) 0.43
http://glovepie.org/GlovePIEWithoutEmotiv043.zip
PPjoy 0.8.4.6
http://drop.io/ppjoy0846testrelease
http://www.megaupload.com/?d=US4CQ0TS (alt. link to PPjoy, in case the one above doesn't work)
Fly-By-Wire 0.9.1 beta
[ame="http://www.orbithangar.com/searchid.php?ID=3223"]Fly-By-Wire 0.9.1 beta[/ame]
Saitek SST programming software
(if you got an X52, you probably have it installed. If not, you can grab them from the Saitek site here: http://www.saitek.com/uk/down/drivers.php)
How to set it up:
First of all, install PPJoy. that is possibly the most complicated part of the whole process, since it's not always so easy to install it... on WinXP it should work alright, but on Vista and 7 you might need to enable test mode for the drivers before installing. here's how:
- Open up the command prompt (Start->Run->type cmd), and in there, type: BCDEDIT -SET TESTSIGNING ON
- restart your computer... next time you boot you should see a 'test mode' message near the clock on your desktop.
- now install PPJoy (it shouldn't complain now)
Once PPjoy is installed, you need to set up your virtual joysticks (it enables none by default)... that's pretty straightforward. Just open the 'configure virtual joysticks' app on your start menu, under Parallel Port Joystick, and create 3 new devices. When creating a device, it will ask you for a device number. Give it the next available number, based on how many joysticks you already have installed. (if you got the X52 and pedals, the first virtual device you create should be number 3)
You can verify that you have 3 shiny new virtual joysticks by going into Game Controllers on the control panel (for windows 7, Start->Run->Type joy.cpl), and making sure there are new devices there.
Ok, so now we have the virtual joysticks in place, let's go ahead and install GlovePIE. This awesome program can do pretty much anything when it comes to hacking input devices. The core of the setup is done here. Once installed, you can open the attached .PIE files with it, and have a look at them.
GlovePIE has it's own scripting language, and that enables us to do whatever we want. in this instance, it's reading the input from the physical joysticks, and mapping them, depending on mode, onto virtual devices that will be mapped into Orbiter through FBW.
Now, open up one of the included scripts with GlovePIE (if you haven't a SpaceNavigator, it should probably be the one that doesn't say SpaceNavigator
The first section of the attached scripts are comments that explain in a little more depth what is going on here... Also here I wrote down the virtual axis mapping into Fly-By-Wire, just in case the profile configuration I'm including doesn't work.
Run the script in GlovePIE now... you should hear Microsoft Anna saying "flight controls started". (yes, the control scheme talks to you :thumbup: )
Ok, now... we got PPjoy and GlovePIE up and running (here's hoping everything went ok up until now)
By now you should probably be installing Fly-By-Wire, if you haven't already, and replacing it's profile in the '<OrbiterDir>/FlyByWire/Current' folder by the one here.
Now we're just missing one little but critically important part of the process... We need to set up a profile for Orbiter in the Saitek SST... included is a my profile for it, which is simply a profile that's been stripped of ALL modes (except mode 1, which is mandatory), and has absolutely no mappings.
This is necessary, since without it, you can't read the state of the mode switch... which renders this whole thing pointless... by disabling all modes, GlovePIE can read the mode switch as buttons.
So, either load up the included profile, or create one and wipe it clean of all modes and apply it.
Now, when you run the glovePIE script, you will hear MS Anna again... and nothing new will have happened... now, assuming everything went right, if you hit the A button (the upper one right of the safe button), MS Anna should say "atmospheric flight controls engaged".
Now, you can go into Launchpad, open up FBW's config dialog, and see if the axes move when you move your stick (and rudder (and SpaceNavigator if you have one)). If that works, you're pretty much done!! Congratulations!!
This is the abbridged control mapping for my scheme... I hope you like it (changing it will require some tweaking of the GlovePIE script). you will find the full mapping commented throughout the GlovePIE script (it's quite large... I'm sure I'll forget a few)
Mode 1 :: Atmospheric Flight Control
X52:
X - Roll
y - Pitch
Throttle - well, throttle
Left toggle (T1) - Gears up/down
Small Rotary - Elevator Trim
Right toggle (T3) - Flight RCS assist on/off (voice cue will let you know)
Rudder Pedals:
Left/Right - Yaw
(still missing are mappings for the toebrakes... I still have to get around to doing it... should take 5 minutes though...)
Mode 2 :: Orbital Controls
X52:
Safe Button - Undock from station
Hat 2 - attitude autipilot (clockwise: prograde, normal, retro, antinormal)
Throttle - Main Engines
Slider - Retro
RCS: (non-spaceNavigator version)
Roll, pitch and yaw - X52 stick and rudder pedals
LIN X - rudder toebrakes
LIN Y - throttle hat up and down
LIN Z - x52 trigger and pinkie switch
Mode 3 :: Maneuver (non-atmospheric flight) (handles like a helicopter)
Roll, pitch and yaw - X52 stick and rudder pedals
Hover - X52 throttle
Main Engines - X52 throttle slider
RCS: Same as above.
Common controls for all modes:
C button: Kill Rot.
A Button: Engage Mode
Mode switch : switch modes
One thing worthy of note: when you switch from one mode to another, you will hear MS Anna say "controls disengaged". This is so you can have time to replace your axes (mainly throttle and slider) back to zero before engaging the next mode, since they will change functions on some modes.
To engage the new mode, press the A button again. MS Anna will call it out.
Another thing: The SpaceNavigator version overrides the RCS control only when in Orbital mode (which is the mode used for docking). When in flight or maneuver, RCS is still controlled by the stick. (linear RCS is available for Maneuver and Orbital modes only)
One last thing: This setup will completely override Orbiter's RCS mode switch... be it on ROT, LIN or OFF, it doesn't matter anymore... this is more Fly-By-Wire's doing than mine, really... but it shouldn't matter since if you want if off, you can just flip the mode switch and disengage all controls, or just put it in flight mode and leave RCS assist off. Also, the AF controls switch is also overriden... these shouldn't be a big deal really...
Well, this was a VERY long post... if you read this far, congratulations, and thanks for putting up with my ramblings
I hope this helps out others. BTW, you have full permission to modify the supplied scripts... whatever works for you :thumbup:
You may not, ever ever, sell these or make money from these in any way.
And please, remember to give credit if redistributing to a (freeware) source.
Best of luck.
Cheers
View attachment control scheme.zip
Last edited: