superdudes
-
Posts
8 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by superdudes
-
-
Heres my code which seems to always be spot on....
Dim dwResult As Long Dim latitude As Double Dim longtitude As Double Dim FakeLat As Currency Dim FakeLon As Currency Call FSUIPC_Read(&H560, 8, VarPtr(FakeLat), dwResult) Call FSUIPC_Read(&H568, 8, VarPtr(FakeLon), dwResult) Call FSUIPC_Process(dwResult) latitude = FakeLat * 10000# latitude = latitude * 90# / (10001750# * 65536# * 65536#) longtitude = FakeLon * 10000# longtitude = longtitude * 360# / (65536# * 65536# * 65536# * 65536#) Lati.Caption = latitude Longt.Caption = longtitude
-
Ah right ok, thanks for the explanation !
Must have been a programming error on my point.
Ive managed to get everything else working from the documentation no problems and just couldnt get this to work!
-
Couldn't you find that? What documents are you using?
OK, Maybe I didnt expain everything correctly, but I did use the documentation provided and also the FS Intergrate program.
double hdg = value_read; hdg = (hdg * 360.0) / (65536.0 * 65536.0);
This is what I tired, however the actual heading value when it was between 360 and 180 was a few degrees out (which wasnt really a problem), it was when it went between 180 and 360 that I had the issues of a negative number
-
Hi There
Was just wondering if someone could help me, I am trying to read the aircraft heading from FS.
Ive set the variable up but having issues with converting it from raw to the heading!
Could anyone post their code to do this or tell me what the conversion is!
Many thnks
Chris
-
The code at the top of the following thread shows how to read the lon and lat in VB6. It uses a currency type which is actually a 64bit integer type in VB6.
http://forums.simflight.com/viewtopic.php?f=54&t=72968&start=0&st=0&sk=t&sd=a
Paul
Got it working, thanks to the link!
Thanks a lot!!
BTW, do statements like
latHi = "0"
really work, and give no compilation error? You declared "latHi" as a Double yet you appear to be assigning a string to it!
Regards
Pete
Dont know Pete, I was just trying to convert the code I had found into visual basic code, and failing miserably!!
-
So should I be able to read the full variable into a double instead of getting 2 parts? I was just following the tutorial as I wasnt sure where to go! Only have basic knowledge of Visual Basic, more of a php programmer myself!
-
OK, So im create an ACARS style program and have got it working to extract everything i need so far, only problem im having is with the latitude and longitude and was wondering if someone could point me in the right direction!
Ive adapted the code from http://www.mycockpit.org/forums/showthr#post87129
And got this
Dim dwResult As Long Dim latHi As Double Dim latLo As Double Dim latitude As Double Dim longHi As Double Dim longLo As Double Dim longitude As Double latHi = "0" latLo = "0" latitude = "0" longHi = "0" longLo = "0" longitude = "0" If FSUIPC_Read(&H564, 4, VarPtr(latHi), dwResult) And FSUIPC_Read(&H560, 4, VarPtr(latLo), dwResult) Then ' "Read" proceeded without any problems If FSUIPC_Process(dwResult) Then ' "Process" proceeded without any problems If latLo = "0" Then latLo = latLo / (65536# * 65536#) End If If latHi > 0 Then latitude = latHi + latLo Else latitude = latHi - latLo End If Lati.Caption = latitude End If End If
Any ideas or if I can extract it using a 64 bit integer using VB6? Ive tried a double but got nothing out of it, have been using FS Interrorgate to read the values and try and match up what it says with what I get!
Any help would be much appreciated!
Failed to open a view to the file map
in FSUIPC Support Pete Dowson Modules
Posted
Hi guys,
I did try and search the forum for an answer but the search page kept timing out!
Anyway, I have created a logger program for my VA that tracks startup time, position shutdown time etc etc, and some of my pilots are reporting this error message from FSUIPC
Failed to open a view to the file map
Was wondering what it means and if theres a fix or if its something I have done wrong?
Thanks in advance
Chris