Realair Turbine Duke gauge help

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
User avatar
shadyowl2
Posts: 176
Joined: Tue Dec 08, 2015 5:06 pm

Realair Turbine Duke gauge help

#1 Post by shadyowl2 »

Here we go again lol...This is a good one for you all. I'm creating gauges for the Turbine Duke from RealAir and having a problem with the engine torque. It is incorrect between my gauge and the vc gauge. In doing testing and research, it does not use lvars but fsx coding plus from what it looks like a variable of there own if I'm reading it correctly.

Here is what I've found from there coding. For torque on engine 1 they use A:ENG TORQUE:1, ft-lbs) 12 * 14 / 1260. now on the gauge it shows max of 2000 ft-lbs. How can I code it to read correctly. Rotation is correct, it probably has to do with there coding addition the 12 *14. Here is my code below. Any help guys would be appreciated.

Code: Select all

--Engine1 Torque--
function new_trq1(trq1)
trq1 = var_cap(trq1, 0, 2000)

img_rotate(img_needle1, 244/2000 *trq1 -122 )
trq1_text = var_round(trq1,0)
txt_set(txt_trq1,trq1_text)
end



fsx_variable_subscribe("ENG TORQUE:1", "foot pounds", new_trq1)
Attachments
background.png
background.png (33.36 KiB) Viewed 3840 times
OORAH!!!! Its a Marine Thing....USMC retired

JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: Realair Turbine Duke gauge help

#2 Post by JackZ »

Hello
What are the raw values currently returned by FSX?
You can check them using the viewer icon in the Create/Edit tab.
Are they in the 0 -2000 range?

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
shadyowl2
Posts: 176
Joined: Tue Dec 08, 2015 5:06 pm

Re: Realair Turbine Duke gauge help

#3 Post by shadyowl2 »

They do fall within that range yes. The gauge works but the readings are off. :?
OORAH!!!! Its a Marine Thing....USMC retired

User avatar
Crashtender
Posts: 127
Joined: Fri Dec 18, 2015 10:24 am

Re: Realair Turbine Duke gauge help

#4 Post by Crashtender »

-
Last edited by Crashtender on Wed Jun 08, 2016 7:36 am, edited 2 times in total.
A day not flown is a day not crashed...

JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: Realair Turbine Duke gauge help

#5 Post by JackZ »

Sorry, but without more details, we won't be able to help you further. I don't understand what "off values" mean.

For an FSX torque of 0 (in the viewer) what is the value indicated by your gauge?
For a torque of 2000(if able) ? For a torque of 1200?

1- is your needle's original position upright(pointing up)? The rotation needed will be different (hence the formula) if the needle is pointing somewhere else
2- the starting rotation angle value (for a torque of 0) in a case of a needle upright should be around 230/240 degrees: if we consider trq1=0 then you formula should return 244/2000*0-122 -->-122 degrees which is correct (-120 equals +240)
3-the max rotation angle value(for a torque of 2000) should be around 120 degrees
In your formula 244/2000*2000-122 should yield 122 which is correct. Provided that the multiplication is done BEFORE the addition
To make sure there is no operator precedence mismatch, could you try the formula with braces?
Insert braces as follow in your code:

(244/2000*trq1)-122

Let us know if this is better

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
shadyowl2
Posts: 176
Joined: Tue Dec 08, 2015 5:06 pm

Re: Realair Turbine Duke gauge help

#6 Post by shadyowl2 »

JackZ wrote:Sorry, but without more details, we won't be able to help you further. I don't understand what "off values" mean.

For an FSX torque of 0 (in the viewer) what is the value indicated by your gauge?
For a torque of 2000(if able) ? For a torque of 1200?

1- is your needle's original position upright(pointing up)? The rotation needed will be different (hence the formula) if the needle is pointing somewhere else
2- the starting rotation angle value (for a torque of 0) in a case of a needle upright should be around 230/240 degrees: if we consider trq1=0 then you formula should return 244/2000*0-122 -->-122 degrees which is correct (-120 equals +240)
3-the max rotation angle value(for a torque of 2000) should be around 120 degrees
In your formula 244/2000*2000-122 should yield 122 which is correct. Provided that the multiplication is done BEFORE the addition
To make sure there is no operator precedence mismatch, could you try the formula with braces?
Insert braces as follow in your code:

(244/2000*trq1)-122

Let us know if this is better

Jacques

Let me see if I can better explain my problem. My gauge calculations and rotations are correct, There is no error. The issue is that realair uses not only standard fsx values ie (A:ENG TORQUE:1, ft-lbs) but they also use and this is right from there xml coding (A:ENG TORQUE:1, ft-lbs) 12 * 14 / 1260.) and they do not use LVARS variables. Where the (off values mean) is that the vc cockpit gauge and my coded gauge the readings differ. I think it has something to do with there xml. They use stock fsx torque but that 12*14/1260 has to be causing the error.
OORAH!!!! Its a Marine Thing....USMC retired

JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: Realair Turbine Duke gauge help

#7 Post by JackZ »

Reverse engineering of an XML gauge is out of my field of knowledge, sorry!
But I don't catch it: if you say that the Real Air Duke uses the standard FSX torque, what is the use of using Their calculated value?
Do you mean that the returned torque value by FSX doesn't match what is indicated by the Real air gauge?
In that case, what you can do is a simple table, with two columns: one for Fsx value that you get from the viewer, the other for the indicated torque by the RealAir gauge.
Hopefully the progression should be linear and the formulae easily guessed.
Another hint could be a change in units between the gauges such as Lbs moved to Newtons or Kilograms....

Other than that I'm out of ideas, sorry

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
shadyowl2
Posts: 176
Joined: Tue Dec 08, 2015 5:06 pm

Re: Realair Turbine Duke gauge help

#8 Post by shadyowl2 »

I tried to get some answer's from realair but they will not release anything. I don't know why they use this value in there xml.
That is exactly it, returned torque value by FSX doesn't match what is indicated by the Real air gauge. Changing the values will not help because it is in ft-lbs. Can you explain this table with two columns?
OORAH!!!! Its a Marine Thing....USMC retired

JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: Realair Turbine Duke gauge help

#9 Post by JackZ »

The idea is to just record some couple of values in a table:
First the FSX torque value, second the corresponding Duke Value.
For as much as values as possible (minimum 4), so we can see the differential. Try with a FSX value of 0 (no torque) up to the FSX max value, with at least 3 values in between.

Fsx torque. | RealAir indicated torque
-------------------------------------------------
0.00 | (Indicated value)
500.00 | (indicated value)
. | (indicated value)
. | (indicated value)
2000.00. | (indicated value)

Etc....
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
shadyowl2
Posts: 176
Joined: Tue Dec 08, 2015 5:06 pm

Re: Realair Turbine Duke gauge help

#10 Post by shadyowl2 »

Away from the computer today but I'll report what I find and post...Thanks JackZ :D
OORAH!!!! Its a Marine Thing....USMC retired

Post Reply