Earth’s gravity accelerates an object in one direction (towards the ground), but it doesn’t decelerate that object in other directions. If an object is traveling horizontally across the Earth, it won’t stop until something other than gravity (usually the ground or air resistance) stops it.
Asteroids are traveling at speeds measured in miles per second before Earth’s gravity starts affecting them. Earth’s gravity will give them additional speed towards the Earth, but that’s not usually enough to change the trajectory so that it hits the ground. The asteroid is still traveling fast enough that it will pass the Earth.
Latest Answers