Mark737NG Posted March 9, 2004 Report Posted March 9, 2004 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
rickalty Posted March 9, 2004 Report Posted March 9, 2004 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now