Pete,
Thanks for the answer.
SIOC is the script that goes along with Opencockpits panels.
Amongst other features it interfaces to the SIM through FSUIPC. To declare a SIOC variable, which shall read/write FSUIPC offsets, you need to specify the offset, and its related size (they call it length) as specified in your Offset Status document.
Regarding the Active Sky ambient visibility parameter, if it's a 32 bit floating point, the size/length of that offset (0x863C) should in my mind be 4. Can you confirm this ?
I made the following small test:
I have set manually in AS a visibility of 5000.
- Using a LUA script I can directly retrieve that value in Offset 0x863C without further post-processing (as you said above)
I use the following variable declaration: AmbVis = math.floor(ipc.readFLT(0x863C))
- The corresponding SIOC Variable declaration like this: var 6015, name Amb_Vis, LINK FSUIPC_IN, Offset $863C, length 4 (using length 4 if my a.m. assumption is correct). What SIOC reads out of 0x863C in decimal and binary format is the following :
A totally different and inconclusive value compared to the LUA reading, so there is apparently something different/wrong here. The high number has lead me to the assumption that I need to 'postprocess' the value, but you correctly explained me that this is stupid.
So in a nutshell my remaining question is if the size of offset 0x863C is 4 ?
Many thanks,
Johannes