Ok here is what I am doing. I am using :
Public Function Plane_heading() As Single
Dim x As Long
Dim dwResult As Long
Call FSUIPC_Read(&H580, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
Plane_heading = x / 65536 / 65536 * 360
End Function
I get a return of .312
If I do this:
Dim Vcount as long,MY_Heading as Single
If FSUIPC_Read(&H580, 4, VarPtr(Vcount), dwResult) Then
If FSUIPC_Process(dwResult) Then
MY_HEADING = CSng(Vcount * 360#) / (65536# * 65536#)
End If
End If
Text1.Text = MY_HEADING
I get .312 my plane gyro compass is reading 340 whiskey is reading 340
But if I get the Auto Pilot heading I am doing this:
Dim APHeading As Long
Dim Convert As Single
Call FSUIPC_Read(&H7CC, 4, VarPtr(APHeading), dwResult)
Call FSUIPC_Process(dwResult)
Convert = (APHeading * 360) / 65536
Me.Caption = Convert
I get a return of 339.9 I can round. Thats not big deal.
Can someone help me with the plane heading.