Terrestrial gamma-ray flashes from storm to satellite