Jump to content
The simFlight Network Forums

Jason Fayre

Members
  • Posts

    119
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Jason Fayre

  1. Hello, I'm working on interfacing the A2A Bonanza aircraft to my Talking Flight Monitor accessibility software. I'm having some odd issues when trying to set l:vars. Whenever I try to do anything with the 0x0d70 offset, the command just doesn't seem to register occasionally. It doesn't matter if I use 0d6c and 0d70 to send a setting to an l:var directly, or if I use 0x0d70 to attempt to trigger a macro that toggles an l:var. Often, the command will go through fine. However, if I attempt the command several times in a row, several of them won't be sent to the sim. If I define a macro, then assign a key to it in the sim, it works 100% of the time. So, it's something to do with either FSUIPC itself, or the pyuipc python module I'm using. I know my code is working, since the macro does work most of the time. This is Prepar3d 4.5 and FSUIPC 6.0.8. Does anyone know of anything that could cause writes to offset 0d70 to not be sent to the sim?
  2. Perfect. Thanks! I'll take a look at this later today. I may be able to get away with using offsets, but this gives me a lot more flexibility if I can get this working.
  3. So what would I need to do to get this working on a 64-bit install? Do I still need the lua socket library from somewhere?
  4. Hello, I'm writing a LUA script for controling the A2A bonanza for my Talking Flight Monitor accessibility software. Has any solution been found for using lua sockets in p3d v4? I know that the existing LUA implimentation won't work. In the FAQ, there is a solution posted, but the proper DLL for 64-bit isn't available. What is the best way for communicating between my external software and a LUA script? I can use reserved offsets, but that may not give me enough space. I need to pass strings to my applications to be output with text-to-speech when l:vars change. I tried just using l:var read/write calls in my application, but had some strange results. This was possibly due to a problem with the pyuipc python module. I would rather not force my users to purchase WideFS if they don't need to. Any suggestions would be apreciated.
  5. Ron. This message doesn't belong in the FSUIPC support group. The software I'm writing is Talking Flight Monitor, formerly called Flight Following. I believe you are familiar with it. I'm not writing a simulator. The software is an add-on for Prepar3d and FSX.
  6. Thanks Pete, Just so I'm clear, I can also use the offset block at 4200 right? It seems like most people are using 66c0, but 4200 has more space available.
  7. Hello, In the flight sim accessibility software I'm developing, I want to add support for reading info from the A2A family of aircraft. I'm doing this by reading panel variables with a LUA script, then writing those values to offsets that my software will read. I'm noticing that some of the readings will periodically show 0. For example, when reading the Engine CHT gauge with the Eng1_CHT variable repeatedly (say once a second), I will sometimes just get a 0 value. This is with the A2A bonanza. I'm using the event.Lvar function to update offset 66c0 when the var changes. My question is, is this normal? I don't know if a2a makes these variables fluctuate on-purpose to make the gauges more realistic? I'm totally blind, so I can't visually see what the gauges are doing.
  8. ah ok! I think it just clicked. I was just misunderstanding the documentation. I assumed the NNNN part needed to be in the high 16 bits as well. How about my second question above, regarding the actual format of the write?
  9. Sorry, one more question, and I apoligize if this is a dumb newbie question. What format am I writing 0d6c in? I know 0d70 is a null-terminated string. IN the python module, I need to specify the format of each read/write. For 32-bit values, I only have the option of a signed or unsigned value. I can also specify the number of bytes to be written for a string. Here is the section out of the pyuipc readme, if that helps at all: 'data' should be a list of tuples of two items. The first item of each tuple should be an offset to read or write. The second item denotes the type of the value to be read from or written into the offset. it should be either a string or an integer. If it is a string, it denotes a type of a fixed size: - b: a 1-byte unsigned value, to be converted into a Python int - 😄 a 1-byte signed value, to be converted into a Python int - h: a 2-byte signed value, to be converted into a Python int - H: a 2-byte unsigned value, to be converted into a Python int - d: a 4-byte signed value, to be converted into a Python int - u: a 4-byte unsigned value, to be converted into a Python long - l: an 8-byte signed value, to be converted into a Python long - L: an 8-byte unsigned value, to be converted into a Python long - f: an 8-byte floating point value, to be converted into a Python double If the second item is an integer, it denotes a string. If the value is positive, the string is of a fixed length with no zero terminator. If the value is negative, its absolute value is the maximal length of the string, but the string itself is zero terminated.
  10. Thanks pete. I know how to write to offsets using Python, but I'm having some trouble understanding what to write/read to offset 0d6c. I understand that the user offset I want to store the data in from the l:var is in the low 16 bits, but what do I store in the high 16 bits? I've read the documentation, I'm just not totally understanding how this works.
  11. Hello, In the accesibility software I'm developing, I've been asked to interface with A2A aircraft. Many of the specific settings that A2A uses can be accessed with local panel variables. My question is, what's the best way to do this? I need to be able to read several variables from the sim and then pass the data to my software, I assume with a fsuipc offset? I may also need to write variables, based on user input from my software. I know I can do a direct read of an l:var with fsuipc offsets, but I can't quite work out how to do it with the pyuipc module in python. I've also read that this can be slow, especially if I'm reading a lot of variables. Is it best to do this with a lua script and then just write the data to some of the user defined offsets that my software can then read? I assume that someone will need a registered FSUIPC version for a lua script to work, correct? Any pointers would be apreciated.
  12. oh wow! I missed that one! Is that the same as subtracting the magnetic variation from the true heading? If so, I'll just use that.
  13. Hi, Thanks for this! That will probably help, but I don't understand why the values I'm getting are wrong.
  14. Hello, I've had a long standing bug in my code that I really need to figure out. Let me first say that math is absolutely not my strong point. When calculating magnetic heading, my result will read as over 360 once the heading wraps around. So, 5 degrees might read as 365, 15 might read as 375. I've used the same calculation as what is listed in the fsuipc record to CSV lua script, but I'm not getting the same results. My code is in python. All the other offsets I'm using (well over 100 now), are working great. It's just this one that's tripping me up. Here is the code I'm using. I really hope someone can sort this out. The variables mentioned are grabbing the raw offset data from fsuipc. self.headingTrue = self.instr['Heading'] * 360 / (65536 * 65536) self.headingCorrected = self.instr['Heading'] - (self.instr['MagneticVariation'] * 65536) self.headingCorrected = self.headingCorrected * 360 / (65536 * 65536)
  15. Hello, For the flight sim accessibility software I'm writing, I've been asked if there is a way of detecting when a user is on the runway centre line, either during take off or landing. I see that the r5.csv that is produced by Makerwys give CentreLat and CentreLong fields, but I'm having trouble figuring out what to do with them. Is this the position of the centre line at the start of the runway? Also, any reason this data isn't included in the runways.xml file? I'm using python, and XML is a bit easier to deal with. I'm sure this is possible to calculate, since I've seen other software give the number of feet left or right of centre when landing. Any help would be apreciated.
  16. Hello all, Using my Flight Following software for blind flight sim users, several people are asking me if there is a way to change the next GPS waypoint. When flying on Vatsim, the controller will often tell a pilot to go direct to a waypoint. The current autopilot software we use doesn't support this. So, is there a way I can do this through FSUIPC? In looking at the documentation, I can read the next waypoint, which I'm doing already, but can I actually change the waypoint, going direct to one further along in the flight plan? I know this can be done with the FMC, but that isn't accessible either for blind users. Thanks!
  17. Hello, First of all, I want to thank Pete and everyone else for your help. The advice I've received on this forum has been hugely helpful in developing my application. As I mentioned in an earlier post, one of the facilities my software provides is reading out SimConnect messages via text to speech. This allow a blind flight sim user to read messages from Pro aTC/X, GSX, Active Sky, etc. I just had an issue reported by a user who is using rc4. I haven't used RC4 in years. When RC4 displays it's menus, it has a waypoint line at the top of the display that updates with heading, time to waypoint, etc. This is causing the rc4 window to read every time this is updated. I assume this is because it is updating the SimConnect changed offset, so my script thinks it is a new message. I was hoping to use the event id to do some specific processing on RC4 messages, but the event id seems to always be 0. Does anyone have any suggestions on how I might handle this? All I want to do is read the new RC4 menu when it updates with new options, like I'm doing with GSX.
  18. Hello, I'm looking at the offsets and trying to figure what is the best way to determine if nav1 detects a localiser and glide slope. I think I saw a glide slope detected flag, but I don't see anything for localiser. Would I just use the localiser signal offset?
  19. Actually. I may have found something. Would the offset at 2EA0: Elevator Trim Deflection, give me what I need?
  20. Thanks Reinhard! So if I'm understanding this, the only way for me to get a human readable value from the trim is to read the aircraft.cfg file? If the max trim in the aircraft.cfg file is 19.5 degrees, how to I convert the value that FSUIPC returns into a degree value? I really apreciate the help!
  21. Hi Thomas. Thanks. Unfortunately, I am totally blind,so images aren't going to help. Can you please indicate the offset I should use? Also, is the info from the cfg file obtainable through FSUIPC, or do I need to get that some other way?
  22. Hello,, In the speech add-on I'm developing, I want to be able to indicate what the elevator trim is set to. In looking at the offsets, I can't quite figure out which offset to use, and what unit to convert the output to. If it is measured in degrees, how do I get that value? The documentation is usually really good, but this one has me stuck.
  23. Hello! I got a response back from the developer of the python module. He made a change for me that returns the string from fSUIPC as a python byte string so I can do my own decoding. The module was trying to decode the string as utf-8 before returning, but for some reason that wasn't working in my case. I think I've got that sorted out now.
  24. Hello, I'm writing an application using Python that uses the pyuipc module. One of the functions is to retrieve any messages that are sent out via SimConnect and read them via text-to-speech. This works most of the time. However, I'm running into a few situations where pyuipc can't process the string. It is possibly related to a strange character in the return string. An example of where this happens is when reading the menus from GSX (ground services x). I can read the menus, up to the point where you choose the jetway options. Pyuipc then throws an error. I can't do any processing on the string, since pyuipc isn't returning anything, just throwing an error. Can anyone suggest a way around this? I know I can read the menus with lua, but the question then is how to output the results using TTS, or transfer the result to my application so I can read it? I tried emailing this question to the developer of the pyuipc module, but never heard back. The module is open source, but I'm not a C developer. Any help would be apreciated! My app can b found at: http://www.github.com/jfayre/voice-flight-following
  25. Hello, I'm trying to read the pitch of the aircraft from fSUIPC (offset 0578). This is for an add-on I'm working on for blind flight sim users. I'm noticing that the pitch never actually hits 0 at level flight. I was flying level at 15000 feet and the pitch was fluctuating around -1.9. Which I understand is a slight pitch up. Can anyone explain what is going on? This is in a b737. In my add-on, I want to have a mode where I will play a series of tones, depending on the pitch of the aircraft. This is mainly used for landing. However, I need to know how to calibrate things.
×
×
  • 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.