> Hope this is the right mailing list to post this question to: This might better be posed in the -flightmodel list, but it's fine here as far as I'm concerned.
> I am trying to automate Flightgear by using a script to fly > planes around in a virtual environment similar to the > capabilities available in JSBSim but with the added ability to > visualize the test (including multiplayer option). I searched > around for this kind of functionality and came to conclusion that > I had the following options: > > 1. use JSBSim for scripting and implement interface between > JSBSim's output interface and Flightgear's FDM interface I brought the JSBSim scripting class into the JSBSim FDMExec class for the explicit purpose of scripting flights within FlightGear. I suspect that Nasal is definitely the better way to go if you are solely interested in running a scripted FlightGear-only test. My intention for allowing the JSBSim scripting capability inside FlightGear (and this capability already exists now with the latest JSBSim version) is so that one could run exactly the same scripted flight test that they might run with the JSBSim standalone application in batch mode. That could serve a very useful test purpose. > 2. somehow expose the JSBSim scripting interface from within Flightgear It's there, but about the time I got that working I installed a new video card and lost the ability to run hardware accelerated OpenGL apps (including, of course, FlightGear - which is killing me!). So, I haven't had time to test it myself. If you look at the JSBSim FGFDMExec class you will see that there is a method: bool FGFDMExec::LoadScript(string script) At the opportune time, you just have to somehow cause this method to be called. I guess that would be done from JSBSim.cxx. You would also have to bypass some or all of the interface that goes from FlightGear to JSBSim. The last part of the puzzle is how to supply a filename to the LoadScript() function. But, apart from that, it should work! ;-) > 3. or is there a way to run a script in Flightgear to do the equivalent? As I mentioned, the Nasal scripting language for FlightGear is highly regarded, from what I understand. I unfortunately have not had time to play with that, either. Jon ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel