pilotjohn Posted December 19, 2011 Report Posted December 19, 2011 Is 0x658 still available for use despite it's documented issues? Can I simply use ipc.readSTR on 0x658, 0x66C, ... or do I need to read the individual bytes and concatenate into a string? I haven't been able to get any ICAO IDs yet, despite trying to read in all sorts of flight phases and areas.
Pete Dowson Posted December 19, 2011 Report Posted December 19, 2011 Is 0x658 still available for use despite it's documented issues? Yes, as also documented in the Advanced User's guide thus: GetNearestAirports=No: The facility to populate certain offsets with details of nearest airports has been withdrawn from general use, because it is buggy (a SimConnect problem) and cannot be relied upon. The code is left in and can be re-enabled by 'GetNearestAirports=Yes', but this is only useful for experimental purposes, not practical applications. It may well work in ESP (untested). Can I simply use ipc.readSTR on 0x658, 0x66C, ... or do I need to read the individual bytes and concatenate into a string? The ICAO is a string of 4 bytes, so read it as such of course, specifying the length. But if you want the data as well, and since it's a structure of five values, it would be more efficient and easier to read it as such, like this icao, lat, lon, alt, dist = ipc.readStruct(0x0658, "4STR", "4FLT") I haven't been able to get any ICAO IDs yet, despite trying to read in all sorts of flight phases and areas. Maybe you haven't enabled the option? If you also set this into the [General] section of the INI: Debug=Please LogExtras=32 FSUIPC will log all the airport data it gets, which you might find useful to double check. Pete
pilotjohn Posted December 20, 2011 Author Report Posted December 20, 2011 I didn't have it enabled... it works, mostly, as you said.
Pete Dowson Posted December 20, 2011 Report Posted December 20, 2011 I didn't have it enabled... it works, mostly, as you said. Unfortunately it is too unreliable to be useful, often not even reporting the airport your are parked at. Very disappointing. Regards Pete
pilotjohn Posted December 20, 2011 Author Report Posted December 20, 2011 Unfortunately it is too unreliable to be useful, often not even reporting the airport your are parked at. Very disappointing. Regards Pete At least it's in the right area, which is what I'm looking for. I just want to have a record of roughly where I flew in my Flight Critic logs. Perhaps you could add a weather ICAO read to the existing direct offset weather areas (0xE..) that gives you the nearest weather station? That seems more reliable and that's really what I'm interested at recording (location/weather). But it doesn't matter much.
Pete Dowson Posted December 20, 2011 Report Posted December 20, 2011 Perhaps you could add a weather ICAO read to the existing direct offset weather areas (0xE..) that gives you the nearest weather station? That seems more reliable and that's really what I'm interested at recording (location/weather). But it doesn't matter much. The ICAO of the nearest weather station is obtained in any case. I'll store it in offset 0E80 as 4 characters (no zero terminator). It'll be in the next update (4.754 probably), but it may not be uploaded till January. [LATER] Okay, I had to release an update in any case to correct something else (wrong turbulence encoding/decoding), so if you get FSUIPC 4.754 from Download Links you will be able to get the ICAO of the nearest WX station form offset 0x0E80. In Lua read it as a string with a length of 4. Regards Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now