- Messages
- 231
- Country

I was trying to write an .xml turn coodinator gauge, using the stock Baron as my starting point. When I got to the point of writing the Rotate/Nonlinearity for the bank needle. I plotted the rotation as the tutoial instructed by overlaying the needle .bmp in place on top of the back gound .bmp and taking location info from the top left corner of the needle.bmp as I rotated it to the -1, -.5, 0, +.5, +1 locations. I punched the numbers in to my code and when I flight tested the gauge the needle starts out about -98 degrees out of top dead center of the gauge as in this pic:
Here is the code I wrote to produce the above gauge:
I had this same problem when writing the cage knob for the attitude gauge. I solved that by removing the Nonlinearity and just letting the Value control the cage knob.bmp. I tried the same thing with the bank needle.bmp and with a few adjusment I have it working perfectly now.
My question. What am I doing wrong with my Nonlinearity to throw the needle.bmp out of position? The needle seems to function correctly as far as movement goes when flight tested, it just does it from the -98 degree location. Am I taking my location data incorrectly? Is the Nonlinearity conflicting with the A
elta heading rate,rpm?
Carl
Here is the code I wrote to produce the above gauge:
Code:
<Gauge Name="f4u1 turn coordinator" Version="1.0">
<Image Name="f4u1_turn_coord_background.bmp"/>
<Element>
<Image Name="f4u1_Indicator_Ball_Icon.bmp">
<Axis X="31" Y="31"/>
</Image>
<Shift>
<Value Minimum="-1" Maximum="1">(A:Turn coordinator ball,position)</Value>
<Nonlinearity>
<Item Value="-1" X="92" Y="302"/>
<Item Value="0" X="227" Y="306"/>
<Item Value="1" X="362" Y="302"/>
</Nonlinearity>
<Delay PixelsPerSecond="60"/>
<Failures>
<GAUGE_TURN_COORDINATOR Action="Freeze"/>
</Failures>
</Shift>
</Element>
<Element>
<Position X="225" Y="410"/>
<Image Name="f4u1_bank_needle.bmp">
<Axis X="29.5" Y="370"/>
</Image>
<Rotate>
<Value Minimum="-1" Maximum="1">(A:Delta heading rate,rpm)</Value>
<Nonlinearity>
<Item Value="-0.5" X="140" Y="51"/>
<Item Value="0" X="197" Y="41"/>
<Item Value="0.5" X="254" Y="41"/>
</Nonlinearity>
<Delay PixelsPerSecond="90"/>
</Rotate>
</Element>
</Gauge>
I had this same problem when writing the cage knob for the attitude gauge. I solved that by removing the Nonlinearity and just letting the Value control the cage knob.bmp. I tried the same thing with the bank needle.bmp and with a few adjusment I have it working perfectly now.
My question. What am I doing wrong with my Nonlinearity to throw the needle.bmp out of position? The needle seems to function correctly as far as movement goes when flight tested, it just does it from the -98 degree location. Am I taking my location data incorrectly? Is the Nonlinearity conflicting with the A
Carl
Last edited:






