I suppose this isn't exactly a new feature but it is new to me since I don't travel through tunnels very often. What exactly is the software using when it decides to switch over to night mode when in a tunnel? GPS Location? A light sensor? A combination of both?
Hard to say without knowing which device and firmware version we're talking about, so what follows is my speculation.
I have a Garmin Nuvi which continues navigating in a tunnel, turns and all, despite losing its satellite reception. Mine doesn't switch to night mode, but it clearly knows it is in a tunnel from the map data. Since loss of reception is a given in a tunnel, the device must be dead-reckoning while it's in there. (Re-broadcasting is out because it would affect the signal timing which is key to calculating a fix). In fact, I have tested this by entering a tunnel fast and decelerating once inside it. The device alerted that it had lost reception and continued to display my entry speed, "passing" turnouts and the tunnel exit before I did.
From that, I inferred that the firmware was using map information, possibly cross-checked with loss of satellite lock, to know when I've entered a tunnel.
Recently I was driving in Italy and I realized that this Google Maps feature works more precise in Italy than in my home country Germany.
I tested it a little bit in Italy and I found the following:
- it does not matter if the tunnel is lighted or not, it always goes into night mode
- drive into a tunnel and keep the speed constant through the whole tunnel and it will work perfectly
- accelerate in the tunnel, then it will turn off the night mode too late
- reduce the speed in the tunnel, then it will turn off the night mode too early
- stop in the tunnel for several minutes, then it will turn off night mode after a while and won't turn it on again
From these observations I conclude that in Italy it relies entirely on map data and approximates when you leave the tunnel only by the speed you drove before the tunnel.