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! 

icon
Avatar
smkr
Posts: 3
Hi all

I have hit a wall!

I would have Altitude read out on a LCD. In the config settings I chose " Pos./Altitude - Altitude........" and hit use. The Base settings are ok using 0x0570.
But somewhere in the transform is a fault. And I can't see what it is.
The transform setings are "(($*3.28084)/65536)/65536" without the Quotation marks! It won't calculate! Only a 0.

Scratch, scratch, what am I doing wrong?

BR.

Sten Kristensen
2019-10-30 17:14
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2911
Supporter
Bug Confirm ! :thumbup:

After a short test i see this is a bug. The Preset is simply wrong !

Apollogy for that..... As Sebastian said in the Presentation Video on Youtube he try to provide with last version 7.7.0 a much more larger list of presets but was not be able to test every single preset himself. He hope all is fine but we already explore some Presets that include wrong data.

So Thank you for your report. We will fix this in next release or via a hotfix..... Not wait for it. Maby it takes some time until we got more Bugs together and make only one bigger Update finaly.

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

Solution for YOU.

Change the follow settings to get a working system:

1. Change Offset Adress from 0570 into 0574
2. Change Size in Byte from 8 Byte into 4 Byte
3. Change Transform from (($*3.28084)/65536)/65536 into $*3.28084

Now all should work fine.
Good Luck !
2019-10-30 18:16
Avatar
smkr
Posts: 3
Thank you

The wall has crumbled! :)
2019-10-30 18:35
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1441
Interestingly I have found the same bug a couple of nights ago and I updated the preset but I have yet to release it.

All of the ones that have these multiple divisions with 65536 don’t work properly. Sorry!

This one however seems to be special because the data in our excel is simply off.

Additionally please also have a look at 0x3324 which is the altimeter reading based on the altimeter setting that you are using. For me that’s more important than the altitude of the airplane. This preset is missing in the current list.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-10-31 02:54
Avatar
smkr
Posts: 3
Thank you.

There is also a third solution to get altitude, but it acumulates a difference when getting higher.
it is 0x6020, GPS altitude. When using a transform like this: Transform = (($*3.28084)/65536)*65536 you get a slightly lower altitude than using 0x574 and 4 bytes int and transform = $*3.28084 or Your suggestion. At least at lower altitude.

I have cut and pasted from FSUIPC to make this:
0x0570
8 Bytes Int


Altitude, in metres and fractional metres. The units are in the
high 32-bit integer (at 0574) and the fractional part is in the low
32-bit integer (at 0570). [Can be written to move aircraft]
(Read offset 6020 for easier conversion!)

Use instead 0x0574 and 4 bytes int and transform = $*3.28084

0x3324
4 Bytes Int


This is the altimeter reading in feet (or metres, if the user is
running with the preference for altitudes in metres), as a 32-bit
signed integer. Please check offset 0C18 to determine when
metres are used (0C18 contains ‘2’).
The same value can be calculated from the actual altitude and the
difference between the QNH and the altimeter “Kollsman”
pressure setting, but this value ensures agreement.
No transform

0x6020
8 Bytes Int

GPS: aircraft altitude, floating point double, in metres.
Transform = (($*3.28084)/65536)*65536


Br
Sten
2019-10-31 11:50
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1441
This is a nice summary of the three offsets that deal with aircraft altitude.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-10-31 12:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2911
Supporter
NOTE

@ Sebastian.

While my short testing i see maby the issue....

At first the Wrong Transform .....
Here you just read in wrong line of the List. The "65536" Elements are completly unless here and are used one offet below (6578) Pretty sure you swap to this offset while writing the needed Transform. Offset show Meters . So Only need Transform is "$*3.28084"

About the issue why Mobiflight show always Zero....
MF not be able to read 8 Byte INT ( What is also complety senseless.) I think this option is available ( in case there can be a 8 Byte FLT) but a 8 Byte INT is not readable.
(Maby this is a BUG and must be reworked...... But normaly there exist no INT Values with more then 4 Byte in a 32Bit System overall)

About Offset 6020
Same like above.... No 65536 is needed and make also no sense..... Value is Meters.... Simply $*3.28084 and all is fine.

*******************
About frictional Meters and Floating point Offset.
Who need a Decimal Value here ? Meter/Feet are absolutly enough. Nobody cares if Altitude is +/- 5 feet more or less as in reality. A Analg Altimeter can not show single feets.
So simply read 3324 for a perfect value OR 0574 for the raw Altitdue ( without pressure)
Good Luck !
2019-10-31 17:06
icon