public GeoPoint GetPointByCurrentFlightTime(double currentFlightTime)
        {
            SphericalMercatorProjection projection = new SphericalMercatorProjection();
            double time = 0.0;

            for (int i = 0; i < trajectory.Count - 1; i++)
            {
                if (trajectory[i].FlightTime > currentFlightTime - time)
                {
                    return(trajectory[i].GetPointByCurrentFlightTime(currentFlightTime - time, projection));
                }
                time += trajectory[i].FlightTime;
            }
            return(trajectory[trajectory.Count - 1].GetPointByCurrentFlightTime(currentFlightTime - time, projection));
        }
 public CSVWriter(string filename, string delim = ";")
 {
     this.delim = delim;
     geoTransform = new SphericalMercatorProjection();
     writer = new StreamWriter(filename);
     StringBuilder sb = new StringBuilder();
     sb.Append("driverId").Append(delim).
         Append("clusterSize").Append(delim).
         Append("trainingSetCount").Append(delim).
         Append("validationSetCount").Append(delim).
         Append("within100m").Append(delim).
         Append("within200m").Append(delim).
         Append("within500m").Append(delim).
         Append("within1000m").Append(delim).
         Append("within2000m").Append(delim).
         Append("meanTripDistance").Append(delim);
     writer.WriteLine(sb.ToString());
 }
Exemple #3
0
        public CSVWriter(string filename, string delim = ";")
        {
            this.delim   = delim;
            geoTransform = new SphericalMercatorProjection();
            writer       = new StreamWriter(filename);
            StringBuilder sb = new StringBuilder();

            sb.Append("driverId").Append(delim).
            Append("clusterSize").Append(delim).
            Append("trainingSetCount").Append(delim).
            Append("validationSetCount").Append(delim).
            Append("within100m").Append(delim).
            Append("within200m").Append(delim).
            Append("within500m").Append(delim).
            Append("within1000m").Append(delim).
            Append("within2000m").Append(delim).
            Append("meanTripDistance").Append(delim);
            writer.WriteLine(sb.ToString());
        }