Bug/thruster state effector isp factor #279
Merged
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.
Description
A hard coded value is removed from the thrusterStateEffector that was erroneously forcing mass depletion always on. Then mass depletion logic is updated to check ThrustFactor to see if a thruster is firing rather than IspFactor which is unused by the thrusterStateEffector. Additionally, the mass depletion is changed to now scale its expenditure according to the scaled value of thrust following ramp up/down.
Verification
The FuelTank mass depletion unit test already produces plots of the fuel expenditure for a thruster dynamic and state effector, and the state effector's plots for mass and massDot vs. time now accurately reflect the firing pattern. While mass depletion was being plotted, no assertions were made as to accuracy of the values, so two assertions have been added to the fuel tank's mass depletion unit test checking that massDot is ramped up when the thruster is firing and ramped down when the thruster is commanded off.
Additionally, the thrusterStateEffector unit test is updated to scale the thrust by its ramp up/down factor when computing truth values for massDot comparison when toggled on for mass depletion force contributions.
Documentation
No documentation is invalidated by these changes, just fixing code to match what the documentation outlines.