Yes, it makes no difference to the success of your application whether the relevant grandparent was in the legitimate or illegitimate line of descent.