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.

Axis Double assignment

Featured Replies

Hello

Can I make a double assignment on a joystick axis where only one of the two is energized depending on whether a condition is met or not?

For example, i would like to assign brakes and spoilers to my joystick axis.  Brakes on the ground (AGL 0 or near 0) and spoilers when AGL>0.  Is this possible?

  • Commercial Member
1 hour ago, A320SimPilot said:

Hello

Can I make a double assignment on a joystick axis where only one of the two is energized depending on whether a condition is met or not?

For example, i would like to assign brakes and spoilers to my joystick axis.  Brakes on the ground (AGL 0 or near 0) and spoilers when AGL>0.  Is this possible?

Only with scripts. You create one single assignment, and that calls a script. In the script use the script variable to read the value from the axis and then actuate the desired axis event depending on your condition.

Untested, off the top of my head.

Script title : AutoSpoilerBrakes
Script group: Test
Script code: (A:PLANE·ALT·ABOVE·GROUND,·Feet)·0·==·if{·(L:Test-AutoSpoilerBrakes)·(>K:AXIS_SPOILER_SET)·}·els{·(L:Test-AutoSpoilerBrakes)·d·(>K:AXIS_LEFT_BRAKE_SET)·(>K:AXIS_RIGHT_BRAKE_SET)·}

This script you assign to the axis (it is in the Events list) and set Axis Min = -16383 and Axis Max = 16383, Rounding "int".

Be careful with the naming. When you rename the group or the script you have to rename the script variable too (L:Test-AutoSpoilerBrakes) this is "(L:scriptgroup-scripttitle)"
Also, be mindful that you may have to change the condition - PLANE ALT ABOVE GROUND is, as far as I know, the distance between the ground and the datum reference point of the aircraft 3D model (=not the "bottom of the wheels") You may have to compensate for that, for example "when alt above ground is less than 20 feet")

But - don't you need spoilers and brakes at the same time upon touchdown?

Edited by Lorby_SI

LORBY-SI

  • Author
17 hours ago, Lorby_SI said:

Only with scripts. You create one single assignment, and that calls a script. In the script use the script variable to read the value from the axis and then actuate the desired axis event depending on your condition.

Untested, off the top of my head.

Script title : AutoSpoilerBrakes
Script group: Test
Script code: (A:PLANE·ALT·ABOVE·GROUND,·Feet)·0·==·if{·(L:Test-AutoSpoilerBrakes)·(>K:AXIS_SPOILER_SET)·}·els{·(L:Test-AutoSpoilerBrakes)·d·(>K:AXIS_LEFT_BRAKE_SET)·(>K:AXIS_RIGHT_BRAKE_SET)·}

This script you assign to the axis (it is in the Events list) and set Axis Min = -16383 and Axis Max = 16383, Rounding "int".

Be careful with the naming. When you rename the group or the script you have to rename the script variable too (L:Test-AutoSpoilerBrakes) this is "(L:scriptgroup-scripttitle)"
Also, be mindful that you may have to change the condition - PLANE ALT ABOVE GROUND is, as far as I know, the distance between the ground and the datum reference point of the aircraft 3D model (=not the "bottom of the wheels") You may have to compensate for that, for example "when alt above ground is less than 20 feet")

But - don't you need spoilers and brakes at the same time upon touchdown?

Thank you for this.  I installed it during cruise  but unfortunately I have brakes while in the air.  I have to wait to land and see if i will have spoilers (the opposite from what i want)

To answer your question, no i don't ... brakes and spoilers work automatically  upon touchdown in the A320, you just have to arm them 🙂

Edited by A320SimPilot

  • Commercial Member
7 minutes ago, A320SimPilot said:

(the opposite from what i want)

You are right, the script is backwards. Let's make that "everything above 30 feet means spoilers". That should also compensate for any CG to ground offset in the AGL variable.

(A:PLANE·ALT·ABOVE·GROUND,·Feet)·30·>·if{·(L:Test-AutoSpoilerBrakes)·(>K:AXIS_SPOILER_SET)·}·els{·(L:Test-AutoSpoilerBrakes)·d·(>K:AXIS_LEFT_BRAKE_SET)·(>K:AXIS_RIGHT_BRAKE_SET)·}

7 minutes ago, A320SimPilot said:

you just have to arm them

It is entirely possible that the script will override that and disarm + lower the spoilers. A lot more code may be necessary. But the "above 30 feet" thing should compensate for that as well, because you won't thouch the speed brakes lever at that point anyway - right?

I still think that you need some other assignment that will lower the speed brakes when you've slowed down. Because as long as you are on the ground, the lever will no longer control them?

Edited by Lorby_SI

LORBY-SI

  • Author
3 minutes ago, Lorby_SI said:

You are right, the script is backwards. Let's make that "everything above 30 feet means spoilers". That should also compensate for any CG to ground offset in the AGL variable.

(A:PLANE·ALT·ABOVE·GROUND,·Feet)·30·>·if{·(L:Test-AutoSpoilerBrakes)·(>K:AXIS_SPOILER_SET)·}·els{·(L:Test-AutoSpoilerBrakes)·d·(>K:AXIS_LEFT_BRAKE_SET)·(>K:AXIS_RIGHT_BRAKE_SET)·}

It is entirely possible that the script will override that and disarm + lower the spoilers. A lot more code may be necessary.

Yesssss

I have spoilers now, i am approaching for landing.  Will let you know if there is an issue with the disarming

Thank you so much!!!

  • Author

Works perfectly.  No issues at all

Thanks again!!!

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.