BoXon Posted August 2, 2008 Report Posted August 2, 2008 Hey! I have a problem once again, i'm trying to read the current Longitude & Latitude of my aircraft in FS, but using this code:' Dim dwResult As Long Dim longfake As Currency Dim currentLong As Double Call FSUIPC_Read(&H568, 8, VarPtr(longfake), dwResult) Call FSUIPC_Process(dwResult) currentLong = longfake * 10000# currentLong = currentLong * 360# / (65536# * 65536# * 65536# * 65536#) longitude.Text = currentLong ------------------------------------------------------------------------------------------ It returns something like this: -123,029740092334 Thats not what i want? :shock:
quantumleap Posted August 2, 2008 Report Posted August 2, 2008 You say the value isn't what you want, but is it correct? While you do not say where the aircraft actually is, I would guess that you are trying your code with the default FSX starting flight near Friday Harbor which does in fact have a longitude near -123.029740092334 in decimal degrees notation which is what your code is written to return. If you want it to appear in another format like degrees minutes seconds (e.g. W123 1' 47'') or degrees and decimal minutes e.g. (W123 1.784') you are going to have to do the conversion yourself. Jeff
AirFlo737 Posted August 2, 2008 Report Posted August 2, 2008 Well, what would you expect? Looks like 123°01'47" W to me. What Longitude does the Flight Simulator give you? Greetings Florian
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