mer Posted September 3, 2018 Report Posted September 3, 2018 How do I read the values from P3d when there is more than 1 layer of wind/cloud/temperature present? The offsets mapped in FSInterrogate and the documentation provide data only for one layer of each of these parameters. An attempt to calculate the locations of other parameters and use the resultant offsets for querying them provides incorrect values. For instance, when 2 cloud layers are present, the value of one can be accessed using locations 0xc680-0xc68e. But when i try to access the values for the 2nd layer from locations c68F-c69e i get the wrong readings. Could you please guide? Thank you
Paul Henty Posted September 3, 2018 Report Posted September 3, 2018 Are you using a .NET language (C#, VB.NET) with my helper DLL for the .NET Framework? Paul
mer Posted September 3, 2018 Author Report Posted September 3, 2018 Yes, I am using C#, the code in UIPC_SDK_CSHARP Revision 1.13 packaged with FSUIPC5. The code is Scott McCrory and Bob Scott's, with improvements by you I am making use of the fsuipc.cs file in that folder
Paul Henty Posted September 3, 2018 Report Posted September 3, 2018 Quote the value of one can be accessed using locations 0xc680-0xc68e. But when i try to access the values for the 2nd layer from locations c68F-c69e i get the wrong readings. The cloud layers start at 0xC680. Each layer is 16 (0x10) bytes. So the second layer will start at 0xC690 (not c68F). The third will be 0xC6A0 etc. Paul
mer Posted September 3, 2018 Author Report Posted September 3, 2018 Thank you, I got that. For wind layers, i tried the same logic. Locations for surface wind layers are 0xC4fc-0xC508. That comes to 12 bytes (0x0c) per layer. Does the second layer therefore starts at c50e?
Paul Henty Posted September 3, 2018 Report Posted September 3, 2018 No, the wind layers are 16 bytes each. So the second wind layer will be 0xC50C. I'm not sure where you're getting your information. The wind layers are from 0xC4FC-0xC67B. The document you should be looking at is called NewWeather.h. This is found in a ZIP file called "New Weather Interface for FS2004.zip". This is found in the FSUIPC SDK. It tells you the locations of each array and the size and layout of each structure (e.g. Wind, Clouds etc). Paul
mer Posted September 3, 2018 Author Report Posted September 3, 2018 Yes I just fount NewWeather.h. Thank you very much
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