1. A computer implemented method of estimating error in distance measurements, the computer implemented method comprising: by a processor, learning a function based on features representing aspects of a training waveform transmitted between training wireless devices under a line-of-sight (LOS) condition or non-line-of-sight (NLOS) condition and a true distance between the training wireless devices, wherein the features represent signal features of the training waveform that distinguish between the LOS and NLOS conditions and wherein learning the function includes accessing data in a training database including the features and corresponding classifications of the LOS condition or NLOS condition; by the processor, estimating error in a distance measurement by evaluating the function for a feature vector extracted from a waveform received at a first wireless device from a second wireless device to determine distance estimation error information of a distance estimate between the first and second wireless devices, wherein signal features of the waveform that distinguish between the LOS and NLOS conditions compose the feature vector; and by the processor, using the distance estimation error information to mitigate error in the distance estimate to improve accuracy of the distance estimate.