Do that hundreds or thousands of times and you eventually get Z height.
Look up the EufyMake E1 for a consumer/prosumer version.