protected bool trajectory_is_better(RendezvousTrajectory t)
            {
                //always accept the first trajecotry
                if (Best == null)
                {
                    return(true);
                }
                //between two killers choose the one with greater PeR
                if (t.KillerOrbit && Best.KillerOrbit)
                {
                    return(t.Orbit.PeR > Best.Orbit.PeR);
                }
                //if current is a killer, it's no better
                if (t.KillerOrbit)
                {
                    return(false);
                }
                //if best is still a killer, any non-killer is better
                if (Best.KillerOrbit)
                {
                    return(true);
                }
                //if best is has negligable maneuver dV, or current misses the target,
                //compare qualities
                var bestDeltaV = Best.ManeuverDeltaV.sqrMagnitude;

                if (bestDeltaV > 1 || t.DistanceToTarget > C.Dtol)
                {
                    return(t.Quality < Best.Quality);
                }
                //otherwise select the one with larger maneuver dV
                return(t.ManeuverDeltaV.sqrMagnitude > bestDeltaV);
            }
 public Point(double s, double t, CDOS_Optimizer2D optimizer)
 {
     start      = s;
     transfer   = t;
     distance   = double.MaxValue;
     trajectory = null;
     opt        = optimizer;
 }
 public void UpdateTrajectory(bool with_distance = false)
 {
     trajectory = opt.ren.new_trajectory(start, transfer);
     transfer   = trajectory.TransferTime;
     if (with_distance)
     {
         UpdateDist();
     }
 }