Transfer cap amount vs time graph to new infrastructure

This commit is contained in:
DarkPhoenix
2019-06-28 19:42:49 +03:00
parent 75ce6ffbcf
commit d448116e91
4 changed files with 61 additions and 60 deletions

View File

@@ -1,15 +0,0 @@
import math
from .base import SmoothGraph
class FitCapAmountVsTimeGraph(SmoothGraph):
def getYForX(self, fit, extraData, time):
if time < 0:
return 0
maxCap = fit.ship.getModifiedItemAttr('capacitorCapacity')
regenTime = fit.ship.getModifiedItemAttr('rechargeRate') / 1000
# https://wiki.eveuniversity.org/Capacitor#Capacitor_recharge_rate
cap = maxCap * (1 + math.exp(5 * -time / regenTime) * -1) ** 2
return cap