On 2 Jan 2009, at 13:50, Curtis Olson wrote:

> However, the existing XML based electrical system model is extremely  
> difficult to use from an xml configuration standpoint, and although  
> it worked ok for the c172 electrical system, I began to run into  
> core design barriers when i was attempting to implement the  
> electrical system for a light twin.  I really don't recommend the  
> xml/C++ electrical system for future use.  Instead, it's *far*  
> easier and much more straight forward to build up a procedural model  
> in nasal.  This is actually a very good job for nasal because  
> aircraft electrical systems are wildly different from each other,  
> and nasal allows you to write a per-aircraft electrical system model.

I don't think doing the complete system is Nasal is sensible - in the  
future we might want to apply a 'real' electrical model, which  
requires an iterative matrix solution, or something comparable (I  
think  it's actually solving some differential equations for each node  
in the circuit, for example).

The set of elements is very small, and well defined (as seen in the  
existing C++ code) - batteries, switches, breakers, alternators, and  
current drains. A few specialised derived types could be added,  
especially for lamps (which are very visible), and which occur  
frequently. And absolutely, this should be configured and defined  
through Nasal, since clearly the arrangement of the above in each  
aircraft differs wildly. But that doesn't mean we shouldn't express  
(and expose!) the core graph to C++, for  simulation, fault-modelling  
and various other purposes. The same is true of the hydraulic system -  
and indeed, many of the components work the same way.

James


------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to