Jump to content
The simFlight Network Forums

jd

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by jd

  1. i think the second write should be Call FSUIPC_Write(&H32FA, 2, VarPtr(marker), dwResult) write not writes and is your output string ending with a zero? output = output & chr$(0) jd
  2. works like a champ here. no problems jd
  3. the last time i tried was back in fs2000 and fs2002. there was something screwy. it seemed to be a factor of how much "altitude" the landing gear gave the plane, maybe a little barometric pressure. just when i had it working on my lear, i'd switch to the 737 and it was a bouncing betty. i gave up. i just told the user to place their plane at the departure airport before starting radar contact :-) jd
  4. i use Public Function set_Plane_Lat(lat As Single) As Single ' Planes latitude Dim x As Long Dim dwResult As Long x = lat * 10001750 / 90 Call FSUIPC_Write(&H564, 4, VarPtr(x), dwResult) Call FSUIPC_Process(dwResult) End Function Public Function set_Plane_lon(lon As Single) As Single ' Plane's longitude Dim x As Long Dim dwResult As Long x = lon * 65536 * 65536 / 360 Call FSUIPC_Write(&H56C, 4, VarPtr(x), dwResult) Call FSUIPC_Process(dwResult) End Function let me know if you figure out how to make the plane sit nicely on the ground, and not bounce up and down jd
  5. this is what i use Public Function fix_to_fix_distance(lat1 As Single, lon1 As Single, lat2 As Single, lon2 As Single) As Single Dim pi As Double Dim degtorad As Double Dim latx1 As Double Dim latx2 As Double Dim lonx1 As Double Dim lonx2 As Double pi = 3.1415926535 degtorad = (pi / 180) latx1 = lat1 * degtorad latx2 = lat2 * degtorad lonx1 = -lon1 * degtorad lonx2 = -lon2 * degtorad fix_to_fix_distance = ArcCos((Sin(latx1) * Sin(latx2)) + (Cos(latx1) * Cos(latx2) * Cos(lonx1 - lonx2))) fix_to_fix_distance = fix_to_fix_distance * 180 * 60 / pi End Function
  6. this will set the keys. it assumes that keys you want to set are in key_codes(i) and that the corresponding offsets are put into key_offsets(i) Public Function set_keycodes() Dim x As Long Dim i As Long Dim k As Long Dim dwResult As Long Dim j As Long Call FSUIPC_Read(&H320C, 4, VarPtr(x), dwResult) Call FSUIPC_Process(dwResult) If x = 56 Then i = 1 For k = &H3210 To &H32F8 Step &H4 Call FSUIPC_Read(k, 4, VarPtr(j), dwResult) Call FSUIPC_Process(dwResult) If j = key_codes(i) Then 'can we find our hot key key_offsets(i) = k i = i + 1 ElseIf j = 0 And i <= 28 Then 'can't find it, find an empty slot and write it out Call FSUIPC_Write(k, 4, VarPtr(key_codes(i)), dwResult) Call FSUIPC_Process(dwResult) key_offsets(i) = k If debug_flag Then Debug.Print i, key_offsets(i), key_codes(i) i = i + 1 End If If i > 28 Then Exit For 'done entering hot keys Next k End If End Function
  7. i don't think anyone will pay a dime for your information on how you fixed your pc
  8. send me an email, and i'll see if i can help. jd@jdtllc.com
  9. you need build 2191 or later, which is on http://www.jdtllc.com/rcv3/rcv31.zip please read http://forums.avsim.net/dcboard.php?az=8396&page= because there additional files you will need to download jd
  10. yep, it was me :-) here is my code that i use, and it works :-) sstring = "ABCD1234WXYZ" & Chr(0) Call FSUIPC_WriteS(&H8001&, Len(sstring), sstring, dwResult) ' Call FSUIPC_Process(dwResult)
  11. you may want to change the line If FSUIPC_WriteS(&H8001, 12, "123456789012", dwResult) = False Then to If FSUIPC_WriteS(&H8001, 13, "123456789012" & chr(0), dwResult) = False Then
  12. you might also consider doing one fsuipc_process, instead of a bunch
  13. you might also consider doing one fsuipc_process, instead of a bunch
  14. mine says 2.975 while running in fs2002. did you try to unzip the .dll while fs2002 was running?
  15. in fs200x/modules/fsuipc - what does the version number say? it maybe the dll's properties are updated to reflect the current build number
  16. ask yourself, is this a variable/value that is influenced by flight simulator or the pilot/user if the pilot/user can adjust the value (comm frequencies, auto pilot heading hold value, brakes, lights, etc), then you can write through fsuipc. this doesn't always hold true, but in general....
  17. congrats pete on the forum. i'll see if i can answer a couple of posts here and there.
×
×
  • 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.