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.
This commit is contained in:
JoePfeiffer 2018-10-21 09:35:33 -06:00
parent c4793cb8b2
commit a5fef587f4

View File

@ -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);