An analytical formulation of the electromagnetic field generated by lightning return strokes