Jump to content
Sign in to follow this  
Guest adameke777

Total Air Temperature

Recommended Posts

16 hours ago, JRBarrett said:

You do realize that you have responded to a post that is 17 years old?

Yup. Never too late to emphasize the obvious. 

Thanks Jim

Share this post


Link to post
Share on other sites
On 9/6/2022 at 7:21 AM, JRBarrett said:

You do realize that you have responded to a post that is 17 years old?

Good Lord! Have I really been around that long! 🤣

  • Upvote 1

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
On 9/8/2022 at 7:51 AM, n4gix said:

Good Lord! Have I really been around that long! 🤣

Father Bill, 
I always enjoy your posts and yes, we old timers, have been here since the Avsim conception. 
Bill, I follow your posts quite often on the FSDeveloper website and have learned quite a bit about XML coding from your many examples. I enjoy reading your posts and then trying to recreate an examples you have provided. In the last 6 months I have garnered an elementary understanding of XML and the subtle differences that exist among other languages. 

I know........ what am I after. Well Sir, I have exhausted at least 20 hours trying to accomplish a task that perhaps is unattainable. I use LevelD-767 exclusively in the simulator. Many of the default FS variables work alongside LevelD's own coding. Variables such as TAT, OAT, Throttle, reversers, park brake, ground speed, airspeed, etc. That said, I have been unable to accomplish a small task.

The task is I wish to display certain conditions on a HUD that EDetroit help me develop. I'm not trying to have the code change any settings within the simulation. Merely to evaluate and display the condition in a form of an annunciator on the hud.

What I am trying to do, and to date, I have 2/3rds of the code working. I wish for the SPEEDBRAKE to show the following conditions when the lever is moved.

HANDLE UP - Display nothing
HANDLE ARMED - Display "SPBRK ARMED"
HANDLE DEPLOYED - Extinguish SPBRK ARMED and display "SPEEDBRK".

But what happens is "SPBRK ARMED" & "SPEEDBRK" display togather. URGHHHHHHHHHHH. I've tried everything. Once the Speedbrake handle is extended the "SPDBRAKE ARMED" dissapears as it should. It is just when the handle is moved to the ARM mode they display togather.

Here is my code:

	<Element> <!-- SPEED BRAKE  -->
<Visible>(A:SPOILERS ARMED, bool) != (A:Spoilers Right Position, percent) 1 &lt; &amp;&amp; </Visible>
<Position X="212" Y="828"/>
<Text X="130" Y="28" Bright="Yes" Length="22" Font="Arial" Color="#D0FF00" Adjust="Center" VerticalAdjust="Center">
<String>SPBRK ARMED</String>
</Text>
</Element>
	<Element>  <!-- SPEED BRAKE ON  -->
<Visible>(A:SPOILERS HANDLE POSITION,percent) /10 &lt;</Visible>
<Position X="209" Y="850"/>
<Text X="130" Y="28" Length="18" Font="Arial" FontSize="21" Color="#D0FF00" Adjust="Center">
<String>SPEEDBRK</String>
</Text>
</Element>
	     <Element>  <!-- REVERSERS  -->
     <Position X="212" Y="820"/>
      <FormattedText X="130" Y="28" Length="18" Font="Ar
	


Many thanks Father.

Michael


 

Edited by n4gix
Added [code] box tags to display XML format properly.

Share this post


Link to post
Share on other sites
4 hours ago, PebbleBeach said:

But what happens is "SPBRK ARMED" & "SPEEDBRK" display togather. URGHHHHHHHHHHH. I've tried everything. Once the Speedbrake handle is extended the "SPDBRAKE ARMED" dissapears as it should. It is just when the handle is moved to the ARM mode they display togather.

I'll have to give this a this a bit to get my nurons synchronized to give a proper examination to the question. There is a danger in using different token variables to evaluate visible conditions.

At a quick glance though have you tried inverting the deployed condition, e.g.,

<Visible>(A:SPOILERS HANDLE POSITION,percent) / 10 &gt;</Visible>
	


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
8 hours ago, n4gix said:

At a quick glance though have you tried inverting the deployed condition, e.g.,

Hi Bill,

You will have to excuse my ignorance but I'm not really sure what that means.

Michael

Share this post


Link to post
Share on other sites

Instead of checking for "less than" check for "greater than." That's assuming that when speed brakes are deployed, the token variable will be 100%. In other words, 10 &lt; will be true even while the speed brakes are "armed" and false while the speed brakes are fully deployed.

I'm not able to check this myself since I haven't got my sim set up after moving to Arkansas a few months ago.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
11 hours ago, n4gix said:

Instead of checking for "less than" check for "greater than." That's assuming that when speed brakes are deployed, the token variable will be 100%. In other words, 10 &lt; will be true even while the speed brakes are "armed" and false while the speed brakes are fully deployed.

Father Bill,

Thank you again for the reply and suggestion.

I tried replacing the  10 &lt with 10 &gt and it didn't change anything. "SPEEDBRK" continues to illuminate when "SPDBRK ARMED" is selected.

Playing around I also tried the following:

100 &gt, /100 &gt, 100 &lt, etc. etc. None worked.

Michael

Share this post


Link to post
Share on other sites

I will have to give it some additional thought then. I haven't delt with XML scripting for several years, so... 😲


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
5 hours ago, n4gix said:

I will have to give it some additional thought then. I haven't delt with XML scripting for several years, so... 😲

Father Bill,
IT WORKS!!!!  I had more time to invest in testing today. And you were right. Checking the "greater than" value and adjusting the percentage made the difference. Thank you so much. Working code below.........

Michael

 

<Element> <!-- SPEED BRAKE  ARMED -->
<Visible>(A:SPOILERS ARMED, bool) != (A:Spoilers Right Position, percent) 1 &lt; &amp;&amp;
</Visible>
<Position X="212" Y="828"/>
<Text X="130" Y="28" Bright="Yes" Length="22" Font="Arial" Color="#a6bf00" Adjust="Center"
VerticalAdjust="Center">
<String>SPBRK ARMED</String>
</Text>
</Element>

     <Element>  <!-- SPEED BRAKE ON  -->
     <Position X="209" Y="850"/>
     <FormattedText X="130" Y="28" Bright="Yes" Length="18" Font="Arial bold" FontSize="21"
Color="#a6bf00" Adjust="Center">
     <String>%((A:SPOILERS HANDLE POSITION,percent) 50 &gt;)%{if}\{blnk}SPEEDBRK\{nr}%</String>
     </FormattedText>
     </Element>

 

Share this post


Link to post
Share on other sites
3 hours ago, PebbleBeach said:

				
			<String>%((A:SPOILERS HANDLE POSITION,percent) 50 &gt;)%{if}\{blnk}SPEEDBRK\{nr}%</String>				
			

Yay! I'm happy to know that I'm not totally brain dead after all... 🤪

I'm also delighted that you've discovered the joy of <FormattedText> as well!


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
7 hours ago, n4gix said:

Yay! I'm happy to know that I'm not totally brain dead after all... 🤪

Your far from brain dead. You sir, are a legend!!!

Michael

Share this post


Link to post
Share on other sites

Father Bill,

Sorry. Calling upon your knowledge AGAIN.

I'm trying to read variables in flight sim and have them display on the HUD I previously informed you about. I am attempting to display "AP" on the HUD when autopilot is engaged. The code I used:

<Element>
<Visible>(A:Autopilot master, bool)</Visible> 
<Position X="10" Y="10"/>
<Text="Yes" X="18" Y="9" Length="2" Font="Arial" Color="#00FF00" Adjust="left">
          <String>AP</String>
         </Text>
      </Element>

DOES NOT WORK. - Well actually it does on default FS2004 aircraft. However, I'm using the commercial LevelD-767 software which has it's own SDK.

Again, with the default FS2004 aircraft it works perfectly. BUT on the LevelD-767, "AP" does not display when autopilot is engaged. Hitting the "Z" keyboard button, which does
control the autopilot master on both aircraft versions, only makes "AP" flash but remains off on LevelD-767 aircraft.

Some background:

Our simulator uses a completely different programming language to interface all our hardware such as, lights, switches, toggles, sounds, radio frequencies, annunciators, etc. etc. This interfacing program was written by Ralph Robinson (EPIC CARD) specifically for our simulator. And this interfacing program was written to read and write based on the information within the LevelD-767 SDK. 

With all this said, perhaps attempting to read a LevelD-767 variable is not possible in XML. I do not know.

I've tried this code pulling info from the LevelD-767 SDK:

<Element>
<Visible>(LVLD_AP_MASTER,enum)</Visible> 
<Position X="10" Y="10"/>
<Text="Yes" X="18" Y="9" Length="2" Font="Arial" Color="#00FF00" Adjust="left">LevelD-767 SDK
          <String>AP</String>
         </Text>
      </Element>

AND MANY VARIATIONS similar to this code. The best I could get was the same result I got with the FS2004 SDK. Hitting the "Z" keyboard button, which does
control the autopilot master on both aircraft versions, only makes "AP" flash but remains off on LevelD-767 aircraft.

So my question to you is......... Is this possible or should I scrap this plan? 

I am attaching the LevelD-767 SDK variables file in case you have extra time to evaluate this issue.

Respectfully,

Michael 
LevelD-767 SDK FILE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...