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
krono
Posts: 17
Hi
I have designed and made an attitude indicator gauge suitable for one of the basic 6 gauges in a cessna 182 in Prepar3d using 2 stepper motors. The offsets used for the gauge are

Attitude bank 0x2F78 Float 8 Bytes
Attitude pitch 0x2F70 Float 8 Bytes
2BBY-48 stepper motors
mobiflight 7.6.1 Build 20190911
arduino mega

These offsets a fine for the default or A2A planes.
The gauge works well until you pass 179 degrees in the bank. FSUIPC gives the bank as a float64 in the range -179 0 179. I am almost positive it never gains 180. If the plane angle passes 179 then the output goes straight to -179 in the same direction. The normal compass mode does not work as it is based on 360 and 0 at the top. Can anyone think of a way to have the stepper continue in the same direction as in a roll when passing the 179 degrees to - 179 degrees.

Thanks for your help and if you need any more information just ask. This is the last gauge I have built in the basic 6 and all others work beautifully. Thanks for this great piece of software. The addition of the "config references" in Version 7.6.1 have made it a lot easier in programming.

Ken Ennis
2019-09-24 07:53
Avatar
krono
Posts: 17
Hi Sorry I forgot to say that at the moment when reaching 179 the stepper reverses direction back through 0 to get to -179. Very similar to the problems people were having with the compass in the past.
2019-09-24 07:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2916
Supporter
Hi

Can you link a photo of your gauge ( or a picture from someone else in the internet with a simmular gauge ??

I not fly cessna (love my 737) but i always thought those gauges got a Endstop (maby at 45 degrees) ..... 180° angle means you will fly head down to the earth.
I´m not sure but i think a real gauge will also not turn "over" the 180° Point..... its maby limmited at 45 or 90° and it also will go backwards to the other side.... correct ?

Whatever.... I not tested this out but we should find a way pretty sure.....
The Compass Mode would be the key.
This mode is not fixed to the 359-0 border..... Compass mode still means a value that "over- or underrun the Limit ( in your case -179 - +179) will NOT turn back and the system simmulate something like a new area below or above..... So system see a swap from -179 to +179 but say to stepper it should show -180...-181...-182 and so on .... so it turn again in same direction.


**************
Summary.
Please check the facts..... And tell me if you realy want/need a indicator that can turn over the 180° Point. If yes we need to find a way.
Good Luck !
2019-09-24 09:18
Avatar
krono
Posts: 17
Hi

The attitude indicater is based on this
https://www.flightillusion.com/product/gsa-036-attitude-indicator-brown-blue-with-pitch-adjustment/
As you can see from the video the outside bank ring rotates through a full 360 degrees.
I will keep on trying on the compass mode.
The link above shows a photo and a small video of the gauge in operation. As you can see it has a signed input from 0 to 179
I have the pitch all ok and as you can see it is attached to the bank disc. It is only the 179 degree rollover that has given me problems.
You are correct when with the standard bank gauge not going past a certain point but this one certainly does. Thanks for your input and help.


Ken
2019-09-24 09:43
Avatar
krono
Posts: 17
Hello again.

Thankyou for your previous input. By ticking compass mode and then in comparism settings using if current value is < 0
set it to 360+$
else set it to $


I hope this will help others later as well

Ken
2019-09-24 12:47
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2916
Supporter
Yes.... This would be the next step ;)

Please just check if formula is correct..... If i remember right it must be if $<0 then $+359 NOT $+360

This is basicly no big deal..... But i think with the +360 formula the Position is wrong by 1 degrees.
Good Luck !
2019-09-24 21:23
Avatar
krono
Posts: 17
Hi pizman

In this case the 360 is correct since you want -179 to correlate to +181. Therefore 360+(-179) = 181. This follows through to 360+(-1) = 359.
Thanks for your input and have a good day. :)
Ken
2019-09-25 02:00
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2916
Supporter
Right.... Got wrong logic....

That just means there exist no 180° Spot ....
I´m sorry.... I just think about the missing 180.... But sure. With my logic there would be a missing 359° Spot.
Good Luck !
2019-09-25 06:53
icon