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.

NAV & LOGO Airbus Fenix Date Script RPN

Featured Replies

Good morning

Google translation

NAV & LOGO Airbus a320 Fenix

Is it possible to create a script that would do this:

If today's date is odd then set the NAV & LOGO switch to 1 If today's date is even then set the NAV & LOGO switch to 2

I know that it's useless, in simulation it's just out of curiosity

THANKS

Edited by ptimale

  • Author

Good morning


it works very well thank you


I was looking in the docs if a function existed, but it was in simvar\environment variables


could you explain your script to me?
THANKS

  • Commercial Member
36 minutes ago, ptimale said:

could you explain your script to me?

"If the day of the current date modulo 2 equals 0 then set the appropriate Fenix LVar to 1, if not, set it to 2."

What is it specifically that you don't understand?

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks for the explanation

what I don't understand is 2% 0

if today's date is 0 ?

  • Author

In your RPN expression, you divide the local day of the month by 2 (E:LOCAL · DAY · OF · MONTH, · Number 2%). If the result of this division is zero, it means that the day of the month is even, because an even number divided by 2 leaves no remainder. Otherwise, if there is a remainder, the day is odd. So in your expression, if the day of the local month is even, it will return 1 (with "si{ 1 }"), otherwise, it will return 2 (with "els{ 2 }"). This allows you to determine whether the day is even or odd based on the return value of this expression.

Archived

This topic is now archived and is closed to further replies.

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.