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.

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
sisoffi
Posts: 91
Hi,
I'm trying to set the fuel quantity display of my maddogX that has 5 displays :
respectively for Left and Right thanks, Center Thanks, Total Fuel and Gross Weight.
All the tested offsets that I insert of fuispc however do not give me the correct values in the various displays.
I see that he also inserts a rule on the transform section.

Where can I find the error?

Thanks again
2020-09-03 00:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

I not understand the basic problem.....

Do you got raw data that is correct BUT Your Problem is to bring this Data on the LCD Display ???
If yes we can talk about. Here i can guide you.
To check if data is correct simply readout the needed Offsets and use NO device. Just Run Mobiflight and check the column right of your config.
There you see the FSUIPC Value ( raw data) and the OUTPUT Value that include used transforms/compares . Thats the value you would send to the Display finaly.
Simply check all Offsets that sounds like "fuel" and find out if one is working for you.


If your Problem is you NOT got the data...... Thats the same problem like all other requests you do with your Maddog.
A Addon "can" use standard Offsets..... But it not have to.

So you must at first check all Fuel Offsets Crossweight and so on from the standard FSUIPC List and "hope" they support the needed data.
If your Fueltank is full but the FSUIPC show e.g. it´s empty then pretty sure Your Maddog NOT use that Offset and got it own system.
In that case like always..... Find out if Maddog got a own Offset here..... if not you need a Lua script that read Maddogs internal data (Lvar e.g.) and support it to a offset.
Good Luck !
2020-09-03 08:22
Avatar
sisoffi
Posts: 91
Pizman,
I investigate and data are correctly taken from prepar. The problem seems to be in the conversion of the fsuipc data.
My system is set in Hybrid (feet, meters) and the fuel paylow as fuel quantity as weight (I see correctly the kilos).
Reading the fsuipc manual, the values ​​that read the fuel are:
0B80 4 Fuel: left main tank capacity: US Gallons
0B98 4 Fuel: right main tank capacity: US Gallons
0B78 4 Fuel: center tank capacity: US Gallons (see also offsets 1244–
for extra fuel tanks)
126C 4 Total Fuel
1334 Gross weight

In my case I have: Virtual cockpit Fuel & Payload Mobiflight
left main tank capacity 3200 3199 1383
right main tank capacity: 3200 3199 1383
center tank capacity: 500 499 3074
126C 4 Total Fuel 6900 6900 15213
1334 Gross weight 52,400 52,496 0

thankyou
Simone
2020-09-03 11:16
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Sorry. I still not understand.

To clearify.....
You say the Offsets ( standard Prepare) support a working value..... So if you Aircraft uses fuel during flight also this offset decrease..... means its working?

If your only problem now is the "unit" of the data.... Then this is easy.

The Offsets show you the percent of fuel in the Tank..... the Other show you the capacity of tank.
Normaly we need for a gauge onky a scale like 50% 75 % or so.... Not the weight.
If you need the weight you can calculate it with the given Offsets.

If your Aircraft is always the same (You not change addons) you can include the 100% capacity direct into the formulas..... If not you need to read that value, too and include it as a variable into the formula.
For example.... If a Tank got a capacity of 200 Galeons then 1% means 2 galeons. So if you say "Percent of fuel *2" this occures in "Fuel in Galeons" .
If you need Kilograms metric simply google...... My first hit say.... 1 Gal = 3,7854118 Kg.
So simply multiply the rusult with 3,79 and it should give you a good result !
Good Luck !
2020-09-03 20:36
Avatar
sisoffi
Posts: 91
thank you pizman,
yes the standard offset from prepar its ok work perfect (only the central thank is not correct, i dont fid the correct value)
the formula in transform is:
($*2)*3.7854118 ?
2020-09-04 09:04
Avatar
sisoffi
Posts: 91
also talking to peter dowson he showed me the formula to get the final fuel:

level1 = 0x0B7C / 128/65536
fuelweight = 0x0AF4 / 256
capacity = 0x0B80
capacity_KG = capacity * fuelweight * 0.4536
level_KG = level1 * capacity_KG

but the formula does not admit opens me the offset values. I tried this but it doesn't work:

($ * 100 / (128 * 65536)) * (0x0B80 * (0x0AF4 / 256) * 0.4536)
2020-09-04 19:24
Avatar
sisoffi
Posts: 91
iconpizman82:

Hi

I not understand the basic problem.....

Do you got raw data that is correct BUT Your Problem is to bring this Data on the LCD Display ???
If yes we can talk about. Here i can guide you.
To check if data is correct simply readout the needed Offsets and use NO device. Just Run Mobiflight and check the column right of your config.
There you see the FSUIPC Value ( raw data) and the OUTPUT Value that include used transforms/compares . Thats the value you would send to the Display finaly.
Simply check all Offsets that sounds like "fuel" and find out if one is working for you.


If your Problem is you NOT got the data...... Thats the same problem like all other requests you do with your Maddog.
A Addon "can" use standard Offsets..... But it not have to.

So you must at first check all Fuel Offsets Crossweight and so on from the standard FSUIPC List and "hope" they support the needed data.
If your Fueltank is full but the FSUIPC show e.g. it´s empty then pretty sure Your Maddog NOT use that Offset and got it own system.
In that case like always..... Find out if Maddog got a own Offset here..... if not you need a Lua script that read Maddogs internal data (Lvar e.g.) and support it to a offset.



I'm not sending any data to the 7 segment display yet.
I'm trying as you suggested the output on mobiflight.
We are definitely starting from the wrong offset in my opinion.
Why do I have to have an offset that reads me the% of fuel? I need to have the final value as a quantity in liters / kilos on the display and not a percentage. If from the% we have to derive the amount of fuel in use I tried with the transform but the formula is wrong. Offsets are not considered while multiplication with 3.75 goes beyond the correct value. Can you tell me the formula to test by meter on the transform? I think the whole problem is the transformation of the percentage of fuel into liter / kilo level.
2020-09-04 20:20
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi
This is pure "math".

Your Problem looks like you try to use a Offset into a Formula. This is not possible.
If you like to use multiple Offsets in a formula you need to create Output Configs for each single Offset.
Finaly you use ONE Config that is controlling e.g. the Display. In that config you define all needed Raw Data Offsets as "Placeholders" and then you build the formula.

Whatever in not understand the logic of your calculation at the moment..... I just want to show you the system.....

"($ * 100 / (128 * 65536)) * (0x0B80 * (0x0AF4 / 256) * 0.4536)"
Here 0B80 and 0AF4 are additional Values ( other Offsets) (And 0B7C pretty sure represent $)

You need to make 2 Output Configs that read that values ( raw) . And then you set them in THAT Config as Placeholders..... E.g. 0B80=a 0AF4=b
The formula is then ($*100/(128*65536))*(a*(b/256))*0.4536)
I not know if this work ( and i don´t think so cause its verry unlogical)...... But this should show you just how you can use other Configs within a transform !
So not use a OffsetAdress..... Use a Placeholder that is set to a Output Config that is fanaly read the needed Offset !!!!


SOLUTION:
I think we can solve this..... But not by Forum.
Way A..... Send me all the data and the logics via Email. I can check it but this will take weeks.
Way B..... If you see me Online in Discord and i got time.... lets make a Shared Screen and Voice Session. Lets talk about and find a solution together !
Good Luck !
2020-09-05 00:12
Avatar
sisoffi
Posts: 91
Thank you Pizman,
i dont use discord :(

I tried your methode. Example:
i set other 2 outputs (no precondition)
Int 4 bytes
a 0x0B7C output value 1383
b 0x0AF4 output value 1715

now i set
FQTY_LEVEL MAIN 0x0B7c

With Config References:
V Use a as a
V Use b as b
and transform: ($*100/(128*65536))*(a*(b/256))*0.4536)

output value 61 instead 3275

where is the error?
thanks
Simone
2020-09-05 20:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Simone.

As i told you.... I don´t know if this formula works or if its correct. I not work it out (till now) so i not test it myself. Whatever Pete Dowson know what he do :-)
Petes Formula is a perfect solution that will work for all Aircrafts same way. As i said. If you use your Maddog you can "skip" pretty sure some steps to get it more easy.
E.g. you not need to read the Fuel capacity by a Config if you always fly the Maddog... Cause the Capacity will not change.
So you can simply read this value 1 time in a testing config.... Note it on a paper.... And in your final Config you use just this value instead of using a Placeholder.
Same with the Fuel Weight Factor.... Here the Temperature is the key....
1000 Liter of a kind of Kerosin weight nearly 790kg at +35°C otherwise 1000 Liter same Kerosin weight 810kg at -35°C There is also a difference between JetA1 and AVGAS ( Prop/Jet). But i think we can technical ignore this +/- 1% ..... Cause you always plan a little more fuel and as less fuel in tank as more accurate is the value.
You see.... You be able to reduce the System to read only ONE Offset for each Tank..... the Fuel in percent. All other things can be done with hard calculated values.

*****************
If you realy like to use the formula from pete Dowson ( Need mutliple Configs and is difficult to build) i recommend to maybe do some "steps" within the raw value Configs.
This reduce the difficult long Formula in the last config and split it into more smaller Math Formulas within the other Configs.

For example:
iconQuote:


level1 = 0x0B7C / 128/65536
fuelweight = 0x0AF4 / 256
capacity = 0x0B80
capacity_KG = capacity * fuelweight * 0.4536
level_KG = level1 * capacity_KG



Config 1 read Fuelweight Offset 0AF4 2 Byte INT . We can include here in a transform already the Recalculation So $/256 . This occure in a Value that show us how many lbs ( US Pounds) are 1 GAL of Fuel. ( So you not need to do the /256 within the master formula in your Display Config)
( techn ical we can also include here the transformation into KG..... But we can also do in the next one)
(THIS Config is GLOBAL and is used by all other Configs..... Cause the Factor here is same for all tanks)

Config 2 Read the capacity of the needed Tank. ( For example 0B80 4 Byte INT for the left main tank) . the Value showes Capacity in gallons.
In this config we can now do Petes Calculation into Kilogram.... " capacity_KG = capacity * fuelweight * 0.4536 "
So we need the Config 1 as a Placeholder.... Lets say its "a" .
Formula in Transform is $*a*0.4536 ....... $ is capacity in GAL.... Multiply with "a" ( the factor of GAL in lbs from Config1) and finaly *0,4536 to swap lbs in KG.

Config 3 Reads the Percent of Fuel from 0B7C ( 4 Byte INT) . We must Divide through 128 and through 65536 to get Level of Fuel in the Tank.
Hopefully this Offset occure after Divide it into a Decimal between 0,01 and 1,00 ..... If its a number from 0-100 we need to dive through 100 again !!!

Finaly we multiply the Level with the Capacitiy in Kilo we calculate in Config 2.... So we need here Config 2 as a Placeholder. Lets say again "a" .
Formula is $/128/65536*a Maybe Syntax must be $/(128*65536)*a If the 100 is needed its e.g. $/128/65536/100*a


*************************
Summary:
Try it out. And think about my suggestion with the "hardcode" Value. In that case you would check one time the Config 1 ( 15° Outside Temp with your Maddog to still know the Factor from GAL to Lbs . You also just test 1 time each FuelTank to knwo its capacity in GAL.
Finaly you do the master calculation with a calculator and get a "number" for each tank. So in Mobiflight at the end you just need to Read the Offsets for Fuel in PErcent and multiply them with your Number you find out for each tank..... Result is the same but save you lot of Configs and CPU work in Mobiflight !
[Last edited by pizman82, 2020-09-06 00:03]
Good Luck !
2020-09-05 23:55
Avatar
sisoffi
Posts: 91
thanks for your detailed info!
But don't tell me how to take the two values a and b to put in the formula.
Do I get them from config references? from the menu I can select them,
but in the "as" field what do I put? a and b? thank you.

Simone
2020-09-08 08:49
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Exactly....

To get a value from a other Config (output) into a formula you need to choose THAT indication Config as a "Config reference" aka. "Placeholder".
You choose the Config in the Left Dropdown..... And in the Right you choose the Symbol.
For a LCD Config it is usefull to choose a Symbol like '*%& or so cause you not need them to write.
For a Formula like we need here its more logical to choose characters like a b c d e to avoid a error if you try to choose a math symbol that is also used in the formula like %&*
Good Luck !
2020-09-08 12:05
Avatar
sisoffi
Posts: 91
Hi Piezman,
the Maddog support created for me the ipc Lvars in order to display FQTY display.
So now i have a hardware problem. Im trying to interface the original WAMCO KW205S via mobiflight.
From test seem that these digits work perfectly by testing single led segment, but when i test a line of 5 digits
i see correctly only the 5 number. I make external source and not from arduino with arund 4.5 v.
2020-10-05 13:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Please... Give us more information.

How do you wire them to the Max chip ? How are the configs done. What Value is in use and so on.

For example ....
iconsisoffi:


From test seem that these digits work perfectly by testing single led segment, but when i test a line of 5 digits
i see correctly only the 5 number.



So what does this mean.... You like to show 12345..... Are 4 digits blank and the last show 5 like _ _ _ _ 5 OR Does the first show that Number Like 5 _ _ _ _ OR does ALL show that Number like 5 5 5 5 5 ????

Please.... Always remember we not see your Display. We not see your wirework we not see your configs..... and finaly we not know what you basicly like to do.
So Pictures, videos or much much more detailed text explentations !
Good Luck !
2020-10-05 14:44
Avatar
sisoffi
Posts: 91
Thank you pizman,
the display in TEST mode show me in the 5 digit display:
the first 1 2 3 4 leds like I I
the last is perfect 5

I use a max chip with a own board build ( i use it for other projects and is very perfect)

I want to send you pics video but seem very difficult to post it inthis forum.
What can i do to document with them?

thanks
sImone
2020-10-05 23:32
Go to page 1Go to page 012Go to page 2Go to page 2