posted 02-13- 09:56 PM
OK, you asked for it... 
How To Make Your RPM Follow the Throttle:
We'll use the P-51D as an example. This is based on the fact that the model of the throttle if you look down into the cockpit moves back and forth as you move your real throttle, but the RPM and Man Press guages do nothing. Basically, we'll set the two guage needles to key off of the same thing the throttle .sm looks at, and then build in a "kludge" to make them look right at startup.
1. Open the P51D.sm file in OPS. Click on the RPMNeedle on the parts list on the left. Then click the Properties Tab on the right side. You'll see:
obProto.................CDial
dataSource..............'engine
dataQuery (appended with)
qryRPM..................'engine
Min.....................0
Max.....................4500
2. Change these properties to:
obProto.................CDial
dataSource..............'P51D
dataQuery (appended with)
qryThrottle.............'engine
Min.....................0
Max.....................1
Loop....................0
(The qryThrottle line should be "appended" to dataQuery, the Min and Max values should be changed, the Loop line should be "added," and the qryRPM line should be deleted).
Now save the file. At this point the RPM guage will be at 0 if your throttle is all the way back, and at 4500 RPM if your throttle is all the way up, and will move back and forth with the throttle. You can stop here if you want, but when you're sitting on the ground or flying with the engine at idle, it is NOT at zero RPM, so if you want the RPM to show "idle power," read on...
Now we need to add a DOF to "simulate" the engine RPM at idle, with engine running. What we do is add a second DOF to the RPMNeedle, and modify the keyboard.inp file to activate this DOF on engine start.
1. With the P51D.sm open in OPS, click on the RPMNeedle on the left, and the DOF tab on the right. You'll see:
Origin
X: 0.66
Y: -2.19
Z: 1.99
Axis
X: 0.0
Y: 1.0
Z: 0.0
Range
Max: 155
Min: -155
Prop List
(Blank)
2. Add a DOF using OPS. Use the pulldown menu to make it a Rotational DOF. Copy the origin coordinates and axis coordinates from the first DOF to the new DOF (we want the same rotational plane for the needle)
3. Set the Min value for the new DOF to 0, and the Max value for the new DOF to 30.
4. Now go to the ORIGINAL DOF. Change the Min value to -185, and the Max value to 125. This will account for the 30 degrees of travel we've given to the new DOF. Now you have the first DOF going from -185 to 125, with no properties (it's governed by the throttle movement, remember), and the second DOF going from 0 to 30, with no properties.
5. Edit the properties for the NEW DOF as follows:
(dofID 'RPMNeedle dofOsc (oscName 'RPMNeedle oscRuntime 3 oscParent 'P51D oscCmd 'cmdEngineToggle 'cmdRunReverse)
This will cause the RPM needle to come up to 500 RPM or so when you start the engine, and drop to zero when you shut down. Save the .sm file. One more step...
6. Open your keyboard.inp file. Add a line:
cmdEngineToggle = E
Even though you probably already have a command inpToggleEngineState = E, you can have another command using E (at least it works on mine). I couldn't get the DOF to use the inpToggleEngineState in the 'cmd statement, so I had to add a command. If you can get the standard "inp" command to work instead, great, you won't have to modify the keyboard.inp file.
Now if you've come this far, you might as well do the Manifold Pressure guage too. Just do the same steps again for the ManifoldPressureNeedle in the parts list. Make sure when you add the second DOF you call it ManifoldPressureNeedle instead of RPMNeedle 
So, what will now happen is that when you start the engine, the revs and boost pressure will come up a little bit, like they should. When you push up the throttle, they will follow. The manifold pressure will, in fact, give you an analog engine power guage, since it goes from 0 to 100 inches on the guage, so you can turn off the HUD if you want and use the boost guage to determine your throttle setting in percent.
On the down side, the guages will show throttle position whether the engine is running or not, so with the engine off or shot out, the guages will be erroneously reporting RPM and boost. Also, if you start your mission inflight, and then shut down the engine, the RPM and boost will go UP when they should go down, and will read above zero when you pull the throttle to zero. However, if you start out on the ground, it will act properly and look much more realistic IMO than having it be always 100% anytime the engine is on.
This should work for any of the planes, although I haven't checked all the guages to see how far they rotate, so you may have to experiment with the DOF limits on the other planes. Just remember to adjust the limits on the FIRST DOF by the same amount as the limits you give to the SECOND DOF. If you want "idle power" to be 30 degrees of needle movement from zero, and your first DOF goes from -100 to 100, then change the first DOF so that it goes from -130 to 70.
Long, I know, but hopefully worthwhile for someone. If it doesn't work, it's just "failure...to communicate," so lemme know and I'll help ya fix it. 
------------------
--jedi--