Set sustainer motor to plugged

This commit is contained in:
SiboVG 2023-03-14 23:56:02 +01:00
parent 338f9460aa
commit 30088ab5a0
2 changed files with 8 additions and 0 deletions

View File

@ -170,6 +170,7 @@ public class RecoveryHandler extends AbstractElementHandler {
recoveryDevice.setLineLength(recoveryDevice.getDiameter());
recoveryDevice.setCD(CD);
config.setDeployAltitude(altitude / RASAeroCommonConstants.RASAERO_TO_OPENROCKET_ALTITUDE);
// There is a special RASAero rule: if event 1 AND event 2 are set to apogee, then set event 2 to altitude
if (recoveryDeviceNr == 1 && eventType.equals("Apogee") && this.eventType[0].equals("Apogee")) {
eventType = "Altitude";

View File

@ -163,6 +163,13 @@ public class SimulationListHandler extends AbstractElementHandler {
}
MotorConfiguration motorConfig = new MotorConfiguration(mount, id);
motorConfig.setMotor(motor);
// RASAero requires apogee deployment, so the sustainer motor should always be plugged
if (stageNr == 0) {
motorConfig.setEjectionDelay(Motor.PLUGGED_DELAY);
}
double delay = ignitionDelay != null ? ignitionDelay : 0.0;
motorConfig.setIgnitionDelay(delay);
if (stageNr < rocket.getStageCount() - 1) { // Use burnout non-last if multi-staged rocket