Car safety measures

So I am trying to make two devices in a way that when they come close enough together (like 10 feet) they will record the time they will do this. Would I be able to do this with a GPS sensor? If so what other sensors or device will I need to create it.

GPS is slow, and accuracy suffers in canyons (natural, and formed by buildings "urban canyons") - consider your phone GPS - notice how sometimes your position can be off by tens of feet when walking in a city (this is sometimes bad enough to cause driving/walking directions to be wrong, and is something anyone who plays Pokemon Go is intimately familiar with). So this probably isn't a great solution.

Actually, sensing distance between things reasonably accurately is pretty hard. I remember seeing some modules that cost like $70/ea that claimed to do short-range distance sensing somehow, in response to someone else asking a similar question.

In self-driving cars, they often rely on cameras (backed by lots of computational power) and LIDAR. You can get reasonably inexpensive laser ranging sensors on ebay - these might be a better thing to start with. I wonder if you could mount one on a continuous rotation servo to make a really ghetto implementation of LIDAR.

GPS will probably get close enough. One of the things about GPS is even if the absolute accuracy is poor, two nearby GPS's get about the same inaccuracy so the relative error is much lower.

A few years back I saw a NASCAR race on TV. They had an arrow pointing to the car the commentator was talking about and the arrow was pretty tightly stuck to the back right corner of the car. I looked into how they do this and the answer was "GPS". There's a GPS on the camera - actually a pretty good one that gets direction as well as position - and one on the car. As far as I could tell, the one on the car wasn't anything special.

If you're not concerned with 360-degree coverage maybe something like this would do:

When posting product links, it is a good idea to remove the Google advertising tracking information ("gclid").

This is all you need: TFmini-S LiDAR(ToF) Laser Range Sensor - DFRobot

jremington:
When posting product links, it is a good idea to remove the Google advertising tracking information ("gclid").

Oops, sorry. Cleaned up. Thx.

MorganS:
GPS will probably get close enough. One of the things about GPS is even if the absolute accuracy is poor, two nearby GPS's get about the same inaccuracy so the relative error is much lower.

A few years back I saw a NASCAR race on TV. They had an arrow pointing to the car the commentator was talking about and the arrow was pretty tightly stuck to the back right corner of the car. I looked into how they do this and the answer was "GPS". There's a GPS on the camera - actually a pretty good one that gets direction as well as position - and one on the car. As far as I could tell, the one on the car wasn't anything special.

Any chance anyone could send a link to a GPS sensor they would recommend that also is compatible with Arduino?

Pretty much all of these: GPS - SparkFun Electronics

From any product page there, find the tutorials. The tutorial comparing different GPS's was very helpful to me.

How would you go about finding the distance between 2 GPS modules? Would a computer be able to calculate it through software of some sort?

See this page for latitude/longitude navigational formulas.

The standard Arduino does not support double precision floating point calculations, which are required for full accuracy using these formulas.