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
JuanJose1
Posts: 19
por que mobiflight al configurar el autopilot HDG da valores negativos
2020-06-21 17:37
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3520
Supporter
Hi

Please in English or german only..... Use google Translator if you not speake these language !!!

About your question:

Mostly this is a signed / Unsgined Problem..... For exampe a 1 Byte Offset can have a Value of -128 to +127 OR a value of 0-255

If the Offset is read in wrong way then it show on the upper half a negative value..... Here you need a Compare like IF Value <0 THEN $+256 ELSE $
For a 2 Byte offset it should be IF $<0 THEN $+65536 ELSE $

Please try out !
Good Luck !
2020-06-21 23:39
Avatar
RudyB
Posts: 25
This is how I configured HDG:


...
Always have fun!
2020-06-22 13:29
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3520
Supporter
iconQuote:

07CC 2 Autopilot heading value, as degrees*65536/360



The standard Heading need normaly a formula to reverse the logic from FSUIPC
Use Transform : $*360/65536

I´m not sure if this solve the Negative Problem already..... If not the needed compare now should be
IF Value <0 (less then zero) THEN $+360 ELSE $
(Thats cause now the result is already degrees but all above 180° is shown as -180...-189...-178 and so on.


NOTE: Interpolation is normaly wrong here. I recommend to not use it in this situation !
Good Luck !
2020-06-22 15:20
Avatar
RudyB
Posts: 25
I would hope the interpolation would results in the same mathematics?

When I tested the settings like in the screenshots, HDG worked properly ... it went from 0 >> 359 >> 0 and it also went backwards without negative values.

Of course I can always revert to using the formula if it goes wrong.
Always have fun!
2020-06-23 17:39
Avatar
JuanJose1
Posts: 19
ok sorry for the language
I will test your solutions, Thanks.
2020-06-23 19:29
Avatar
JuanJose1
Posts: 19
Thank you very much for everything, it worked perfectly.
2020-06-23 20:14
icon