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!
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.
Index > MSFS 2020 > Altitude Encoder and 7-Segment Display
Hi,
Sorry if this question has been answered before.
For the last few days I have been trying to make a Rotary Encoder to change autopilot altitude and display it on a 7 segment display for MSFS2020. I have managed to search forums and finally my rotary encoder has worked using EVENT-Id only: Left: EVENT-ID(65893) , AP_ALT_VAR_DEC Right: EVENT-ID(65892), AP_ALT_VAR_INC
However the display just doesn't show the correct altitude: It generally comes to 1997537 with FSUIPC offset 0x07D4. I did the subtraction $-1997537 and $+1997537.
SO I managed to adjust the Transform in the FSUIPC tab of 7-Segment display : ($/1997537)*100. Which now correctly displays the AP- Altitude at 100ft increments.
My Question is: 1) Is this the correct way to achieve this ? Because Heading, IAS, VS all work fine but altitude just did not work.( And I cannot use 1000ft increment with this formula)
And my other question is 2) Why does the rotary encoder NOT work when using MSFS2020 Events :AP_ALT_VAR_DEC, AP_ALT_VAR_INC
Today in FS2020 we get "better" ways as FSUIPC.
With our new Output Tool ( Currently in BETA Version.... In some Days/weeks also in LIVE Version) you can read the ALT correctly in Feet without calculation!
Just to explane what happen in the past....
The FSUIPC Offset give you ....
Adress: 07D4 --- Size in Byte: 4 ---- Typ INT 4 Byte DWord ---- Autopilot altitude value, as metres*65536
To get "feet" you need to rework it.... 1 Meter = 3,28084 feet.
So lets say you have 1000 ft in the Display..... 1000ft /3,28084 = 304,79999 Meters ..... 304,79999 * 65536 = 19975372,114 so ~~ 19975372 on the Offset!
Your Problem: YOUR Formula is wrong.... It make fully no sense to say "displays the AP- Altitude at 100ft increments." on the 7Seg.
The Display simply show AP ALT in feet..... ne recalculation to 1000 or so..... And finally.... Your formula is wrong by a factor of *10 !
To get now "feet" from raw value the needed Formula is : $*3.28084/65536 ( Like in MF Preset ! )
In case there can be Rounding Issues ( e.g. at 500ft or 100 ft) we use a "Round" additionally..... so..... Round(($*3.28084/65536),0) This give clear feets !
( and for sure you can also recalculate it like you do.... But then with correct factor..... $/19975.372 or with rounding ...... Round(($/19975.372),0) )
BUT.... As i said.... All this is no longer needed ( in Beta and soon in Live) ..... Use the Sim Variable "Aircraft: - Autopilot Data : - Autopilot Altitude Lock Var"
This will show Standard Aircraft AP ALT without any claculation or rounding needed..... Simply clear feets. ( Or in meters if you need it)
**************
About Question 2:
Yes.... My testing ( in C172) got same result.... Looks like this Input Variables not work correctly ( in that Aircraft or basically). May we can offer a "other" variable in next release !
Hi Pizman82,
Using Sim Variable is so much easier thanks!!!!
I used the simvars and in mobiflight/ output / Flight Sim Value column , for my 7segment altitude display, it shows correct AP Altitude but in the Output Value Column it shows 0 and if i set my AP Altitude below 0 it shows a -1. Basically the Output Value of 7 segment is not displaying what is showing in the Flight Sim Value Column
Do i need to do something else for it to display in 7 segment?
this sounds like a issue.
Please check if you enable ( by mistake) a Transform, a Compare or a interpolation ??
Without any other setting MF will show the "FSUIPC/SIM" Value collumn 1:1 same way in the OUTPUT Collumn...... Only exception. The Value get Truncate (Decimals are cut).
Yes , somehow Transform was checked and everything displayed fine after I unchecked it. I even successfully implemented display for VS. But I couldn’t find a var to use for heading!!
Hope we could make a pdf tutorial on all these new MF functions.
Thank you very much Pizman82 for the clarification and awesome support !!
Basically your right with the tutorial...... But i think 99% is self explaned.....
You say you not find a Value for the Heading..... Just invest 2 Mins of your time !
All other AP Data (You still found) starts with the name "AUTOPILOT" ... So simply search this 20-30 Entrys.
3 Include the word "Heading" .....
Heading Lock
Heading Lock Dir
Heading Slot Index.
One is pretty sure the Heading Display Value....
The "Heading Lock is Typ "bool" .... So it can only be 1/0 .... Sounds like this is the "Heading Hold" LED
The "Lock Dir" has as typ "degrees" ..... 99% this is the right.
The 3rd i can not identify from the list.... I need to test what it will do !
Good Luck !
2021-06-07 22:39
Index > MSFS 2020 > Altitude Encoder and 7-Segment Display