From 8ba1b169829bd17cd07a4bbf5ab7c44c7992b60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20B=C3=B6klin?= Date: Wed, 19 May 2021 19:58:38 +0200 Subject: [PATCH] Modify humanoid dimensions for calculation of drag --- common/src/comp/fluid_dynamics.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/comp/fluid_dynamics.rs b/common/src/comp/fluid_dynamics.rs index 986ec88a36..93a9d7261c 100644 --- a/common/src/comp/fluid_dynamics.rs +++ b/common/src/comp/fluid_dynamics.rs @@ -184,13 +184,15 @@ impl Body { /// Skin friction is the drag arising from the shear forces between a fluid /// and a surface, while pressure drag is due to flow separation. Both are /// viscous effects. + /// + /// This coefficient includes the reference area. fn parasite_drag_coefficient(&self, wings: Option<&Wings>) -> f32 { // Reference area and drag coefficient assumes best-case scenario of the // orientation producing least amount of drag match self { // Cross-section, head/feet first Body::BipedLarge(_) | Body::BipedSmall(_) | Body::Golem(_) | Body::Humanoid(_) => { - let dim = self.dimensions().xy().map(|a| a * 0.5); + let dim = self.dimensions().xy().map(|a| 0.7 * a * 0.5); const CD: f32 = 0.7; CD * PI * dim.x * dim.y },