Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
My First Gauges (Read 304 times)
Apr 14th, 2009 at 8:25am

Alejandro Rojas L.   Ex Member
I Love Simviation.

*
 
with the teaching of the guy who made the gauges of the 727(AceHawk) ,I have made some gauges pointed in the Show below
Eventhough they are so primitive and simple ,I ask Like in the VC anti thief VC link XML part  ,Is there a way to link this *.CAB to works only in this cockpit? like add a string in a hidden place of the xml document or something attach to the VC ..  I've seen it

and why doesn't work properly none of them in FS Panel Studio for FSX Undecided ,they are fine inside FSX........



     ...



« Last Edit: Apr 14th, 2009 at 1:56pm by Alejandro Rhodes »  
IP Logged
 
Reply #1 - Apr 14th, 2009 at 5:40pm

Alejandro Rojas L.   Ex Member
I Love Simviation.

*
 
Please let me share this   Cheesy God I so happy , "Acehawk" Its sending me since yesterday in My double own language 1 its Spanish, and 2nd Its Not too technical Long Types of information ,a tutorial in a popular lenguage ,You know I never went to college what I want to say I'm not good in tecnical lenguage even in my own lenguage..and worth if is C++

,is like street language

This is one of my dream and it seems its becoming true Make my own gauges wow!!

I have always ask for help when its about to add XML new parts to the modeldef.xml and always someone very special comes to my help ,I didn't knew what was "Bool" which is a simple Boolean is a variable that can have two values like On and off on=1 off=0 for a switch for christ sake.. Huh

 

Shocked , I just made the mask with 1,1,1, and 0,0,0 to place the indicator bars ,Right Now I just knew how to move an object without being a bar (my God the text string gauge are the most easy thing in this world,and you can change the colors ,Fonts etc size whatever BTW) I just set the OIL PSI with no accurate presition  ,but I calculate the same reading as the lear45 and some of the default similar model (This is a complex Gauge) Shocked and I'm just a learning ...I feel like the first time I made that Old 717 here .,remember I went like crazy ,well I'm crazy but more that the usual levels  Grin

the Oil psi ,while engines are being shutting down

...

I didn't knew there's no need to use the mask but i will leave it like that , but now at this moment working in the oil Temp

Code:
<Element>
	   <Position X="0" Y="0"></Position>
	   <MaskImage Name="EICAS_Mask.bmp" ImageSizes="530,560">
		<Axis X="446" Y="106"></Axis>
	   </MaskImage>
	   <Image Name="EICAS_eng1_oil_pressure.bmp" Bright="Yes" ImageSizes="12,22">
		<Axis X="0" Y="3"></Axis>
		<Nonlinearity>
		   <Item Value="0" X="0" Y="0"></Item>		    
		   <Item Value="100" X="0" Y="50"></Item>		  
		   <Item Value="300" X="0" Y="100"></Item>		  
		   <Item Value="500" X="0" Y="200"></Item>		  
		   <Item Value="700" X="0" Y="500"></Item>		  
		   <Item Value="800" X="0" Y="700"></Item>
		   <Item Value="900" X="0" Y="1000"></Item>
		</Nonlinearity>
	   </Image>
	   <Shift>
		<Value Minimum="0" Maximum="900">(A:General eng1 oil pressure, psi)</Value>
   		   </Shift>    
	</Element>
	 <Element>
	   <Position X="0" Y="0"></Position>
	   <MaskImage Name="EICAS_Mask.bmp" ImageSizes="530,560">
		<Axis X="470" Y="106"></Axis>
	   </MaskImage>
	   <Image Name="EICAS_eng2_oil_pressure.bmp" Bright="Yes" ImageSizes="12,22">
		<Axis X="0" Y="3"></Axis>
		<Nonlinearity>
		   <Item Value="0" X="0" Y="0"></Item>		    
		   <Item Value="100" X="0" Y="50"></Item>		  
		   <Item Value="300" X="0" Y="100"></Item>		  
		   <Item Value="500" X="0" Y="200"></Item>		  
		   <Item Value="700" X="0" Y="500"></Item>		  
		   <Item Value="800" X="0" Y="700"></Item>
		   <Item Value="900" X="0" Y="1000"></Item>
		</Nonlinearity>
	   </Image>
	   <Shift>
		<Value Minimum="0" Maximum="900">(A:General eng2 oil pressure, psi)</Value>
   		   </Shift>    
	</Element>  





This is something in my life very important ,I can only share with the people who has teach me the 99% of modeling ,that Now I can be my own Gauge programer  Cheesy
 
IP Logged
 
Reply #2 - Apr 14th, 2009 at 6:06pm

Brett_Henderson   Offline
Colonel
EVERY OUTER MARKER SHOULD
BE AN NDB

Gender: male
Posts: 3593
*****
 
YaY  Smiley   

Now I know who to ask, when I need a special gauge  Cool
 
IP Logged
 
Reply #3 - Apr 14th, 2009 at 6:37pm

Alejandro Rojas L.   Ex Member
I Love Simviation.

*
 
Brett_Henderson wrote on Apr 14th, 2009 at 6:06pm:
YaY  Smiley  

Now I know who to ask, when I need a special gauge  Cool



Tongue






Grin  Wink
 
IP Logged
 
Reply #4 - Apr 15th, 2009 at 2:13pm

scalper_old   Offline
Colonel

Posts: 1466
*****
 
Right on!. Master Builder in the making.
 
IP Logged
 
Reply #5 - Apr 17th, 2009 at 5:56am
fabian_e   Ex Member

 
You rock  Cool
 
IP Logged
 
Reply #6 - Apr 17th, 2009 at 7:38pm

Alejandro Rojas L.   Ex Member
I Love Simviation.

*
 
Thanks guys

I'm almost done with the EICAS , I just find out that I'm learning XML in the FS2004 way (which obviously works perfect in FSX) ,I still don't understand these people from Aces , I read the new XML and they are much complicated I was/still trying to finish to put a warning data screen in the eicas lcd but so far I can't understand the new Stupid and complicated format ,I have done almost everything,I was trying By looking in the Lear45 LEARN because I?m in level 7% I need to get to level 100% to be One Bill Leaming , So in the learning to to gauges ,I'm a newbie and I need to see other gauges a lot to learn

     ...

It won't be like the paywares versions (Not Multi screen things ) But in normal it will do all the real life Citation X does or Show..

I still Just don't get it the old XML format works fine the 100% of the people which are making gauges still are working on this code ,Why is so different? ,Do I have to make all the drawings in Photo shop and mask them each to use that stupid tool psd2xml.exe .. Angry


and BTW I'm going to have to install FS9-SDK Maybe the variable list are more understandably than the one in Not alphabetic orther  Angry
 
IP Logged
 
Reply #7 - Apr 17th, 2009 at 10:12pm

Fr. Bill   Offline
Colonel
I used to have a life;
now I have GMax!
Hammond, IN

Gender: male
Posts: 962
*****
 
Alex, my advice is to simply forget all about the "new FSX XML schema" altogether.  There's not enough "new stuff" in it to make it worth the bother...

The way the Lear45 uses a structured, formatted string for the EICAS messages is simply brilliant...

I've always used that format...

Here for example is a version I've scripted for the B787 MFD/EICAS gauge I've been working on. Note that each "message" is on it's own line, and has its own "conditions" for display.

Because this is a single "string" everything gets drawn (or not) every gauge cycle. Every line begins and ends with the % symbol. Just before the % symbol at the end of the line, the \n symbols are placed. This means "new line" and acts like the Enter key on your keyboard.

Note that three separate colors are used. The primary color of RED is in the <FormattedText... declaration, and two substitute colors (Yellow and White) are also declared.  The \{clr2} and \{clr3} tokens activate the two alternate colors where needed.


Code:
<!-- XXXXXXXXXXXXXXXXXXXXXXXXX EICAS MESSAGES XXXXXXXXXXXXXXXXXXXXXXXXXX -->
<!-- High Priority at top are Red, Medium Priority are Yellow, Low Priority are White -->
<Element>
	<Position X="730" Y="56"/>
	<FormattedText X="182" Y="210" Font="Arial Bold" FontSize="16" Adjust="Left" Color="#DE243B" VerticalAdjust="Center" Bright="Yes">
		<Color Value="#ECB226"/>
		<Color Value="#FFFFFF"/>
		<String>

			%((A:AUTOPILOT MASTER,bool) 0 ==)%{if}AUTOPILOT DISC\n%{end}
			%((L:Fire_Eng1_Warning) 1 ==)%{if}L FIRE\n%{end}
			%((L:Fire_Eng2_Warning) 1 ==)%{if}R FIRE\n%{end}
			%((L:Fire_Apu_Warning) 1 ==)%{if}APU FIRE DET\n%{end}
			%((L:OilPressure_Eng1_Warning) 1 ==)%{if}L OIL PRESS LOW\n%{end}
			%((L:OilPressure_Eng2_Warning) 1 ==)%{if}R OIL PRESS LOW\n%{end}


			\{clr2}
			%((A:AUTOPILOT AIRSPEED HOLD,bool) 0 ==)%{if}AUTOTHROTTLE DISC\n%{end}
			%((L:FuelPressure_Eng1_Warning) 1 ==)%{if}L FUEL PRESS LOW\n%{end}
			%((L:FuelPressure_Eng2_Warning) 1 ==)%{if}R FUEL PRESS LOW\n%{end}
			%((A:Spoilers Left Position,percent) (A:Spoilers Right Position,percent) + 0 &gt;
				(A:Sim On Ground,bool) &amp;&amp; s0
				(A:General Eng Throttle Lever Position:1,percent) (A:General Eng Throttle Lever Position:2,percent) + 2 /
				82.0 &gt; l0 &amp;&amp;)%{if}SPOILERS EXT\n%{end}
			%((L:Gear_Warning) 1 ==)%{if}GEAR\n%{end}
			%((L:FuelQty_LeftTank_Caution) 1 ==)%{if}L FUEL QTY LOW\n%{end}
			%((L:FuelQty_RightTank_Caution) 1 ==)%{if}R FUEL QTY LOW\n%{end}
			%((L:FuelImbalance_Caution) 1 ==)%{if}FUEL IMBALANCE\n%{end}
			%((L:FuelXFeed_Caution) 1 == )%{if}FUEL XFLO\n%{end}
			%((L:BrakeAcumPress_Caution) 1 == )%{if}BRAKE ACUM PRESS\n%{end}
			%((L:GenFail_Eng1_Caution) 1 == )%{if}L GEN FAIL\n%{end}
			%((L:GenFail_Eng2_Caution) 1 == )%{if}R GEN FAIL\n%{end}
			%((A:Spoilers Left Position,percent) (A:Spoilers Right Position,percent) + 0 &gt;
				(A:Sim On Ground,bool) ! &amp;&amp;
				(A:Trailing edge flaps0 left angle, degrees) 3.0 &gt; &amp;&amp;)%{if}SPOILERS EXT\n%{end}
			%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) ! &amp;&amp;)%{if}L ICE DETECTED\n%{end}
			%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) ! &amp;&amp;)%{if}R ICE DETECTED\n%{end}


			\{clr3}
			%((A:Turb Eng1 Vibration,number) 4.0 &gt;)%{if}L ENG VIB MON\n%{end}
			%((A:Turb Eng2 Vibration,number) 4.0 &gt;)%{if}R ENG VIB MON\n%{end}
			%((A:General Eng Fuel Pump On:1,bool))%{if}L STBY PUMP ON\n%{end}
			%((A:General Eng Fuel Pump On:2,bool))%{if}R STBY PUMP ON\n%{end}
			%((A:Hydraulic Pressure:1,PSF) 28800 &lt;)%{if}L HYD PUMP LOW\n%{end}
			%((A:Hydraulic Pressure:2,PSF) 28800 &lt;)%{if}R HYD PUMP LOW\n%{end}
			%((A:Spoilers Armed,bool))%{if}AUTOSPLR ARMED\n%{end}
			%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) &amp;&amp;)%{if}L ICE DETECTED\n%{end}
			%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) &amp;&amp;)%{if}R ICE DETECTED\n%{end}
			%((A:Exit Open:0,bool) (A:Sim On Ground,bool) &amp;&amp;) %{if}ENTRY DOOR\n%{end}
		</String>
	</FormattedText>
</Element>
 

« Last Edit: Apr 18th, 2009 at 9:47am by Fr. Bill »  

Bill
... Gauge Programming - 3d Modeling Eaglesoft Development Group Intel Core 2 Quad Q6600-4GB DDR2 Crucial PC6400-800 GB SATA-ATI Radeon HD2400 Pro 256MB DX10 NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
...
IP Logged
 
Reply #8 - Apr 18th, 2009 at 7:09am

Alejandro Rojas L.   Ex Member
I Love Simviation.

*
 
I don't get it  Undecided in  the lear45 every line  also ends with  % and {end} also are in a single line ,but too long to be shown in {code} mode ,this is the original scheme of the lear45 I have adapted to the old way (The way I'M learning) Could Be that you're specifying
           <Color Value="#ECB226"/>
           <Color Value="#FFFFFF"/>  ???? But as far I can see the string are the same build

also I see you make it much more simple ,but I can't too much different in your string from the one in the lear enogh not to show anything at all from all the rehearsals I made  Undecided

well I didn't have successful,

Code:
<Element id="All text">
	  <FloatPosition>166.000,30.000</FloatPosition>
	  <GaugeText id="Text">
	    <Bold>True</Bold>
	    <Bright>True</Bright>
	    <FontFace>Arial</FontFace>
	    <FontColor>#DE243B</FontColor>
	    <FontHeight>8</FontHeight>
	    <GaugeString>%((L:Fire_Eng1_Warning) 1 ==)%{if}L FIRE\n%{end}
%((L:Fire_Eng2_Warning) 1 ==)%{if}R FIRE\n%{end}
%((L:Fire_Apu_Warning) 1 ==)%{if}APU FIRE DET\n%{end}
%((L:OilPressure_Eng1_Warning) 1 ==)%{if}L OIL PRESS LOW\n%{end}
%((L:OilPressure_Eng2_Warning) 1 ==)%{if}R OIL PRESS LOW\n%{end}
\{clr2}
%((L:FuelPressure_Eng1_Warning) 1 ==)%{if}L FUEL PRESS LOW\n%{end}
%((L:FuelPressure_Eng2_Warning) 1 ==)%{if}R FUEL PRESS LOW\n%{end}
%((A:Spoilers Left Position,percent) (A:Spoilers Right Position,percent) + 0 &gt;
    (A:Sim On Ground,bool) &amp;&amp; s0
    (A:General Eng Throttle Lever Position:1,percent) (A:General Eng Throttle Lever Position:2,percent) + 2 /
    82.0 &gt; l0 &amp;&amp;)%{if}SPOILERS EXT\n%{end}
%((L:Gear_Warning) 1 ==)%{if}GEAR\n%{end}
%((L:FuelQty_LeftTank_Caution) 1 ==)%{if}L FUEL QTY LOW\n%{end}
%((L:FuelQty_RightTank_Caution) 1 ==)%{if}R FUEL QTY LOW\n%{end}
%((L:FuelImbalance_Caution) 1 ==)%{if}FUEL IMBALANCE\n%{end}
%((L:FuelXFeed_Caution) 1 == )%{if}FUEL XFLO\n%{end}
%((L:BrakeAcumPress_Caution) 1 == )%{if}BRAKE ACUM PRESS\n%{end}
%((L:GenFail_Eng1_Caution) 1 == )%{if}L GEN FAIL\n%{end}
%((L:GenFail_Eng2_Caution) 1 == )%{if}R GEN FAIL\n%{end}
%((A:Spoilers Left Position,percent) (A:Spoilers Right Position,percent) + 0 &gt;
    (A:Sim On Ground,bool) ! &amp;&amp;
    (A:Trailing edge flaps0 left angle, degrees) 3.0 &gt; &amp;&amp;)%{if}SPOILERS EXT\n%{end}
%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) ! &amp;&amp;)%{if}L ICE DETECTED\n%{end}
%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) ! &amp;&amp;)%{if}R ICE DETECTED\n%{end}
\{clr3}
%((A:Turb Eng1 Vibration,number) 4.0 &gt;)%{if}L ENG VIB MON\n%{end}
%((A:Turb Eng2 Vibration,number) 4.0 &gt;)%{if}R ENG VIB MON\n%{end}
%((A:General Eng Fuel Pump On:1,bool))%{if}L STBY PUMP ON\n%{end}
%((A:General Eng Fuel Pump On:2,bool))%{if}R STBY PUMP ON\n%{end}
%((A:Hydraulic Pressure:1,PSF) 28800 &lt;)%{if}L HYD PUMP LOW\n%{end}
%((A:Hydraulic Pressure:2,PSF) 28800 &lt;)%{if}R HYD PUMP LOW\n%{end}
%((A:Spoilers Armed,bool))%{if}AUTOSPLR ARMED\n%{end}
%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) &amp;&amp;)%{if}L ICE DETECTED\n%{end}
%((A:Structural Ice Pct,percent) 0 &gt; (A:Structural Deice Switch,bool) &amp;&amp;)%{if}R ICE DETECTED\n%{end}
%((A:Exit Open:0,bool) (A:Sim On Ground,bool) &amp;&amp;) %{if}ENTRY DOOR\n%{end}
</GaugeString>
	    <Size>80,150</Size>
	    <Transparent>True</Transparent>
	    <AlternateColor id="AlternateColor">
		<FontColor>#ECB226</FontColor>
	    </AlternateColor>
	    <AlternateColor id="AlternateColor">
		<FontColor>White</FontColor>
	    </AlternateColor>
	  </GaugeText>
	</Element> 




and Now I just set your lines and Roll Eyes

...

May I use it?  Roll Eyes =®<---you know


Alex



« Last Edit: Apr 18th, 2009 at 8:15am by Alejandro Rhodes »  
IP Logged
 
Reply #9 - Apr 18th, 2009 at 9:46am

Fr. Bill   Offline
Colonel
I used to have a life;
now I have GMax!
Hammond, IN

Gender: male
Posts: 962
*****
 
Of course you can use what I posted, Alex. All I did was reformat the Lear45 example so that each "message" is on a separate line in the script so that it would be easier to read!  Shocked

Well, I also added a few "messages" that I needed for my project, but that's trivial.

By the way, remove the //comments from the script! I only put them in my example post to make it clear where the "color changes" were in the script...  Grin
 

Bill
... Gauge Programming - 3d Modeling Eaglesoft Development Group Intel Core 2 Quad Q6600-4GB DDR2 Crucial PC6400-800 GB SATA-ATI Radeon HD2400 Pro 256MB DX10 NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
...
IP Logged
 
Reply #10 - Apr 18th, 2009 at 6:46pm

Alejandro Rojas L.   Ex Member
I Love Simviation.

*
 
Fr. Bill wrote on Apr 18th, 2009 at 9:46am:
By the way, remove the //comments from the script! I only put them in my example post to make it clear where the "color changes" were in the script...  Grin


Thanks Bill ,I guess this eicas is done ,YES ,I wipe out the comments and change AUTOPĚLOT DISC for DISANGAGE .. Wink

You mentioned that  \n symbols means New lines ,this is one of the thing I wish to know all ,so far I know many symbols as

!d!  no decimal numbers like 20
!.1f! EX 20.1
!.4f! 20.1230

in a string for example

less than 0 wold be
(A:anything, percent) 0 &lt;

equal 0 wold be
(A:anything, percent) 0 =

Bigger than 0 would be
(A:anything, percent) 0 &gt;

some of the thing I read

and understand

<String>
%((A:ELEVATOR TRIM INDICATOR, percent) 0 = )%{if}----
if the  (A:Elv Trim, percent) is equal 0 the show it "-----"

%{else}%((A:ELEVATOR TRIM INDICATOR, percent) 10 &lt;)%{if}00%((A:ELEVATOR TRIM INDICATOR, percent))%!d!
if the  (A:Elv Trim, percent) is minus than 10   the show "00" and the  (A:Elv Trim, Percent)

%{else}%((A:ELEVATOR TRIM INDICATOR, percent) 100 &lt;)%{if}0%((A:ELEVATOR TRIM INDICATOR, percent))%!d!
if the  (A:Elv Trim, Percent) is minus than 100 the show "0" and the (A:Elv Trim, Percent)

%{else}%((A:ELEVATOR TRIM INDICATOR, percent))%!d!%{end}
Otherwise (in other cases) show (A:Elv Trim, Percent)

Bool its a variable with 2 purposes:a  on or off
a switch for example (A:landing lights, bool) the only values are on (1) or off(0)

that the % % is to be applied and elemet that has a <string>

and all the needle things  ,Masks any Bmp that has to move I'm almost 100% with this knowledge  Cool

and I know more sstuff but they're not enough I'm still need somekind of written tutorial Like a diccionary
the K: L:  and many symbols still don't know what they mean ..

But we have to be aware that a week and a half ago I didn't have any idea how a none of this works , The persons whos teaching me disapear and I have set him emails and seems he close the doors to me  Undecided

Toggle ,I got a confusion in this variable, but working to figure it out

so anything (Under XML FS9 squeme) tutorial or dictionary would be very help full at this time that I have an idea how this works..

To be honest  Undecided I can't make the whole gauge turn off (the citX eicas Gauge) for example like a electricity failure everythings loos the power exept the eicas Cry ,i KNOW  is in the first line of the xml

I made a black 1,1,1 map for that, and I know I have to add a second image , or something else right down here at the begining of the gauge

Code:
<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="EICAS" Version="1.0">
<Image Name="EICAS_background.bmp" ImageSizes="584,793"></Image>

<Element>
	<Position X="23" Y="30"></Position>
	<Visibility>(A:CIRCUIT GENERAL PANEL ON, bool) </Visibility>
	<Image Name="EICAS_ON.bmp" ImageSizes="530,560"></Image> 



I'm exhausted and this is long, but I put 100% of my person,My soul ,my brain , to learn this ,which is my dream come true  Smiley

Thanks

Alex  

 








 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print