Ejemplo n.º 1
0
        private void plot_xysum_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double y = 0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                double x = events[i].ts + delay;
                y += events[i].lastx;
                update_minmax(x, y);
                main_comp.Add(x, y);
            }

            y = 0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                double x = events[i].ts + delay;
                y += events[i].lasty;
                update_minmax(x, y);
                sec_comp.Add(x, y);
            }
        }
Ejemplo n.º 2
0
        private void plot_yvelocity_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            if (mlog.Cpi > 0)
            {
                for (int i = last_start; i <= last_end; i++)
                {
                    if (events[i].hDevice != mlog.hDevice)
                    {
                        continue;
                    }

                    double x = events[i].ts + delay;
                    double y;
                    if (i == 0)
                    {
                        y = 0.0;
                    }
                    else
                    {
                        y = (events[i].lasty) / (events[i].ts - events[i].lastts) / mlog.Cpi * 25.4;
                    }

                    update_minmax(x, y);
                    main_comp.Add(x, y);
                }
            }
            else
            {
                MessageBox.Show("CPI value is invalid, please run Measure");
            }
        }
Ejemplo n.º 3
0
 private void ResetPlotComponents()
 {
     BlueComponent = new GraphComponents(OxyColors.Blue);
     RedComponent  = new GraphComponents(OxyColors.Red);
     if (dual)
     {
         GreenComponent  = new GraphComponents(OxyColors.Green);
         YellowComponent = new GraphComponents(OxyColors.Orange);
     }
 }
Ejemplo n.º 4
0
        private void plot_x_vs_y(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double x = 0.0;
            double y = 0.0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                x += events[i].lastx;
                y += events[i].lasty;
                update_minmax(x, x);
                update_minmax(y, y);
                main_comp.Add(x, y, false);
            }
        }
Ejemplo n.º 5
0
        private void plot_frequency_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                double x = events[i].ts;
                double y;
                if (i == 0)
                {
                    y = 0.0;
                }
                else
                {
                    y = 1000.0 / (events[i].ts - events[i].lastts);
                }

                update_minmax(x, y);
                main_comp.Add(x, y);
            }
        }
Ejemplo n.º 6
0
 private void ResetPlotComponents()
 {
     BlueComponent = new GraphComponents(OxyColors.Blue);
     RedComponent = new GraphComponents(OxyColors.Red);
     if (dual)
     {
         GreenComponent = new GraphComponents(OxyColors.Green);
         YellowComponent = new GraphComponents(OxyColors.Orange);
     }
 }
Ejemplo n.º 7
0
        private void plot_yvelocity_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            if (mlog.Cpi > 0)
            {
                for (int i = last_start; i <= last_end; i++)
                {
                    if (events[i].hDevice != mlog.hDevice)
                        continue;

                    double x = events[i].ts + delay;
                    double y;
                    if (i == 0)
                        y = 0.0;
                    else
                        y = (events[i].lasty) / (events[i].ts - events[i].lastts) / mlog.Cpi * 25.4;

                    update_minmax(x, y);
                    main_comp.Add(x, y);
                }
            }
            else
                MessageBox.Show("CPI value is invalid, please run Measure");
        }
Ejemplo n.º 8
0
        private void plot_ysum_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double y = 0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                    continue;

                double x = events[i].ts + delay;
                y += events[i].lasty;
                update_minmax(x, y);
                main_comp.Add(x, y);
            }
        }
Ejemplo n.º 9
0
        private void plot_x_vs_y(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double x = 0.0;
            double y = 0.0;
            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                    continue;

                x += events[i].lastx;
                y += events[i].lasty;
                update_minmax(x, x);
                update_minmax(y, y);
                main_comp.Add(x, y, false);
            }
        }
Ejemplo n.º 10
0
        private void plot_interval_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                    continue;

                double x = events[i].ts;
                double y;
                if (i == 0)
                    y = 0.0;
                else
                    y = events[i].ts - events[i].lastts;

                update_minmax(x, y);
                main_comp.Add(x, y);
            }
        }