"Scott G. Miller" wrote: > > > > > > > I'm considering writing a scripting language interface to FlightGear to > > > experiment with script driven weather and aircraft failure events. Is there > > > a pointer to any documentation on interfacing with running flightgear on > > > its http server? > > > > > > I'm implementing a similar idea except using the telnet interface > > (--props=...) instead of http. None of this stuff is in cvs yet. > > > > In answer to your question though, http requests are handled by the > > HttpdChannel::foundTerminator() function in Network/httpd.cxx. > > Ah of course. I do have one question to whoever is implementing the > telnet interface, though. I can use it fine exactly once. A second > connection is accepted by fgfs, but does not respond to any commands. > This makes debugging my code very difficult, as I have to restart > flightgear each time. >
There was a bug in the network code that prevented subsequent connections from getting through but I believe it is fixed in cvs. The current props/telnet server doesn't support multiple simultaneous connections. I have a fix in the pipeline but Curt has been busy. FWIW I have written a python class that interfaces to the props server. It provides a dictionary-like interface to the property system. For example: import FlightGear # Establish a connection to the FlightGear props server fg = FlightGear.FlightGear( "localhost", 5500 ) # Apply the parking brake fg["/controls/parking-brake"] = 1 # Display the current heading print fg["/orientation/heading-deg"] # Display all toplevel properties for prop in fg.ls(): print prop Cheers, Bernie _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
