There is a good YouTube video about how a German VW TDI owner and professional hacker who got into his ECU and found the code that detected the EU driving cycle by being with a tight distance and speed tolerance, and with the later added check of steering movement determined which emissions profile to apply.
He also found similar firmware in an Opel diesel car that integrated speed x distance in each gear to do the same.
Two years ago I never would have thought any company would take such a massive risk, especially German, and especially VW who had a previous history of withdrawing TDIs from the strict California market in years where they could not comply with NOx; 2000 and 2004 for example.
I studied alternative fuel for diesels in uni (Canterbury) and have been pro-diesel till recently but it seems they are never going to get it right before they all have to disappear due to GG emissions.