Add warning when no motor

This commit is contained in:
SiboVG 2023-04-04 00:04:02 +02:00
parent 811305201f
commit 485c23161e

View File

@ -162,10 +162,17 @@ public class SimulationDTO {
} }
int stageNr = rocket.getChildPosition(stage); int stageNr = rocket.getChildPosition(stage);
// Add friendly reminder to user
if (motor == null) {
warnings.add(String.format("<html>Stage %s has no motor.<br>" +
"&nbsp --> When adding a motor in RASAero, don't forget to update the stage mass and CG.</html>",
stage.getName()));
}
// Add the simulation info for each stage
FlightConfiguration CGCalcConfig = new FlightConfiguration(rocket); FlightConfiguration CGCalcConfig = new FlightConfiguration(rocket);
RigidBody calc; RigidBody calc;
double ignitionDelay, totalCG, separationDelay; double ignitionDelay, totalCG, separationDelay;
switch (stageNr) { switch (stageNr) {
// Sustainer // Sustainer
case 0: case 0: