Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate the inertia tensor to the Part #2386

Merged
merged 12 commits into from
Dec 1, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Nov 30, 2019

No description provided.

ksp_plugin/part.cpp Outdated Show resolved Hide resolved
@@ -53,11 +56,19 @@ class InertiaTensor {
Rotation<Frame, PrincipalAxesFrame> rotation;
};

// A factory that creates an inertia tensor for a solid sphere of water having
// the given mass. Useful e.g. for save compatibility.
static InertiaTensor<Frame> MakeSphericalInertiaTensor(Mass const& mass);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either pass ρ as a parameter, put "Water" in the name, or move this to ksp_plugin.

@@ -228,7 +248,7 @@ std::string Part::ShortDebugString() const {
std::ostream& operator<<(std::ostream& out, Part const& part) {
return out << "{"
<< part.part_id() << ", "
<< part.mass() << "}";
<< part.inertia_tensor().mass() << "}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log the tensor too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, let's not do that, this is not even used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants