by greekydeke » Fri Jul 09, 2004 8:55 pm
Valerio:
Given your C++ programming experience, you might consider writing a simple gauge DLL (.GAU file) that gets FS gauge variables and sends them to a system output port instead of driving gauge components.
The starting point for your project would be Microsoft's FS2000 "Building Panels and Gauges" SDK. I think it might still be available on Microsoft's FS downloads website. It has all the info you'll need for your project. I think that SDK is included in SDK's for FS2002 and FS2004, but I'm not sure.
The SDK has an 18-page list of gauge variables that you can use, along with the necessary header and resource files. Your C++ code would be relatively simple; a couple of lines to get the instantaneous value for the token variable you want (e.g. airspeed) and pass it to a system output port that's connected to whatever external device you plan to drive.
When you compile the gauge DLL you'll give it a filename with a .GAU file extension. To activate your data gauge you have to (1) put a copy of your gauge in your GAUGES folder, and (2) make a gauge entry in the [Window00] section in your aircraft's PANEL.CFG file. When you do that your data gauge DLL will be linked to FS and the flight data you want will start being sent to your output port when you select your aircraft and fly it. Your gauge entry will be simple; gauge sizing and position parameters won't be necessary. For example, if you name your gauge "myDataGauge.GAU" your [Window00] gauge entry would look something like this:
[Window00]
...
gauge10=Cessna!airspeed, 75, 150
gauge69=myDataGauge
...
Since the token variables for .GAU gauges are available in FS98 through FS2004, this approach to your problem should work in all those versions of FS as well.
Good luck on your project!
Best regards,
Ken Smith
Abingdon, Maryland USA