Distance between arduinos

I have a code that works pretty well, just to measure the distance between one beacon and teh receiver, but when i try to introduce more staff, like the sound speed as a function of temperature the distance measure is awfull.

You said these beacons are indoors. Just how much does the indoor temperature vary? Just how much change in speed does that variation cause?