@spiceErrorCheck<EOL>def gfrefn(t1, t2, s1, s2):
t1 = ctypes.c_double(t1)<EOL>t2 = ctypes.c_double(t2)<EOL>s1 = ctypes.c_int(s1)<EOL>s2 = ctypes.c_int(s2)<EOL>t = ctypes.c_double()<EOL>libspice.gfrefn_c(t1, t2, s1, s2, ctypes.byref(t))<EOL>return t.value<EOL>
For those times when we can't do better, we use a bisection
method to find the next time at which to test for state change.

http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrefn_c.html

:param t1: One of two values bracketing a state change.
:type t1: float
:param t2: The other value that brackets a state change.
:type t2: float
:param s1: State at t1.
:type s1: bool
:param s2: State at t2.
:type s2: bool
:return: New value at which to check for transition.
:rtype: float