Jump to content
The simFlight Network Forums

Emre5134

Members
  • Posts

    4
  • Joined

  • Last visited

Emre5134's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ok I solved the problem.I tried to insert the value to the database using this sql: rs.open "insert into table(latitude,longtitude) values (" + latitude + "," + longtitude + ")",connection, adOpenStatic, adLockOptimistic I guess the problem was about the "+" symbols I used in the sql. I changed them with the "&" symbol and the problem is solved. Thank you
  2. Hi everyone, I'm working on a little program which will insert aircraft's current latitude and longtitude to a mysql database. I am using visual basic 6. In VB I get the position data from FSUIPC as DOUBLE data type. But when I try to insert these data to the database I get a type missmatch error. The data types in mysql are DOUBLE as well. I also tried decimal and float in mysql but I got the same error message. What's the problem here? If anyone knows the answer I'd appreciate your help edit: I get the position from FSUIPC using these codes: Dim latitude as Double Dim longtitude as Double Dim FakeLat As Currency Dim FakeLon As Currency Dim dwResult As Long 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#) Thank you
  3. Thank you for your answer Pete, my problem is about using those values in the database. For example, I have coordinates of a runway's four edges in the database and I know the plane's current coordinates but I couldn't figure out how to check if the plane is on runway or not. Plane might have plenty of different coordinates while on the runway so I can not compare with only one coordinate I guess I need a mathematical equation but I couldn't make up one. So if there is anyone who also made something like this before I would really appreciate your help. Thank you
  4. I'm making a flight recorder for a virtual airline and I need to log pilots' actions but I'm having some problems. I need to know if the pilot lands at the correct airport, what the nearest airport is and if he is on runway or not. I couldn't figure out a way to get theese information out of FSUIPC. Any help would be appreciated . Thank You PS:I'm using Visual Basic
×
×
  • 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.