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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.