关于机动车刹车制动距离问题讨论

机动车刹车制动距离问题

速度km/h2030405060708090100110120130140150
速度m/s5.68.311.113.916.619.422.22527.830.633.336.138.941.7
制动距离3.157.0812.5919.6828.3438.5750.463.7578.7195.22113.29132.93154.12176.87

假设驾驶员的反应时间为10s,安全距离为10 m。请问:

1.根据某驾驶员的实际视力和视觉习惯,其驾驶时的有效视距为120 m,则其在该路面行车时,时速最高不能超过多少(结果取整)?

2.若以表中数据为参考,设计一条最高时速为125 km/h的高速公路则设计人员应该保证驾驶者在公路上任一点的可视距离为多少米?

用matlab实现

% 已知数据
speed = [20 30 40 50 60 70 80 90 100 110 120 130 140 150]; % km/h
distance = [3.15 7.08 12.59 19.68 28.34 38.57 50.4 63.75 78.71 95.22 113.29 132.93 154.12 176.87]; % m
time = 10; % s
safedistance = 10; % m

% 将速度转换为m/s
speed = speed * 1000 / 3600;

% 计算总停车距离
alldistance = speed * time + distance + safedistance;

% 问题1: 在有效视距120m内的最高速度
topspeedindex = find(alldistance <= 120, 1, 'last');
topspeed = speed(topspeedindex) * 3600 / 1000; % 转换回km/h
fprintf('在有效视距120m内的最高速度为: %.2f km/h\n', topspeed);

% 问题2: 在125km/h时需要的可视距离
% 插值找到125km/h时的制动距离
distance_125 = interp1(speed, distance, 125*1000/3600, 'linear', 'extrap');
% 计算总停车距离
alldistance_125 = 125 * 1000 / 3600 * time + distance_125 + safedistance;
fprintf('在125km/h时需要的可视距离为: %.2f m\n', alldistance_125);
在有效视距120m内的最高速度为: 30.00 km/h
在125km/h时需要的可视距离为: 480.33 m

用java实现

public class DrivingDistanceCalculator {

    private static final double[] speeds = {20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150};
    private static final double[] brakingDistances = {3.15, 7.08, 12.59, 19.68, 28.34, 38.57, 50.4, 63.75, 78.71, 95.22, 113.29, 132.93, 154.12, 176.87};
    private static final double reactionTime = 10;  // in seconds
    private static final double safetyDistance = 10;  // in meters

    public static void main(String[] args) {
        double effectiveVisionDistance = 120;  // in meters
       System.out.println("1. 在有效视距120m内的最高速度为: " + getMaxSpeed(effectiveVisionDistance) + " km/h.");

        double maxHighwaySpeed = 125;  // in km/h
        System.out.println("2. 在125km/h时需要的可视距离为: " + getVisibilityDistance(maxHighwaySpeed) + " meters.");
    }

    public static int getMaxSpeed(double visionDistance) {
        for (int i = speeds.length - 1; i >= 0; i--) {
            double totalDistance = safetyDistance + brakingDistances[i] + speeds[i] * reactionTime / 3.6;  // converting speed from km/h to m/s
            if (totalDistance <= visionDistance) {
                return (int) speeds[i];
            }
        }
        return 0;  // If the speed that meets the criteria is not found, return 0.
    }

    public static double getVisibilityDistance(double maxHighwaySpeed) {
        double brakingDistance = interp1(speeds, brakingDistances, maxHighwaySpeed, true);
        return safetyDistance + brakingDistance + maxHighwaySpeed * reactionTime / 3.6;
    }

    public static Double interp1(double[] X, double[] V, double Xq, boolean extrap) {
        for (int i = 0; i < X.length - 1; i++) {
            if ((Xq >= X[i] && Xq <= X[i + 1]) || (extrap && i == X.length - 2)) {
                return V[i] + (Xq - X[i]) * (V[i + 1] - V[i]) / (X[i + 1] - X[i]);
            }
        }
        return extrap ? V[V.length - 1] + (Xq - X[X.length - 1]) * (V[V.length - 1] - V[V.length - 2]) / (X[X.length - 1] - X[X.length - 2]) : null;
    }
}

运行结果

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值