Observation
New member
- Joined
- Jun 13, 2019
- Messages
- 26
- Reaction score
- 5
- Points
- 3
Hi everyone,
I've been trying to implement a realistic center of mass simulation, that is that it moves as fuel levels change.
Now a few problems have arisen: when I start the simulation in a landed state, it immediately jumps into active state. The same happens when I set the location with the scenario editor. Also, when I land off a base, the vessel never returns to the landed state. This problem is not directly related to moving the center of mass moving since if I comment all the
But this leads me to the next problem: when I land on a base, if I eventually "dock" and refueling happens (which shifts the CG), the ship ends up below the surface. I found out that while a vessel is in the landed state, calls to
As if this wasn't enough, I have not managed to make the ship stay stable and upright while fueled above a certain limit. When it is fully fueled, it sinks down a few meters and then slowly tips over. I already use an "active suspension": calling
at each timestep (I have 6 touchdown points for ground contact). I would hope this would make the vessel always sit at the same height, which is not the case. I must admit that the CG ends up pretty high up (20m) while the touchdown vertices are spread out only on a 9m diameter circle.
And finally a bonus if anyone knows: I've noticed that the ship was "sticking" to the ground at takeoff a little bit. This happens only while the touchdown vertices are still in contact with the ground. But this is not as problematic as the rest.
To sum up:
Thank you for any insight into any of these problems!
I've been trying to implement a realistic center of mass simulation, that is that it moves as fuel levels change.
Now a few problems have arisen: when I start the simulation in a landed state, it immediately jumps into active state. The same happens when I set the location with the scenario editor. Also, when I land off a base, the vessel never returns to the landed state. This problem is not directly related to moving the center of mass moving since if I comment all the
ShiftCG()
's out, I still get the same behaviour.But this leads me to the next problem: when I land on a base, if I eventually "dock" and refueling happens (which shifts the CG), the ship ends up below the surface. I found out that while a vessel is in the landed state, calls to
ShiftCenterOfMass()
have no effect, which means that when ShiftCG()
is called, the mesh, touchdown points and thruster definitions are just sunk into the ground.As if this wasn't enough, I have not managed to make the ship stay stable and upright while fueled above a certain limit. When it is fully fueled, it sinks down a few meters and then slowly tips over. I already use an "active suspension": calling
C++:
tdvtx[i].stiffness = weight;
tdvtx[i].damping = 2 * sqrt(tdvtx[i].stiffness * getMass());
And finally a bonus if anyone knows: I've noticed that the ship was "sticking" to the ground at takeoff a little bit. This happens only while the touchdown vertices are still in contact with the ground. But this is not as problematic as the rest.
To sum up:
- What makes a vessel stay in, enter and exit the landed state?
- Is there a bypass to
ShiftCenterOfMass()
for when a ship is in landed state? - How to avoid the ship tipping over when the CG is too high up?
- How for it not to stick to the ground?
Thank you for any insight into any of these problems!