示例#1
0
        private void Update()
        {
            if (!FlightGlobals.ready)
            {
                return;
            }

            if (orbitHUD == null || targetHUD == null || maneuverHUD == null)
            {
                return;
            }

            Vessel v = FlightGlobals.ActiveVessel;

            if (v == null)
            {
                return;
            }

            if (orbitHUD.IsVisible)
            {
                switch (v.situation)
                {
                case Vessel.Situations.LANDED:
                case Vessel.Situations.PRELAUNCH:
                    apo.IsActive      = apo.AlwaysShow;
                    peri.IsActive     = peri.AlwaysShow;
                    inc.IsActive      = inc.AlwaysShow;
                    ecc.IsActive      = ecc.AlwaysShow;
                    LAN.IsActive      = LAN.AlwaysShow;
                    AoPE.IsActive     = AoPE.AlwaysShow;
                    SMA.IsActive      = SMA.AlwaysShow;
                    period.IsActive   = period.AlwaysShow;
                    altitude.IsActive = altitude.AlwaysShow;
                    radar.IsActive    = radar.AlwaysShow;
                    location.IsActive = true;
                    terrain.IsActive  = true;
                    break;

                case Vessel.Situations.SPLASHED:
                    apo.IsActive      = apo.AlwaysShow;
                    peri.IsActive     = peri.AlwaysShow;
                    inc.IsActive      = inc.AlwaysShow;
                    ecc.IsActive      = ecc.AlwaysShow;
                    LAN.IsActive      = LAN.AlwaysShow;
                    AoPE.IsActive     = AoPE.AlwaysShow;
                    SMA.IsActive      = SMA.AlwaysShow;
                    period.IsActive   = period.AlwaysShow;
                    altitude.IsActive = altitude.AlwaysShow;
                    location.IsActive = true;
                    radar.IsActive    = true;
                    terrain.IsActive  = true;
                    break;

                case Vessel.Situations.FLYING:
                    apo.IsActive      = apo.AlwaysShow || v.orbit.eccentricity < 1;
                    radar.IsActive    = true;
                    terrain.IsActive  = true;
                    location.IsActive = true;
                    inc.IsActive      = inc.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 3;
                    altitude.IsActive = altitude.AlwaysShow;
                    LAN.IsActive      = LAN.AlwaysShow;
                    AoPE.IsActive     = AoPE.AlwaysShow;
                    SMA.IsActive      = SMA.AlwaysShow;
                    ecc.IsActive      = ecc.AlwaysShow;
                    peri.IsActive     = v.orbit.PeA > 0;
                    period.IsActive   = period.AlwaysShow;
                    break;

                case Vessel.Situations.SUB_ORBITAL:
                    apo.IsActive      = apo.AlwaysShow || v.orbit.eccentricity < 1;
                    radar.IsActive    = true;
                    inc.IsActive      = true;
                    ecc.IsActive      = true;
                    location.IsActive = true;

                    if (v.orbit.PeA < 0)
                    {
                        peri.IsActive = peri.AlwaysShow || Math.Abs(v.orbit.PeA) < v.mainBody.Radius / 5 || (v.orbit.eccentricity >= 1 && v.orbit.timeToPe > 0);
                    }
                    else
                    {
                        peri.IsActive = peri.AlwaysShow || v.orbit.eccentricity < 1 || v.orbit.timeToPe > 0;
                    }

                    altitude.IsActive = altitude.AlwaysShow;
                    LAN.IsActive      = LAN.AlwaysShow;
                    AoPE.IsActive     = AoPE.AlwaysShow;
                    SMA.IsActive      = SMA.AlwaysShow;
                    period.IsActive   = period.AlwaysShow;
                    terrain.IsActive  = terrain.AlwaysShow;
                    break;

                default:
                    apo.IsActive      = apo.AlwaysShow || v.orbit.eccentricity < 1;
                    peri.IsActive     = peri.AlwaysShow || v.orbit.eccentricity < 1 || v.orbit.timeToPe > 0;
                    inc.IsActive      = true;
                    ecc.IsActive      = true;
                    LAN.IsActive      = true;
                    AoPE.IsActive     = true;
                    SMA.IsActive      = true;
                    period.IsActive   = period.AlwaysShow || v.orbit.eccentricity < 1;
                    altitude.IsActive = true;

                    location.IsActive = location.AlwaysShow;
                    radar.IsActive    = radar.AlwaysShow;
                    terrain.IsActive  = terrain.AlwaysShow;
                    break;
                }
            }

            bool targetFlag = true;

            if (targetHUD.IsVisible)
            {
                if (!BasicTargetting.TargetValid())
                {
                    targetName.IsActive = false;
                    closest.IsActive    = false;
                    distance.IsActive   = false;
                    relInc.IsActive     = false;
                    relVel.IsActive     = false;
                    angToPro.IsActive   = false;
                    closestVel.IsActive = false;

                    targetFlag = false;

                    BasicTargetting.UpdateOn = false;
                }
                else
                {
                    switch (v.situation)
                    {
                    case Vessel.Situations.LANDED:
                    case Vessel.Situations.PRELAUNCH:
                    case Vessel.Situations.SPLASHED:
                        targetName.IsActive = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        angToPro.IsActive   = angToPro.AlwaysShow && (BasicTargetting.IsCelestial && FlightGlobals.currentMainBody.referenceBody != null && FlightGlobals.currentMainBody.referenceBody != FlightGlobals.currentMainBody);
                        closest.IsActive    = closest.AlwaysShow && ((BasicTargetting.IsCelestial && BasicTargetting.BodyIntersect) || (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect));
                        closestVel.IsActive = closestVel.AlwaysShow && BasicTargetting.IsVessel && BasicTargetting.VesselIntersect;
                        distance.IsActive   = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        relVel.IsActive     = relVel.AlwaysShow && (BasicTargetting.IsCelestial || BasicTargetting.IsVessel);
                        relInc.IsActive     = relInc.AlwaysShow && (BasicTargetting.IsCelestial || BasicTargetting.IsVessel);
                        break;

                    case Vessel.Situations.FLYING:
                        targetName.IsActive = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        angToPro.IsActive   = angToPro.AlwaysShow && (BasicTargetting.IsCelestial && FlightGlobals.currentMainBody.referenceBody != null && FlightGlobals.currentMainBody.referenceBody != FlightGlobals.currentMainBody);
                        closest.IsActive    = ((BasicTargetting.IsCelestial && BasicTargetting.BodyIntersect) || (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect)) && (closest.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold);
                        closestVel.IsActive = (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect) && (closestVel.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold);
                        distance.IsActive   = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        relVel.IsActive     = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        relInc.IsActive     = (BasicTargetting.IsCelestial || BasicTargetting.IsVessel) && (relInc.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 3);
                        break;

                    default:
                        targetName.IsActive = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        angToPro.IsActive   = BasicTargetting.IsCelestial && FlightGlobals.currentMainBody.referenceBody != null && FlightGlobals.currentMainBody.referenceBody != FlightGlobals.currentMainBody;
                        closest.IsActive    = (BasicTargetting.IsCelestial && BasicTargetting.BodyIntersect) || (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect);
                        closestVel.IsActive = BasicTargetting.IsVessel && BasicTargetting.VesselIntersect;
                        distance.IsActive   = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        relVel.IsActive     = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        relInc.IsActive     = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                        break;
                    }

                    BasicTargetting.UpdateOn = true;
                }
            }
            else
            {
                BasicTargetting.UpdateOn = false;
            }

            if (BasicTargetting.UpdateOn)
            {
                BasicTargetting.Update();
            }

            if (maneuverHUD.IsVisible)
            {
                if (!targetHUD.IsVisible)
                {
                    if (!BasicTargetting.TargetValid())
                    {
                        targetFlag = false;
                    }
                }

                PatchedConicSolver solver = v.patchedConicSolver;

                if (solver == null || solver.maneuverNodes.Count <= 0)
                {
                    maneuver.IsActive = false;
                    burnTime.IsActive = false;
                    maneuverCloseApproach.IsActive = false;
                    maneuverCloseRelVel.IsActive   = false;

                    BasicManeuvering.UpdateOn = false;
                }
                else
                {
                    switch (v.situation)
                    {
                    case Vessel.Situations.LANDED:
                    case Vessel.Situations.PRELAUNCH:
                    case Vessel.Situations.SPLASHED:
                        maneuver.IsActive = maneuver.AlwaysShow;
                        burnTime.IsActive = burnTime.AlwaysShow;
                        maneuverCloseApproach.IsActive = targetFlag && maneuverCloseApproach.AlwaysShow && ((BasicTargetting.IsCelestial && BasicManeuvering.BodyIntersect) || (BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect));
                        maneuverCloseRelVel.IsActive   = targetFlag && maneuverCloseRelVel.AlwaysShow && BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect;
                        break;

                    case Vessel.Situations.FLYING:
                        maneuver.IsActive = maneuver.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                        burnTime.IsActive = burnTime.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                        maneuverCloseApproach.IsActive = targetFlag && ((BasicTargetting.IsCelestial && BasicManeuvering.BodyIntersect) || (BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect)) && (maneuverCloseApproach.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2);
                        maneuverCloseRelVel.IsActive   = targetFlag && BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect && (maneuverCloseRelVel.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2);
                        break;

                    default:
                        maneuver.IsActive = true;
                        burnTime.IsActive = true;
                        maneuverCloseApproach.IsActive = targetFlag && ((BasicTargetting.IsCelestial && BasicManeuvering.BodyIntersect) || (BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect));
                        maneuverCloseRelVel.IsActive   = targetFlag && BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect;
                        break;
                    }

                    BasicManeuvering.UpdateOn = true;
                }
            }
            else
            {
                BasicManeuvering.UpdateOn = false;
            }

            if (BasicManeuvering.UpdateOn)
            {
                BasicManeuvering.Update();
            }
        }
示例#2
0
        private void Update()
        {
            if (!FlightGlobals.ready)
            {
                return;
            }

            if (orbitHUD == null || targetHUD == null || maneuverHUD == null)
            {
                return;
            }

            Vessel v = FlightGlobals.ActiveVessel;

            if (v == null)
            {
                return;
            }

            bool jumper    = v.isEVA || v.vesselType == VesselType.Rover;
            bool highRadar = v.isEVA ? v.radarAltitude > 10 : v.radarAltitude > 5;

            if (orbitHUD.IsVisible)
            {
                if (OrbitTimer < 4)
                {
                    OrbitTimer++;
                }
                else
                {
                    OrbitTimer = 0;

                    bool pqs = v.mainBody != null && v.mainBody.pqsController != null;

                    switch (v.situation)
                    {
                    case Vessel.Situations.LANDED:
                    case Vessel.Situations.PRELAUNCH:
                        vesselName.IsActive = true;
                        apo.IsActive        = apo.AlwaysShow;
                        peri.IsActive       = peri.AlwaysShow;
                        inc.IsActive        = inc.AlwaysShow;
                        eqNode.IsActive     = eqNode.AlwaysShow;
                        ecc.IsActive        = ecc.AlwaysShow;
                        LAN.IsActive        = LAN.AlwaysShow;
                        AoPE.IsActive       = AoPE.AlwaysShow;
                        SMA.IsActive        = SMA.AlwaysShow;
                        period.IsActive     = period.AlwaysShow;
                        altitude.IsActive   = altitude.AlwaysShow;
                        radar.IsActive      = radar.AlwaysShow;
                        velocity.IsActive   = true;
                        location.IsActive   = true;
                        terrain.IsActive    = pqs || terrain.AlwaysShow;
                        break;

                    case Vessel.Situations.SPLASHED:
                        vesselName.IsActive = true;
                        apo.IsActive        = apo.AlwaysShow;
                        peri.IsActive       = peri.AlwaysShow;
                        inc.IsActive        = inc.AlwaysShow;
                        eqNode.IsActive     = eqNode.AlwaysShow;
                        ecc.IsActive        = ecc.AlwaysShow;
                        LAN.IsActive        = LAN.AlwaysShow;
                        AoPE.IsActive       = AoPE.AlwaysShow;
                        SMA.IsActive        = SMA.AlwaysShow;
                        period.IsActive     = period.AlwaysShow;
                        altitude.IsActive   = altitude.AlwaysShow;
                        velocity.IsActive   = true;
                        location.IsActive   = true;
                        radar.IsActive      = pqs || radar.AlwaysShow;
                        terrain.IsActive    = pqs || terrain.AlwaysShow;
                        break;

                    case Vessel.Situations.FLYING:
                        vesselName.IsActive = true;
                        apo.IsActive        = apo.AlwaysShow || (v.orbit.eccentricity < 1 && (!jumper || highRadar));
                        radar.IsActive      = radar.AlwaysShow || (pqs && (!jumper || highRadar));
                        terrain.IsActive    = terrain.AlwaysShow || pqs;
                        location.IsActive   = true;
                        velocity.IsActive   = true;
                        inc.IsActive        = inc.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 3;
                        eqNode.IsActive     = eqNode.AlwaysShow || (v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 3 && (Math.Abs(v.orbit.inclination) > 0.0001 && Math.Abs(v.orbit.inclination) < 179.9999));
                        altitude.IsActive   = altitude.AlwaysShow || (!pqs && (!jumper || highRadar));
                        LAN.IsActive        = LAN.AlwaysShow;
                        AoPE.IsActive       = AoPE.AlwaysShow;
                        SMA.IsActive        = SMA.AlwaysShow;
                        ecc.IsActive        = ecc.AlwaysShow;
                        peri.IsActive       = peri.AlwaysShow || (v.orbit.PeA > 0 && ((!jumper || highRadar)));
                        period.IsActive     = period.AlwaysShow;
                        break;

                    case Vessel.Situations.SUB_ORBITAL:
                        vesselName.IsActive = true;
                        apo.IsActive        = apo.AlwaysShow || (v.orbit.eccentricity < 1 && (!jumper || highRadar));
                        inc.IsActive        = inc.AlwaysShow || !jumper || highRadar;
                        eqNode.IsActive     = eqNode.AlwaysShow || ((!jumper || highRadar) && (Math.Abs(v.orbit.inclination) > 0.0001 && Math.Abs(v.orbit.inclination) < 179.9999));
                        ecc.IsActive        = ecc.AlwaysShow || !jumper || highRadar;
                        location.IsActive   = true;
                        velocity.IsActive   = true;

                        radar.IsActive    = radar.AlwaysShow || (pqs && (!jumper || highRadar));
                        terrain.IsActive  = terrain.AlwaysShow || pqs;
                        altitude.IsActive = altitude.AlwaysShow || (!pqs && (!jumper || highRadar));

                        if (v.orbit.PeA < 0)
                        {
                            peri.IsActive = peri.AlwaysShow || ((Math.Abs(v.orbit.PeA) < v.mainBody.Radius || (v.orbit.eccentricity >= 1 && v.orbit.timeToPe > 0)) && (!jumper || highRadar));
                        }
                        else
                        {
                            peri.IsActive = peri.AlwaysShow || ((v.orbit.eccentricity < 1 || v.orbit.timeToPe > 0) && (!jumper || highRadar));
                        }

                        LAN.IsActive    = LAN.AlwaysShow;
                        AoPE.IsActive   = AoPE.AlwaysShow;
                        SMA.IsActive    = SMA.AlwaysShow;
                        period.IsActive = period.AlwaysShow;
                        break;

                    default:
                        vesselName.IsActive = true;
                        apo.IsActive        = apo.AlwaysShow || v.orbit.eccentricity < 1;
                        peri.IsActive       = peri.AlwaysShow || v.orbit.eccentricity < 1 || v.orbit.timeToPe > 0;
                        inc.IsActive        = true;
                        eqNode.IsActive     = eqNode.AlwaysShow || (Math.Abs(v.orbit.inclination) > 0.0001 && Math.Abs(v.orbit.inclination) < 179.9999);
                        ecc.IsActive        = true;
                        LAN.IsActive        = true;
                        AoPE.IsActive       = true;
                        SMA.IsActive        = true;
                        period.IsActive     = period.AlwaysShow || v.orbit.eccentricity < 1;
                        altitude.IsActive   = true;

                        velocity.IsActive = velocity.AlwaysShow;
                        location.IsActive = location.AlwaysShow;
                        radar.IsActive    = (v.altitude < (v.mainBody.minOrbitalDistance - v.mainBody.Radius) && pqs) || radar.AlwaysShow;
                        terrain.IsActive  = (v.altitude < (v.mainBody.minOrbitalDistance - v.mainBody.Radius) && pqs) || terrain.AlwaysShow;
                        break;
                    }
                }

                if ((terrain.IsActive && terrain.IsVisible) || (radar.IsActive && radar.IsVisible))
                {
                    BasicOrbiting.Update();
                }
            }

            bool targetFlag = true;

            if (targetHUD.IsVisible)
            {
                if (!BasicTargetting.TargetValid())
                {
                    targetName.IsActive = false;
                    closest.IsActive    = false;
                    distance.IsActive   = false;
                    relInc.IsActive     = false;
                    relVel.IsActive     = false;
                    angToPro.IsActive   = false;
                    closestVel.IsActive = false;
                    phaseAngle.IsActive = false;

                    targetFlag = false;

                    BasicTargetting.UpdateOn = false;
                }
                else
                {
                    if (TargetTimer < 3)
                    {
                        TargetTimer++;
                        BasicTargetting.UpdateOn = false;
                    }
                    else
                    {
                        TargetTimer = 0;

                        switch (v.situation)
                        {
                        case Vessel.Situations.LANDED:
                        case Vessel.Situations.PRELAUNCH:
                        case Vessel.Situations.SPLASHED:
                            targetName.IsActive = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                            angToPro.IsActive   = angToPro.AlwaysShow && BasicTargetting.ShowAngle && BasicTargetting.IsCelestial;
                            phaseAngle.IsActive = phaseAngle.AlwaysShow && BasicTargetting.ShowPhasing;
                            closest.IsActive    = closest.AlwaysShow && ((BasicTargetting.IsCelestial && BasicTargetting.BodyIntersect) || (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect));
                            closestVel.IsActive = closestVel.AlwaysShow && BasicTargetting.IsVessel && BasicTargetting.VesselIntersect;
                            distance.IsActive   = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                            relVel.IsActive     = relVel.AlwaysShow && (BasicTargetting.IsCelestial || BasicTargetting.IsVessel);
                            relInc.IsActive     = relInc.AlwaysShow && (BasicTargetting.IsCelestial || BasicTargetting.IsVessel);
                            break;

                        case Vessel.Situations.FLYING:
                            targetName.IsActive = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                            angToPro.IsActive   = (angToPro.AlwaysShow && BasicTargetting.ShowAngle && BasicTargetting.IsCelestial) && (!jumper || highRadar);
                            phaseAngle.IsActive = (phaseAngle.AlwaysShow && BasicTargetting.ShowPhasing) && (!jumper || highRadar);
                            closest.IsActive    = ((BasicTargetting.IsCelestial && BasicTargetting.BodyIntersect) || (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect)) && (closest.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold);
                            closestVel.IsActive = (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect) && (closestVel.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold);
                            distance.IsActive   = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                            relVel.IsActive     = (BasicTargetting.IsCelestial || BasicTargetting.IsVessel) && (relVel.AlwaysShow || !jumper || highRadar);
                            relInc.IsActive     = (BasicTargetting.IsCelestial || BasicTargetting.IsVessel) && (relInc.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 3);
                            break;

                        default:
                            targetName.IsActive = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                            angToPro.IsActive   = (BasicTargetting.ShowAngle && (BasicTargetting.IsCelestial || BasicTargetting.IsVessel)) && (angToPro.AlwaysShow || !jumper || highRadar);
                            phaseAngle.IsActive = BasicTargetting.ShowPhasing && (phaseAngle.AlwaysShow || !jumper || highRadar);
                            closest.IsActive    = ((BasicTargetting.IsCelestial && BasicTargetting.BodyIntersect) || (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect)) && (closest.AlwaysShow || !jumper || highRadar);
                            closestVel.IsActive = (BasicTargetting.IsVessel && BasicTargetting.VesselIntersect) && (closestVel.AlwaysShow || !jumper || highRadar);
                            distance.IsActive   = BasicTargetting.IsCelestial || BasicTargetting.IsVessel;
                            relVel.IsActive     = (BasicTargetting.IsCelestial || BasicTargetting.IsVessel) && (relVel.AlwaysShow || !jumper || highRadar);
                            relInc.IsActive     = (BasicTargetting.IsCelestial || BasicTargetting.IsVessel) && (relInc.AlwaysShow || !jumper || highRadar);
                            break;
                        }

                        if (AnyTargetActive())
                        {
                            BasicTargetting.UpdateOn = true;
                        }
                        else
                        {
                            BasicTargetting.UpdateOn = false;
                        }
                    }
                }
            }
            else
            {
                BasicTargetting.UpdateOn = false;
            }

            if (BasicTargetting.UpdateOn)
            {
                BasicTargetting.Update();
            }

            if (maneuverHUD.IsVisible)
            {
                if (!targetHUD.IsVisible)
                {
                    if (!BasicTargetting.TargetValid())
                    {
                        targetFlag = false;
                    }
                }

                PatchedConicSolver solver = v.patchedConicSolver;

                if (solver == null || solver.maneuverNodes.Count <= 0)
                {
                    maneuver.IsActive              = false;
                    burnTime.IsActive              = false;
                    maneuverApoapsis.IsActive      = false;
                    maneuverPeriapsis.IsActive     = false;
                    maneuverInclination.IsActive   = false;
                    maneuverEccentricity.IsActive  = false;
                    maneuverAngleToPro.IsActive    = false;
                    maneuverPhaseAngle.IsActive    = false;
                    maneuverCloseApproach.IsActive = false;
                    maneuverCloseRelVel.IsActive   = false;

                    BasicManeuvering.Updated  = false;
                    BasicManeuvering.UpdateOn = false;
                }
                else
                {
                    if (ManeuverTimer < 3)
                    {
                        ManeuverTimer++;
                        BasicManeuvering.UpdateOn = false;
                    }
                    else
                    {
                        ManeuverTimer = 0;
                        switch (v.situation)
                        {
                        case Vessel.Situations.LANDED:
                        case Vessel.Situations.PRELAUNCH:
                        case Vessel.Situations.SPLASHED:
                            maneuver.IsActive              = maneuver.AlwaysShow;
                            burnTime.IsActive              = burnTime.AlwaysShow;
                            maneuverApoapsis.IsActive      = maneuverApoapsis.AlwaysShow;
                            maneuverPeriapsis.IsActive     = maneuverPeriapsis.AlwaysShow;
                            maneuverInclination.IsActive   = maneuverInclination.AlwaysShow;
                            maneuverEccentricity.IsActive  = maneuverEccentricity.AlwaysShow;
                            maneuverAngleToPro.IsActive    = targetFlag && maneuverAngleToPro.AlwaysShow && BasicManeuvering.ShowAngle && BasicTargetting.IsCelestial;
                            maneuverPhaseAngle.IsActive    = targetFlag && maneuverPhaseAngle.AlwaysShow && BasicManeuvering.ShowPhasing;
                            maneuverCloseApproach.IsActive = targetFlag && maneuverCloseApproach.AlwaysShow && ((BasicTargetting.IsCelestial && BasicManeuvering.BodyIntersect) || (BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect));
                            maneuverCloseRelVel.IsActive   = targetFlag && maneuverCloseRelVel.AlwaysShow && BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect;
                            break;

                        case Vessel.Situations.FLYING:
                            maneuver.IsActive              = maneuver.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                            burnTime.IsActive              = burnTime.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                            maneuverApoapsis.IsActive      = maneuverApoapsis.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                            maneuverPeriapsis.IsActive     = maneuverPeriapsis.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                            maneuverInclination.IsActive   = maneuverInclination.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                            maneuverEccentricity.IsActive  = maneuverEccentricity.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2;
                            maneuverAngleToPro.IsActive    = (targetFlag && maneuverAngleToPro.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2) && BasicManeuvering.ShowAngle && BasicTargetting.IsCelestial;
                            maneuverPhaseAngle.IsActive    = (targetFlag && maneuverPhaseAngle.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2) && BasicManeuvering.ShowPhasing;
                            maneuverCloseApproach.IsActive = targetFlag && ((BasicTargetting.IsCelestial && BasicManeuvering.BodyIntersect) || (BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect)) && (maneuverCloseApproach.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2);
                            maneuverCloseRelVel.IsActive   = targetFlag && BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect && (maneuverCloseRelVel.AlwaysShow || v.altitude > v.mainBody.scienceValues.flyingAltitudeThreshold / 2);
                            break;

                        default:
                            Orbit nextPatch = solver.maneuverNodes[0].nextPatch;

                            maneuver.IsActive              = maneuver.AlwaysShow || !jumper || highRadar;
                            burnTime.IsActive              = burnTime.AlwaysShow || !jumper || highRadar;
                            maneuverApoapsis.IsActive      = maneuverApoapsis.AlwaysShow || ((nextPatch != null && nextPatch.eccentricity < 1) && (!jumper || highRadar));
                            maneuverPeriapsis.IsActive     = maneuverPeriapsis.AlwaysShow || ((nextPatch != null && (nextPatch.eccentricity < 1 || nextPatch.timeToPe > 0)) && (!jumper || highRadar));
                            maneuverInclination.IsActive   = maneuverInclination.AlwaysShow || !jumper || highRadar;
                            maneuverEccentricity.IsActive  = maneuverEccentricity.AlwaysShow || !jumper || highRadar;
                            maneuverAngleToPro.IsActive    = (targetFlag && BasicManeuvering.ShowAngle && (BasicTargetting.IsCelestial || BasicTargetting.IsVessel)) && (maneuverAngleToPro.AlwaysShow || !jumper || highRadar);
                            maneuverPhaseAngle.IsActive    = (targetFlag && BasicManeuvering.ShowPhasing) && (maneuverPhaseAngle.AlwaysShow || !jumper || highRadar);
                            maneuverCloseApproach.IsActive = (targetFlag && ((BasicTargetting.IsCelestial && BasicManeuvering.BodyIntersect) || (BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect))) && (maneuverCloseApproach.AlwaysShow || !jumper || highRadar);
                            maneuverCloseRelVel.IsActive   = (targetFlag && BasicTargetting.IsVessel && BasicManeuvering.VesselIntersect) && (maneuverCloseRelVel.AlwaysShow || !jumper || highRadar);
                            break;
                        }

                        if (AnyManeuverActive())
                        {
                            BasicManeuvering.UpdateOn = true;
                        }
                        else
                        {
                            BasicManeuvering.UpdateOn = false;
                        }
                    }
                }
            }
            else
            {
                BasicManeuvering.UpdateOn = false;
            }

            if (BasicManeuvering.UpdateOn)
            {
                BasicManeuvering.Update(targetFlag);
            }
        }