Operations on PMI Vectors

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
10,002
Reaction score
4,418
Points
203
Location
Toulouse
Hello,

I have a little physics question.

I want to reflect the change of PMI of a booster when I attach a ship on its side.

I wonder if :

1) I can use "GetPMI" to get the PMI vector of the attached ship, and then sum it up with the boosters PMI vector (it works).

2) I have to make a mesh including my booster and the ship attached to it, then calculate the PMI via the ShipEdit SDK utility. The big con is that it will be correct only for a single ship...

3) 1 and 2 are equivalent (for a same given ship)... :hmm:
 
Have a look at this presentation I gave a few years ago at ESTEC.

On page 8, "Rigid-body model and composite structures" I am explaining how orbiter calculates the PMI values for composite structures. It's not very accurate (in particular the assumption that the inertia tensor of a composite vessel remains diagonal without rotating the reference frame is generally not really true), but it seems an acceptable compromise between ease of computation and plausible behaviour.

The idea is essentially this:

  • Represent each vessel by 6 point masses, one each on the vessel's +/- x, +/- y and +/- z axis, such that the PMI values resulting from these point masses are the same as those for the vessel.
  • Arrange all the point masses for the vessels comprising the superstructure in a common reference system, given the relative positions of the vessels.
  • Calculate new PMI values in the new reference frame by summing over all point masses.
The reference frame should have its origin at the centre of gravity of the composite vessel. It usually has the same orientation as the "parent vessel", although really it should be rotated to diagonalise the inertia tensor (but this would lead to additional problems, because rotating a vessel's reference frame when docked with another vessel would require all sorts of additional computation by vessel addons).

As for specific answers to your questions:
1. No, you can't just sum up the PMI values of the components.
2. Using shipedit on the composite mesh to re-calcuate the PMI values probably gives more accurate results, but with a little compromise in accuracy you can do it on the fly in the way outlined in the presentation. This is in particular useful if you don't know beforehand which vessels are docked.
3. Methods 1 and 2 are not equivalent.
 
Thank you. Yes, that's only an approximation, anyways the overall density would (in real life) change during the flight, as the propellant is being consumed.
 
Back
Top