Changed fitting of ground profile to use line scans