Esempio n. 1
0
        /// <summary>
        /// Creates motor driven axle class instance
        /// - sets TransmissionEfficiency to 0.99 (99%)
        /// - sets SlipWarningThresholdPercent to 70%
        /// - sets axle DriveType to MotorDriven
        /// - updates totalInertiaKgm2 parameter
        /// </summary>
        /// <param name="electricMotor">Electric motor connected with the axle</param>
        public Axle(ElectricMotor electricMotor)
        {
            motor = electricMotor;
            motor.AxleConnected    = this;
            transmissionEfficiency = 0.99f;
            driveType = AxleDriveType.MotorDriven;
            AxleRevolutionsInt.IsLimited = true;
            Adhesion2 = 0.331455f;

            switch (driveType)
            {
            case AxleDriveType.NotDriven:
                totalInertiaKgm2 = inertiaKgm2;
                break;

            case AxleDriveType.MotorDriven:
                AxleRevolutionsInt.Max = 5000.0f;
                AxleRevolutionsInt.Min = -5000.0f;
                totalInertiaKgm2       = inertiaKgm2 + transmissionRatio * transmissionRatio * motor.InertiaKgm2;
                break;

            case AxleDriveType.ForceDriven:
                AxleRevolutionsInt.Max = 100.0f;
                AxleRevolutionsInt.Min = -100.0f;
                totalInertiaKgm2       = inertiaKgm2;
                break;

            default:
                totalInertiaKgm2 = inertiaKgm2;
                break;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Nonparametric constructor of Axle class instance
        /// - sets motor parameter to null
        /// - sets TtransmissionEfficiency to 0.99 (99%)
        /// - sets SlipWarningThresholdPercent to 70%
        /// - sets axle DriveType to ForceDriven
        /// - updates totalInertiaKgm2 parameter
        /// </summary>
        public Axle()
        {
            transmissionEfficiency     = 0.99f;
            SlipWarningTresholdPercent = 70.0f;
            driveType = AxleDriveType.ForceDriven;
            AxleRevolutionsInt.IsLimited = true;
            Adhesion2 = 0.331455f;

            switch (driveType)
            {
            case AxleDriveType.NotDriven:
                break;

            case AxleDriveType.MotorDriven:
                AxleRevolutionsInt.Max = 5000.0f;
                AxleRevolutionsInt.Min = -5000.0f;
                totalInertiaKgm2       = inertiaKgm2 + transmissionRatio * transmissionRatio * motor.InertiaKgm2;
                break;

            case AxleDriveType.ForceDriven:
                AxleRevolutionsInt.Max = 1000.0f;
                AxleRevolutionsInt.Min = -1000.0f;
                totalInertiaKgm2       = inertiaKgm2;
                break;

            default:
                totalInertiaKgm2 = inertiaKgm2;
                break;
            }
        }