From a5fef587f4a4cc7397e8e9b0e81f03579c50c758 Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Sun, 21 Oct 2018 09:35:33 -0600 Subject: [PATCH] Wind speed wasn't being entered into data store, so was being reported as NaN in data export. Fixed. TODO: the code is very sloppy about naming variables velocity (ie speed and direction) vs speed (ie magnitude of velocity). Should be fixed after this release... I started down that rabbit hole a couple of times before settling on just fixing the actual bug. --- .../net/sf/openrocket/simulation/RK4SimulationStepper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java b/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java index 38f0eb7db..7625e113a 100644 --- a/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java +++ b/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java @@ -489,8 +489,9 @@ public class RK4SimulationStepper extends AbstractSimulationStepper { //// Local wind speed and direction - Coordinate windSpeed = modelWindVelocity(status); - Coordinate airSpeed = status.getRocketVelocity().add(windSpeed); + Coordinate windVelocity = modelWindVelocity(status); + store.windSpeed = windVelocity.length(); + Coordinate airSpeed = status.getRocketVelocity().add(windVelocity); airSpeed = status.getRocketOrientationQuaternion().invRotate(airSpeed);