MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
Barsk66
Posts: 4
Hi!

Need a bit of help.

I have really tried to get an understanding of how to transform a value so that a servo displaying trim settings work. The servo is correctly setup and has a range of MIN-MAX 0-100.

Now I set it up to read a sim variable via preset ELEVATOR TRIM INDICATOR I get the preset code:
iconCode:
(A:ELEVATOR TRIM INDICATOR, Position)


If I read the MSFS docs it is saying:
Position: (-16K to 0), -16K = full down

But what I get is a decimal value of about -0.46 to 1. Why is that, should I not get an int value?
I have really tried to find one simple example of how the full RPN script of the preset code + transformation should look like but I fail to find one. Most all example are of setting variables, not reading them. I have tried numerous variants but I fail completly to find any example of how to fix this. I'm sure this is a pretty basic thing though so a bit frustrating to not be able to solve it... I have done transformations and stuff on setting variables, but the syntax here is different.

Also, if there is a better preset and servo configuration than I have done, please advise of alternative configs.
2024-04-21 18:49
Avatar
Barsk66
Posts: 4
Ok, I figured out something. :)

I now have:
iconCode:
 (A:ELEVATOR TRIM INDICATOR, Position)  16383 *

And that gives me a range (in the Cessna 172) of -7606.396 to 16383. I don't understand that range. Why is there -7606?
Is there some other TRIM variables to use that gives usable output?
2024-04-21 19:15
Avatar
Barsk66
Posts: 4
Ok, I got it working.

Used ELEVATOR TRIM PCT instead, not sure it gave me different numbers than that above, but anyways:
iconCode:
(A:ELEVATOR TRIM PCT,Percent Over 100) 100 * 100 +  near


Gives me a range of 0 - 200 and set the servo to 0-200 too. Still don't know why I get a decimal number here from MobiFlight that I have to tweak into something useful...
2024-04-22 14:21
Avatar
jaimeleon
Posts: 26
It is normal for elevator trim to have negative and positive side, 0 being the neutral position.
You were using percent over 100 as units, so that returns a value between -1.0 and +1.0 with decimals.
I think most of the Mobiflight support has moved to the Discord community server.
2024-05-01 01:28
icon