Determining TDC (top dead center)