Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Does anyone have any VB6 code for NAV1 OBS or radial

0C4E 2 NAV1 OBS setting (degrees, 0–359)

0C50 2 NAV1 radial ( *360/65536 for degrees)

and

02A0 2 Magnetic variation (signed, –ve = West). For degrees *360/65536. Convert True headings to Magnetic by subtracting this value, Magnetic headings to True by adding this value.

Just being lazy really but Im hard up for time at present

Loads of code to offer in return!

Cheers

Mark

Posted

To convert the FS value from 2A0...

Dim Variation As Long

Call FSUIPC_Read(&H2A0, 2, VarPtr(Variation), dwResult)

Call FSUIPC_Process(dwResult)

Variation = (Variation / 65536) * CLng(360)

For 0C50 it's exactly the same.

For 0C40 the ame but ignore the correction, it reads straight out in degrees.

Richard

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.