# Multiple Analog Dials in a Screen, Coordinates?

#### lionheart

Hey guys,

I am having a heck of a time getting my dials to work right.

I tried writing the dial 'value' coordinates, (zero, thru 2000)from the Element location, based on the grid points on the artwork background bitmap, and also based on the Element location being 'in space', meaning, a coordinate being above that point is now a negative sum, and a value coordinate to the left of the Element coordinate is also a negative sum.

None of those 2 approaches work. I wonder what I am doing wrong, and I also need to know what the exact route is for making multiple analog gauges is on their system of coordinates for 'values'. (Is the first one right or the second one right?)

Here is the 4th Turbo Prop 'Prop RPM' or NP gauge so far.

Code:
``````  <Element>
<Position X="62" Y="172" />
<Image Name="EICAS_Triangle_Dial_large.bmp" Bright="Yes" Sizes="16,20">
<Axis X="8" Y="51" PointsTo="North"/>
</Image>
<Rotate>
<Value Minimum="0" Maximum="2000">(A:Prop1 RPM,RPM)</Value>
<Nonlinearity>
<Item Value="0" X="8" Y="-7" />
<Item Value="1300" X="16" Y="-52" />
<Item Value="2000" X="32" Y="-36" />
</Nonlinearity>
<Delay DegreesPerSecond="20" />
</Rotate>
</Element>``````

I would be greatful for any guru knowledge on this seemingly complex subject..

Bill
LHC

Last edited:

#### lionheart

Instudying this, and looking through other gauges, including the FSX coded Embrarier CAB folder/EIAS window gauge, I am seeing that others do not put in the following;

* PointsTo=North
* Coordinates.

They put in 'Points to' and have a degree coordinate?

And they put in degrees for the needle to spin, it looks like.

Is this proper in FS9?

Bill

#### n4gix

Resource contributor
Bill, see the composited screenshot below for how I would set up and calculate the coordinates for your gauge "needles."

Note that I created one needle with a "yellow diamond" 8,53 pixels. Note I also placed "Guidelines" in Photoshop to indicate the centerpoint of rotation for those "needles."

Using the cursor in Photoshop, I can see that the first needle's pivot point on the background will be precisely 56.5,54.5 (the needle's axis is 4,49).

The zero point for the top scale is 7,55 and the 100% point is 94,23. This provides enough information to write the first needle <Element>'s XML script. Keep in mind that these numbers are relative to the top left corner of the background image. The background image of course has it's own set of placement coordinates (which won't necessarily be the top left corner of its background image! (the G900's frame of course).

Code:
``````  <Element>
<Position X="62" Y="172" />
<Image Name="EICAS_background.bmp" Bright="Yes" Sizes="159,528">
</Image>
<!-- First Needle -->
<Element>
<Position X="56.5" Y="54.5" />
<Image Name="EICAS_needle.bmp" Bright="Yes" Sizes="8,53"
<Image>
<Axis X="4" Y="49" PointsTo="North"/>
<Rotate>
<Value Minimum="0" Maximum="2000">(A:Prop1RPM,RPM)
</Value>
<Nonlinearity>
<Item Value="0" X="7" Y="55" />
<Item Value="2000" X="94" Y="23" />
</Nonlinearity>
<Delay DegreesPerSecond="20" />
</Rotate>
</Element>
</Element>`````` Shot at 2008-06-11

Last edited:

#### lionheart

Time to call it a night.

Couldnt get it to work.

I tried other Varibles in that it was perhaps an A: factor concerning turbo props.. Nada. I tried moving sections around, rechecked coordinates, double checked them against yours.. nothing.. rewrote another fresh, nothing.. the gauge points to below zero point and stays there. Digital doesnt show a readout also, which makes me think is a turboprop issue via A: callup.

I inplaced gray 'duck' tape on my eyebrows in the hops that if they cannot see what is going on, (going wrong) that they will not gray so fast. However, saying that, I will have to 'pull' the duck tape off..... arrgh..

Yes.. I know.. its 'DUCT' tape, or

Code:
``<A:DUCT_TAPE, sticky>``

Bill

#### lionheart

Ok... A bit more progress.

My RPM dial is now working, but making multiple revolutions. I have tripple checked (actually 12 point checked) the code, found a couple of errors, and now its functioning. (I had an extra > in the Value section).

Here it is.. The 'spinning' dial.. Does about 4 or 5 revolutions.. arrghh.

Code:
``````<Element>
<Position X="55" Y="165"/>
<Image Name="EICAS_Triangle_Dial_large.bmp" Bright="Yes" Sizes="16,20">
<Axis X="4" Y="48" Faces="North"/>
</Image>
<Rotate>
<Item Value="    0" X="   7" Y="164"/>
<Item Value="2200" X="92" Y="136"/>
<Value Minimum="0" Maximum="2200">(A:Prop1 RPM,RPM)  </Value>
</Rotate>
</Element>``````

Any idea why this would be spinning wildly? The digital RPM shows its not going over 2,000 RPM, so 2200 RPM should be good. Also, its not the turbine RPM value, so that couldt be it. (The digital string is using the same Parameter).

Bill

#### lionheart

Well.. Still having odd issues. What a nightmare.

All coordinates are tripple checked and their value amounts also checked. Everything seems in order. They either spin several times in a row in one direction, or they read far outside their assigned parameters of Min. and Max.

Here is the gauge code for anyone that might be interested at taking a gander.

Code:
`````` <Element>
<Position X="55" Y="55" />
<Image Name="EICAS_Triangle_Dial_large.bmp" ImageSizes="16,20">
<Axis X="4" Y="48" PointsTo="North" />
</Image>
<Rotate>
<Value Minimum="0" Maximum="5000">(A:Eng1 torque,foot pounds)</Value>
<Nonlinearity>
<Item Value="0" X="92" Y="23" />
<Item Value="5000" X="8" Y="54" />
</Nonlinearity>
<Delay DegreesPerSecond="20" />
</Rotate>
</Element>

<!--  *******   TURBINE ENGINE ITT TEMP AREA    -->

<Element>
<Position X="55" Y="109"/>
<Image Name="EICAS_Triangle_Dial_large.bmp" Bright="Yes" Sizes="16,20">
<Axis X="4" Y="48" PointsTo="North"/>
</Image>
<Rotate>
<Item Value="    0" X="   7" Y="109"/>
<Item Value="2000" X="92" Y="79"/>
<Value>(A:TURB ENG1 ITT, celsius)</Value>
</Rotate>
</Element>

<!--  *******   PROP RPM NP AREA    -->

<Element>
<Position X="55" Y="165" />
<Image Name="EICAS_Triangle_Dial_large.bmp" ImageSizes="16,20">
<Axis X="4" Y="48" PointsTo="North" />
</Image>
<Rotate>
<Value Minimum="0" Maximum="2200">(A:Prop1 RPM,RPM)</Value>
<Nonlinearity>
<Item Value="0" X="92" Y="136" />
<Item Value="1100" X="42" Y="120" />
<Item Value="2200" X="8" Y="165" />
</Nonlinearity>
<Delay DegreesPerSecond="20" />
</Rotate>
</Element>

<!--  *******   TURBINE RPM NG% AREA    -->

<Element>
<Position X="55" Y="218"/>
<Image Name="EICAS_Triangle_Dial_large.bmp" Bright="Yes" Sizes="16,20">
<Axis X="4" Y="48" PointsTo="North"/>
</Image>
<Rotate>
<Item Value="    0" X="   7" Y="219"/>
<Item Value="150" X="92" Y="190"/>
<Value>(A:TURB ENG1 N2, percent)</Value>
</Rotate>
</Element>``````
Any clues? I am mystified on this.

Bill

#### n4gix

Resource contributor
Bill, I used the same variables as you specified, and it took about one-half hour to (re)create the artwork and set up the following XML script.

All that remains to be done is final calibration...

From your example above, you still don't seem to have grasped how to set up the coordinates properly.

I'm sending my "sample gauge" to you via email... Code:
``````<?xml version="1.0" encoding="utf-8"?>
<Gauge Name="EICAS_Popup" Version="1.0">
<Image Name="EICAS_background.bmp" ImageSizes="159,528"/>

<!-- ******* TURBINE ENGINE TORQUE AREA -->
<Element>
<Position X="55" Y="54"/>
<Image Name="EICAS_needle.bmp" PointsTo="North" ImageSizes="8,51">
<Axis X="4" Y="51"/>
</Image>
<Rotate>
<Value Minimum="0" Maximum="2500">(A:Eng1 torque,foot pounds)</Value>
<Nonlinearity>
<Item Value="0" X="7" Y="53"/>
<Item Value="2200" X="83" Y="14"/>
<Item Value="2500" X="92" Y="23"/>
</Nonlinearity>
<Delay DegreesPerSecond="5"/>
</Rotate>
</Element>

<!-- ******* TURBINE ENGINE ITT TEMP AREA -->
<Element>
<Position X="55" Y="109"/>
<Image Name="EICAS_needle.bmp" PointsTo="North" ImageSizes="8,51">
<Axis X="4" Y="51"/>
</Image>
<Rotate>
<Value Minimum="0" Maximum="5000">(A:TURB ENG1 ITT, celsius)</Value>
<Nonlinearity>
<Item Value="0" X="7" Y="110"/>
<Item Value="5000" X="92" Y="80"/>
</Nonlinearity>
<Delay DegreesPerSecond="5"/>
</Rotate>
</Element>

<!-- ******* PROP RPM NP AREA -->
<Element>
<Position X="55" Y="164"/>
<Image Name="EICAS_needle.bmp" PointsTo="North" ImageSizes="8,51">
<Axis X="4" Y="51"/>
</Image>
<Rotate>
<Value Minimum="0" Maximum="2200">(A:Prop1 RPM,RPM)</Value>
<Nonlinearity>
<Item Value="0" X="7" Y="164"/>
<Item Value="2200" X="92" Y="137"/>
</Nonlinearity>
<Delay DegreesPerSecond="5"/>
</Rotate>
</Element>

<!-- ******* TURBINE RPM NG% AREA -->
<Element>
<Position X="55" Y="220"/>
<Image Name="EICAS_needle.bmp" PointsTo="North" ImageSizes="8,51">
<Axis X="4" Y="51"/>
</Image>
<Rotate>
<Value Minimum="0" Maximum="150">(A:TURB ENG1 N2, percent)</Value>
<Nonlinearity>
<Item Value="0" X="7" Y="220"/>
<Item Value="150" X="92" Y="191"/>
</Nonlinearity>
<Delay DegreesPerSecond="5"/>
</Rotate>
</Element>
</Gauge>``````
EICAS_background.bmp EICAS_Needle.bmp  Shot at 2008-06-12

Last edited:

#### lionheart

Many thanks Fr. Bill,

From your coordinates and refinements, I was able to get them all calibrated and working in quick order. Many thanks. Thanks for your patience in working with me on this. I feel like a total kindergardner again. I love making mesh and painting textures, running business, but have never had to deal with gauges except for a landing gear gauge or a German vintage fuel gauge.

One of the things that really through me off on the coordinates issue were the Linear 'rail' gauges. They went in 'opposite' negative directions for some reason that I still havent figured out. (Perhaps a vista thing? surely not). But I assumed that it was sharing the coordinates use with the analogue gauges. (Only makes sense that the same gauges on a XML would have the same uses of coordinates), but not this time.

All working now. I might be able to sleep. Got the Torque set up and calibrated, all working properly.

Thanks a Zillion!! May your patient act of kindness come back to you ten fold.

Bill
LHC