as sailingfool said, most
GPS unit have this feature with a programmable threshold for movement. If you get a
GPS with "differential" they're very accurate. I forget what the manufacturers advertise but I've cruised by nav aids entering locals areas and my
gps unit (a
Furuno) showed the navaid a few feet from the boat when it was in fact "a few feet" from the boat.
I have not had to rely on it in the fog but after seeing it perform I would trust it.