A camera measurement needs an honest ± range
A tape measure is exact enough that nobody asks how wrong it is. A phone camera is not. Accuracy depends on light, on how much texture a surface has and on how far away it is. Plain white walls and dark rooms are hard for AR to track.
So every number in Span comes with a ± range, and the PDF it exports says plainly: “Camera measurements. Accuracy about ±1 cm per metre. Check on site before cutting.” For someone quoting tiles from it, that sentence matters as much as the number.
Where the range comes from
For a length, Span uses about 1 cm of error per metre, and never less than 1 cm:
static func lengthError(_ metres: Float) -> Float {
max(0.01, metres * 0.01)
}This is a starting estimate, not a measured number. The plan is to replace it with real results: measuring ten objects of known size on several phones and recording how far off each one is.
The area range was double
An area’s error comes from the error in its sides. For a rectangle w wide and h tall, it is about w times the error in h, plus h times the error in w. Each pair of opposite sides counts once.
When I compared the app with the design, a 1.24 by 0.92 metre shape showed ±0.05 m², where the design said ±0.02 m². My code walked all four sides of the shape and added each one, which counted every pair twice. The fix was to halve the total:
for index in points.indices {
let side = simd_distance(points[index], points[(index + 1) % points.count])
total += side * lengthError(side)
}
return total / 2A unit test now pins the design’s example to its number. Nothing crashed, nothing looked broken, and the range was simply twice as pessimistic as it should have been. Comparing against a known answer was the only way to see it.
Drift
Points can also move after they are placed, as AR refines its picture of the room. Span records how far each point has drifted, and warns when any point has moved 1.5 cm or more. The design showed this warning with numbers that did not quite match its own drawing, so the debug screen uses a true 2 cm movement, and the app computes the result from the positions instead of copying the design’s figure.
The first real test
When I tested on my iPhone, it picked up edges correctly, and lengths came out about 1 to 2 cm off. That is in line with the estimate, but it is one person’s first impression, not the accuracy table. Until that table exists, the ± range is the most honest thing the app can show.