Jump to content
The simFlight Network Forums

russellbdavis

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by russellbdavis

  1. In the documentation for FSUIPC, there are many references to AI traffic commands. There is even a "TrafficControlDirect" setting regarding AI commands. There is a reference to "known lists" of AI commands. But I am a loss as to what AI commands are available, and how any of them would be implemented. Does anyone have insight into this?
  2. Thanks Pete, I have it all working now. It seems once the aircraft was off the ground, then the values I passed to 0570 started working. I came to you hoping you would simply tell me how to correct my error, not simply point it out. I knew something was wrong and sought your guidance to correct it. Simply insulting my choice of programming language, and your assumption that I am simply ignoring the documentation, and just downright rude responses are not beneficial to anyone. So, I was able to ascertain the problem and correct on my own. And since you yourself have declared you are not a VB programmer, then please refrain from such judgements about the langauge. There isn't a program I have yet to create that can't be accomplished as well or as fast as VB. That is my opinion. I'm not going to sit here and put down other language products, that is not what I came here seeking. So enjoy your holiday, no need for any further response.
  3. Pete, I did post my code. What do you think that was? And I have been using FSInterrogate to examine what is possibly happening. I've tried using INTEGERs, DOUBLES, SINGLES, CURRENCY and the like. I've tried writing to both 0570 and 0574 in every possible configuration I can muster. And you are right, this should not be that difficult. A 4 byte variable will be 32 bit. But yet, writing to that offset does nothing. Simply converting my feet to meters and storing that into a variable does not work either. And if you don't know anything about VB, how can you conclude I should use a 'decent language'? VB is an extremely powerful language, and I have been using it since 1991. I am well versed in the language, and that is not where the breakdown is. Also, BTW, your comment about the inflight or onground variable is incorrect. According to your documentation, you write a 0 for in-flight, or a 1 for on-ground at offset 055C for your initial position.
  4. thanks Pete, I'll keep digging. I too have been searching Google for examples of setting the altitude at offset 0570.
  5. The biggest difficulty with VB 6.0 is it does not support 64 bit variables. The currency type is the only thing that can be used. I did find an example in the VB folder of your SDK that references the Fake64bit function. I will have to experiment with that. I am also wondering if the offset that says the aircraft is in flight or on the ground could be causing a problem as well. I had this whole project working earlier and the result was really exciting. But I failed to save it for some silly reason and once I reopened the project, the code that was working was gone. You may or may not remember, but a few years ago I had a motorcycle wreck and it did wreak havoc on my memory abilities. So I appreciate your patience and understanding. :-)
  6. Pete, I am hoping you can tell what I NEED to store in the memory location. Simply storing the actual meters at 0574 is not working. An integer in VB is 4 bytes. I have tried saving the integer of my altitude (in feet) * .3048 in memory location 0574. For instance, my initial altitude is 2027.48 feet. 2027.48 * .3048 is: 617.975904 meters. If I stored the integer of 618 at 0574, the plane still sits on the ground while its moving.
  7. well, I had it working and then I screwed something up. Here is my code: Dim dwResult As Long Dim x As Long Dim pitch As Long Dim bank As Long Dim heading As Long Dim PitchRate As Integer Dim YawRate As Integer Dim RollRate As Integer Dim TempAlt As Long PitchRate = 16384 YawRate = 0 RollRate = 0 dlat = rc!RUPLAT dlon = rc!RUPLON x = dlat * 10001750 / 90 FSUIPC_Write &H564, 4, VarPtr(x), dwResult x = dlon * 65536 * 65536 / 360 FSUIPC_Write &H56C, 4, VarPtr(x), dwResult '===============write the pitch/bank/heading values============= pitch = rc!VTHETADG * 65536 * 65536 / 360 bank = -rc!VPHIDG * 65536 * 65536 / 360 heading = rc!VPSIDG * 65536 * 65536 / 360 FSUIPC_Write &H578, 4, VarPtr(pitch), dwResult FSUIPC_Write &H57C, 4, VarPtr(bank), dwResult FSUIPC_Write &H580, 4, VarPtr(heading), dwResult '================================================================ 'set the yaw roll and pitch rates to 0 FSUIPC_Write &H5E4, 2, VarPtr(RollRate), dwResult FSUIPC_Write &H5E6, 2, VarPtr(YawRate), dwResult FSUIPC_Write &H5EE, 2, VarPtr(PitchRate), dwResult '=================write the altitude============================= TempAlt = Val(rc!VHH) TempAlt = (TempAlt / 3.28084) * 65536 FSUIPC_Write &H574, 4, VarPtr(TempAlt), dwResult FSUIPC_Process dwResult Everything is working except the altitude.
  8. Thanks Pete, Well...I'm not sure what I did exactly, but it is now working. I am using FSX to playback data captured from a CAE Boeing 737-800 used by the FAA in research. So I am real happy that I was able to playback data from a multi-million dollar device using FSUIPC. :-)
  9. Can anyone give me a code example of setting the altitude at offset 0570 using Visual Basic 6.0? I have searched the forum and found fragments of issues regarding offset 0570, but not a single complete example. Any help would be appreciated. I am using slew mode and have resolved the lat/long problem I was having. But, now when I attempt to set the aircraft altitude, it sits on the ground (at the current elevation) and does not change no matter what I write to that location. So, I am not sure if I am using the correct variable declaration, and/or equation.
  10. Hi Russell, Yes you need to use currency as that's actually a 64bit integer in VB6. The code at the top of the following thread shows how to read the lon and lat in VB6. You just need to reverse the process to write them. http://forums.simflight.com/viewtopic.php?f=54&t=72968&start=0&st=0&sk=t&sd=a Paul Thanks Paul, this will help me greatly.
  11. Pete, I purchased a license for FSUIPC for FSX at simMarket. And then I obtained the FREE SDK.
  12. Yes Pete I am using the SDK, I just purchased it a few days ago. And yes it appears double is a falacy on my part. I will look into the integer variables. But I'm not certian, but I think VB 6.0 does not have a 64 bit integer type. I am aware of the currency type and that may be the solution. Thanks.
  13. greetings, If this topic has been covered I do apologize. I'm just now getting back into using the FSUIPC library and have hit a roadblock. I am using FSX to playback research data captured from a Boeing 737 simulator, and an Airbus. I am attempting to pass the lat/long pairs to the proper offsets using FSUIPC. My lat/long pairs are in the form 40.xxx, -75.xxx, etc. Does someone have the proper equation to convert these to the 8 bit doubles needed for the proper FSUIPC_Write function? I am using VB6.0 and I think it does not support 64 bit doubles, I am getting an overflow error. Thanks.
  14. Anyone have a code snippet using VB6 with FSUIPC to setup HOT KEYS in the Free Slots area (beginning with 0x3210) and then detecting a keypress from within FS? Say, for instance a combination of [CTRL] + [R]. Any help would be appreciated.
×
×
  • 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.