Define distance: ill-conditioned constraint

I can send you all data if you woud like to reproduce it.