Hi,
I'm new to creating gauges and have probably made a basic mistake but here goes.
I am creating a fuel quantity gauge using ace.exe and a background.bmp and needle.bmp.
I cannot get the gauage to register any fuel quantity, 800 gallons is loaded in the setup screen for, in this example, the 'left tank'.
I am using the following code generated through ace.exe:
=======================================
<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document
Type="AceXML"
version="1,0"
id="FuelQuantityLeftMain">
<Descr>AceXML Document</Descr>
<Filename>FuelQuantityLeftMain.xml</Filename>
<SimGauge.Gauge id="FuelQuantityLeftMain" ArtDirectory="D:\Program Files\FS Design Tools\New Gauges\EE_Lightning\">
<FloatPosition>30.000,30.000</FloatPosition>
<Image id="FuelQuantity_BG.bmp" Name="FuelQuantity_BG.bmp">
<Transparent>True</Transparent>
</Image>
<Element id="Needle_113_17">
<FloatPosition>100.000,100.000</FloatPosition>
<SizeScale>0.900</SizeScale>
<Image id="Needle_113_17.bmp" Name="Needle_113_17.bmp">
<Transparent>True</Transparent>
<Axis>13.000,8.500</Axis>
</Image>
<Rotation id="Rotation">
<Expression id="Rotation through max of 6.28318 minus ~1.04 radians">
<Script>(A:FUEL TANK LEFT MAIN LEVEL) 5.25 * 2.098 +</Script>
</Expression>
</Rotation>
</Element>
</SimGauge.Gauge>
</SimBase.Document>
============================
in (A:FUEL TANK LEFT MAIN LEVEL) 5.25 * 2.098 +
the 5.25 is the radians between enpty and full and the 2.098 is the radians offset to bring the needle from it's EAST direction to the empty position. (Needle is horizontal, sharp end to the right).
I believe that (A:FUEL TANK LEFT MAIN LEVEL) is a percentage output from FSX.
When I replace (A:FUEL TANK LEFT MAIN LEVEL) with a value 1 in the expression the needle drives round to Full in ace.exe but it doesn't respond to the (A:FUEL TANK LEFT MAIN LEVEL) data in the cockpit.
Any thoughts?
klem
I'm new to creating gauges and have probably made a basic mistake but here goes.
I am creating a fuel quantity gauge using ace.exe and a background.bmp and needle.bmp.
I cannot get the gauage to register any fuel quantity, 800 gallons is loaded in the setup screen for, in this example, the 'left tank'.
I am using the following code generated through ace.exe:
=======================================
<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document
Type="AceXML"
version="1,0"
id="FuelQuantityLeftMain">
<Descr>AceXML Document</Descr>
<Filename>FuelQuantityLeftMain.xml</Filename>
<SimGauge.Gauge id="FuelQuantityLeftMain" ArtDirectory="D:\Program Files\FS Design Tools\New Gauges\EE_Lightning\">
<FloatPosition>30.000,30.000</FloatPosition>
<Image id="FuelQuantity_BG.bmp" Name="FuelQuantity_BG.bmp">
<Transparent>True</Transparent>
</Image>
<Element id="Needle_113_17">
<FloatPosition>100.000,100.000</FloatPosition>
<SizeScale>0.900</SizeScale>
<Image id="Needle_113_17.bmp" Name="Needle_113_17.bmp">
<Transparent>True</Transparent>
<Axis>13.000,8.500</Axis>
</Image>
<Rotation id="Rotation">
<Expression id="Rotation through max of 6.28318 minus ~1.04 radians">
<Script>(A:FUEL TANK LEFT MAIN LEVEL) 5.25 * 2.098 +</Script>
</Expression>
</Rotation>
</Element>
</SimGauge.Gauge>
</SimBase.Document>
============================
in (A:FUEL TANK LEFT MAIN LEVEL) 5.25 * 2.098 +
the 5.25 is the radians between enpty and full and the 2.098 is the radians offset to bring the needle from it's EAST direction to the empty position. (Needle is horizontal, sharp end to the right).
I believe that (A:FUEL TANK LEFT MAIN LEVEL) is a percentage output from FSX.
When I replace (A:FUEL TANK LEFT MAIN LEVEL) with a value 1 in the expression the needle drives round to Full in ace.exe but it doesn't respond to the (A:FUEL TANK LEFT MAIN LEVEL) data in the cockpit.
Any thoughts?
klem

