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