How did armies know how tall to build their siege towers when besieging cities with walls.
A few methods are noted by ancient writers:
Thucydides wrote: "Their method was as follows: they constructed ladders to reach the top of the enemy's wall, and they did this by calculating the height of the wall from the number of layers of bricks at a point which was facing in their direction and had not been plastered."
Vegetius noted two methods: (a) Shoot an arrow with a light line attached to it to the top of the wall. If it makes it to the top of the wall, the height is found from the length of the line; (b) Measure the shadow of the wall. The ratio of the height of the wall to the length of the shadow is the same as for a stick measured at the same time.
Polybius more mysterious notes that it can be done by mathematics: "the height of any object which stands perpendicular on a plane surface can be taken from a distance, the method of determining it being practicable and easy for anyone who chooses to study mathematics." Less mysteriously, Polybius also suggests using spies.
If the fortification is old and well-known, the height might already be known.