Merge pull request #2436 from JoePfeiffer/oops-in-2432
Fix data field in thrustcurve events
This commit is contained in:
commit
ced11d9b6c
@ -41,7 +41,7 @@ public class DeploymentConfiguration implements FlightConfigurableParameter<Depl
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public boolean isActivationEvent(DeploymentConfiguration config, FlightEvent e, RocketComponent source) {
|
public boolean isActivationEvent(DeploymentConfiguration config, FlightEvent e, RocketComponent source) {
|
||||||
if (e.getType() != FlightEvent.Type.ALTITUDE)
|
if ((e.getType() != FlightEvent.Type.ALTITUDE) || (e.getData() == null))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
double alt = config.deployAltitude;
|
double alt = config.deployAltitude;
|
||||||
|
@ -418,7 +418,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
ThrustCurveMotor motor = (ThrustCurveMotor) motorState.getMotor();
|
ThrustCurveMotor motor = (ThrustCurveMotor) motorState.getMotor();
|
||||||
double[] timePoints = motor.getTimePoints();
|
double[] timePoints = motor.getTimePoints();
|
||||||
for (double point : timePoints) {
|
for (double point : timePoints) {
|
||||||
addEvent(new FlightEvent(FlightEvent.Type.ALTITUDE, point, event.getSource(), motorState));
|
addEvent(new FlightEvent(FlightEvent.Type.ALTITUDE, point, event.getSource(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
// and queue up the burnout for this motor, as well.
|
// and queue up the burnout for this motor, as well.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user