Your dog is much smarter than you give him credit for, if you have a timely daily routine which you follow to the T. Your dog is able to sit and swat that routine down to the very timing. Your dog will know when you are about to leave and when he/she should expect you home. We can go further as to say your dog knows your unique sound. Let's say you have a particular kind of Motor car which revs a particular sound, you dog is able to distinguish between the sound and look out for your car before you even turn that bend towards your home. But the most powerful tool a dog uses to tell when you are nearly home is his nose.
The dog's nose is a powerful piece of organ there sitting between it's eyes. A dog can sniff out a dead carcass over half mile away. Male dogs even get wiled up when they sniff the female pheromones that are even two and a half miles away. Put that in your pot and cook it! Dogs have a magnificent ability to interpret information by scent. They know what you smell like, (natural odor) they know what perfume you wore out today, they even know what under and inside your car smells like. Your dog will know when you are nearly home by simply sniffing the air, the more powerful your scent is to the dog, the nearer he knows you are.