Jump to content
The simFlight Network Forums

Recommended Posts

Posted


'declare it only once on top - class/form level

Dim APHeadingValue As Offset(Of UInteger) = New FSUIPC.Offset(Of UInteger)(&H7CC)

-------------------------------------------------------------

'could be done in a shorter and or different way

Dim APHaeding As Integer

APHeading = 350 (assign heading)

'whatever you calculate before, p.e. Hdg + a Wind-Drift-Value

If APHeading > 360 Then

APHeading = APHeading - 360

ElseIf APHeading < 0 Then

APHeading = 360 + APHeading

End If

'AP Heading Value in ° 16384 = 90°

APHeading = APHeading * 182

If APHeading > 65536.0 Then APHeading = 65536.0

APHeadingValue.Value = APHeading 'set Hdg to AP

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.