help on US-100 accuracy

This is the first time I worked with this sensor and the code is the sample code i got. I only added distance=distance-.3; because it became a little more accurate. I tried NewPing library and its not that accurate also. I am hoping for about 0.001" error but it still can’t be that accurate. Any work around how to get the expected result or can suggest another sensor that i can use? Btw im planning to make a foot measuring device so accuracy is important. Thank you in advance. any suggestion is appreciated.

const int trigger1 = 3;
const int echo1 = 2;
float distance1;

void setup(){
  pinMode(trigger1, OUTPUT);
  pinMode(echo1, INPUT);
void loop(){
  digitalWrite(trigger1, LOW);
  digitalWrite(trigger1, HIGH);
  digitalWrite(trigger1, LOW);

  distance1 = pulseIn(echo1, HIGH);
  distance1 = distance1*0.01657;
  distance1 = distance1 / 2.54;
  distance1 = distance1-.3;


This is the table of my tries in the accuracy