Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

WAYPOINT ALERT HSI FLAG

Featured Replies

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

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 
 

 

  • Author

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

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,

Jan

 

 

 

"Beatus ille qui procul negotiis..."

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 
 

 

  • Moderator

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

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 
 

 

  • Author

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

Try to use:

 

(A:GPS DRIVES NAV1,bool)

 

instead of

 

(A:GPS IS ACTIVE WAY POINT,bool)

 

 

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

 

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

Strange,

 

Can you show all code you use in this gauge?

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Moderator

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

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

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

<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

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>

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.