> Concerning your original issue on implementing an autopilot: a much
> better way to do it is to avoid Nasal for the actual autopilot
> controller elements (numeric computation). Instead, use XML "autopilot"
> rules for the filter, gain, damper, integrator elements:
> http://wiki.flightgear.org/Autopilot_Configuration_Reference
> 
> You can then use Nasal for the high level stuff, and
> enable/disable/switch the individual controller elements (e.g. in order
> to automatically switch the autopilot mode when capturing the ILS).
> There are some nice examples with fgdata/Git aircraft. You could look
> at the 777.
> 
> This is also how such things are done in the real world: controllers
> aren't implemented in imperative programming languages these days -
> especially not in scripting languages. People use model-based design
> and connect controller elements - using graphical tools like
> MATLAB/Simulink. Obviously, FG is missing a graphical interface to
> specify the controller rules - but the idea of specifying through XML
> is the same and specification is straight forward.
> 
> cheers,
> Thorsten

I'd strongly agree with Thorsten here. It's nothing against Nasal from me -
I've not even used it - but creating an autopilot (or any GNC or system
model, for that matter) can be done very effectively with discrete objects
such as summers, gains, controllers, filters, switches, etc., much as JSBSim
has done with the system components. This is a standard approach in industry
as Thorsten mentions as exemplified by Mathwork's $imulink product.
Scilab/Scicos is similar in concept. Control system topologies are often
diagrammed in a way that can lead to a one-to-one correspondence between a
block and a control system object that can be referenced in an XML file, if
the control system component library has been defined properly. This, again,
is the way that JSBSim has approached the solution.

Some benefits to such an approach include (IMHO) better testability, more
predictability, and easier interface (someday) with a GUI tool, should one
materialize. The downside is that XML can be verbose, but it's a price I've
come to accept.

Jon



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to