Пример #1
0
        private bool IsSpinningWheels(LogSampleGroup drv)
        {
            var wheelSpeedLF = drv.ReadAs <float>("TyreSpeedLF") * 0.327 * -3.6; // speed*radius*3.6 in km/h
            var wheelSpeedRF = drv.ReadAs <float>("TyreSpeedRF") * 0.327 * -3.6;
            var wheelSpeedLR = drv.ReadAs <float>("TyreSpeedLR") * 0.328 * -3.6;
            var wheelSpeedRR = drv.ReadAs <float>("TyreSpeedRR") * 0.328 * -3.6;
            var speed        = drv.ReadAs <float>("Speed") * 3.6;

            var factorLF = wheelSpeedLF / speed;
            var factorRF = wheelSpeedRF / speed;
            var factorLR = wheelSpeedLR / speed;
            var factorRR = wheelSpeedRR / speed;

            //if (factorLF > 1.2 && (wheelSpeedLF - speed) > 20) return true;
            //if (factorRF > 1.2 && (wheelSpeedRF - speed) > 20) return true;

            // only check on driven wheels
            if (factorLR > 1.2 && (wheelSpeedLR - speed) > 20)
            {
                return(true);
            }
            if (factorRR > 1.2 && (wheelSpeedRR - speed) > 20)
            {
                return(true);
            }
            return(false);
        }
Пример #2
0
        private bool IsLockingWheels(LogSampleGroup drv)
        {
            var wheelSpeedLF = drv.ReadAs <float>("TyreSpeedLF") * 0.327 * -3.6; // speed*radius*3.6 in km/h
            var wheelSpeedRF = drv.ReadAs <float>("TyreSpeedRF") * 0.327 * -3.6;
            var wheelSpeedLR = drv.ReadAs <float>("TyreSpeedLR") * 0.328 * -3.6;
            var wheelSpeedRR = drv.ReadAs <float>("TyreSpeedRR") * 0.328 * -3.6;
            var speed        = drv.ReadAs <float>("Speed") * 3.6;

            var factorLF = wheelSpeedLF / speed;
            var factorRF = wheelSpeedRF / speed;
            var factorLR = wheelSpeedLR / speed;
            var factorRR = wheelSpeedRR / speed;

            if (factorLF < 0.85 && (speed - wheelSpeedLF) > 10)
            {
                return(true);
            }
            if (factorRF < 0.85 && (speed - wheelSpeedRF) > 10)
            {
                return(true);
            }
            if (factorLR < 0.85 && (speed - wheelSpeedLR) > 10)
            {
                return(true);
            }
            if (factorRR < 0.85 && (speed - wheelSpeedRR) > 10)
            {
                return(true);
            }
            return(false);
        }
Пример #3
0
        private bool IsLockingWheels(LogSampleGroup drv)
        {
            var wheelSpeedLF = drv.ReadAs<float>("TyreSpeedLF")*0.327*-3.6; // speed*radius*3.6 in km/h
            var wheelSpeedRF = drv.ReadAs<float>("TyreSpeedRF")*0.327*-3.6;
            var wheelSpeedLR = drv.ReadAs<float>("TyreSpeedLR")*0.328*-3.6;
            var wheelSpeedRR = drv.ReadAs<float>("TyreSpeedRR")*0.328*-3.6;
            var speed = drv.ReadAs<float>("Speed")*3.6;

            var factorLF = wheelSpeedLF/speed;
            var factorRF = wheelSpeedRF/speed;
            var factorLR = wheelSpeedLR/speed;
            var factorRR = wheelSpeedRR/speed;

            if (factorLF < 0.85 && (speed - wheelSpeedLF) > 10) return true;
            if (factorRF < 0.85 && (speed - wheelSpeedRF) > 10) return true;
            if (factorLR < 0.85 && (speed - wheelSpeedLR) > 10) return true;
            if (factorRR < 0.85 && (speed - wheelSpeedRR) > 10) return true;
            return false;
        }
Пример #4
0
        private bool IsSpinningWheels(LogSampleGroup drv)
        {
            var wheelSpeedLF = drv.ReadAs<float>("TyreSpeedLF") * 0.327 * -3.6; // speed*radius*3.6 in km/h
            var wheelSpeedRF = drv.ReadAs<float>("TyreSpeedRF") * 0.327 * -3.6;
            var wheelSpeedLR = drv.ReadAs<float>("TyreSpeedLR") * 0.328 * -3.6;
            var wheelSpeedRR = drv.ReadAs<float>("TyreSpeedRR") * 0.328 * -3.6;
            var speed = drv.ReadAs<float>("Speed") * 3.6;

            var factorLF = wheelSpeedLF / speed;
            var factorRF = wheelSpeedRF / speed;
            var factorLR = wheelSpeedLR / speed;
            var factorRR = wheelSpeedRR / speed;

            //if (factorLF > 1.2 && (wheelSpeedLF - speed) > 20) return true;
            //if (factorRF > 1.2 && (wheelSpeedRF - speed) > 20) return true;

            // only check on driven wheels
            if (factorLR > 1.2 && (wheelSpeedLR - speed) > 20) return true;
            if (factorRR > 1.2 && (wheelSpeedRR - speed) > 20) return true;
            return false;
        }