Make exceptions show up in plots. Use the exception text in the
warnings.
This commit is contained in:
parent
f0ae25615e
commit
f19044f08d
@ -325,7 +325,4 @@ public abstract class Warning {
|
|||||||
|
|
||||||
public static final Warning RECOVERY_LAUNCH_ROD =
|
public static final Warning RECOVERY_LAUNCH_ROD =
|
||||||
new Other(trans.get("Warning.RECOVERY_LAUNCH_ROD"));
|
new Other(trans.get("Warning.RECOVERY_LAUNCH_ROD"));
|
||||||
|
|
||||||
public static final Warning SIMULATION_EXCEPTION =
|
|
||||||
new Other("Exception during simulation");
|
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Total motion vs. time
|
//// Total motion vs. time
|
||||||
@ -51,6 +52,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Flight side profile
|
//// Flight side profile
|
||||||
@ -63,6 +65,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Stability vs. time
|
//// Stability vs. time
|
||||||
@ -77,6 +80,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Drag coefficients vs. Mach number
|
//// Drag coefficients vs. Mach number
|
||||||
@ -86,6 +90,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.addPlotDataType(FlightDataType.TYPE_FRICTION_DRAG_COEFF, 0);
|
config.addPlotDataType(FlightDataType.TYPE_FRICTION_DRAG_COEFF, 0);
|
||||||
config.addPlotDataType(FlightDataType.TYPE_BASE_DRAG_COEFF, 0);
|
config.addPlotDataType(FlightDataType.TYPE_BASE_DRAG_COEFF, 0);
|
||||||
config.addPlotDataType(FlightDataType.TYPE_PRESSURE_DRAG_COEFF, 0);
|
config.addPlotDataType(FlightDataType.TYPE_PRESSURE_DRAG_COEFF, 0);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Roll characteristics
|
//// Roll characteristics
|
||||||
@ -102,6 +107,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Angle of attack and orientation vs. time
|
//// Angle of attack and orientation vs. time
|
||||||
@ -116,6 +122,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
//// Simulation time step and computation time
|
//// Simulation time step and computation time
|
||||||
@ -129,6 +136,7 @@ public class PlotConfiguration implements Cloneable {
|
|||||||
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
config.setEvent(FlightEvent.Type.STAGE_SEPARATION, true);
|
||||||
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
config.setEvent(FlightEvent.Type.GROUND_HIT, true);
|
||||||
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
config.setEvent(FlightEvent.Type.TUMBLE, true);
|
||||||
|
config.setEvent(FlightEvent.Type.EXCEPTION, true);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
|
|
||||||
DEFAULT_CONFIGURATIONS = configs.toArray(new PlotConfiguration[0]);
|
DEFAULT_CONFIGURATIONS = configs.toArray(new PlotConfiguration[0]);
|
||||||
|
@ -38,7 +38,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
private SimulationPlotDialog(Window parent, Simulation simulation, PlotConfiguration config) {
|
private SimulationPlotDialog(Window parent, Simulation simulation, PlotConfiguration config) {
|
||||||
//// Flight data plot
|
//// Flight data plot
|
||||||
super(parent, simulation.getName());
|
super(parent, simulation.getName());
|
||||||
this.setModalityType(ModalityType.MODELESS);
|
this.setModalityType(ModalityType.DOCUMENT_MODAL);
|
||||||
|
|
||||||
final boolean initialShowPoints = Application.getPreferences().getBoolean(Preferences.PLOT_SHOW_POINTS, false);
|
final boolean initialShowPoints = Application.getPreferences().getBoolean(Preferences.PLOT_SHOW_POINTS, false);
|
||||||
|
|
||||||
|
@ -395,6 +395,7 @@ public class SimulationRunDialog extends JDialog {
|
|||||||
log.debug("Simulation done");
|
log.debug("Simulation done");
|
||||||
setSimulationProgress(1.0);
|
setSimulationProgress(1.0);
|
||||||
updateProgress();
|
updateProgress();
|
||||||
|
SimulationWarningDialog.showWarningDialog(SimulationRunDialog.this, simulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
SimulationListenerHelper.fireEndSimulation(status, e);
|
SimulationListenerHelper.fireEndSimulation(status, e);
|
||||||
// Add FlightEvent for Abort.
|
// Add FlightEvent for Abort.
|
||||||
status.getFlightData().addEvent(new FlightEvent(FlightEvent.Type.EXCEPTION, status.getSimulationTime(), status.getConfiguration().getRocket(), e.getLocalizedMessage()));
|
status.getFlightData().addEvent(new FlightEvent(FlightEvent.Type.EXCEPTION, status.getSimulationTime(), status.getConfiguration().getRocket(), e.getLocalizedMessage()));
|
||||||
status.getWarnings().add(Warning.SIMULATION_EXCEPTION);
|
status.getWarnings().add(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return status.getFlightData();
|
return status.getFlightData();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user