fixed up quantity to get coordinate docs to build
decompose height/distance calculation to avoid weird Quantity behavior reported in #3240
fixed support for Nd arrays, added tests