> Can anyone suggest a way of accessing the methods: > GetCoefficientValues(...) and > GetCoefficientStrings(...) > from a --native socket? > > I have a piece of code within flightgear which uses 'globals' and > 'cur_fdm_state' via a socket similar to the "--native" socket > provided with flightgear. > I'd need to access internal JSBSim data but am at a loss how to > do it from that socket. > > any suggestions?
You can access JSBSim aero data via properties if you know the property names. Problem is, the aero properties are sort of internal, and there's not a simple way (that I know of) to get all aero properties. So, I see you want to try (from FlightGear) to get the strings via the FGAerodynamics calls. To do that, you'd need to know the FGFDMExec pointer in the interface (FGJSBSim). The value you need is a private attribute, "fdmex". You could add a getter for that, GetExec(), perhaps. Then you could use that: my_string = GetExec()->GetAerodynamics()->GetCoefficientStrings(delimeter); I haven't tried this, but I think this should work. Is this what you are looking for? On the other hand, JSBSim does have a socket output capability, too. Using the new code (almost ready for commit to FlightGear CVS) you could do the following and get all aero properties: <output name="localhost" type="SOCKET" port="1139" rate="10"> <coefficients> ON </coefficients> </output> The above would go in your aircraft config file at the bottom. I'll be glad to clarify this if you need more info. Jon -- Project Coordinator JSBSim Flight Dynamics Model http://www.jsbsim.org _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d