• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Reading current Visibility in FS9 (XML)

rcbarend

Resource contributor
Messages
435
Country
netherlands
FSX has a var (A:AMBIENT VISIBILITY,meters) which I use to read the set visibility.
Apparently FS9 doesn't know this var.

Is there another way to read this in FS9 ??

Rob
 

Luka

Resource contributor
Messages
212
Country
serbia
It is possible with C/C ++ gauges, then conversion to XML L:Var.
Code:
HMODULE hGlobal;                // handle to the DLL
UINT32 global_visibility_id;    // address
FLOAT64 visibility;             // miles
ID xml_visibility_id;           //
...
...
...
    case PANEL_SERVICE_CONNECT_TO_WINDOW:
        hGlobal = GetModuleHandle("GLOBAL.DLL");
        if((hGlobal) != NULL) global_visibility_id = ((UINT32)GetProcAddress(hGlobal,"Linkage")) + 0x0E8A; // from FSUIPC docs: 0E8A, 2 bytes, Current visibility, Statue miles * 100
        break;
  
    case PANEL_SERVICE_PRE_UPDATE:
        visibility = FLOAT64(*(UINT16 *)global_visibility_id) / 100.0; // miles
        xml_visibility_id = check_named_variable("AMBIENT VISIBILITY"); set_named_variable_value(xml_visibility_id,visibility); // (>L:AMBIENT VISIBILITY,number)
        break;
 
Messages
495
Country
austria
That looks great..;)

But is somebody willing to compile this code??
That would be even more great:)

I'm just a simple xml - player:cool:

Edi
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I so loathe those 'free' download hosting sites. There are always a half-dozen "Download" buttons, flash-ad popups, and crud that it's nearly impossible to actually find the well-disguised link to the actual file.

That's the main reason I have used dropbox for years. I like it so much that I pay $99/year for 1TB filespace. :laughing:
 

Luka

Resource contributor
Messages
212
Country
serbia
So, I have not seen large "Upload a File" button below the reply box. :oops:
It's time to start wearing glasses :yikes:
 
Messages
1,468
Country
italy
I so loathe those 'free' download hosting sites. There are always a half-dozen "Download" buttons, flash-ad popups, and crud that it's nearly impossible to actually find the well-disguised link to the actual file.

That's the main reason I have used dropbox for years. I like it so much that I pay $99/year for 1TB filespace. :laughing:
What I also hate about them is that they screw up one's browser.
 
Messages
129
Country
us-indiana
This post is a bit old but there is another way that does not require a separate *.dll gauge but does require a simple lua:

function ShowVisibility(offset, value)
ipc.writeLvar"(L:Visiblity", value)
end

event.offset (0x0E8A, "UW", "ShowVisibility")

use:

(L:Visibility, number) 100 /

for statue miles in XML gauge.

And of course, the same information can be obtained from using AWOS/ATIS information.
 
Last edited:
Top