It doesm't really know where you are. It's just another sound function like brakes, couplers, bell, etc... it just starts at the regular horn tone and it lowers (along with the engine sound) like it would in real life. But it will do it whenever you hit the button.
It will do it on DC too...