Pat needs to determine the height of a tree before cutting it down to be sure that it will not fall on a nearby fence. The angle of elevation of the tree from one position on a flat path from the tree is $30^{\circ}$, and from a second position 40 feet farther along this path it is $20^{\circ} .$ What is the height of the tree?