Figure 5: Remaining energy computation.