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
Marc1980
Posts: 12
Hello,
I have programmed a 7 segment display to read out my autopilot altitude select. I am using offset 0x07D4 and in the transform box it auto populates $*3.28084/65536. The strange thing is it does not always read in 100's. For example when I turn it once instead of reading 100ft it reads 99ft then 200, then 300, then 400, then 499 instead of 500. Any ideas what might be causing this? Oh OK... I just fixed it but will post this just in case anybody else runs into the same problem. I changed the first part of the transform to $*3.28085 simply changing the 4 at the end to a 5.
Thanks
Marc
[Last edited by Marc1980, 2021-07-22 10:37]
2021-07-21 23:10
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

That not really solve the Problem itself..... May it do but thats just "luck "

The Problem....
The transform is Meter × 3.2808398950131 .... So $*3.28084 is CORRECT !!!! the 5 is WRONG technical !

In case FSUIPC not work with clear numbers and use instead a old Hexadecimal System
Thats why the Offset show "Altitude in METERS multiply with 65536 " So we need to Divide it again and also recalculate from meter to feet by the 3.28084

Result.... There CAN happe situations a altitude from e.g. 500ft result in a calculation of 499,999994948 .
BUT Mobiflight simply show 499 in that case !

The official solution for older Sims with FSUIPC..... Use the "Round" Command.
Round(($*3.28084/65536),0)


Then "odd Float Values" get rounded ( like also in the Sim internal) and the Output is fine !
Good Luck !
2021-07-28 17:33
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Correct, but Round has to be written with a capital R and small ound ;-) -> Round() - otherwise you got an error
Grüße,
Stephan (Time: UTC+2)
2021-12-19 00:20
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Another possible issue..... Not mix "point" >>.<< and "decimal" >>,<<

A Decimal is used for functions like if(a,b,c) or Round(a,b)
A Point is used to write a decimal Float Number ... like 1.234

Wrong usage also occure in a syntax error warning !
Good Luck !
2021-12-19 17:06
icon