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

Angular momentum accounting #2465

Merged
merged 12 commits into from
Feb 2, 2020

Conversation

eggrobin
Copy link
Member

@eggrobin eggrobin commented Feb 1, 2020

Keep track of the angular momentum of a pile up.
For the moment, it is neither exposed nor serialized.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@eggrobin
Copy link
Member Author

eggrobin commented Feb 2, 2020

Some quick sanity checks from surfacing the angular momentum of the pile up containing the active vessel in-game: a freshly-dewarped vessel (non-rotating in World) has a very low angular momentum at high altitudes where World is non-rotating, but a noticeable one when World is rotating.

The angular momentum is constant when the vessel is inert, turning on the engines or using the reaction wheels makes it grow very quickly; turning SAS on seems to eventually reduce it (but the PID oscillates quite a lot).

@@ -194,6 +197,10 @@ class PileUp {
// good as Hari Seldon we only do it over a short period of time.
DiscreteTrajectory<Barycentric>* psychohistory_ = nullptr;

// The angular momentum of the pile up with respect to its centre of mass.
// TODO(egg): This is not yet serialized.
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't seem hard to serialize. Could you do it in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want to do that yet: until we use it to perform a correction, it will go completely out of synch with the game every time we warp.

@pleroy pleroy added the LGTM label Feb 2, 2020
@eggrobin eggrobin merged commit da414c2 into mockingbirdnest:master Feb 2, 2020
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