Jump to content
The simFlight Network Forums

Indagroove

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Indagroove

  1. What I do is grab the 23000 airports out of flight sim and place them somewhere I can get to them easily (database works good for this).

    Then I check the latitude and longitude and if they are within 4 miles of where they are at then they must be at that airport.

    I know that last sentence did not make any sense LOL.....

    Basically you check both the latitude and longitude of the current location and match those lat,lon settings against the database.

    Search google for 1 mile in latitude and longitude for calculations, I forget them at the moment.

    Mike

  2. This is what I use....

    If FSUIPC_Read(&H560, 8, VarPtr(Fake64Bit), dwResult) Then

    If FSUIPC_Process(dwResult) Then

    StartLat = Fake64Bit * 10000#

    StartLat = StartLat * 90# / (10001750# * 65536# * 65536#)

    modVars.StartLatitude = StartLat

    End If

    End If

    It does return a decimal like -122.23456 or something.

    Fake64Bit is a Currency Declaration. It fakes VB out to grab floating 64 bit info.

    If you dont force the doubles (#) you will constantly get overflow errors.

    Mike

  3. Well, in the VB SDK it states that VB does not do 64 bit info. BUT you can cheat it.

    Use a Currency variable for Floating 64

    Then use that Fake64Bit and do your calculations with doubles to prevent overflows....

    A = Fake64Bit

    A = 360# / (65536.0#*65536.0#)

    The # forces the double. Without it you will get overflow errors

    Mike

  4. I have just one question for you VB gurus out there.

    I have a form with a timer on it.

    The timer sub reads info from FSUIPC when enabled.

    Simple enough right.

    Well it works great when I run it from inside visual studio. But when I compile and install, once that timer is enabled the whole program dissapears. No errors, no nothing.

    Everything else works fine, but once the timer is enabled to read info from FSUIPC it just quits.

    It doesnt do it in Visual Studio though, weird. Im confused.

    Any Ideas? Need More Info?

    Thanks

    Michael Smith

    Zion Virtual Airlines

    Chief Operations Officer

×
×
  • 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.