Fix some VesselState thrust calculations (probably fix diffthrottle)#2261
Merged
Merged
Conversation
- Removes the double-cos-losses coming both from the cosineLosses variable and the vector addition by just dropping the cosineLosses variable. - Change the CoT calculations to no longer be based on current thrust but on max thrust. This ensures that ThrustForward is nonzero with zero thrust, and makes it a constant of the vessel geometry. This means that diff throttle will also no longer affect and chase its own setpoint. As I've been adding INERTIAL_COT to various controllers I've probably been breaking diffthrottle and this should fix that. - That latter change might in principle break some badly constructed vehicles which have considerably different thrust vectors for minthrottle vs. maxthrottle for times when they aren't being max throttled. As most things you want to do with rockets tend to be bang-bang control this shouldn't affect anyone, but to the extent it actually does affect anyone, those rockets and situations are just considered rocket design problems, and support is dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the double-cos-losses coming both from the cosineLosses variable and the vector addition by just dropping the cosineLosses variable.
Change the CoT calculations to no longer be based on current thrust but on max thrust. This ensures that ThrustForward is nonzero with zero thrust, and makes it a constant of the vessel geometry. This means that diff throttle will also no longer affect and chase its own setpoint. As I've been adding INERTIAL_COT to various controllers I've probably been breaking diffthrottle and this should fix that.
That latter change might in principle break some badly constructed vehicles which have considerably different thrust vectors for minthrottle vs. maxthrottle for times when they aren't being max throttled. As most things you want to do with rockets tend to be bang-bang control this shouldn't affect anyone, but to the extent it actually does affect anyone, those rockets and situations are just considered rocket design problems, and support is dropped.