Jump to content
The simFlight Network Forums

doia

Members
  • Posts

    16
  • Joined

  • Last visited

doia's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Pete, Thanks for the help.I got confused, my PC has plenty of memory, and it does seem a whole lot easier to just make the buffer the size equal to the offset space so I will just take your suggestion. One last question, what exactly do you mean when you say: Regards, Isa
  2. Yes you certainly can, and in fact it is by far the best way! There is no reason why the offset (0x8954) and size (5) in my example can't be from parameters. Just loop reading the parameters, doing the reads. Then one Process. Wouldn't I still need 300 different memory locations to store these values then?
  3. Pete, Thanks for the help- again. For my application I don't know how much data I'll be requesting - it is dependent on an external input - so it would be impossible to allocate a separate variable for each read request and build up the Read requests, hence my question about saving all data to a larger buffer. So that you have a better idea of what I want to do here's the outline of my application: The program reads an input file: INPUT FILE Parameter name / parameter location / conversion factor Lateral Acceleration 45 0.2223355 Vertical Acceleration 70 1.23333 Then my program looks up the name, correspondent offset number, byte size, conversion factor and "receptacle type" from a second file like this: LOOK UP TABLE Lateral Acceleration 0x6040 8 0.2223355 double The program uses the values acquired from the Table as the inputs the FSUIPC_Read request. Because my input file is "volatile" and has a huge quantity of parameters (300) I can't make individual reads and writes. My final output should do be an array with (the lateral acceleration from sim * conversion factor form input file) stored on its 45th index(parameter location from input file). Regards
  4. Pete, How would I go about to store all of the offset data into a large buffer? I figured this is the best way to request large amounts of parameters(requested by an external input) without having to make multiple Process calls. Then I can pick the data requested by the input from that buffer. I am just not sure what type of buffer receptacle or offset number to use. char buffer[Max_size];? FSUIPC_Read(0x230, 200?, &buffer?, &dwResult) Regards, Isa
  5. That is exactly what I would like to do. I have already implemented data length but the variable receptor type is what I was having problems with. I had briefly looked at FSInterrogate before but now that I am actually reading the manual I can see it will save me a lot of work. Thank you again Pete! Best Regards, Isadora
  6. Well you pointed out earlier that in order to actually store the parameters into the allocated memory I need to run the FSUIPC_Process call after my FSUIPC_Read requests. You also pointed out that it is highly undesirable to make multiple Process calls as it slows down FS and FSUIPC. I am no expert programmer and I understand my scope of resources in C is quite limited but I thought that having an array would be the easiest way to allow me to do those multiple read requests, defining a different memory location for each read request in a semi-automated fashion. It would allow me to have a generic acquisition code without the need to do multiple Process calls. I will post my results here. Thank you for all your help and for clarifying everything Pete. Regards, Isadora
  7. Pete, Sorry for my confusion and thank you for the help. Perhaps I can allocate memory inside an array of elements and have FSUIPC_Read store the value in a different element of that array each time it is called inside a loop - this way I can have a rather generic call and limit the amount of FSUIPC_Process calls by using it only after a certain number of read requests. I currently have my program look up a table to find the corresponding FSUIPC offset and byte size. My second idea would be to add a "flag" to each parameter in the table that would guide the program in calling the appropriate data receptacle. The call would not be exactly generic but this seems like a fairly simple solution.
  8. Hi, I am writing a program to acquire FSX parameters using FSUIPC in C. I am having a hard time acquiring some values- all they seem to return is zero. Examples of parameters that return zero every time: 11C6, 11D0, 31E4, 0609 Examples of parameters that return the correct value: 0240, 3060, 6020 I am using the same code for every parameter acquired: double sim_value =0; FSUIPC_Read(param_offset, param_bytes, &sim_value, &dwResult); My guess is that I am getting zeros because I am trying to acquire everything as a double and passing FSUIPC_Read incorrect data types for the third parameter. Can anyone please explain how I should about acquiring all values using a generic code? If it's not possible to use a generic code then how do I know the correct data type to pass on to the function?
  9. Does anyone know FSUIPC offsets that acquire the state of CMD A and CMD B (autopilot) and CWS (control wheel steering) A and B for the B737?
  10. Hey Pete, I am trying to acquire real time values from FSX using FSUIPC. I have noticed there's a delay (a few milliseconds) in acquiring values from FSX paused compared to when it is running. I would like to know if this flaw is inherent to my code or to FSUIPC itself and how it connects and acquires values from FSX paused. I was hoping you could answer that question. Cheers, doia
  11. Hey Peter, This is a programming related question rather than FSUIPC specific. I need to write an application that accesses flight data from a buffer. I noticed that FSUIPC allows multiple processes to request FSX data at the same time and they magically don't interfere with each other I am having a hard time doing that (after one process is already open all additional processes won't run) could you please point me in the right direction or give me some tips? Any help is much appreciated! Cheers
  12. Hi Peter, I am trying to link an application to Flight Simulator via FSUIPC. I am having some trouble getting my application to run and link properly and I was wondering if you could tell me what compiler settings/compiler version you used for the FSUIPC library so I could match it when I am trying to compile a .dll file that goes into my application. More specifically I would like to know: compiler used, preprocessor definitions, Runtime Library Setting and any additional dependencies. Thank you in advance!
  13. You are right Pete, It is the same. :oops: I wasn't aware of the existence of the "on ground flag" (0x0366) and that will do just fine. Cheers!
  14. I need to obtain a Weight on Wheels Boolean (1 if there's weight on the wheels 0 if not). I know there is no such parameter readily available from FSUIPC, I have been brainstorming how I could come about deducing it from the existing parameters. So far this is what I have: - Check if landing gear is up or down - which wouldn't work if landing gear is not retractable - Check Absolute Altitude - which one of the offsets is absolute altitude? - Check if Speed is lower than Stall Speed - aircraft is most likely taxing If all these conditions check then Weight on Wheels =1. Any suggestions/correction to my line of thought would be greatly appreciated!
  15. just added this: #pragma comment(lib,"user32.lib"); under #include and now it compiles fine=) values coming in perfectly! merci
×
×
  • 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.