Alarm clock based on distance