P3D v3 Turbo prop torque gauge.

#1
I’m working on a 3D modeled torque gauge for my plane and for the life of me I can’t get the right variable or something. I’m completely new to programming of any kind but I have read and studied everything I can find on this site and google. I’m trying to put the code straight into the model def and that may be the problem. Any help or explanation would be greatly appreciated. I’m very thankful for all of you who share your knowledge on this site! I’m using blender2fsx/p3d and I’m running p3d v3.4.


Sent from my iPhone using Tapatalk
 
#3
I was able to use (A:ENG1 TORQUE, ft-lbs) but with my needle animation having key frames set at 0, 50 and 100 the needle is maxed out 99% of the time and the other 1% it's bottomed out. Here is my code.

Code:
<Animation name="needle_torque" guid="9f8828e7-cfb8-4f14-0d06-daf3f86ea768" length="100" type="Sim" typeParam2="needle_torque" typeParam="AutoPlay" />

  <PartInfo>
    <Name>needle_torque</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:ENG1 TORQUE, ft-lbs)</Code>
      </Parameter>
    </Animation>
  </PartInfo>
 

tgibson

Resource contributor
#4
The Parameter section outputs the keyframe to be displayed. I assume that 99% of the time that variable is greater than 100. You may need to divide it by some number to bring the scale down to a 0-100 range.
 
#5
Ok so I tried scaling it down with no effect
Code:
<Code>(A:ENG1 TORQUE, ft-lbs) 16.8 *</Code>
My max torque is 1,680 ft/lbs so my thinking was 16.8 ft/lbs per frame but I got the exact same response. I then tried 100 in place of 16.8 and still the same response so it must be something else. Is there a program to read the output data from the simulation so I could see the number its producing in raw form?
 
#6
You could use XML Tools, available in the Resources here to read that variable.

It has been a long time since I've used them, but I think what you would use is called FlightDataRecorder.

As you tagged this post P3DV3, that is the version of XML Tools that the link points to. There are other versions available.

Otherwise, it isn't hard to add a window to your panel and put an XML gauge on it to read variables like that.

Something like this: example.jpg
 

tgibson

Resource contributor
#7
I said you probably need to *divide* that variable so the result is in the range of 0-100. If your max torque is 1,680 ft-lbs, then you need to use

Code:
<Code>(A:ENG1 TORQUE, ft-lbs) 16.8 / </Code>
 
#8
Got it!! I'm sorry I misunderstood and i was looking at other gauges trying to understand my problem. My modeldef file was not overwriting for some reason and that was the problem the whole time. Noob mistake or not paying attention one. Anyway this works perfectly!
Code:
  <PartInfo>
    <Name>needle_torque</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:Turb Eng Max Torque Percent:1, percent)</Code>
      </Parameter>
    </Animation>
  </PartInfo>
Thanks for the help, if not for this site I would be really lost!
 
#9
It is insanely unlikely that the max needle deflection for the gauge is the 100% torque position. The red line is typically reached before the the limit of the needle movement.
 
#10
I agree and I have since discovered this, my redline is 1,680ft/lbs but by feathering the prop at full throttle I’ve got a max reading of 2,298ft/lbs. Now to figure out if I can just up my animation.


Sent from my iPhone using Tapatalk
 

tgibson

Resource contributor
#11
You shouldn't need to change your animation, just divide the new variable by a factor so it doesn't get to 100 at 2298 ft-lbs.
 
#12
I tested the the torque readings in game with a 2d gauge from another plane. I get 1680 at full throttle with the prop in high rpm but when I full feather the prop at full throttle the torque jumps to 2298. My gauge is only animated from 0- 1680ft/lbs as the real gauge in the plane is. Now I think I need it to go higher though. I’m trying to word this and explain in the proper way but not sure exactly how to lol.


Sent from my iPhone using Tapatalk
 
#14
I’m modeling the AT-402b but I’m using the 502B as a reference due to the 360 view of the cockpit. It’s 2500 ft/lbs. here’s the gauge.



Sent from my iPhone using Tapatalk
 
#16
Roy: PT6 engine... 680shp @ 2200rpm gives a torque of 1623 so I think he's close. However, that's not the actual issue.

dpturn1: 0 to 2500 torque means you take the actual torque value and divide by 2500. 0 = zero animation and 2500 = 100 animation.
 
#17
My gauge would then hit max torque (or the 1680 mark) at 2/3 throttle right? Is that normal for a turbo prop? I know you can over torque with one for sure but I’m not sure how much.


Sent from my iPhone using Tapatalk
 
#19
Your gauge would hit max torque at the red mark on the gauge... just like the real aircraft. That's all you care about with regards to making the gauge work.
 
Top