An Inverse Problem from sub-Riemannian geometry