private Vector MomentOfInertia() { if (shared.Vessel != FlightGlobals.ActiveVessel) { throw new KOSException("You may only call addons:MOI:I from the active vessel"); } if (Available()) { var I = InertiaTensor.Compute(shared.Vessel).Trace(); return(new Vector(I)); } throw new KOSUnavailableAddonException("I", "MomentOfInertia"); }
public Vector3 CalculateMomentOfInertia(Vessel v) { var inertiaTensor = InertiaTensor.Compute(v); return(inertiaTensor.Trace()); }