public override void CreateEngine() { if (maxEngineTemp == 0d) { maxEngineTemp = part.maxTemp; } float omega = rpm * 0.1047f; engineSolver = new SolverRotor(omega, r, weight, power * 745.7f, 1.2f, VTOLbuff, BSFC, useOxygen, reverseRotation ? -clockWise : clockWise); useAtmCurve = atmChangeFlow = useVelCurve = useAtmCurveIsp = useVelCurveIsp = false; thrustTransformVectorDefault = thrustTransforms[0].forward; /*this.Fields["Yaw Coeff."].guiActive = yaw; * this.Fields["Yaw Coeff."].guiActiveEditor = yaw; * this.Fields["Collective Diff. Pitch Coeff."].guiActive = colDiffPitch; * this.Fields["Collective Diff. Pitch Coeff."].guiActiveEditor = colDiffPitch; * this.Fields["Cyclic Diff. Coeff."].guiActive = cycDiffYaw; * this.Fields["Cyclic Diff. Coeff."].guiActiveEditor = cycDiffYaw;*/ rollPID = new PIDController((int)(1 / Time.fixedDeltaTime)); pitchPID = new PIDController((int)(1 / Time.fixedDeltaTime)); }
public override void CreateEngine() { if (maxEngineTemp == 0d) { maxEngineTemp = part.maxTemp; } float omega = rpm * 0.1047f; // power *= 745.7f; engineSolver = new SolverRotor(omega, r, weight, power * 745.7f, 1.2f, VTOLbuff, BSFC, useOxygen); sas = part.FindModuleImplementing <ModuleReactionWheel>(); if (sas != null) { sasP = sas.PitchTorque; sasY = sas.YawTorque; sasR = sas.RollTorque; } useAtmCurve = atmChangeFlow = useVelCurve = useAtmCurveIsp = useVelCurveIsp = false; }