zmax is the maximum value of z; t is in seconds. a0c0