A new approach to calculating endurance in electric flight and comparing fuel cells and batteries