Пример #1
0
        public void DataAfterEvaluation(ref List <ExerciceEvaluation> exoEvalList, ref ExerciceEvaluation exo, ref SingletonReeducation ValeurReeducation, ref List <DataPosition> tempData)
        {
            tempDataFilted = new List <DataPosition>();
            if (tempData.Count != 0)
            {
                VitMoy     = 0.0;
                resultDist = 0.0;
                Stra       = 0.0;
                SpeedMet   = 0.0;
                JerkM      = 0.0;
                Ampli      = 0.0;
                Presi      = 0.0;
                VitMax     = 0.0;

                //Filtres
                tempDataFilted = FiltreSurDonnees(exoEvalList, tempDataFilted, ref ValeurReeducation, ref tempData);

                //Calculs

                Calculs(exoEvalList, tempDataFilted, ref ValeurReeducation);

                if (cycleInfo == cycleTot) // Vérifier si la moyenne est complète + RAZ pour next cycle
                {
                    CalculMoyennes();      //On calcule les moyennes

                    if (exoEvalList[0].TypeExercice == ExerciceTypes.Evaluation)
                    {
                        if (exoEvalList[0].TypeEval == ExerciceEvalTypes.Forme)
                        {
                            ExerciceForme ef = (ExerciceForme)exoEvalList[0];
                            if (ef.TypeForme == FormeType.Carré)
                            {
                                exo = new Square(cycleTot, VitMoy, tabVitMoy, VitMax, tabVitMax, SpeedMet, tabSpeedMet, JerkM, tabJerkM, Presi, tabPresi);
                            }

                            else
                            {
                                exo = new Circle(cycleTot, VitMoy, tabVitMoy, VitMax, tabVitMax, SpeedMet, tabSpeedMet, JerkM, tabJerkM, Presi, tabPresi);
                            }
                        }

                        else
                        {
                            ExerciceMouvement ef = (ExerciceMouvement)exoEvalList[0];
                            if (ef.TypeDroite == DroiteType.VerticalLong)//FreeAmpl
                            {
                                exo = new FreeAmplitude(cycleTot, VitMoy, tabVitMoy, VitMax, tabVitMax, SpeedMet, tabSpeedMet, JerkM, tabJerkM, Stra, tabStra, Ampli, tabCoordYMax);
                            }
                            else
                            {
                                exo = new Target(cycleTot, VitMoy, tabVitMoy, VitMax, tabVitMax, SpeedMet, tabSpeedMet, JerkM, tabJerkM, Stra, tabStra, Presi, tabPresi);
                            }
                        }
                    }
                    CleanCycle(ref tempData); //On clean le cycle
                }
            }
        }
Пример #2
0
        private void Calculs(List <ExerciceEvaluation> exoEvalList, List <DataPosition> tempDataFilted, ref SingletonReeducation ValeurReeducation)
        {
            //Calculs
            tabVitMoy[cycleInfo]     = Ax_Vitesse.VitesseMoy(tempDataFilted, ref VitMax, 0.008); // Calc de la vitesse moyenne
            tabVitMax[cycleInfo]     = VitMax;
            tabJerkM[cycleInfo]      = Ax_Vitesse.JerkMet(tempDataFilted, VitMax, 0.008);        // Calc du Jerk
            tabResultDist[cycleInfo] = Ax_Position.Distance(tempDataFilted);                     // Calc de la distance réelle
            tabDoub[0] = tabResultDist[cycleInfo];

            double ampStrain = 0.0;
            double coordYMax = 0.0;

            if (exoEvalList[0].TypeEval == ExerciceEvalTypes.Mouvement)
            {
                ExerciceMouvement ef1 = (ExerciceMouvement)exoEvalList[0];
                if (ef1.TypeDroite == DroiteType.VerticalLong)                              //FreeAmplitude
                {
                    ampStrain = FreeAmplitude.CalAmpliFree(tempDataFilted, ref coordYMax);  // special aller/retour :p
                    tabCoordYMax[cycleInfo] = coordYMax;
                    tabStra[cycleInfo]      = Ax_Position.Straightness(ampStrain, tabDoub); // Calc de la Straightness
                }
                else if (ef1.TypeDroite == DroiteType.Vertical)
                {
                    ampStrain           = Target.CalAmpli(tempDataFilted);              // Calc de l'amplitude
                    tabStra[cycleInfo]  = Ax_Position.Straightness(ampStrain, tabDoub); // Calc de la Straightness
                    tabPresi[cycleInfo] = Target.PresciTarget(tempDataFilted);          // calc precision target droite
                }
            }
            else if (exoEvalList[0].TypeEval == ExerciceEvalTypes.Forme)
            {
                ExerciceForme ef = (ExerciceForme)exoEvalList[0];
                if (ef.TypeForme == FormeType.Cercle)
                {
                    DataPosition centre = new DataPosition(XCENTRE, YCENTRE); // 37.0 46.0
                    double       Rayon  = 4.0;
                    tabPresi[cycleInfo] = Circle.PreciCercle(tempDataFilted, centre, Rayon);
                }
                else
                {
                    DataPosition centre = new DataPosition(XCENTRE, YCENTRE);
                    double       longCot = 6.0, Orientation = 0.0;
                    tabPresi[cycleInfo] = Square.PreciCarre(tempDataFilted, centre, longCot, Orientation);
                }
            }

            tabSpeedMet[cycleInfo] = tabVitMoy[cycleInfo] / tabVitMax[cycleInfo];               // Calc de la Speed Metrique
            cycleInfo++;
        }