示例#1
0
        private void SetTransferDetails()
        {
            DepartureSelected = DepartureMin + (vectSelected.x - PlotPosition.x) * xResolution;
            TravelSelected    = TravelMax - (vectSelected.y - PlotPosition.y) * yResolution;

            LambertSolver.TransferDeltaV(cbOrigin, cbDestination, DepartureSelected, TravelSelected, InitialOrbitAltitude, FinalOrbitAltitude, out TransferSelected);
            TransferSelected.CalcEjectionValues();

            mbTWP.EjectAngle.AngleTargetValue = TransferSelected.EjectionAngle * LambertSolver.Rad2Deg;
            mbTWP.EjectAngle.DrawToRetrograde = TransferSelected.EjectionAngleIsRetrograde;
            mbTWP.PhaseAngle.AngleTargetValue = TransferSelected.PhaseAngle * LambertSolver.Rad2Deg;
            if (!mbTWP.PhaseAngle.ShowTargetAngle)
            {
                mbTWP.PhaseAngle.ShowTargetAngle = true;
            }
        }
示例#2
0
        private void SetTransferDetails()
        {
            DepartureSelected = DepartureMin + (vectSelected.x - PlotPosition.x) * xResolution;
            TravelSelected    = TravelMax - (vectSelected.y - PlotPosition.y) * yResolution;

            LambertSolver.TransferDeltaV(cbOrigin, cbDestination, DepartureSelected, TravelSelected, InitialOrbitAltitude, FinalOrbitAltitude, out TransferSelected);
            if (TransferSelected != null)
            {
                //Only if its not a NaN
                TransferSelected.CalcEjectionValues();

                if (TransferWindowPlanner.lstScenesForAngles.Contains(HighLogic.LoadedScene))
                {
                    mbTWP.EjectAngle.AngleTargetValue = TransferSelected.EjectionAngle * LambertSolver.Rad2Deg;
                    mbTWP.EjectAngle.DrawToRetrograde = TransferSelected.EjectionAngleIsRetrograde;
                    mbTWP.PhaseAngle.AngleTargetValue = TransferSelected.PhaseAngle * LambertSolver.Rad2Deg;
                    if (!mbTWP.PhaseAngle.ShowTargetAngle)
                    {
                        mbTWP.PhaseAngle.ShowTargetAngle = true;
                    }
                }
            }
        }