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

Open source C/C++ gauges?

Messages
130
Country
france
Hello,
I'm thinking about diving into C/C++ gauges. I'm still doubtful whether I'll ever manage to understand C/C++ at all. Practical examples to look at would be of great help though.

* Is there a site somewhere with open source C or C++ FS gauges?

To be able to look at some practical examples and see how these are realised beyond wat's in the SDK or Dai's Tutorial (which is still pretty much incomprehensible to me).

I'd be interested in particular in example gauges that use features that are not accessible with xml gauges, like reading and writing from a cfg/txt file, reading and writing sim variables, FSUIPC/Simconnect interaction ect. These are the reasons I'm looking at C/C++ gauges at all.
But at the very beginner stage I'm at, any gauge to look at would be of great help to me...

Thanks in advance for any pointers to useful ressources!

Gunter
 
There are (or at least were) some very interesting examples at AVSIM that had the source code for the "Tin Mouse" among some other projects.

707pnsrc2.zip

trafficradarxml201.zip
 
Is there a site somewhere with open source C or C++ FS gauges?
Hi Gunter,

I don't know of any specific site with open-source C/C++ gauges. However, given the kinds of things you seem interested in doing, I'd encourage you to also consider not just gauge DLL creation but also non-gauge DLL and EXE creation (for MSFS).

A couple of useful examples for learning might include these non-gauge projects:
  1. 'FSMenu' by Cyril Hruscak
  2. 'Autower' by Christoph Langguth
Both of these are available in the AVSIM library (registration required) and include the source code. However, the 'Autower' version on AVSIM (2.11) is different from the version (2.2.0) on the author's own website. I presume his website has the latest, but with those versioning numbers, it's hard to be sure!

I wish I could give you more examples (especially gauge DLL examples), but they really seem to be "few and far between", sadly. Nevertheless, I'd be surprised if you couldn't find something interesting to learn/use in each of the examples I've listed above.

Oh, and don't forget that the FSUIPC SDK (ZIP, 6.25 MB) comes with source code too! IIRC, it's very useful to develop something in C/C++ which will interact with FSUIPC.

Disclaimer: I've only tested those projects on FS2004, not on FSX.

Whatever you try, good luck in your endeavors!
 
Jester,
many thanks for the links to the additional source code and valuable info !

AuJoePilot,
n4gix sent me source code for a Boeing panel, and searching for "source code" in the file libraries at the different sites turned up a few more projects with source code included. I didn't find more than that, but that's already much better than nothing.

However, meanwhile Doug Dawson has generously shared a gauge which allows to read write from an ini file (also in the carrier ops package by RC Barendregt), so with my immediate needs covered, I have stopped my attemps to get into C programming.
But I'm definitely archiving all information I can get, if one day I need to dive into C gauge development for real.

All the best !

Gunter
 
Hello,
I'm thinking about diving into C/C++ gauges. I'm still doubtful whether I'll ever manage to understand C/C++ at all. Practical examples to look at would be of great help though.

* Is there a site somewhere with open source C or C++ FS gauges?

To be able to look at some practical examples and see how these are realised beyond wat's in the SDK or Dai's Tutorial (which is still pretty much incomprehensible to me).

I'd be interested in particular in example gauges that use features that are not accessible with xml gauges, like reading and writing from a cfg/txt file, reading and writing sim variables, FSUIPC/Simconnect interaction ect. These are the reasons I'm looking at C/C++ gauges at all.
But at the very beginner stage I'm at, any gauge to look at would be of great help to me...

Thanks in advance for any pointers to useful ressources!

Gunter

The attached is the source code for a fuel dump gauge. It is designed to be an interface that allows XML gauge programmers to dump (or add) fuel by setting an XML L:Variable. It uses SimConnect reads and writes to achieve this end.

Doug
 
Last edited:
The attached is the source code for a fuel dump gauge. It is designed to be an interface that allows XML gauge programmers to dump (or add) fuel by setting an XML L:Variable. It uses SimConnect reads and writes to achieve this end.

Doug
Doug,
thanks a lot for sharing that very interesting project.

Great sample code for reading from/writing to sim variables via FSX simconnect and L: variables. And that .cpp code is well commented.
Excellent! That should make attacking that part of my wishlist tasks that much easier if ever I'll sum up the courage to tackle it. Of course I'd credit properly.

Going straight into the archive.

Thanks again!

Gunter
 
Back
Top