Andy Ross writes:

 > This could actually be done with minimal C++ code.  Picture a "failure
 > manager" that walks a property tree under "/failures".  For each
 > child, it reads a "mtbf-sec" property and sets the "working" boolean
 > with a random probability that corresponds to the failure rate.  This
 > is maybe a few tens of lines of C++.

I was picturing something a little different.  Every component has its
own failure flag, and we register the failure properties and MBEF with
the failure manager.

On that note, I've been thinking about how to rework the instruments,
and here's what I have so far.  We create a new src/Instrumentation/
directory with subsystems for each instrument or instrument group
(such as pitot-static or vacuum-driven gyros), copying most of the
code out of the existing steam.cxx where possible.  This subdirectory,
though, could also hold custom code for GPS's, transponders, weather
radar, etc. etc.

In the property tree, we set up a root

  /instrumentation/

branch.  Inside this, we have

  /instrumentation/altimeter/
  /instrumentation/airspeed-indicator/
  /instrumentation/vor-gauge/
  /instrumentation/transponder/

etc., with indexes as appropriate.  Inside each branch, we have a
collection of properties, some common to many (or all) instruments,
and some specific to individual instruments:

  /instrumentation/altimeter/servicable
  /instrumentation/altimeter/error-pct
  /instrumentation/altimeter/reading-ft
  /instrumentation/altimeter/setting-inhg

error-pct would be a percentage error independent of the altimeter
setting, static port issues, and so on -- instructors could play with
it just to mess with students' minds.  servicable would be a flag on
every instrument for enabled/disabled.

We would also have a /systems/ branch for the various aircraft
systems, like the static-pitot system:

  /systems/static-port/obstruction-pct
  /systems/pitot-tube/obstruction-pct
  /systems/air-intake/obstruction-pct
  /systems/pitot-heat/servicable

Obviously, it will take time to implement all of this, but at least
we'd have a place to put all of it.  Engines are important enough
systems that they deserve they own branch, of course.


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to