Ejemplo n.º 1
0
    private void Setup_values()
    {
        interpolated_rpms = Calculation_formulas.Interpolated_x(
            options.Get_list_rpm(), options.interpolation);
        interpolated_moments = Calculation_formulas.Interpolated_y(
            options.Get_list_rpm(), options.Get_list_moment(), interpolated_rpms);
        for (int i = 0; i < interpolated_moments.Count; i++)
        {
            interpolated_moments[i] /= options.lever_length;
        }
        interpolated_consumtions = Calculation_formulas.Interpolated_y(
            options.Get_list_rpm(), options.Get_list_consumption(), interpolated_rpms);
        for (int i = 0; i < interpolated_consumtions.Count; i++)
        {
            interpolated_consumtions[i] /= 3600f;
        }

        engine_state = false;
        rpm          = 0;
        rpm_old      = 0;
        load_state   = false;

        gauge_rpm.Set_max_value(7000f);
        gauge_p.Set_max_value(options.max_moment / options.lever_length);
        gauge_load.Set_max_value(options.max_moment / options.lever_length);
        temperature.Heat_time_set(options.heat_time);
    }
Ejemplo n.º 2
0
    public void Calculate_graphs(Engine_options options, int graph_num)
    {
        List <int> label_x = options.Get_list_rpm();

        interpolation  = options.interpolation;
        interpolated_x = Calculation_formulas.Interpolated_x(
            options.Get_list_rpm(), interpolation);

        switch (graph_num)
        {
        case 0:
            Moment_graphs(label_x, options.Get_list_moment());
            break;

        case 1:
            Consumption_graphs(label_x, options.Get_list_consumption());
            break;

        case 2:
            Moment_graphs(label_x, options.Get_list_moment());
            Consumption_graphs(label_x, options.Get_list_consumption());
            break;
        }
        Moment_and_consumption_graph(label_x, options.Get_list_moment(), options.Get_list_consumption());
        Graph_change(dropdown.value);
    }