feat(flight): enhance flight model with transonic drag and vortex lift features
This commit is contained in:
1 parent
599ecae21f
commit
44a5f7f9bc
12 files changed
+177
-26
No files matched your search
@@ -205,10 +205,7 @@ public final class AeroState implements PhysicsBridge.Publishable {
|
||||
private void evaluate(Frame frame, Vector3dc centerOfMass, double[] v, double[] w, boolean improved, boolean commit, Wrench out) {
|
||||
out.clear();
|
||||
double weight = clock.weight();
|
||||
double liftConstant = ImprovedAero.LIFT_CONSTANT;
|
||||
double stallAngleScale = Config.STALL_ANGLE_SCALE.get();
|
||||
double liftScale = Config.LIFT_SCALE.get();
|
||||
double thinDrag = Config.STABILIZER_DRAG.get();
|
||||
ImprovedAero.Tuning tuning = improved ? ImprovedAero.Tuning.read() : null;
|
||||
double[] r = new double[3];
|
||||
if (commit) {
|
||||
wingStalled = false;
|
||||
@@ -227,7 +224,7 @@ public final class AeroState implements PhysicsBridge.Publishable {
|
||||
double input = s.type().controllable ? input(s, node, state, 0.0) : 0.0;
|
||||
|
||||
if (improved) {
|
||||
boolean nowStalled = ImprovedAero.evaluate(s, v, w, r, input, weight, liftConstant, liftScale, stallAngleScale, thinDrag, stalled[i], out);
|
||||
boolean nowStalled = ImprovedAero.evaluate(s, v, w, r, input, weight, tuning, stalled[i], out);
|
||||
if (commit) {
|
||||
stalled[i] = nowStalled;
|
||||
wingStalled |= nowStalled && s.type() == SurfaceType.WING;
|
||||
@@ -242,7 +239,7 @@ public final class AeroState implements PhysicsBridge.Publishable {
|
||||
probe.clear();
|
||||
double base = 0.0;
|
||||
if (improved) {
|
||||
ImprovedAero.evaluate(s, v, w, r, input, weight, liftConstant, liftScale, stallAngleScale, thinDrag, stalled[i], probe);
|
||||
ImprovedAero.evaluate(s, v, w, r, input, weight, tuning, stalled[i], probe);
|
||||
} else {
|
||||
WariumAero.evaluate(s, v, w, r, input, weight, probe);
|
||||
}
|
||||
@@ -250,7 +247,7 @@ public final class AeroState implements PhysicsBridge.Publishable {
|
||||
probe.clear();
|
||||
double nudged = input(s, node, state, delta);
|
||||
if (improved) {
|
||||
ImprovedAero.evaluate(s, v, w, r, nudged, weight, liftConstant, liftScale, stallAngleScale, thinDrag, stalled[i], probe);
|
||||
ImprovedAero.evaluate(s, v, w, r, nudged, weight, tuning, stalled[i], probe);
|
||||
} else {
|
||||
WariumAero.evaluate(s, v, w, r, nudged, weight, probe);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user