Calculate lift-induced drag from gravity

more-targets
Titan Yuan 2024-09-27 10:50:50 -07:00
parent 3a0a27c4a7
commit f15ab47842
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class Interceptor : Agent {
} }
float airDrag = CalculateDrag(); float airDrag = CalculateDrag();
float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput); float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput + gravity);
float dragAcceleration = -(airDrag + liftInducedDrag); float dragAcceleration = -(airDrag + liftInducedDrag);
// Project the drag acceleration onto the forward direction // Project the drag acceleration onto the forward direction