PDA

View Full Version : Whiskey Compass: a question



Cees Donker
May 20th, 2021, 12:49
I want to use this gauge in a plane I'm building, but the strip shows too low. How do I change that? Is it even possible?
https://i.postimg.cc/jqZW8fSy/fokker-2021-may-20-004.jpg (https://postimg.cc/5jQNy6vt)

The code:
<Gauge Name="kompas" Version="1.0">
<Image Name="kompas_background.bmp"/>

<!-- ======================= Compass Strip ======================= -->
<Element>
<Position X="19" Y="14"/>
<MaskImage Name="kompas_window.bmp">
<Axis X="40" Y="0"/>
</MaskImage>
<Image Name="kompas_strip.bmp">
<Axis X="167" Y="0"/>
<Nonlinearity>
<Item Value="0" X="300" Y="0"/>
<Item Value="360" X="35" Y="0"/>
</Nonlinearity>
</Image>
<Shift>
<Value>(A:Wiskey compass indication degrees,degrees) dnor</Value>
<Failures>
<GAUGE_KOMPAS Action="Freeze"/>
</Failures>
</Shift>
<Shift>
<Value Minimum="-15" Maximum="15">(A:ATTITUDE INDICATOR PITCH DEGREES,degrees) /-/</Value>
<Scale Y="1.0"/>
<Nonlinearity>
<Item Value=" 15" X="0" Y="-26"/>
<Item Value=" 0" X="0" Y="0"/>
<Item Value="-15" X="0" Y="26"/>
</Nonlinearity>
</Shift>


<Rotate>
<Value Minimum="-30" Maximum="30">(A:Turn coordinator ball,degrees) </Value>
<Delay DegreesPerSecond="30" />
</Rotate>




</Element>

<!-- ======================= Tick Marks ========================= -->
<Element>
<Position X="59" Y="16"/>
<Image Name="kompas_line.bmp"/>
</Element>

<!-- ======================= Shadow ============================= -->
<Element>
<Position X="0" Y="0"/>
<Image Name="kompas_shadow.bmp" Alpha="Yes"/>
</Element>


<!-- ======================= Reflection ========================= -->
<Element>
<Position X="0" Y="0"/>
<Image Name="kompas_reflection.bmp" Alpha="Yes"/>
</Element>



<Mouse>
<Tooltip ID="TOOLTIPTEXT_WHISKEY_COMPASS"/>
</Mouse>
</Gauge>


:dizzy:

Cees

Cees Donker
May 20th, 2021, 20:49
I meant too high. Mustn't post things just before bed-time!

:biggrin-new:

Cees

Klein
May 20th, 2021, 21:28
Hello Cees
I'm not too familiar with XML gauges, so not sure that it has to be done, but you can try to increase the Y value:
<Element>
<Position X="19" Y="14"/>

Have a nice day, cheers
Martin :jump:

Cees Donker
May 20th, 2021, 21:48
Hello Cees
I'm not too familiar with XML gauges, so not sure that it has to be done, but you can try to increase the Y value:
<Element>
<Position X="19" Y="14"/>

Have a nice day, cheers
Martin :jump:
Thanks Martin. As they say: asking a question is answering that same question. I found a tutorial (simple) that explains xml gauge programming. And the value that must be increased is the other Y value:

<Element>
<Position X="19" Y="14"/>
<MaskImage Name="kompas_window.bmp">
<Axis X="40" Y="0"/>

https://i.postimg.cc/y8XX0DhJ/fokker-2021-may-21-001.jpg (https://postimg.cc/sMxhrDNy)

:untroubled:

Cees

Klein
May 20th, 2021, 22:21
Wonderfull Cees
I would be happy to know more about XML gauges, can you please send me the link to this tuto?

Cheers
Martin :jump:

Cees Donker
May 21st, 2021, 03:45
Off course:

XML Gauge Programming (fs2x.com) (http://www.fs2x.com/Tutorials_files/XML%20Gauge%20Programming%20for%20FS2004.%20Chapte r%201.%20Main%20Body%20Sections%20V2_0.pdf)

:encouragement:

Cees

Klein
May 21st, 2021, 09:30
Many thanks Cees
I dropped a quick eye on it, and it seems I'll find there an answer on how to do a 3D compass, reacting to pitch and bank, lovely!

Cheers
Martin :jump: