Jump to content
Sign in to follow this  
G.Franco

WAYPOINT ALERT HSI FLAG

Recommended Posts

As in the real B747 on the HSI there's a flag to alert the pilot two minutes before reaching the next waypoint.

 

<Element>

<Position X="61" Y="272" />

<Visible>(A : Electrical avionics bus voltage, bool)</Visible>

<Select>

  <Element>
      <Position X="61" Y="272" />

      <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,bool)</Visible>

      <Select>
         <Value>(A:GPS IS ACTIVE WAY POINT,bool) (A:GPS WP ETA,minutes) - abs d 2 >= r 60 <= &&</Value>

         <Case Value="0">
            <Image Name="wpt Alert1" ImageSizes="12,44" Bright="yes" />
         </Case>

         <Case Value="1">
            <Image Name="wpt Alert2" ImageSizes="12,44" Bright="yes" />
         </Case>
      </Select>
   </Element>

After many attempts I'm not able to have the "Wpt Alert2"illumination.It's expected to illuminate two minutes before the next waypoint.

All helps will be welcome.

Gianfranco

Share this post


Link to post
Share on other sites

Gianfranco,

 

 It looks like there is multiple problems -

 

1. There is 2 opening <Element>s  and only 1 closing </Element> - this may be just a simple mistake pasting into forums?

2. There is no relational operator for avioncs bus voltage - voltage is not boolean

3. A subtraction in the <Value> not needed

3. Wrong relational operator (>) in the <Value>

5. Not enough bitwise 'ands' in the <Value> - as it written you have 1 logical 'and'.

 

Show the second bitmap if - Avionics Bus has power and GPS is active to a waypoint and time to waypoint is less than 2 minutes - otherwise show the first bitmap.

  <Element>
      <Position X="61" Y="272" />  
      <Select>
         <Value>(A:GPS WP ETA,minutes) 2 < (A:GPS IS ACTIVE WAY POINT,bool) (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 > and and</Value>
         <Case Value="0">
            <Image Name="wpt Alert1" ImageSizes="12,44" Bright="yes" />
         </Case>
         <Case Value="1">
            <Image Name="wpt Alert2" ImageSizes="12,44" Bright="yes" />
         </Case>
      </Select>
   </Element>

 Hope this helps.


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

 

Share this post


Link to post
Share on other sites

Hi Spokes,

thank you for your help, but unfortunately it doesn't work. The light is illuminated for few seconds when the flight plan is loaded but during the flight the light remains always off.

The short illumination at Flight plan loading I think is a symptom that the right solution is near but it isn't yet available. Anyway thanks again for your help and if you 'll have a solution  you 're always welcome.

Gianfranco

Share this post


Link to post
Share on other sites

Hi,

 

Try to use ETE.

 

This works for me: a bell sign before reaching a waypoint.

(A:GPS WP ETE,minutes) 1 <
 if{ (L:waypoint,number) 0 == if{ 1 (>L:waypoint,number) 1 (>L:sign,number) } }
 els{ 0 (>L:waypoint,number) }

 

Hope it helps,

Share this post


Link to post
Share on other sites

Oh my! Time to get eye glasses  B) ! I looked at the code a dozen times and never caught it..

 

Gianfranco,

 

Use the code I posted above and replace just the <Value> section with this -

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

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

 

Share this post


Link to post
Share on other sites

You still need glasses, Roman. You need another set of & & (or better still, simply write "and and"). Three conditions require two conjunctions! :Big Grin:

 

Remember that all three of these forms are valid:

&&

& &

and


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,

 

 I used the single & ( or "&" ) which assigns the logic as bitwise, which in all cases is bitwise when a comparison is made or dealing with all boolean. Using && ( "and" or "&&" ) assigns the logic as logical.

 

(A:GPS WP ETE, minutes) 2 < = 0 or 1

(A:GPS IS ACTIVE WAY POINT, bool) = 0 or 1

(A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 > = 0 or 1

 

In the above the following will all work -

& &

& &

&& &&

&& &&

and and

 

Why I did it that way before is a big question...  Normally I use the literal term. ("and" "or")  In any case I modified all the previous posts to just use the literal "and" .  "It is logical to just stay logical" -Spock  LOL!!!   :LMAO:  

 

 


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

 

Share this post


Link to post
Share on other sites

Hi Spokes,

you're great now the ALERT LIGHT works properly but only when the plane leaves the ground. After having loaded the flight plan the ALERT LIGHT illuminates and remains illuminated until the plane leaves the ground. When in flight the light works as it's expected to do. May be it's better to disable the ALERT LIGHT when the plane is on ground using the variable (A:SIM ON GROUND,bool)?

Ciao Gianfranco

Share this post


Link to post
Share on other sites

Try to use:

 

(A:GPS DRIVES NAV1,bool)

 

instead of

 

(A:GPS IS ACTIVE WAY POINT,bool)

 

 

Share this post


Link to post
Share on other sites

 

Hi Spokes,

Now I know exactly the flag behaviour on ground. During pushback, taxi alignment etc.. when the plane stops the flag comes on illuminated and comes out when the plane

moves again. When in flight the flag works great. Do you think there's a way to disable on ground the flag in order do not have this not real and elegant behaviour?

Thanks for your help.

 

Hi Jan,

the variable (A:GPS DRIVES NAV1,bool) doesn't work for this gauge. Thank you anyway.

 

Gianfranco

Share this post


Link to post
Share on other sites

The simplest solution is to add the on ground check to disable the script. If the a/c is not on the ground, the script will execute, otherwise it will stop executing.

 <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
}
</Value>

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

Btw.

 

Using ETE reads 0 (<2!), when parking brake or pushback is on.

That 's why the alert comes on.

Also when using ETE, (A:GPS IS ACTIVE WAY POINT,bool) is Always 1, so you don't need that parameter.

Of course one can use (A:sin on ground,bool), but that is extra, unnecessary code.

I use (A:GPS DRIVES NAV1,bool), of course only when airborne and have a flawless functioning waypoint alert system.

 

So:

 

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

 

This is part of a lot of other code only working with current on the Av. buses..

Share this post


Link to post
Share on other sites

<Element>

<Position X="61" Y="272" />

 

<Select>

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

 

<Case Value="0">

<Image Name="wpt Alert1" ImageSizes="12,44" Bright="yes" />

</Case>

 

<Case Value="1">

<Image Name="wpt Alert2" ImageSizes="12,44" Bright="yes" />

</Case>

</Select>

</Element>

This is the code and the problem is on ground during taxi.When the plane is stopped the ALERT LIGHT comes on illuminated and when the plane moves the Alert light goes out.After TO the ALERT LIGHT works properly.Using the (A:SIM ON GROUND,bool) if etc... the light on ground is always off but when the plane leaves the ground the light suddenly illuminates and remains illuminated during the flight.Using as you said the variable (A:GPS DRIVES NAV1,bool)instead (A:GPS IS ACTIVE WAY POINT,bool) the light is always illuminated both on ground and flight.

This code drives me crazy.

Gianfranco

Share this post


Link to post
Share on other sites

Watch the spaces! and try:

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

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