• 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.

WebSimData

WebSimConnect

Resource contributor
Messages
154
The need is a mother of invention.

When Daan "Dutcheeseblend" approached me to help him with integrating my WebSimGauge into his Fokker models, I repeated what I am always saying when using my FSX/P3D X-Plane HTML5 framework, that the best implementation for plane makers is to build custom DLL gauge that will communicate with FSX and WebSimGauge instead of using WebSimConnect HTTP which is targeted for external network access. I provide sample project with source code (WebSimClient) that demonstrate the use. What I did not realize is that not all modellers are familiar with C++ programming as most of the gauges are XML based. I decided to build something universal, and this is how WebSimData was born on extremely hot evening (it was 39C during a day) with a cold glass of beer.

What WebSimData does is simple. It reads with specified frequency SimConnnect variables specified in the configuration file and calls JavaScript function that updates the content defined in the HTML. Most of the gauges are read only gauges, so such a tool is very handy as no C++ programming is needed. Everything is specified in the simple INI file, for example:

Code:
[WebSimData01]
Frequency=5
id=tablet
file=websimdata_map.html
function=updateMap
data00=Plane Longitude,degrees,FLOAT32
data01=Plane Latitude,degrees,FLOAT32
data02=PLANE HEADING DEGREES TRUE,degrees,FLOAT32

This configuration defines 3 SimConnect variables (data00, data01, data02 attributes) and FSX will read the values every 5 visual frames (frequency attribute) and will call updateMap() JavaScript function (function attribute) defined in the websimdata_map.html page (file attribute) that is rendered by WebSimGauge browser which identifier is tablet (id attribute).

WebSimData.dll is a gauge so it needs to be specified in the panel.cfg along with WebSimGauge gauges.

You can download the package at:

https://www.dropbox.com/s/y5xd7qr89znyfp4/WebSimData_1.5.zip?dl=0

as usual with my tools, binaries, sdk and sample (rotating moving map) included.

Cheers,

Marcin

P.S.
For me it was a nice break to build such a tool as I am struggling with porting my framework to Mac version of X-Plane which is giving me a lot of headache (OSX and Cocoa are not my best friends). I hope to have the results very soon.

 
Thanks to Marcin for this! It works as advertised and I'll be using it on my T.5 (and prolly on my Danish D.21 as well). Since these old planes are rather limited in application suitability for WebSim, I can't yet see other applications yet for my products. Therefore, I encourage all developers to think about this and try to implement it in your A/C. What I've been doing just for fun, while testing my WebSim setup, is reviewing .html that contains a model file (Blender can export a model to a simple html file via Blend4Web), see below. This might give ideas to others?

WSC_t5panel.png


What the file itself is: https://googledrive.com/host/0B3rXXshj-mHdSzdzSnRJVXUzTWs/t5_mainpanel_tr001.html

I believe there's a bunch of other applications out there.

Cheers, keep it going Marcin ;)
 
Back
Top