Function should_slow_down

Source
fn should_slow_down(
    my_pilot_pos: &Vec2<f32>,
    my_pilot_velocity: f32,
    my_pilot_dist_to_docking_target: f32,
    next_pilot_pos: &Vec2<f32>,
    next_pilot_velocity: f32,
    next_pilot_dist_to_docking_target: f32,
    next_pilot_to_docking_target_trend: &DistanceTrend,
) -> bool
Expand description

My pilot should slow down if the pilot ahead is moving towards my target docking position and the ratio of next pilot velocity over my velocity is less than a threshold (i.e. the next pilot is moving slower than my pilot), and the distance between the next pilot and my pilot is less than some fraction of the standard airship spacing, and the distance between my pilot and my docking target position is greater than the distance between the next pilot and my docking target position (i.e. the next pilot is inside my radius from my target docking position).