Too often people don't understand the difference between a mock charge and a serious charge by elephants. Considering that elephants can run at speed of about 30kmph and higher, unless and untill you are at a distance, the likelihood of outrunning the elephant is slim. Ofcourse, it is a different story if you are in a vehicle.
Raman Sukumar in his book Elephant Days and Nights writes: "The elephant at times does a threat display by fully extending its ears so as to appear even larger, swing its trunk rhythmically, shake its head, or sway its whole body. It may scrape the ground in conjunction with displacement activities, such as gathering mud and grass with its trunk and throwing it over its body"
I am enclosing an image that displays this behaviour. This image was photographed in Bandipur. This elephant was clearly nervous and then kept on coming closer and closer and finally charged at us.
Again quoting from Raman Sukumar "An agitated elephant may run a few paces first towards and then away from the enemy, making trumpeting sounds, in an attempt to scare the intruder. If this fails it may launch a more serious attack - a mock charge culminating in an impressive display within a short distance from the enemy".
In one instance, an elephant was moving downhill and then I chanced upon him on a bend. It displayed similar behaviour, trumpeted and moved a few paces towards us. I reversed. If I would have panicked, then probably while reversing in the narrow winding road, my vehicle would have gone down the cliff into the gorge.
I also agree with Raman Sukumar that most of the times the matriarch is composed where as the younger females charge. He further states that an elephant may charge without any warning or threat display. So it is better to be cautious.