Fix ridge lift

- Fix formula for steepness
- Reduce ridge lift coefficient to 1.0 (from 2.0 previously)
This commit is contained in:
juliancoffee 2024-03-01 18:38:29 +02:00
parent a06e79b089
commit 67a4d30f81

View File

@ -225,7 +225,9 @@ fn simulated_wind_vel(
// === Ridge/Wave lift ===
let mut ridge_lift = {
let steepness = normal.angle_between(normal.with_z(0.)).max(0.5);
const RIDGE_LIFT_COEFF: f32 = 1.0;
let steepness = normal.angle_between(Vec3::unit_z());
// angle between normal and wind
let mut angle = wind_velocity.angle_between(normal.xy()); // 1.4 radians of zero
@ -235,7 +237,7 @@ fn simulated_wind_vel(
angle = (angle - 1.3).max(0.0);
// the ridge lift is based on the angle and the velocity of the wind
angle * steepness * wind_velocity.magnitude() * 2.0
angle * steepness * wind_velocity.magnitude() * RIDGE_LIFT_COEFF
};
// Cliffs mean more lift