Using Real-Time Dynamic Prediction to Implement IoV-Based Collision Avoidance