XML gauge: Shift and Rotation on Image causes wild distortion

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
rlipoff

XML gauge: Shift and Rotation on Image causes wild distortion

Postby rlipoff » Fri May 08, 2020 11:41 pm

I'm new to XML gauge design, but this one has me completely stumped. I have an ADI bitmap for an electronic flight display. If I apply a Shift (or variable vertical FloatPosition) for pitch, no problem. As soon as I add a rotation for bank though, I get bizarre distortion that happens with or without the Shift at any combination of bank and pitch, even straight and level. The screenshot has the ADI image on top for clarity (the rest of the gauge is unaffected), at about 35 degrees bank and 5 degrees pitch down. The original bitmap was 600x2400, but even cutting it in half to 600x1200 doesn't fix the problem.
I've tried all combinations of order in the code, even a separate element within an element, with the Shift or Rotation applied to the top level or next level element, but no change. Limiting the output to +/- pi or 2*pi had no effect. Changing <PointsTo> had no effect.
Do XML gauges just have a limit to how large an image can be to rotate before it can't handle it? Relevant XML is below.

Code: Select all

<?xml version="1.0" encoding="UTF-16"?> <SimGauge.Element id="ADI bmp"> <FloatPosition>282.000000,202.000000</FloatPosition> <Image id="ADI2.bmp" Name="ADI2.bmp"> <Axis>300.000000,600.000000</Axis> <Bright>True</Bright> <Bilinear>False</Bilinear> </Image> <Rotation id="Rotation"> <PointsTo>NORTH</PointsTo> <Expression id="Expression"> <Minimum>-3.141593</Minimum> <Maximum>3.141593</Maximum> <Script>(A:ATTITUDE INDICATOR BANK DEGREES, radians)</Script> </Expression> </Rotation> <Shift id="Shift"> <Scale>0.000000,1.000000</Scale> <Expression id="Expression"> <Script>(A:ATTITUDE INDICATOR PITCH DEGREES, degrees) 10 *</Script> </Expression> </Shift>
Image

For comparison, a different method using 2 rectangles and a line worked perfectly, but that makes showing pitch bars and numbers a lot more complicated.

Return to “Simulation Object Development Questions”

Who is online

Users browsing this forum: No registered users and 10 guests