PA-30 Twin Comanche Gauges
PA-30 Twin Comanche Gauges
How's it going,
Could someone help me, I'm trying to make a Fuel Flow instrument from a Piper PA-30 Twin Comanche, but I can't understand very well the process of creating an instrument, could someone help me?
Could someone help me, I'm trying to make a Fuel Flow instrument from a Piper PA-30 Twin Comanche, but I can't understand very well the process of creating an instrument, could someone help me?
Re: PA-30 Twin Comanche Gauges
Search for an obscure new website called youtube, then search for Air Manager, then watch ALL the videos, yes yes, some are REALLY boring with too many 'errrs' in, but you will learn something. Then read through the forums here, then look at some sample instruments.. that should keep you occupied for a while
Joe. CISSP, MSc.
Re: PA-30 Twin Comanche Gauges
It would indeed be good to try most of it yourself, so you learn how it works. And realize that it isn't hard but just takes time
What do you have so far? Images?
What do you have so far? Images?
Re: PA-30 Twin Comanche Gauges
ok, now i have the images and i am trying with part of the code taking as an example a normal fuel flow meter
Re: PA-30 Twin Comanche Gauges
and if I'm watching all the videos
-
- Posts: 5336
- Joined: Thu Jul 27, 2017 12:22 am
Re: PA-30 Twin Comanche Gauges
Here's a sample one from Milviz :
a very similar from Air Manager Online Store download, is this one from William Hayes :
Code: Select all
---------------------------------------------
-- Properties --
---------------------------------------------
prop_BG = user_prop_add_boolean("Background Display", true, "Display background")
-------------------------------------
-- Load and display images --
-------------------------------------
if user_prop_get(prop_BG) then
img_add_fullscreen("fuel_flow_bg.png")
end
img_add_fullscreen("fuel_flow_gauge.png")
pointer1 = img_add("pointer.png", 239, 60, 34, 204)
pointer2 = img_add("pointer.png", 239, 60, 34, 204)
rotate(pointer1, 188.4, 17, 194, 0)
rotate(pointer2, 171.6, 17, 194, 0)
img_add_fullscreen("black_bar_overlay.png")
-------------------------------------
-- Rotate Needles --
-------------------------------------
function ff_data(ff_1, ff_2)
calc_ff_1 = 188.4 + ((0.0162 * ff_1^3) - (0.0646 * ff_1^2) + (4.386 * ff_1))
calc_ff_2 = 171.6 - ((0.0162 * ff_2^3) - (0.0646 * ff_2^2) + (4.386 * ff_2))
rotate(pointer1, calc_ff_1, 17, 194, 0)
rotate(pointer2, calc_ff_2, 17, 194, 0)
end
function ff_data_xpl(xpl_data)
ff_1 = ((xpl_data[1] * 3600 * 2.20462) / 6.01) --convert xpl data in kg per sec to gal per hour
ff_2 = ((xpl_data[2] * 3600 * 2.20462) / 6.01) --convert xpl data in kg per sec to gal per hour
calc_ff_1 = 188.4 + ((0.0162 * ff_1^3) - (0.0646 * ff_1^2) + (4.386 * ff_1))
calc_ff_2 = 171.6 - ((0.0162 * ff_2^3) - (0.0646 * ff_2^2) + (4.386 * ff_2))
rotate(pointer1, calc_ff_1, 17, 194, 0)
rotate(pointer2, calc_ff_2, 17, 194, 0)
end
-------------------------------------
-- Data Subscription --
-------------------------------------
fsx_variable_subscribe("ENG FUEL FLOW GPH:1", "Gallons per hour",
"ENG FUEL FLOW GPH:2", "Gallons per hour", ff_data)
fs2020_variable_subscribe("ENG FUEL FLOW GPH:1", "Gallons per hour",
"ENG FUEL FLOW GPH:2", "Gallons per hour", ff_data)
xpl_dataref_subscribe("sim/flightmodel/engine/ENGN_FF_","FLOAT[8]", ff_data_xpl)
Re: PA-30 Twin Comanche Gauges
What's up, I couldn't find the images so I started to create them in inkscape, I share them below, then I export it to PNG and when I run the images it gives me a blank instrument, any suggestion what it could be?
-
- Posts: 5336
- Joined: Thu Jul 27, 2017 12:22 am
Re: PA-30 Twin Comanche Gauges
Could you please, post your script code between code tags, so we can help further ?
For code tags reference and usage : https://siminnovations.com/forums/viewt ... 094#p49094
Re: PA-30 Twin Comanche Gauges
Code: Select all
-- Gauge FUEL FLOW Twin Comanche (c) JDLEONR
img_add_fullscreen("FuelFlow.png")
img_add_fullscreen("NeedleLeft.png")
img_add_fullscreen("NeedleRigth.png")
function ff_data(ff_1, ff_2)
calc_ff_1 = 188.4 - ((0.0162 * ff_1^3) - (0.0646 * ff_1^2) + (4.386 * ff_1))
calc_ff_2 = 171.6 + ((0.0162 * ff_2^3) - (0.0646 * ff_2^2) + (4.386 * ff_2))
rotate(NeedleLeft.png)
rotate(NeedleRigth.png)
end
-------------------------------------
-- Data Subscription --
-------------------------------------
fsx_variable_subscribe("ENG FUEL FLOW GPH:1", "Gallons per hour",
"ENG FUEL FLOW GPH:2", "Gallons per hour", ff_data)
fs2020_variable_subscribe("ENG FUEL FLOW GPH:1", "Gallons per hour",
"ENG FUEL FLOW GPH:2", "Gallons per hour", ff_data)