Actually, scrap that, allow 0-speed wind
This commit is contained in:
parent
ff638366a2
commit
c3614330b9
@ -146,7 +146,7 @@ public class MultiLevelWindModel implements WindModel {
|
||||
|
||||
public WindLevel(double altitude, double speed, double direction) {
|
||||
this.altitude = altitude;
|
||||
this.speed = Math.max(speed, 0.1);
|
||||
this.speed = Math.max(speed, 0);
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class PinkNoiseWindModel implements WindModel {
|
||||
* @param average the average wind speed to set
|
||||
*/
|
||||
public void setAverage(double average) {
|
||||
average = Math.max(average, 0.1);
|
||||
average = Math.max(average, 0);
|
||||
if (average == this.average) {
|
||||
return;
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ public class Quaternion {
|
||||
// return = (a,b,c,d) * (this)^-1 = (a,b,c,d) * (w,-x,-y,-z)
|
||||
|
||||
// Assert that the w-value is zero
|
||||
assert (Math.abs(a * w + b * x + c * y + d * z) < coord.max() * MathUtil.EPSILON)
|
||||
assert (Math.abs(a * w + b * x + c * y + d * z) <= coord.max() * MathUtil.EPSILON)
|
||||
: ("Should be zero: " + (a * w + b * x + c * y + d * z) + " in " + this + " c=" + coord);
|
||||
|
||||
return new Coordinate(
|
||||
|
@ -69,6 +69,7 @@ public class FlightEventsTest extends BaseTestCase {
|
||||
final Simulation sim = new Simulation(rocket);
|
||||
sim.getOptions().setISAAtmosphere(true);
|
||||
sim.getOptions().setTimeStep(0.05);
|
||||
sim.getOptions ().getPinkNoiseWindModel().setAverage(0.1);
|
||||
rocket.getSelectedConfiguration().setAllStages();
|
||||
FlightConfigurationId fcid = rocket.getSelectedConfiguration().getFlightConfigurationID();
|
||||
sim.setFlightConfigurationId(fcid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user