A snippet from my calibration experience of
5th wheel speed and distance measuring system . Here is a critical application to get the circumference right since it's a measuring device, but same can be used for a bike if you want that kind of precision (yet the instrument may be lacking)
So the best way to measure rolling radius and circumference is by rolling it while loaded the same as any ride of yours. Find a straight section of road and mark the biggest distance you can with a tape measure. (I've pinpointed by GPS 2km with +- 50mm accuracy and permanently planted two nails as a reference and install optical barriers at those locations). So go 50m or 100 or 200 or whatever you can measure accurate with a tape measure or laser rangefinder or ....
Setup for start with the wheel at start line. (for the 5th wheel device, i start a few meter behind since the optical barrier is the trigger that starts and stops the measuring). Ride in a straight line until past finish line. The speed sensor from the fifth wheel gives exactly 1000 impulses/ revolution. So between the two points exactly 2km apart I have a set number of impulses and calibrating consists in associating a set number of impulses for each meter. So the math is simple here.
Now since a bike owner will not have optical barriers nor a specialized encoder to measure the angle of the wheel, you need a reference value first. Wrap a tailors tape around the center and find an approximate initial circumference (let's say you measure 2110mm). Then carefully setup the wheel with valve stem down (even better is to add some marks with a sharpie or white corrector paint on the tyre itself). Start rolling from the start those 100m and carefully stop the tyre in the same position with the mark down near the 100m mark. So make another mark. Now you know a number of complete revolutions will get you that distance (100m plus something small where the tyre stopped.. measure with a ruler or tape measure that distance. so let's say you stopped 1m longer at 101m final distance)
The question is how many revolutions were done? (one could count by riding, or setting a video camera or use some math: divide those 101m by the initial circumference known of 2.110m =47.87 revolutions.. so the nearest is 48 revolutions in this case)
Divide the distance to the exact number of revolutions 101/48=2.1042m
Be very careful in identifying the correct number of revolutions, since a bad initial measurement may throw the calculus by as much of one revolution. The longer the distance the more chance you have to miscount the number of revolutions if using the initial measurement math determination.
Another approach you can use is just calculating the % calibration needed between a trusty indicator and the one you want to calibrate.
A good indication is the normal GPS in any phone. At constant speed will get a a very accurate reading in regards of speed. So you can go with that.
Set the cyclo-computer to whatever circumference.. let's say 2200mm and ride in a straight line with constant higher speed.. let's say above 25km/h. Check that speed is stable as both the speedo and the gps speed should not fluctuate. Take note of those two values. So the gps was saying 26.4km/h and the speedo said 29.3km/h with the initial value of 2200mm in the speedo for circumference. So this number must be shaved down by 26.4/29.3=90.1024% of the intial value.. so 0.901024*2200=1928.25mm
For all intents the last method is by far the easiest and one of the most accurate for a bike.