allow sustainer to tumble before apogee.
I don't know if it's actually possible for the sustainer to tumble when not under thrust (I guess it would need a tractor motor and very careful CG-CP design so it would tumble immediately after burnout?) but the conditions are checked separately just in case
This commit is contained in:
parent
3c7f35c137
commit
03f5c8924e
@ -258,21 +258,16 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
|
|
||||||
// Check for Tumbling
|
// Check for Tumbling
|
||||||
// Conditions for transition are:
|
// Conditions for transition are:
|
||||||
// apogee reached (if sustainer stage)
|
// is not already tumbling
|
||||||
// and is not already tumbling
|
|
||||||
// and not stable (cg > cp)
|
// and not stable (cg > cp)
|
||||||
// and aoa > AOA_TUMBLE_CONDITION threshold
|
// and aoa > AOA_TUMBLE_CONDITION threshold
|
||||||
// and thrust < THRUST_TUMBLE_CONDITION threshold
|
|
||||||
|
|
||||||
if (!currentStatus.isTumbling()) {
|
if (!currentStatus.isTumbling()) {
|
||||||
final double cp = currentStatus.getFlightData().getLast(FlightDataType.TYPE_CP_LOCATION);
|
final double cp = currentStatus.getFlightData().getLast(FlightDataType.TYPE_CP_LOCATION);
|
||||||
final double cg = currentStatus.getFlightData().getLast(FlightDataType.TYPE_CG_LOCATION);
|
final double cg = currentStatus.getFlightData().getLast(FlightDataType.TYPE_CG_LOCATION);
|
||||||
final double aoa = currentStatus.getFlightData().getLast(FlightDataType.TYPE_AOA);
|
final double aoa = currentStatus.getFlightData().getLast(FlightDataType.TYPE_AOA);
|
||||||
|
|
||||||
final boolean wantToTumble = (cg > cp && aoa > AOA_TUMBLE_CONDITION);
|
if (cg > cp && aoa > AOA_TUMBLE_CONDITION) {
|
||||||
final boolean isSustainer = currentStatus.getConfiguration().isStageActive(0);
|
|
||||||
final boolean isApogee = currentStatus.isApogeeReached();
|
|
||||||
if (wantToTumble && (isApogee || !isSustainer)) {
|
|
||||||
currentStatus.addEvent(new FlightEvent(FlightEvent.Type.TUMBLE, currentStatus.getSimulationTime()));
|
currentStatus.addEvent(new FlightEvent(FlightEvent.Type.TUMBLE, currentStatus.getSimulationTime()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user