def ts(self, n):
try:<EOL><INDENT>root1, root2 = solve_quadratic(self.slope / <NUM_LIT>, self.minrps, -n)<EOL><DEDENT>except ZeroDivisionError:<EOL><INDENT>root2 = float(n) / self.minrps<EOL><DEDENT>return int(root2 * <NUM_LIT:1000>)<EOL>
:param n: number of charge
:return: when to shoot nth charge, milliseconds