Unlocking a lock when gps location of the lock and gps location of the device_tracker is less than

I had an idea, maybe it’s not a smart idea, but still, I want to see if this can be achieved.

Given:

  • a device_tracker on a person (phone location, car location, …)
  • zone.home
    OR
  • a device_tracker on a person (the phone)
  • a device_tracker in a car

When the distance between the gps location for device_tracker and the car is less than (eg) 20 meters, the car unlocks.

Has anyone tried this?