Jump to content
Sign in to follow this  
G.Franco

WAYPOINT ALERT HSI FLAG

Recommended Posts

OK,

 

For fun tested your code and this works perfect:

 

 

<Element>

<Position X="0" Y="200" />

<Select>

<Value>

(A:sim on ground,bool) !

if{

(A:GPS WP ETE, minutes) 2 <

(A:GPS IS ACTIVE WAY POINT,bool)

(A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >

and and

if{ 1 }

els{ 0 }

}

els{ 0 }

</Value>

<Case Value="0"><Image Name="wpt Alert1.bmp" Bright="yes"/></Case>

<Case Value="1"><Image Name="wpt Alert2.bmp" Bright="yes"/></Case>

</Select>

</Element>

Share this post


Link to post
Share on other sites

Hi Jan,

your corrections to the code have been the right solution. Now the ALERT Light on my HSI works properly on ground and in flight.

Thank you very much indeed.

Gianfranco

Share this post


Link to post
Share on other sites

In that case then, let me repost the XML script the correct way for posterity:

<Element>
 <Position X="0" Y="200" />
 <Select>
   <Value>
     (A:sim on ground,bool) !
     if{
       (A:GPS WP ETE, minutes) 2 <
       (A:GPS IS ACTIVE WAY POINT,bool)
       (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >
       and and
       if{ 1 }
       els{ 0 }
       }
     els{ 0 }
   </Value>
   <Case Value="0">
     <Image Name="wpt Alert1.bmp" Bright="yes"/>
   </Case>
   <Case Value="1">
     <Image Name="wpt Alert2.bmp" Bright="yes"/>
   </Case>
 </Select>
</Element>          

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

Bill,

that's the right code .I would like to know ,just for learning, the why of code after " and and ". Please explain to me.

Thanks

Gianfranco

Share this post


Link to post
Share on other sites

Hi,

 

(A:sim on ground,bool) !
if{

(A:GPS WP ETE, minutes) 2 <
(A:GPS IS ACTIVE WAY POINT,bool)
(A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >
and and

if{ 1 } els{ 0 }

 }
els{ 0 }

 

 

A translation:

If airborne (A:sim on ground,bool) !,

 

then the value is "1", when the 3 arguments,
(A:GPS WP ETE, minutes) 2 <
(A:GPS IS ACTIVE WAY POINT,bool)
(A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >
and and,
are true.
if not, one of the arguments is false, the value is "0".

 

On the ground the value will be "0".

 

Share this post


Link to post
Share on other sites

Simply out of interest, what value does (A:GPS WP ETE, minutes) return with the aircraft on ground?

Share this post


Link to post
Share on other sites

Simply out of interest, what value does (A:GPS WP ETE, minutes) return with the aircraft on ground?

Depends on if the aircraft is in motion or not.  If it's in motion, it will return a value... hence the need to test for being airborne.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

Depends on if the aircraft is in motion or not.  If it's in motion, it will return a value... hence the need to test for being airborne.

 

What value does it return if the aircraft's in motion?

 

Also what value does it return if the aircraft's airborne but not moving towards the waypoint?

Share this post


Link to post
Share on other sites

My observations ETE minutes:

 

On the ground: "0" when parking brakes are on and "a whole lot" during taxiing.

 

In the air: the amount of minutes to the waypoint and when holding the number increases on the outbound leg and decreases, of course, on the inbound leg.

 

When moving in a circle around the wpt, so distance stays the same, the number of minutes remain even.

Share this post


Link to post
Share on other sites

Could a "whole lot" be distance to way point divided by velocity component towards waypoint?

Share this post


Link to post
Share on other sites

Didn't calculate that, but probably "the whole lot" is the amount of minutes to get to the waypoint whatever direction one is moving, so i think you are right.

(Time = Distance / Velocity)

Share this post


Link to post
Share on other sites

YUP,

 

 Just to add,

  <Value>
     (A:sim on ground,bool) !
     if{
       (A:GPS WP ETE, minutes) 2 <
      (A:GPS IS ACTIVE WAY POINT,bool)
       (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >
       and and
       if{ 1 }
       els{ 0 }
       }
     els{ 0 }
   </Value>

Is exactly as the same  as  - 

  <Value>
     (A:sim on ground,bool) !
     (A:GPS WP ETE, minutes) 2 <
     (A:GPS IS ACTIVE WAY POINT,bool)
     (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >
      and and and
  </Value>

Just an example, as a lesson perse' , alternate ways to do the same thing.

 

P.S. Anyone talk to Arne Bartels lately?   


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Right,

 

FTR, i use only:

<Value>(A:GPS DRIVES NAV1,bool) (A:GPS WP ETE,minutes) 2 < and</Value>

for obvious reasons.

 

Share this post


Link to post
Share on other sites

Arne has been conspicuous by his absence now for about three years. I've tried several times to re-establish contact with him via email, but never got a reply. :(

 

@Roman, you are quite correct. The only real "purpose" for using the { 1 } and { 0 } constructs is for ease of human understanding... :Nerd:


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

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...