Page 1 of 1

XML gauge: Shift and Rotation on Image causes wild distortion

Posted: Fri May 08, 2020 11:41 pm
by rlipoff
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">
    <Image id="ADI2.bmp" Name="ADI2.bmp">
    <Rotation id="Rotation">
        <Expression id="Expression">
            <Script>(A:ATTITUDE INDICATOR BANK DEGREES, radians)</Script>
    <Shift id="Shift">
        <Expression id="Expression">
            <Script>(A:ATTITUDE INDICATOR PITCH DEGREES, degrees) 10 *</Script>

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.