Skip to content

Fix some VesselState thrust calculations (probably fix diffthrottle)#2261

Merged
lamont-granquist merged 1 commit into
devfrom
lcg/fix-vesselstate-thrust-calculations
Jun 21, 2026
Merged

Fix some VesselState thrust calculations (probably fix diffthrottle)#2261
lamont-granquist merged 1 commit into
devfrom
lcg/fix-vesselstate-thrust-calculations

Conversation

@lamont-granquist

Copy link
Copy Markdown
Collaborator
  • 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.

- 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.
@lamont-granquist lamont-granquist merged commit 7afb43e into dev Jun 21, 2026
1 check passed
@lamont-granquist lamont-granquist deleted the lcg/fix-vesselstate-thrust-calculations branch June 21, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant