Functionality Questions #621
Replies: 5 comments 2 replies
-
Sure you can change the mass of a point-mass at runtime, e.g. set it' mass to 0 to simulate it being dropped, I don't see an explicit delete mechanism. jsbsim/src/models/FGMassBalance.cpp Lines 431 to 448 in 59c0bd9 |
Beta Was this translation helpful? Give feedback.
-
My guess is it is as easy as removing an entry from the vector, although given the property bindings that are created for each instance you may need to remove the property bindings as well. However, the vector is a private member variable and there is no public accessor. So you have a couple of choices. Just set the mass of the point mass to 0. In your own fork create a public accessor, or a specific Submit a pull request that adds a |
Beta Was this translation helpful? Give feedback.
-
As Sean points out (in the link he refers to), you can change the location and weight of a pointmass at runtime. I have used this in the past to simulate a person getting into and out of an aircraft sitting on the runway – there was a specific reason for that test. You could also use it to model dropping a load of food and medical supplies (😊) or whatever while in-flight.
Looking at the code (and in retrospect) changing the *weight* of a pointmass might have been a bad design choice, as opposed to changing the *mass* of a pointmass.
Jon
|
Beta Was this translation helpful? Give feedback.
-
Ah. That is a shortcoming I was concerned about. It's nice to know my issue wasn't unfounded, I think I will try modding JSBSim further to my needs. I'm grateful to have a helpful and supportive community like you two though, thanks! |
Beta Was this translation helpful? Give feedback.
-
I was thinking since I guarantee this won't be my last discussion here about JSBSim; would anyone else be interested in a Discord about JSBSim? |
Beta Was this translation helpful? Give feedback.
-
I had some questions about what JSBSim can/can't do. I noticed there was a PointMass class, http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGMassBalance.html#details detailed some here. Can this be used to change the mass of the aircraft at runtime? Like, making it drop or take off with things to change it's base mass?
Beta Was this translation helpful? Give feedback.
All reactions