public static double VitesseMoyDroite(List <DataPosition> data, ref double peakV, double temps) { double[,] tabSomme; double[] tabVitesse; //double[,] tabSomme2; int tabLong; tabSomme = SommeTemps(data, temps); tabLong = tabSomme.Length / 2; //tabSomme2 = new double[2, tabLong - 20]; //for (int i = 0; i < tabLong; i++) //{ // if ((i > 9) && (i < tabLong - 21)) // { // tabSomme2[0, i] = tabSomme[0, i]; // tabSomme2[1, i] = tabSomme[1, i]; // } //} tabVitesse = Ax_Generique.DistancePark(tabSomme); peakV = VitessePeak(tabVitesse); return(VitesseMoyenne(tabVitesse)); // vitesse moyenne }
/// <summary> /// Calculer la distance Ppr Pc /// </summary> /// <param name="data"></param> /// <returns></returns> public static double DistancePprPc(List <DataPosition> ppr, List <DataPosition> pc) { double[,] tabSommeAbs; double[] tabSommePpr = new double[2]; double[] tabSommePc = new double[2]; double nbrs; for (int i = 0; i < ppr.Count; i++) { tabSommePpr[0] += ppr[i].X; tabSommePpr[1] += ppr[i].Y; } tabSommePpr[0] /= ppr.Count; tabSommePpr[1] /= ppr.Count; for (int i = 0; i < pc.Count; i++) { tabSommePc[0] += pc[i].X; tabSommePc[1] += pc[i].Y; } tabSommePc[0] /= pc.Count; tabSommePc[1] /= pc.Count; nbrs = Ax_Generique.DistancePythagorean(tabSommePpr[0], tabSommePpr[1], tabSommePc[0], tabSommePc[1]); return(nbrs); }
/// <summary> /// Calculer la distance Réelle /// </summary> /// <param name="data"></param> /// <returns></returns> public static double Distance(List <DataPosition> data) { double[,] tabSommeAbs; double[] tabDistance; tabSommeAbs = Somme(data); tabDistance = Ax_Generique.DistancePark(tabSommeAbs); return(Ax_Generique.DistanceReelle(tabDistance)); }
/// <summary> /// Somme des points /// </summary> /// <param name="data"></param> /// <returns></returns> private static double[,] Somme(List <DataPosition> data) { int nbrs_position = (data.Count - 1); double[,] tabSomme = new double[2, nbrs_position]; for (int i = 0; i < (nbrs_position); i++) { tabSomme[0, i] = Ax_Generique.CalcSommeAbs(data[i + 1].X, data[i].X); } for (int j = 0; j < (nbrs_position); j++) { tabSomme[1, j] = Ax_Generique.CalcSommeAbs(data[j + 1].Y, data[j].Y); } return(tabSomme); }