I'll jump in with some quick background.

Originally I developed a system where you defined your electrical system
components and all the connections in a complex xml file.  Then a C++ module
loaded this configuration at run time and used a simplistic approach to
propagate the "juice" through the system.  (IANAEE) :-)

I developed a sample configuration file for the C172 which worked pretty
well, even to the point of working for an FAA certified trainer where all
the backend stuff and circuit breakers needed to always do the right thing.

Then I needed to model the electrical system for a light twin.  I discovered
that the electrical system on a typical light twin is much more complex than
a single engine plane.  You have two generators, two batteries, systems are
often fed by default from one side or the other to balance the load, but if
one side fails the other side can feed the whole system.  I found I needed
to extend some of the simple assumptions that worked ok for the single
engine case and create new parts and had to totally rewrite the "juice"
propagation system.  But then I found that my requirements weren't just to
figure out what parts were powered, I also needed to model current load as
different systems were powered on and off to support an ammeter gauge and a
volt meter gauge.  At that point my C++ scheme was really creaking under the
load.  The xml file was exploding into a huge monstrosity, and it started to
look like I was going to need a full circuit simulation system to proceed.
 I basically crushed myself under the complexity of the system I built and
couldn't reach the finish line.

In the mean time I was trying to field questions about this system from
other aircraft developers and it quickly became clear as soon as other
people tried to use it that it was an overwhelming beast to try to figure
out, not to mention test and debug.

So instead I abandoned that approach and created a procedural based
electrical system model written in nasal.  This turned out to be sooo much
cleaner, so much easier, so much quicker, so much more understandable, so
much more maintainable, and probably ran a heck of a lot faster because it
wasn't iterating over hundreds of components every frame.

I made the decision to keep the xml/C++ based electrical system in place for
compatibility and because by then I wasn't just the only one using it.  But
my recommendation for most people is to strongly consider writing their
electrical system model in nasal.  I think most people will be much happier
with a nasal based electrical system.

Now if we have people who still want to build an electrical system using a
circuit simulation based approach, that's great, this is exactly what
FlightGear is for ... an open-source sand box.  Go for it!  Scratch that
itch!

Best regards,

Curt.



On Wed, Feb 23, 2011 at 3:39 PM, Heiko Schulz wrote:

> Hi,
>
> > A few months ago I created a
> > nasal-based generic electrical system
> > modeled after the built-in Flightgear system. I thought I'd
> > offer it
> > up here for those who might be interested:
> >
> > http://ltts.crlt.indiana.edu/grn/flightgear/electrical_1.html
> >
> I must admit, I'm a bit confused now about the electrical systems in
> FlightGear.
>
> I know the one used in the c172p, the ones created by Syd Adams which I use
> by myself in my projects (Ec130) and now this one.
>
> What are the advantages, where are the issues?
> I must admit creating the different systems in FlightGear (electrical,
> hydraulic, pneumatic, etc...) is quite difficult for those who aren't that
> into programming and scripting...
>
> Cheers
> Heiko
>
>
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Flightgear-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>



-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org -
http://www.flightgear.org/blogs/category/curt/<http://www.flightgear.org/blogs/category/personal/curt/>
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to