A Secure Collision Avoidance Warning Algorithm Based on Environmental Characteristics and Driver Characteristics