Adapted ground template fitting to try different template heights