Hello everybody, first post over here and I'll get a chance to thank you all for all the help and good lessons in my trial and error adventure.
I have been modifying the default G1000 to fit the design of the one I use.
I am stuck at the fuel gauge, though, and it may be an easy fix, but after 3 days I just can't seem to find it.
My problem is that I need to change the size of a vertical bar, according to the amount of fuel in each tank. The 0 is in the bottom (so the bar would be 0 pixels) and the max is 60 USGAL, which conveniently, would be 60 pixels high.
What I am trying to achieve is the right. What I have is the left.
This is the code I have so far (really like the one from the default) and I manage to move the "indicator tip" as needed with the shift function.
If I try to put the size of a vertical line (<Height>(A:FUEL LEFT QUANTITY, gallons)</Height>) the bar doesn't show at all (I have tried formatting the variable to a decimal and floating point without success either).
Same if I try to do it with a Polygon and putting its upper Y's as the fuel quantity.
Thank you all for your help again!
I have been modifying the default G1000 to fit the design of the one I use.
I am stuck at the fuel gauge, though, and it may be an easy fix, but after 3 days I just can't seem to find it.
My problem is that I need to change the size of a vertical bar, according to the amount of fuel in each tank. The 0 is in the bottom (so the bar would be 0 pixels) and the max is 60 USGAL, which conveniently, would be 60 pixels high.
What I am trying to achieve is the right. What I have is the left.
This is the code I have so far (really like the one from the default) and I manage to move the "indicator tip" as needed with the shift function.
Code:
<Element id="Left indicator">
<FloatPosition>33.000,0.000</FloatPosition>
<Element id="White line">
<FloatPosition>0.000,0.000</FloatPosition>
<VerticalLine id="VerticalLine">
<Bright>True</Bright>
<Height>(A:FUEL LEFT QUANTITY, gallons)</Height>
<LineColor>White</LineColor>
<LineWidth>5</LineWidth>
</VerticalLine>
</Element>
<Shift id="Shift">
<Expression id="Expression">
<Script>(A:FUEL LEFT QUANTITY, gallons)</Script>
</Expression>
<NonlinearityTable id="NonlinearityTable">
<NonlinearityEntry id="60">
<ExpressionResult>60.000</ExpressionResult>
<FloatPosition>21.000,0.000</FloatPosition>
</NonlinearityEntry>
<NonlinearityEntry id="0">
<ExpressionResult>0.000</ExpressionResult>
<FloatPosition>21.000,60.000</FloatPosition>
</NonlinearityEntry>
</NonlinearityTable>
</Shift>
<Element id="Indicator tip">
<FloatPosition>0.000,0.000</FloatPosition>
<Polygon id="Polygon">
<Bright>True</Bright>
<FillColor>White</FillColor>
<FillColorScript>@FuelQty1Caution if{ 'Yellow' }
els{
@FuelQty1Warning if{ 'Red' }
els{ 'White' }
}</FillColorScript>
<LineWidth>1</LineWidth>
<LineColor>Black</LineColor>
<Point id="0, 0">
<FloatPosition>0.000,0.000</FloatPosition>
</Point>
<Point id="15, 0">
<FloatPosition>15.000,0.000</FloatPosition>
</Point>
<Point id="5, 8">
<FloatPosition>5.000,8.000</FloatPosition>
</Point>
<Point id="0, 8">
<FloatPosition>0,8.000</FloatPosition>
</Point>
</Polygon>
</Element>
</Element>
If I try to put the size of a vertical line (<Height>(A:FUEL LEFT QUANTITY, gallons)</Height>) the bar doesn't show at all (I have tried formatting the variable to a decimal and floating point without success either).
Same if I try to do it with a Polygon and putting its upper Y's as the fuel quantity.
Thank you all for your help again!

