Referring to your talks on the devel list (still lurking/skimming occasionally):
- re-implementing stuff like aircraft.nas is redundant and isn't needed at all
- there is existing, working and proven code doing this sort of thing, implemented in C++ - written by TorstenD: The PID controller/property rules machinery: http://wiki.flightgear.org/Autopilot_co ... _reference
- this can be trivially exposed to scripting space, either via cppbind: http://wiki.flightgear.org/Nasal/CppBind
- or by using a SGPropertyChangeListener-based approach, analogous to how the Canvas system works: http://wiki.flightgear.org/Howto:Create ... _Listeners
- more recently, Richard has provided another promising option, namely: Emesary: http://wiki.flightgear.org/Emesary
- any of these options could be used to expose Torsten's existing C++ work to scripting space (easily)
As a matter of fact, Torsten himself originally considered providing exactly such a bindings layer/wrapper: viewtopic.php?f=66&t=15189&p=149376&#p149376
Regarding the needed changes for the testing infrastructure/machinery, quoted below:
https://sourceforge.net/p/flightgear/ma ... /36763063/
legoboyvdlp wrote:By the looks of it: we want to load up the Nasal subsystem in
FGTestAPI/Nasal.cxx (new file)
(e.g.)
globals->add_new_subsystem<FGNasalSys>(SGSubsystemMgr::INIT);
as well as all subsystems that nasal depends on. For instance, I think the
event_mgr, properties, and logger at least would need initialised but I can
figure that out by trial and error.
These have also been previously worked on, for pointers see:
http://wiki.flightgear.org/Initializing_Nasal_early
I would suggest to take a look at Andy's original github repo, and look at the standalone nasal binary that you can find there.
You will also find a number of Nasal specific regression tests.
A couple of years back, Philosopher worked out a simgear-based adaption of the standalone Nasal binary that would also include our property tree, timers (events) etc - Icecode GL ended up using a subset of this for his work on the fgradar infrastructure, which also still can be found on line:
You can still look at the original commits/changes we made when we reworked fgfs to support partial/incremental re-initialization: https://gitorious.org/fg/philosophers-f ... s/fgcanvas
To look at some of the original work done by Philosopher, see: https://gitorious.org/fg/philosophers-f ... nded-nasal
This includes a basic cmake-integration for Andy's original unit tests, which should come in handy for the kind of project that bugman is working on: https://gitorious.org/fg/philosophers-f ... 0e72fea88c
Hopefully, these pointers will save you some time and headache when working on things related to this - obviously, it's up to you to use these or not
Still, while none of these are intended to apply cleanly given how much time has passed, all the infrastructure changes to cmakelists.txt involving simgear/nasal should apply "as is", because they merely introduce new, and optional, stuff.
As you can see in the original comments, James Turner was originally supportive of these changes and encouraged work on integrating nasal into the testing suite.
PS: Sorry, if I am being late to the party ... again, only lurking - good luck anyways