It will be based on a speed read by all four wheels using esp wheel speed sensons, (but im pretty sure it only use's the back two as the wheels are turning at different speeds when cornering) which information is sent to the esp unit and eventually relayed to the dials you see in front of you. There is no such things as ' an analogue speedo' as both the dial and the matrix screen (between the dials) both received precisely the same digital information, analogue would refer to a cable driven system, digital is highly reliable and accurate.
This information would also be used to activate the 'active rear spoiler' as it would also received the same data. by the time it rises and you look back 97-98 is probably your shown speed on the dials infront of you.
As will gps, the car does not use speed data from the gps system, but it does take certain information from it.
Hope this helps.