Jump to content
The simFlight Network Forums

Preset Syntax


DaveSCUSA

Recommended Posts

I want to increase/decrease the The elevator trim using the trim wheel on my Bravo. The switches dont seem to have much control thru the MSFS Controls with the wheel.

I want to slow down the rate on the down and up switches. I read another post to increment/decremet the trim by 128 bips. I have tried to create two presets (dn & up). Would you please check the syntax for me. Thanks

DA62_Elev_Trm_Dn#(A:Elevator Position, number) (>L:Elevator_Angle_Trim, number)  (L:Elevator_Angle_Trim, number) 128 - -16383 Min (L:Elevator_Angle_Trim, number) (>A:Elevator Position, number)

DA62_Elev_Trm_Up#(A:Elevator Position, number) (>L:Elevator_Angle_Trim, number)  (L:Elevator_Angle_Trim, number) 128 + 16383 Max (L:Elevator_Angle_Trim, number) (>A:Elevator Position, number)

Link to comment
Share on other sites

Some observations:

1. Min and Max should be min and max.

2. According to the SDK, the value of (A:Elevator Position, number) goes only from -16K to 0.

3. Given the range of (A:Elevator Position, number) above,  unless the Elevator_Angle_Trim value is less than - 16255, (L:Elevator_Angle_Trim, number) 128 - -16383 min will  be -16383 and then you are putting that into (A:Elevator Position, number). It will then get more negative from there when the preset repeats and it seems you will almost immediately exceed the negative range of (A:Elevator Position, number). Don't know if that is OK.

4. Given the range of  (A:Elevator Position, number) above,  (L:Elevator_Angle_Trim, number) 128 + 16383 max will be 16383, and then you are putting that into (A:Elevator Position, number) which supposedly has a max value of 0. And the value you are putting into (A:Elevator Position, number) will get more positive when the preset repeats. Don't know if that is OK.

5. It would seem the Lvar (L:Elevator_Angle_Trim, number) located after the Min and Max operators is missing a > before the L: (unless I misunderstand what you are trying to do).

6. I have some timing concerns about trying to update an Lvar and them immediately using the new Lvar value in the next operation in the same preset. I would have to test that to see if it would work reliably.

7. While the presets are updating the value of the Avar (A:Elevator Position, number), I assume the sim might be doing that also, so how the dual updating will work is not clear to me.

Any needed corrections to the above are welcome.

Al

Link to comment
Share on other sites

Thanks John,

I used the wrong variable. Using ELEVATOR TRIM POSITION, radians instead to down -60 (-10°) to up 60 (10°).

Perhaps I'll split the presets with a delay between.

I realized after I said it that presets can't manipulate Input Events. Are you going to provide the C510 Input Events / Events you find to the public?

Link to comment
Share on other sites

PS

Do all (A:, (K:, (L: entries require a >? Can your recommend a document that explains? I had a tutorial for syntax in FSX gauges, but can't find it. The XML there is fairly straightforward, but the RPN needed explanation which I had.

Wonder why MSFS had to make it so difficult to understand

Link to comment
Share on other sites

2 hours ago, DaveSCUSA said:

Do all (A:, (K:, (L: entries require a >?

Generally, Avars and Lvars require the > only if you are trying to write (store) a value into them. K events do usually have a > before the K.  In this case I think of the > as meaning "activate" the event. Sometimes, but NOT in presets or calculator code, the > symbol will be replaced with >  meaning "greater than".

3 hours ago, DaveSCUSA said:

Using ELEVATOR TRIM POSITION, radians instead to down -60 (-10°) to up 60 (10°)

I'm not sure what the 60 represents in the above, but note that one radian is about 57.29 degrees, so 10 degrees is about 0.17 radians. Also, often you can change the units a variable uses, so you may be able to write the Avar (A:ELEVATOR TRIM POSITION, radians) as (A:ELEVATOR TRIM POSITION, degrees)  which may be more convenient in your particular application.

Al

Link to comment
Share on other sites

On 4/22/2024 at 12:36 AM, DaveSCUSA said:

I want to increase/decrease the The elevator trim using the trim wheel on my Bravo. The switches dont seem to have much control thru the MSFS Controls with the wheel.

See this post on how to assign the Bravo trim wheel for default elevator trim controls (and AP functions): 

 

This uses a lua script for fast/slow trim control, and uses FSUIPC offsets to set the trim value. You can increase/decrease the delta for both the fast and slow trim buttons if required. This is the standard way to set-up a trim wheel in FSUIPC, providing the aircraft supports the standard controls. If not, you can still use the lua script (for fast and slow virtual buttons), but you would need to change the assignments to the fast/slow virtual buttons to whatever controls the trim in the aircraft (n the aircraft profile).

Checked in the DA62 and those assignments are valid for this aircraft, but you probably want to increase the delta values - the current values of 24 (for slow) and 50 (for fast) seem a bit low. Just increase them to whatever feels good for you.

18 hours ago, DaveSCUSA said:

Can your recommend a document that explains? I had a tutorial for syntax in FSX gauges, but can't find it. The XML there is fairly straightforward, but the RPN needed explanation which I had.

There isn't much documentation that I know of, only this: https://docs.flightsimulator.com/flighting/html/Additional_Information/Reverse_Polish_Notation.htm

John

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.