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
kjoussen
From: Hamburg, Germany
Posts: 178
Hi there,

I build a trimming plate inspired by Airbus



There are two offsets in FSUIPC

0BBA Rudder control input: –16383 to +16383
0BBC Rudder position indicator (maybe adjusted from input!)

How to convert the value from FSUIPC (=0bba) to display the correct value on my 4digit display on the 3rd and 4th digit?
How to display a "L" or a "P" (R is not possible) on the 1st digit depending on more left / more right or just nothing when zero?
How to convert the value in MF to be send to FSUIPC (0bbc) to do what it should do?

I'm still "at war" with the calculation syntax, tried some sutff but don't get it.

Thanks

Kai
2022-02-09 22:33
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Take Care... We talk about the TRIM !



So you not like to read the "Rudder Position"....
You need the "Trim Position "

iconQuote:

0C04 2 Rudder trim value/control: –16383 to +16383




So check out at first, if you got the correct Value....
THEN we can think about a logic.
The config finally is just a couple of Preconditions, Refferences and Compare Stuff.
I will say .... YES!
If you got the correct raw Data we can build e.g. a Number of 0-10 ( represent the Trim angle) and we also be able to write a L and P whatever trim is left or right !
Good Luck !
2022-02-10 00:14
Avatar
asessa
From: Salerno, Italy
Posts: 88
iconkjoussen:

Hi there,

I build a trimming plate inspired by Airbus



There are two offsets in FSUIPC

0BBA Rudder control input: –16383 to +16383
0BBC Rudder position indicator (maybe adjusted from input!)

How to convert the value from FSUIPC (=0bba) to display the correct value on my 4digit display on the 3rd and 4th digit?
How to display a "L" or a "P" (R is not possible) on the 1st digit depending on more left / more right or just nothing when zero?
How to convert the value in MF to be send to FSUIPC (0bbc) to do what it should do?

I'm still "at war" with the calculation syntax, tried some sutff but don't get it.

Thanks

Kai



Why do you want use fsuipc?

You can use MSFS ora A20Nx custom LVARS and events

https://hubhop.mobiflight.com/#/list

For the rudder trim you can try (FBW events are missing)

INPUTS

K:RUDDER_TRIM_RESET for Reset
https://hubhop.mobiflight.com/#/presetview/76ae76fe-192d-47b4-b8c7-bcddc7dd2b2a

RUDDER_TRIM_LEFT
https://hubhop.mobiflight.com/#/presetview/bef140ec-3e8b-4fe9-9700-b20da8703e36

RUDDER_TRIM_RIGHT
https://hubhop.mobiflight.com/#/presetview/9059ea1a-3086-4e63-97ce-478cf9218bfb

RUDDER_TRIM_SET (with potentiometers)
https://hubhop.mobiflight.com/#/presetview/90cd4ba2-0e74-46f5-af1b-c512d9d73540
A320HC MSFS
2022-02-10 09:57
Avatar
kjoussen
From: Hamburg, Germany
Posts: 178
@pizman82:
Sorry, you're totally right, probably it was too late yesterday, I copied the wrong Offsets from the document.

Of course i plan to use 0C04.

And i forgot to mention that i'm using FSX with the stock Airbus.

According to the Airbus-Documentation:


So the logic / formula must convert –16383 to +16383 into -20° to +20°, saying this, the Display should display L_20 up to P_20 with a ___0 in the middle ( _ means blank)

The left / right momentary switch just adds 1° (approx. 819 as vaule) in each direction to the value and the reset button sets the value to 0.

In a real Airbus: when holding the switch it adds 1° per second. As far as i know this is not possible with MF due to a missing timer functionality.

When the AP is active the switch is disabled.

The solution, or better the way suggested from asessa is totally new to me, so i cannot rate it.
2022-02-10 10:54
Avatar
asessa
From: Salerno, Italy
Posts: 88
iconkjoussen:

@pizman82:
The solution, or better the way suggested from asessa is totally new to me, so i cannot rate it.



Okay, I thought you were using msfs
A320HC MSFS
2022-02-10 11:47
Avatar
kjoussen
From: Hamburg, Germany
Posts: 178
Now working beside two cosmetic bugs.

1) If the value is < 1, then my display shows .0 insted of 0.0
2) How to display in the most left digit L (value negative) or P (value positive, or nothing (value 0)?
2022-02-10 16:38
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
@asessa.
Basically Thanks for the Input....
But if a user not explicit ask for FS2020 stuff we always expect he is using a older Sim like FSX/P3D
In that case the user ask within topic title for FSUIPC! So FS2020 Events and Lvars was not his target!

But for sure.... there are still users who work with FS2020 but not know already our new system.... Means your comment was finally correct !


****

@Kai

There are lots of ways to build this.... We also need to know if you like a "Battery Off State" included for a Blanking of the Display!

In case this is a little complex tell you all the different ways here takes to much time.
Would be cool to meet on Discord if you got some time.
I will say we can build this perfectly within 20 Mins via shared Screen and voice ! ( And likely in german pertty sure)

Basic logic:
We can work with multiple Configs....
Like Config one only controll the Left Diggit and Config 2 controll the Value.
OR
We can include the logic with one config by using a Placeholder and 1-2 "Raw Value" Configs
Also the Decimal Point is a little Tricky.... Specialy with a Battery Off State we would need again 1-2 more Configs.
(If you use single diggits and not a block, we could solve the Decimal Problem also external)

A improvisional solution is to show the decimal Dot as a diggit.... So Display show "L0_.0" instead of "L_0.0"
This would save a lot of work !

You see a lot of ways and different logics!
Good Luck !
2022-02-10 18:04
Avatar
kjoussen
From: Hamburg, Germany
Posts: 178
OK, for the "informed" persons....i'm working as a consultant in the public sector and approx 80% of my time is having phone or video calls.
Therefore Discord is not my first choice in the evening, as i'm happy when i don't have to talk anymore.

Now back to my issues.

Sorted out:
- Splitting displaying value and "Direction" (L or R) with three configs. One for the value only addressing the Digits 2 - 4 and two for addressing the digit one, depending on the value.
- switching off the display if Battery Master Switch is off (plane is "dead")

To solve (cosmetic);
- when switching Battery back on, the display gives nothing at digits 2 -4 (the value) until i change the value with the Rudder Trim Switch
-> how to tell the Display to go on at once after battery is on?
- With two configs in manage to display L or R depending on the value of the offset.
But it is not static but blinking fast (2 times the second) between L (or R) and something random.
-> i'm pretty sure i have an error in my formulas or logic

Would it be helpfull to show the XML-Code here? Or how to fix it?
2022-02-10 22:54
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Thats why i request for "Discord".... Cause there are some "tricky spots" we need to avoid.
I understand discord is not the first choice for you..... But may we can talk next time ( Bayerisch for sure)

Your Problems:
MF get struggle if Multiple Configs handle a different Number of Diggits by Precondition!
Lets say Config 1 Controll Diggit 1 ..... Config 2 Controll Diggit 2-4 And Config 3 Controll Diggit 1-4 for the Blank !
THIS will not work.... Cause the Config 3 got a different Setup as Config 1 and 2.
What is possible: Using Config 1 For Diggit 1 .... Config 2 for Diggit 2-4 .... Config 3 to blank JUST Digit 1 and Config 4 to Blank Digit 2-4!

In easy words.... We can use a Digit with multiple Configs.... But all these Configs must use always the same diggit(s) .... A MIx occure in axact your problem.... Then A Refresh is missing and Display remain Dark until you change the Value.

Problem2 : The Blinking L and R .... Here pretty sure the PReconditions are Wrong.... So Both Displays try to write the same Diggit same time.... And that occure in a flickering.


What i would do.... ONE Config for L/P Controlled to Diggit 1 .... Including already a Display Blank Logic.
So we say " Read the Current Rudder Position" ..... And we use as config Refference the Config of the Battery Switch.... lets say symbol "a"
Formula say.... IF Battery Switch is OFF OR if Rudder is neutral then show SPACE..... ELSE if Rudder is less 0 show L ELSE if Rudder is Greater 0 show P
In case we can not use "Stiings" like SPACE,L,P ) in the Transform we need to combine also a Compare here.

In transform i would say.... if(a=0||$=0,999,if($<0,-1,1))
So we say... If a (Battery) is "0" (off) OR if Trim is "0" (Neutral) THEN set to 999 ELSEIF $<0 (Trim value below 0) set to "-1" ELSE ( so Value is above 0) set to 1
Summary... Value is now -1 for L, 999 for Space and 1 for P

Now enable Compare and say .... If Value = 999 THEN ' ' ( One Space)
In the ELSE Field you say... if($=1,'P','L')

So we capture the Space Situation by the IF-->THEN and we solve the LP situation by the Condition in the ELSE field ( that only come working if Value is not 999)

I hope you understand !

Really problematic ( with current MF Version before our planed rework of 7Seg) is the Decimal Point !
Builidng a Number from 00 to 20 is no problem... But using 0.0 to 2.0 is more advanced in case the DP is set hardcoded....
And a Precondition ( to solve the DP) maybe get struggle again our first diggit with the L/P

Here we need to try out what is possible and what not !
Good Luck !
2022-02-10 23:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
And just to show that we have a lot of ways.... We not need to make this -1/1 here. This is just ONE possible way!

We could much more easy say..... Transform if(a=0,0,$) So we set the value to "0" fixed alsong battery is OFF.... And we show current Value ( -16383 to +16383) if Battery is ON

In compare we say IF VALUE = 0 ( Means Battery OFF orBattery On woithout any Trim) THEN ' ' ( One Space)
ELSE we say if($>0,'P','L')

Same result.... If "0" Whatever in case of Trim or Battery we set a Space.... If Value is not 0 it show L/P whatever the value is less or greater Zero !


Means we now solve the first diggit WITHOUT Preconditions and no risk of flickering or of a wrong usage of diggit combinations with the other Display part.
Its now a ownstanding logic !
Good Luck !
2022-02-10 23:41
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Sorry for the multiple Topics!!

For the right part.... We have a Value of -16383 to +16383 ....
At first we no longer need minus or plus... Cause we just need a Value. ( The minus/plus is already shown by our L/R)
We need a Value from 0-20.... So 16383/20=819,15 So $/819 ( or maybe $/819.15) should give us a clean value of -20 to +20
We also no longer need the Minus and Plus now.
So we include a "Absolut Function" to make X from -x
Final Tranform syntax.... Abs($/819.15)

For sure... We could also say if($<0,($/819.15)*-1,$/819.15) Would do the same !
Or we could include this in Compare again.

Finally in compare we need to figure out and play with the LEft Padding System..... Do you expect "000" or "0" for Zero ?
Will you like to include again Battery by a Formula PArt like if(a=0,' ',$) ?

****************

I hope i gave some inspiration !..... At the end i hope you can build it. Else we need to talk/share screen so you can directly ask me and we can do it step by step !
Good Luck !
2022-02-10 23:56
Avatar
kjoussen
From: Hamburg, Germany
Posts: 178
Hi,

with the help of your - again - brilliant input i got everything sorted out.

1) The Direction-Marker
I changed the formula a little to
iconCode:
if(M=0 || Abs($)<150, 999, if($<0,-1,1))
as the "Zero-Value" is not everytime really zero. -10 or 17 can happen :confused:
All other is working now including the switching off in the same config

2) Switch off the value
Working

3) Leading Zero (before decimal point)
..when the value to display is between 0 and 0.8 there should be a leading 0 before the .

Solution pretty simple:
Transformation:
iconCode:
Round(Abs($/819.15),1)*10


In Compare-Tab
If VALUE < 10 THEN '0'+$ ELSE $

Tada.....:thumbup:

Again, thanks for this heavy birth, i learned a lot about MF and can now concentrate on my last of the actual 3 projects....stay tuned

Kai
2022-02-11 14:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Yeah

As i said.... Lots of ways....

For example: Round(Abs($/819.15),1)*10
What about Round(Abs($/81.915),0) :P

Reduce the Divider by move decimal to the left occure in a number that is 10 times greater .... Then a Rounding no longer must be done to the decimal 1 part.... We can round it still to full number and can leave out the multiply10 at the end.



AT LAST:
Your formula now solve everything except the Battery OFF for the right Part....
In case you will use the DecimalPoint .... Here you now need 2 Configs ( in the future we hopefully can hanlde this more easy)

So Config 1 have your logic for Diggit 2,3,4 . And a Active Decimal Point !
Config 2 must use also Diggit 2,3,4 WITHOUT a Decimal Point selected and hardcoded in Compare to ' ' ( Three spaces)
Finally 2 Preconditions.... Config 1 only work if Battery Config =1 the Other if Battery Config =0

I build those logics 1000 times and it work.... But i never build it with this Decimalpoint on a Splitted MAX.
"maybe" the blanking of the DP occure in a Problem of the left L/P Diggit. Here i´m not sure.
Good Luck !
2022-02-11 15:04
Avatar
kjoussen
From: Hamburg, Germany
Posts: 178
You're of course right,

In fact i have two configs for the value-part. One for displaying and one for blanking the pure value (without the Direction Marker), depending on the state of the Master Battery (for which i have an additional almost empty config) with exactly this in the preconditions.

This Displaymodule does not and will not share "its" Max, therefore they won't be future problems.

Kai
2022-02-11 15:21
icon