public static InstantConditionSimulationWrapper Borrow() { InstantConditionSimulationWrapper sim = pool.Borrow(); sim.Update(); return(sim); }
public override Vector3 GetAeroTorque(Conditions conditions, float AoA, float pitchInput = 0, bool dryTorque = false) { AoA *= Mathf.Rad2Deg; InstantConditionSimOutputWrapper output; InstantConditionSimulationWrapper simulator = GetAvailableSimulator(); try { output = new InstantConditionSimOutputWrapper(simulator.ComputeNonDimensionalForces(AoA, 0, 0, 0, 0, 0, conditions.mach, pitchInput, true, true)); } finally { System.Threading.Monitor.Exit(simulator); } float Q = 0.0005f * conditions.atmDensity * conditions.speed * conditions.speed; return(new Vector3((float)output.Cm * (float)output.MAC, 0, 0) * Q * (float)output.Area); }
private static void Reset(InstantConditionSimulationWrapper sim) { }