import net.sf.openrocket.rocketcomponent.MotorMount;
import net.sf.openrocket.rocketcomponent.RecoveryDevice;
import net.sf.openrocket.rocketcomponent.RocketComponent;
+import net.sf.openrocket.simulation.exception.MotorIgnitionException;
import net.sf.openrocket.simulation.exception.SimulationException;
import net.sf.openrocket.simulation.exception.SimulationLaunchException;
import net.sf.openrocket.simulation.listeners.SimulationListenerHelper;
Configuration configuration = setupConfiguration(simulationConditions);
MotorInstanceConfiguration motorConfiguration = setupMotorConfiguration(configuration);
if (motorConfiguration.getMotorIDs().isEmpty()) {
- throw new SimulationLaunchException("No motors defined.");
+ throw new MotorIgnitionException("No motors defined in the simulation.");
}
// Initialize the simulation
flightData.addBranch(status.getFlightData());
- log.info("Warnings at the end of simulation: " + flightData.getWarningSet());
+ if (!flightData.getWarningSet().isEmpty()) {
+ log.info("Warnings at the end of simulation: " + flightData.getWarningSet());
+ }
// TODO: HIGH: Simulate branches
return flightData;
// If no motor has ignited, abort
if (!status.isMotorIgnited()) {
- throw new SimulationLaunchException("No motors ignited.");
+ throw new MotorIgnitionException("No motors ignited.");
}
return ret;