On Tuesday 22 February 2005 22:20, Paul Surgeon wrote:
> Hi guys
>
> I'm busy creating a variometer for FlightGear.
>
> My instrument needs to be able to :
> 1. Display total energy (using some maths I haven't figured out yet)
> 2. Play sounds (audio cue)
> 3. Accept user input to its 2 knobs and 3 toggle switches.
>
> From what I've seen in FG I would have to generate the total energy
> property from a nasal script, play the sounds from the aircraft XML file
> and accept the user input through the panel hot spot (actions) config file.

I would like to suggest a different approach.

1. Create a new Variometer instrument module i C++. Actually you might want to 
create a more generic "Total Energy Tube" module to add to the systems 
modules (static, pitot, vacuum, etc.). I urge you to try to model the "Total 
Energy Tube" principles as closely as possible. I found a basic description 
from a variometer manufacturer:

http://www.borgeltinstruments.com/BasicDefinitions.html

But I guess you'll need something a bit more descriptive.

2. The sound bit can be coded in C++ into the variometer instrument module.

>
> I have one short word to describe this affair : "Mess!"   :)
>
> Most of the instrument has to be coded into the aircraft config files
> (although none of it is aircraft model specific) and for every aircraft
> that I want to install the instrument in I would have to duplicate the
> sound, hot spots and nasal code.
>
> Is there not a better way of doing it?
>
> Also is there not a way to accept user input on a 3D instrument?
> I don't see the logic behind specifying hot spots using 2D panel *pixel*
> locations for a 3D model which is placed using 3D coordinates.
> Not to mention that as soon as I move my 3D instrument around in the
> cockpit the input is "lost". Surely the input should be part and parcel of
> the instrument?

You could include a small panel with every 3D instrument and make the hole 
panel a hotspot as described here:

http://baron.flightgear.org/pipermail/flightgear-devel/2004-June/028820.html

But this of course is a very ugly hack. I've wanted to make 3D instruments 
(objects) clickable for a long time, but I just don't have the skill to do 
it :-(

> The way I see it is an instrument should be able to have it's own set of
> animation, input and sound config files as well as nasal scripts.
> Then only a single include has to be done in an aircraft config file to
> load the instrument at the right location.

Yes, I totally agree on this.

-- 
Roy Vegard Ovesen

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

Reply via email to