From: Bertrand C. <bco...@gm...> - 2011-01-05 20:46:36
|
2011/1/5 Jon S. Berndt <jon...@co...>: > As you may know, I've been interested in modeling multiple-bodies in JSBSim > for some time. There are references to child model objects in the codebase, > now. I've been wondering, however, if there is a better way to do this. It > occurred to me that perhaps just having multiple instances of JSBSim running > would work, where a state could be passed from the "core" instance, to other > instances. This is not dissimilar to the way I have been considering > implementing the capability, with the difference being in what object is > responsible for managing the various instances of JSBSim. > > A reference case for such a capability is for a multistage rocket. We do > have an example case that is being developed, now (the J246). However, once > bodies (such as booster rockets) are dropped off they are not tracked. I > simply zero out the mass of the spent boosters. However, what if instead we > initialized an instance of JSBSim for each booster rocket that is dropped? > The way that might work is to actually create an instance of JSBSim > representing each booster rocket (or each individual piece). The initial > configuration of the rocket would be done as it currently is in the J246 > model, where the monolithic rocket is modeled. However, at staging, if the > mass of the booster rockets is zeroed out, I envision that at that time we > can initialize the "dormant" JSBSim instances that represent each booster > rocket by itself at the current correct location, and let them fly free. > This would, of course, require the application that manages a JSBSim > instance to be set up to handle multiple JSBSim instances. However, I think > this could be made to work. > > Thoughts? > I guess that, as long as the bodies are not interacting, the safer and simpler way to proceed is to use multiple instances of JSBSim. But for the J246 example, there are alternate solutions where, instead of a monolithic rocket, you use a set of boosters which are connected together. These connections can be modelled by constraints between the DOFs of each bodies. Of course, it is more complicated but more versatile. For instance, you can use a constraint to cap the maximum distance between 2 bodies to model a glider that is towed by an aircraft. Moreover there exist algorithms that can optimize the amount of calculations for sets of bodies that are constrained together. This would require to adapt a significant portion of JSBSim code and would therefore be considered more like a long term goal while your suggestion seems more likely to be applicable in the short term. Cheers, Bertrand. |