>I've found that each "%f" format conversion is relatively expensive, and >(under linux) many sprintf followed by a single write is much faster than >a lot of successive fprintf. I'd assume that the C++ version has the same >performance impact.
Right now, FGOutput.cpp uses cout. We direct output to cout, and after we are finished with a record, we flush() the stream. There is likely a better way to do this, but I haven't spent too much time on it. Ideally, it won't come into play unless someone is doing debugging - which most users will not. We're open to suggestion, though. >So, how about having the logging system giving the user the choice of >(a) At crash or exit, the last ten seconds of flight are written to file, or >(b) redirect the JSB log stream through the simgear networking interface ? This sounds appealing, but I am not sure how we'd store ten seconds of constanlty refreshing data. >The former eliminates the performance impact at the cost of a fairly small >memory array that acts as a queue of doubles. The latter gives the option >of making the data accessible from a second computer for real time plotting. >I've been using "xoscope" recently, quite successfully, for such things. Real time plotting is something I've always wanted to do. There is the remnant of a socket interface in FGfdmSocket, and it is/was used in FGOutput. I actually wrote a small program that accepted data from a JSBSim output stream a couple years ago. I haven't seen xoscope. What is it? Jon _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
