Skip to content

Commit

Permalink
Bug fix: battery failure function
Browse files Browse the repository at this point in the history
  • Loading branch information
n-akram committed Oct 4, 2023
1 parent 610fa84 commit d8f707f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SafeDrones/core/SafeDrones.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def Battery_Failure_Risk_Calc(self, BatteryLevel=None, time=None, Lambda = None,
else:
P_Fail = 1
MTTF = 0
return P_Fail, MTTF

P0_Battery = P0_Battery.astype(np.float64)

Expand All @@ -521,7 +522,9 @@ def Battery_Failure_Risk_Calc(self, BatteryLevel=None, time=None, Lambda = None,
[ L, 0, L, 0, L, 0, 0, 0]], dtype=np.float64)


P_Battery1 = sym.exp(M_Battery*np.float64(t))*P0_Battery
# P_Battery1 = sym.exp(M_Battery*np.float64(t))*P0_Battery
P_Battery1 = expm(M_Battery*np.float64(time))*P0_Battery


P_Battery_Fail = P_Battery1[-1] + P_Battery1[-2]

Expand Down

0 comments on commit d8f707f

Please sign in to comment.