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

dragAccel set in BDAirspeedControl.MaxEngineAccel() can be positive #46

Open
RichardDastardly opened this issue Apr 27, 2016 · 1 comment

Comments

@RichardDastardly
Copy link

Tested under FAR and a late 10.4/KSP 1.0.5 version ( as I've been chasing this for a while ):

Issue showed mainly during zoom climb during extend mode when DefaultAltitude is set fairly high - the actual issue is that the craft rolls off the throttle completely while pitched up steeply, which can even result in a stall. Spraying debugging labels showed the issue was caused by +ve figures for dragAccel - I am assuming this is never meant to be positive? - set in BDAirspeedControl.MaxEngineAccel() - clamping that number to <=0 fixed the overall issue with no apparent side-effects so far, but I lack the understanding of intent ( and Unity ) to find the root cause currently.

Example of problem from https://youtu.be/RpM0SxN9aNQ?t=113 onwards.

@RichardDastardly
Copy link
Author

RichardDastardly commented Apr 27, 2016

From what I can make out you're comparing the estimated absolute acceleration of the craft with it's current acceleration along it's velocity vector - but you're not allowing for the current acceleration having a gravity component at the point you produce accelError. Tacking +GravAccel() onto actualCurrentAccel also fixes the issue but it looks a bit messy :p

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

No branches or pull requests

1 participant