On Wednesday 23 February 2005 18:11, Paul Surgeon wrote:
> Are you now talking about a separate C++ instrument?

Yes.

> So the way I see it is I need two C++ modules that need to be created and
> hooked into FG.

Right.

> How does one do that?

Instrument modules are located in src/Instrumentation. This is where I would 
suggest that you create the Variometer instrument module. Take a look at the 
existing VSI module (vertical_speed_indicator.*xx), and use that as a 
template. The work is done in the update method.

System modules are located in src/Systems. Where you create your TE tube 
module. System modules and instrument modules are really the same thing 
programming-wise, they are all children of SGSubsystem.

> Can I write shared libraries with a defined interface and get FG to load it
> when the panel references it?

This is not how it is currently done, but that's an interesting idea.

All the instrument modules and system modules are compiled into the fgfs 
executable.

> If there is a defined API for this stuff I'll manage but if it requires
> designing software architectures then I'm stuck.
> I think I'll rather fiddle around with the existing mess and leave the
> serious stuff up to the guys who have brains.

I think that if you take a look at the aforementioned VSI module, and also the 
static-port system module, you will find that creating new instrumentation 
modules is pretty straight forward. You also have to modify the 
instrumentation manager (FGInstrumentMgr) and the systems manager 
(FGSystemMgr) to include your new modules. If you get stuck please feel free 
to mail me off-list, I'll be happy to help you out!

-- 
Roy Vegard Ovesen

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to